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

6.2.1.  UART Model Interfaces

A TLM 2.0 socket is the natural model for the bus interface to the CPU. However the interface to the terminal is much simpler. Standard byte wide SystemC buffers (sc_buffer) will be suitable, one for the Rx direction and one for Tx. The buffer is implemented for the Rx direction and a port to a buffer for the Tx direction. The terminal (see Chapter 7) will offer the complementary arrangement.

[Note]Note

A SystemC buffer (sc_buffer) is used rather than a SystemC signal (sc_signal), since it must report all writes to the buffer, rather than just changes to the value (as would be the case with a signal). At this level of modeling it is quite possible that two identical bytes would follow each other.

The interrupt is not modeled as an interface at this stage, so the UART will only be suitable for polled use. An interrupt interface is added in Chapter 10.

Embecosm divider strip