Services - tools - models - for embedded software development
Embecosm divider strip
Prev  Next

4.5.  Building the Complete System

4.5.1. An Example Debugging Session.

The main program is found in OrpsocMain.cpp, with a header file, OrpsocMain.h, providing system wide constants.

Since this is SystemC, OrpsocMain.cpp declares sc_main. This instantiates all the SystemC modules and connects them as described in Embecosm Application Note 6 High Performance SoC Modeling with Verilator: A Tutorial for Cycle Accurate SystemC Model Creation and Optimization [10]. The Embecosm Cycle Accurate SystemC JTAG interface is instantiated and connected as described in Embecosm Application Note 5 Using JTAG with SystemC: Implementation of a Cycle Accurate Interface [9].

The port number to connect on may be supplied as an argument to the GDB server program (so will appear in argv). If not provided it defaults to 51000.

Finally the GDB server SystemC module, GdbServerSC is instantiated taking the port number and pointer to the JTAG FIFO as arguments. The GdbServerSC SystemC thread will then execute, processing RSP packets and driving the OpenRISC 1000 model via its JTAG interface.

Embecosm divider strip