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

4.3.5.  Blocking Transport

Once the payload fields are set up, the doTrans function (which is used for both read and write) is called to transport the payload to the target and return the result.

The transport function requires a time to be supplied, even when timing is not being used (as in this case). This must be time variable, not a constant, since the target can update the value. A dummy variable is declared with zero time and passed to the blocking transport function of the socket with the payload.

  sc_core::sc_time  dummyDelay = sc_core::SC_ZERO_TIME;
  dataBus->b_transport( trans, dummyDelay );
	  

This implementation is sufficient for modeling just the Or1ksim ISS in SystemC. However at no time does the thread execute a SystemC wait call. In the absence of any such yield, no other thread would be able to execute. This will be remedied in Chapter 6 when other threads are added to model peripherals.

Embecosm divider strip