gem5 v24.0.0.0
Loading...
Searching...
No Matches
gem5::backdoor_manager_test Namespace Reference

Classes

class  BackdoorManagerTest
 

Functions

 TEST_F (BackdoorManagerTest, BasicRemapTest)
 
 TEST_F (BackdoorManagerTest, ShrinkTest)
 
 TEST_F (BackdoorManagerTest, ReuseTest)
 

Variables

const std::vector< AddrRangekOriginalRange ({AddrRange(0x0, 0x1000)})
 
const std::vector< AddrRangekRemappedRange ({AddrRange(0x1000, 0x2000)})
 

Function Documentation

◆ TEST_F() [1/3]

gem5::backdoor_manager_test::TEST_F ( BackdoorManagerTest ,
BasicRemapTest  )

The backdoor range is remappedRanges[0], and should be reverted into originalRanges[0].

After the target backdoor is invalidated, the new created backdoor should be freed and removed from the backdoor list.

Definition at line 51 of file backdoor_manager.test.cc.

References gem5::MemBackdoor::invalidate(), gem5::MemBackdoor::ptr(), and gem5::MemBackdoor::range().

◆ TEST_F() [2/3]

gem5::backdoor_manager_test::TEST_F ( BackdoorManagerTest ,
ReuseTest  )

The two packets have different address range, but both contained in the original address range.

The address range of the backdoor covers the whole address range, so both packets can be fulfilled by this backdoor.

For the first packet, a new backdoor should be constructed.

For the second packet, it should return the same backdoor as previous one, and no new backdoor should be constructed.

Definition at line 103 of file backdoor_manager.test.cc.

References gem5::MemBackdoor::invalidate().

◆ TEST_F() [3/3]

gem5::backdoor_manager_test::TEST_F ( BackdoorManagerTest ,
ShrinkTest  )

The backdoor range is larger than the address remapper's address range. Backdoor is expected to be shrinked.

Definition at line 78 of file backdoor_manager.test.cc.

References gem5::MemBackdoor::invalidate(), gem5::MemBackdoor::ptr(), and gem5::MemBackdoor::range().

Variable Documentation

◆ kOriginalRange

const std::vector< AddrRange > gem5::backdoor_manager_test::kOriginalRange({AddrRange(0x0, 0x1000)}) ( {AddrRange(0x0, 0x1000)} )

◆ kRemappedRange

const std::vector< AddrRange > gem5::backdoor_manager_test::kRemappedRange({AddrRange(0x1000, 0x2000)}) ( {AddrRange(0x1000, 0x2000)} )

Generated on Tue Jun 18 2024 16:24:18 for gem5 by doxygen 1.11.0