ParaNut SystemC Model
A SystemC Model of the ParaNut architecture
|
ParaNut simulation system and control. More...
Classes | |
class | MParaNutSystem |
Complete ParaNut System ready for simulation. More... | |
Constructor / Destructor... | |
MParaNutSystem::MParaNutSystem (const int argc, char *argv[]) | |
Create and elablorate the System. More... | |
MParaNutSystem::~MParaNutSystem () | |
Destructor destroying all runtime objects. More... | |
System Construction... | |
void | MParaNutSystem::AddSlave (TWord start_adr, size_t size, MPeripheral *slave) |
Add a slave peripheral to the ParaNut System. More... | |
void | MParaNutSystem::AddInterrupt (TWord index, sc_out< bool > *port) |
Add a slave port to the ParaNut Systems internal interrupt input signals. More... | |
void | MParaNutSystem::AddSlave (TWord start_adr, size_t size, sc_in_clk *wb_clk_i, sc_in< bool > *wb_rst_i, sc_in< bool > *wb_stb_i, sc_in< bool > *wb_cyc_i, sc_in< bool > *wb_we_i, sc_in< sc_uint< 3 > > *wb_cti_i, sc_in< sc_uint< 2 > > *wb_bte_i, sc_in< sc_uint< WB_PORT_SIZE/8 > > *wb_sel_i, sc_out< bool > *wb_ack_o, sc_out< bool > *wb_err_o, sc_out< bool > *wb_rty_o, sc_in< sc_uint< 32 > > *wb_adr_i, sc_in< sc_uint< WB_PORT_SIZE > > *wb_dat_i, sc_out< sc_uint< WB_PORT_SIZE > > *wb_dat_o) |
Execution Control... | |
void | MParaNutSystem::Run () |
Start the SystemC simulation and wait for the ParaNut to HALT. More... | |
Support Functions... | |
void | MParaNutSystem::Usage () |
Print usage of the command line options to stdout. More... | |
void | MParaNutSystem::PrintConfig () |
Print the current configuration to stderr. More... | |
ParaNut simulation system and control.
This module groups the simulation system and it's control functions.
A minimal SystemC main program to simulate a ParaNut system could look like this:
void MParaNutSystem::AddInterrupt | ( | TWord | index, |
sc_out< bool > * | port | ||
) |
Add a slave port to the ParaNut Systems internal interrupt input signals.
The provided port will be bound to the interupt input at the given index.
index | is the index of the interrupt input (must be < CFG_NUT_EX_INT). |
port | is the pointer of a sc_out<bool> port that will be bound. |
|
inline |
Add a slave peripheral to the ParaNut System.
The provided slave peripheral will be added to the Wishbone interconnect at start_adr and will occupie size amount of bytes.
The interconnect checks for address space collisions and will stop execution on error.
NOTE: Calling with a non MPeripheral derived or compatible slave value will likely lead to unwanted behaviour or a segmentation fault!
start_adr | is the I/O base address. |
size | is the number of bytes occupied by the slave. |
slave | is a pointer to a MPeripheral derived or compatible module. |
|
inline |
MParaNutSystem::MParaNutSystem | ( | const int | argc, |
char * | argv[] | ||
) |
Create and elablorate the System.
Parses the supplied argc and argv to configure the simulation and elaborates the System containing a ParaNut (MParanut), Wishbone interconnect (MInterconnect) and the Main Memory (MWBMemory).
argc | is the number of arguments in argv. |
argv | is the array of arguments that gets parsed. |
void MParaNutSystem::PrintConfig | ( | ) |
Print the current configuration to stderr.
Uses the PS_PRINTCAT and PS_PRINTCONF macros.
void MParaNutSystem::Run | ( | ) |
Start the SystemC simulation and wait for the ParaNut to HALT.
Sets up and starts the debugging interfaces if the interactive debug flag is set (-d).
Prints performance statistics (-p), memory content befor and after completion (-m) and dumps signature section contents after completion (-s)
void MParaNutSystem::Usage | ( | ) |
Print usage of the command line options to stdout.
MParaNutSystem::~MParaNutSystem | ( | ) |
Destructor destroying all runtime objects.