hw: gate the per-instruction trace behind `ifdef DEBUG - #328
Merged
colluca merged 1 commit intoJul 30, 2026
Conversation
DanielKellerM
force-pushed
the
snitch-trace-plusarg
branch
2 times, most recently
from
July 30, 2026 13:24
e4c118d to
e9a50ba
Compare
DanielKellerM
marked this pull request as ready for review
July 30, 2026 13:40
The snitch_cc .dasm tracer opens logs/trace_hart_*.dasm and $fwrites a line per retired instruction unconditionally (guarded only by translate_off) -- for every hart in the design. On a multi-cluster sim that is 100+ harts each doing per-cycle $sformat + $fwrite to disk, which dominates wall-clock during compute and writes hundreds of MB per run even when the trace is not wanted. Fully gate the tracer behind `ifdef DEBUG so it is compiled out by default, and pass -DDEBUG down to the RTL via bender when DEBUG=ON (reusing the existing DEBUG build flag, which the tracer already keys off for $fflush).
DanielKellerM
force-pushed
the
snitch-trace-plusarg
branch
from
July 30, 2026 13:43
e9a50ba to
5d8b93d
Compare
colluca
approved these changes
Jul 30, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The
snitch_cc.dasmtracer openslogs/trace_hart_*.dasmand$fwrites aline per retired instruction unconditionally (guarded only by
translate_off),for every hart in the design. On a multi-cluster sim that is 100+ harts each
doing a per-cycle
$sformat+$fwriteto disk, which dominates wall-clockduring compute and writes hundreds of MB per run even when the trace is unwanted.
Fully gate the tracer behind `ifdef DEBUG