Implementation of the constructor is preceded, like
Or1ksimSC
, by the SystemC macro.
SC_HAS_PROCESS( UartSC );
The constructor calls the base class
(sc_module
) constructor to set the module
name, saves the endianness flag in its internal state variable and
clears the interrupt pending flags. The thread to handle bus I/O is
associated with this module.
SC_THREAD( busThread );
The method handling data on the Rx buffer is associated with this module with static sensitivity to writes to that buffer. It is not initialized.
SC_METHOD( rxMethod ); sensitive << rx; dont_initialize();
The blocking transport callback is registered for the
bus
socket, in the same manner as was used for
the logger, LoggerSC
.
bus.register_b_transport( this, &UartSC::busReadWrite );
Finally the registers (regs
) are cleared.