In this work I show how to build a reference model
in systemc using queues,
from C++ STD. The DUT:
-
Firstly I needed to select a DUT, from the existing projects available
from this site. I decided on a complex multiplier with a
trick,
which is explained in this
page.
-
Secondly I coded the DUT in systemc. The description of the DUT code is given
in.
DUT page
-
Next I coded a
monitor,
which collects the data, calculates the expected and stores it in a scoreboard (coded in C++ using queues from STD),
to be later (after DUT latency) used to check the output from the DUT. I used
c++ and systemc special classes for this monitor.
-
A systemc
test-bench
was also created. The test-bench instantiates
the DUT and monitor, connects the monitor and DUT, defines a clock,
drives random data and traces signals, using VCD format.
-
Last compilation and simulation
scripts.
I use the make-file from OSCI, with three source files. Although it compiles
the files, which were modified, the program sometimes does not function well.
So a script, which touches all sources and fires up the make-file, is
available too.
-
The code can be downloaded
from:
-
You may also be interested in
extension to the systemc example from cadance of producer consumer.
|