Simply RISC S1 Core - Tracan (Trace Analyzer)
|
S1 Core - Tracan (Trace Analyzer)
|
=============================================
|
=================================
|
|
|
This small tool has been written to convert the waveforms of the
|
This small tool has been written to convert the waveforms of the
|
original OpenSPARC T1 simulation environment into a format similar
|
original OpenSPARC T1 simulation environment into a format similar
|
to the one used in the "sim.log" file generated by the S1 simulations.
|
to the one used in the "sim.log" file generated by the S1 simulations.
|
|
|
To have it working you have to:
|
To have it working you have to:
|
- have a working OpenSPARC T1 simulation environment;
|
- have a working OpenSPARC T1 simulation environment;
|
- modify the top-level testbench cmpt_top.v to add the
|
- modify the top-level testbench cmpt_top.v to add the
|
following lines:
|
following lines:
|
|
|
initial begin
|
initial begin
|
$dumpfile("trace.vcd");
|
$dumpfile("trace.vcd");
|
$dumpvars(2);
|
$dumpvars(2);
|
end
|
end
|
|
|
- run the T1 simulations you want (give to the sims script
|
- run the T1 simulations you want (give to the sims script
|
the argument to not delete the results);
|
the argument to not delete the results);
|
- open the resulting trace.vcd file with a text editor and
|
- open the resulting trace.vcd file with a text editor and
|
look for lines similar to these ones:
|
look for lines similar to these ones:
|
|
|
$var wire 124 " spc_pcx_data_pa [123:0] $end
|
$var wire 124 " spc_pcx_data_pa [123:0] $end
|
$var wire 145 $ cpx_spc_data_cx2 [144:0] $end
|
$var wire 145 $ cpx_spc_data_cx2 [144:0] $end
|
|
|
- if the chars after the numbers are different from the double
|
- if the chars after the numbers are different from the double
|
quote and the dollar sign shown above, then you have to change
|
quote and the dollar sign shown above, then you have to change
|
the string used by the egrep command into the 'tracan' script;
|
the string used by the egrep command into the 'tracan' script;
|
for instance if the two chars are 'A' and 'B' the line will
|
for instance if the two chars are 'A' and 'B' the line will
|
become:
|
become:
|
|
|
egrep ' A$| B$' $1 | egrep -v x | ./tracan.bin
|
egrep ' A$| B$' $1 | egrep -v x | ./tracan.bin
|
|
|
- then you can finally run the program: if the binary file
|
- then you can finally run the program: if the binary file
|
tracan.bin does not exists it will be compiled with GCC;
|
tracan.bin does not exists it will be compiled with GCC;
|
- if everything goes right you will be able to use the command:
|
- if everything goes right you will be able to use the command:
|
|
|
tracan.sh PATH_TO_YOUR_TRACE_VCD_FILE
|
tracan.sh PATH_TO_YOUR_TRACE_VCD_FILE
|
|
|
and you will get the logfile on the console; a typical usage
|
and you will get the logfile on the console; a typical usage
|
would be:
|
would be:
|
|
|
tracan.sh trace.vcd > sim.log
|
tracan.sh trace.vcd > sim.log
|
|
|
- if you want to improve the script to automatically extract the
|
- if you want to improve the script to automatically extract the
|
ASCII symbol used in the VCD file for outgoing and incoming
|
ASCII symbol used in the VCD file for outgoing and incoming
|
packets, please modify the tool and we'll be happy to mention
|
packets, please modify the tool and we'll be happy to mention
|
your name into this file!
|
your name into this file!
|
- Enjoy!
|
- Enjoy!
|
|
|
The development team at Simply RISC LLP
|
|
|
|
|
|