Class simtix::system::SingleCoreSystem
ClassList > simtix > system > SingleCoreSystem
Inherits the following classes: simtix::system::BaseSystem
Classes
Type | Name |
---|---|
struct | Config |
Public Functions
Type | Name |
---|---|
virtual int | Initialize () override Initialize all components in the system. |
virtual int | PeekMemory (uint8_t * data, uint64_t addr, std::size_t size) override Peek into memory content. |
virtual int | PreloadMemory (const uint8_t * data, uint64_t addr, std::size_t size) override Preload memory with data. |
virtual uint64_t | Run (uint64_t ticks) override Run the system for a given number of ticks. |
SingleCoreSystem (const Config & cfg) |
|
SingleCoreSystem (const SingleCoreSystem &) = delete |
|
virtual void | TearDown () override Tear down the system and release resources. |
bool | initialized () const |
SingleCoreSystem & | operator= (const SingleCoreSystem &) = delete |
BaseSM & | sm () |
const std::shared_ptr< stat::Group > | stat () const |
TaskDispatcher & | td () |
~SingleCoreSystem () |
Public Functions inherited from simtix::system::BaseSystem
See simtix::system::BaseSystem
Type | Name |
---|---|
BaseSystem () = default |
|
virtual int | Initialize () = 0 Initialize all components in the system. |
virtual int | PeekMemory (uint8_t * data, uint64_t addr, std::size_t size) = 0 Peek into memory content. |
virtual int | PreloadMemory (const uint8_t * data, uint64_t addr, std::size_t size) = 0 Preload memory with data. |
virtual uint64_t | Run (uint64_t ticks) = 0 Run the system for a given number of ticks. |
virtual void | TearDown () = 0 Tear down the system and release resources. |
virtual | ~BaseSystem () = default |
Protected Attributes
Type | Name |
---|---|
Config | cfg_ |
mem::NBHBCache * | dcache_ = nullptr |
mem::NBHBCache * | icache_ = nullptr |
bool | initialized_ = false |
mem::BankedMemory * | lmem_ = nullptr |
std::vector< mem::MemoryInterface * > | mems_ |
BaseSM * | sm_ = nullptr |
std::shared_ptr< SingleCoreSystemStat > | stat_ |
TaskDispatcher * | td_ = nullptr |
mem::XBar * | xbar_ = nullptr |
Public Functions Documentation
function Initialize
Initialize all components in the system.
Returns:
0 if successful, non-zero otherwise. After the system is instantiated, the simulator should use this method to initialize all the components in the system.
Implements simtix::system::BaseSystem::Initialize
function PeekMemory
Peek into memory content.
virtual int simtix::system::SingleCoreSystem::PeekMemory (
uint8_t * data,
uint64_t addr,
std::size_t size
) override
Parameters:
data
Pointer to the buffer to store the memory content.addr
Starting address in memory.size
Size of the memory region to peek.
Returns:
0 if successful, non-zero otherwise.
During or after simulation, simulator can use this method to peek the memory content. This is useful for dumping the memory to check the simulation result.
Implements simtix::system::BaseSystem::PeekMemory
function PreloadMemory
Preload memory with data.
virtual int simtix::system::SingleCoreSystem::PreloadMemory (
const uint8_t * data,
uint64_t addr,
std::size_t size
) override
Parameters:
data
Pointer to the data to preload.addr
Starting address in memory.size
Size of the data to preload.
Returns:
0 if successful, non-zero otherwise.
Simulator can preload the memory with this method. Note that this can only be called after the system is initialized.
Implements simtix::system::BaseSystem::PreloadMemory
function Run
Run the system for a given number of ticks.
Parameters:
ticks
Number of ticks to run.
Returns:
Remaining ticks if the system halts early, otherwise 0.
Run a given number of ticks. This method can stop early when the system halts normally because there is not any busy component. The return value indicates the remaining ticks, that is, if the system stops earlier, the returned value would be positive.
Implements simtix::system::BaseSystem::Run
function SingleCoreSystem [1/2]
function SingleCoreSystem [2/2]
function TearDown
Tear down the system and release resources.
Implements simtix::system::BaseSystem::TearDown
function initialized
function operator=
SingleCoreSystem & simtix::system::SingleCoreSystem::operator= (
const SingleCoreSystem &
) = delete
function sm
function stat
function td
function ~SingleCoreSystem
Protected Attributes Documentation
variable cfg_
variable dcache_
variable icache_
variable initialized_
variable lmem_
variable mems_
variable sm_
variable stat_
variable td_
variable xbar_
The documentation for this class was generated from the following file projects/simtix/include/simtix/system.h