The constructor passes the name to the constructors of its base
class (sc_module
) and its simple initiator socket
(dataBus
), then calls the
or1ksim_init
function in the Or1ksim library
to initialize the ISS.
The member function, run
is associated with the
class as a SystemC thread, using the SC_THREAD
macro. It will be called automatically by the SystemC kernel after
elaboration (i.e SystemC initialization).
Or1ksimSC::Or1ksimSC ( sc_core::sc_module_name name, const char *configFile, const char *imageFile ) : sc_module( name ), dataIni( "data_initiator" ) { or1ksim_init( configFile, imageFile, this, staticReadUpcall, staticWriteUpcall ); SC_THREAD( run ); // Thread to run the ISS } /* Or1ksimSC() */