Services and Modeling for Embedded Software Development
Embecosm divider strip
Prev  Next

8.4.  Extending the UartSC Module Class

8.4.1. UartSyncSC Module Class Definition
8.4.2. UartSyncSC Module Class Implementation

A new class, UartSyncSC derived from UartSC implements the additional functionality for synchronized timing.

The time taken for the serial pulses (start, data, parity, stop bits) on the real UART will be modeled as a delay before writing data onto the Tx output port. The corresponding delay on the Rx buffer port will be modeled by the terminal writing into that port[8].

The TLM 2.0 socket modeling the bus is extended to model the time taken for reads to and writes from the bus.



[8] This is not the ideal solution. The delay is really a property of the channel, so should be modeled by a derived class of the standard SystemC buffer which provides a defined delay between data being written and data availability being signaled. The approach used here (transmitter models the delay) represents a practical compromise.

Embecosm divider strip