-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add --disable-tracing
and --prefix-trace
options to snax_cluster
#399
Conversation
hw/snitch_cluster/src/snitch_cc.sv
Outdated
if(enable_tracing()) begin | ||
$sformat(fn, "trace_chip_%01x%01x_hart_%05x.dasm", tcdm_addr_base_i[47:44], | ||
tcdm_addr_base_i[43:40], hart_id_i); | ||
$sformat(trace_file, "%s%s", get_trace_file_prefix(), fn); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wanted to concatenate the strings here in systemverilog, but that made the verilator quite angry, so now I'm using this really dumb sformat
target/common/test/verilator_lib.cc
Outdated
return default_value; // Return the default value if not found or invalid | ||
} | ||
|
||
svBit enable_tracing() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I changed this to svBit, because verilator seemed to generate a DPI function that expected that... not sure how else I would've figured out...
c6d2bfd
to
c636b56
Compare
@IveanEx the only other place I have found this was already behind an |
c636b56
to
ba027aa
Compare
ba027aa
to
31344b9
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This PR breaks the HeMAiA's Verilator simulation flow (make hemaia_system_vlt at the root directory). Can you also make a PR to the main branch of HeMAiA to fix it?
Beside this error, other tests with Questa and VCS can pass without problem.
--disable-tracing
and --prefix-trace
options to snax_cluster
@IveanEx |
This adds two extra options to snitch_cluster, to address #395
This was quite difficult to figure out, the way i've implemented it now is like this:
2 C++ functions that return a command-line value --> DPI-C --> SystemVerilog Tracer
--disable-tracing
: turns off tracing for the Verilog simulation, might speed up some long-taking CI runs, for which we don't care about log parsing anyway...--prefix-trace="prefix"
: appends a prefix to the output traces. If you use this, it will not default to a logs folder anymore, so be sure to includelogs/your_prefix
in the prefix if you want it to end up in a folder.I'm keeping this as a draft for now because of the following reasons:
htif.cc
fromriscv-isa-sim/fesvr
... Not sure if we are using any of those arguments right now though...