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

6.3.  Extending the Or1ksimSC Wrapper Module

6.3.1. Adding an Endianness Test Function to the Or1ksim Library
6.3.2. Extended Or1ksim Wrapper Module Class Definition
6.3.3. Extended Or1ksim Wrapper Module Class Implementation

For a larger system, the Or1ksim wrapper module described in Chapter 4 must be extended. A public function is required for peripheral models to establish the CPU endianness.

The function must be added to the underlying Or1ksim library and then a wrapper function added to the Or1ksimSC wrapper module.

In Section 4.3.5 it was noted that the absence of any call to wait meant the Or1ksim ISS could be the only thread in the model. The doTrans function must be extended to yield after each transaction to allow other threads to run. For our new model, this would prevent the UART and terminal models from running.

These extensions are achieved by defining a new class, Or1ksimExtSC derived from the existing Or1ksimSC class. It inherits all the functionality of the existing class, re-implements that of the transport function, doTrans and adds an additional public interface function, isLittleEndian.

Embecosm divider strip