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

Chapter 5.  Testing the Or1ksim ISS TLM 2.0 Wrapper

5.1. Overall Design of the Test Program
5.1.1. Class Structure
5.1.2. Behavioral Diagrams
5.2. Definition of the TLM 2.0 Logger Module
5.2.1. Include Files
5.2.2. Module Declaration and Constructor
5.2.3. Public Interface
5.2.4. Blocking Transport
5.3. Implementation of the TLM 2.0 Logger Module
5.3.1. Included Headers
5.3.2. Constructor
5.3.3. Blocking Transport Callback
5.4. The Model Main Program
5.4.1. Included Headers
5.4.2. Argument Processing
5.4.3. Module Instantiation
5.4.4. Connecting the Modules
5.4.5. Model Execution
5.5. Test Program to Run on the Or1ksim
5.5.1. The Utility Functions
5.5.2. Memory Mapped Data Structure
5.5.3. Checking Write Access
5.5.4. Checking Read Access
5.5.5. Program Compilation
5.6. Running the Test
5.6.1. Compiling the SystemC Model
5.6.2. Configuring the OpenRISC 1000 Or1ksim ISS
5.6.3. Running the Compiled Model

The test configuration was shown earlier in Figure 3.1. For this a simple logger is needed, which must implement a TLM 2.0 simple target socket.

In addition, a simple embedded application is needed to run on the Or1ksim ISS, which will make reads and writes to peripheral address space, which can be detected by the logger.

All the behavior is in the callback function—there are no SystemC threads. This means the logger will be suitable for testing the Or1ksimSC wrapper module, even though its thread never yields (see Section 4.3.5).

The code for the logger module (LoggerSC.cpp and LoggerSC.h) and the main program (loggerMainSC.cpp may be found with the Or1ksim wrapper code in the sysc-models/logger directory of the distribution.

Embecosm divider strip