A good way to retrieve information of what is happening in our SystemC simulations is to generate a log file with the information that we need (module name, simulation time, what phase is going on, etc.).
The most elegant and easy way to do that is to create a special class for that task, that the other modules in the simulation can use to send their information and to be stores in disk. This can be achieved designing a singleton type class. This design pattern restricts the instantiation of a class to one single object. In our case, it will cause that all modules use the same object and log file.
Continue reading A class to Log them all
First of all, I should remember you what means loosely-timed: we use the blocking function b_transport and therefore we have two synchronization points per transaction, that corresponds to the beginning and the end of the transaction. These two points can be in the same simulation time or in different simulation time. In case we have the two synchronization points in the same simulation time, we are using untimed).
Continue reading Ejemplo de Loosely-timed example
Let’s start with the first example…
We shall start with the include’s
using namespace sc_core;
Firstly we include systemc and then tlm.h
Then we include the easiest socket for that example.
Now it’s time to declare the Initiator class
class Initiator: sc_module
Continue reading Untimed example