The conversion of an existing ISS to a SystemC module with TLM 2.0 sockets involves several steps.
Modify the existing ISS (in this example Or1ksim written in C) so it behaves in a manner suitable for wrapping (see Section 4.1).
Define a SystemC module for the wrapper (see Section 4.2) and provide its implementation (see Section 4.3).
Test the wrapper with a simple logger module attached to the TLM 2.0 socket and a suitable test application running as embedded code on the ISS (see Chapter 5).
The code for the Or1ksim wrapper module
(Or1ksimSC.cpp
and
Or1ksimSC.h
) may be found in the
sysc-models/logger
directory of the distribution.