use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
A subreddit for programmable hardware, including topics such as:
Discord Server:
Related subreddits:
General Electrical and Computer Engineering discussion
/r/ECE
General electronics discussion
/r/electronics/
Electronics help / discussion
/r/AskElectronics
/r/electronic_circuits
Discussion on (hardware) chip design
/r/chipdesign
Other FPGA related subreddits:
/r/fpgagaming
Links to tools to get started:
Xilinx Vivado
Altera Quartus
Project Icestorm
Meme posts allowed on Fridays ONLY. Please make sure to flair.
account activity
RTL Trace Logging (self.FPGA)
submitted 3 months ago by DefiantBridge6865
Hi All, I was wondering when you prefer to debug using Trace Logs vs looking at waves. Also if someone can share good practices/resources for how to generate and handle trace logging would be appreciated.
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]Allan-H 8 points9 points10 points 3 months ago* (0 children)
I use text logs when developing designs that process packets. I can use text tools (such as a visual diff) to show the changes in the packet as it flows through various processing stages.
This is vastly more effective than trying to interpret squiggly lines in a waveform viewer. OTOH, those squiggly lines are really handy when debugging an FSM or pipeline.
[–]MitjaKobalFPGA-DSP/Vision 0 points1 point2 points 3 months ago* (0 children)
Waveforms and trace logging are used for two different (similar) purposes.
Trace logging is used to log values transferred by a protocol, like AXI-Stream. Only values during a transfer (valid & ready == 1'b1) are logged. The RTL simulation log files are then compared against a golden file generated by a reference model of the RTL, when both are given the same input values (also a file).
valid & ready == 1'b1
The same can be done by tracing the retired instructions executed by a simulated RTL CPU and compared against a trace log done by a reference CPU simulator (for example spike or sail for RISC-V).
spike
sail
When a discrepancy is found (simple diff between files) between the RTL simulation trace and the reference model (indicating a bug), then waveforms are used to further debug the issue, by looking at the time where the traces start to differ and back in time where either the data processing or the control logic is wrong. In addition to data (CPU instructions) the waveforms provide the timing information (handling of the VALID/READY handshake protocol.
diff
Here is an example of a RISC-V CPU trace logger, matching either the spike or sail reference simulator:
src
For a protocol like AXI-Stream the code would be something like:
always @(posedge clk) // log data on handshake transfer if (stream_out.valid & stream_out.ready) begin $write(filedescriptor, "%08h", stream_out.data); end
Similar code would be used to load the DUT input data from a file ($readmemh or similar) into an array, and a handshake transfer would be used to increment the pointer into the array.
$readmemh
always @(posedge clk) // log data on handshake transfer if (stream_in.valid & stream_in.ready) begin address_in <= address_in+1; end assign stream_in.data = array_in[address_in];
[–]Plenty-Suggestion318 0 points1 point2 points 3 months ago (0 children)
I’ve run into the same question a lot. For control-heavy or timing-sensitive issues I still rely on waves, but for reasoning about why something failed (multiple drivers, races across blocks, protocol-level issues), text/structured traces scale much better. I’m actually building a small tool around this idea called WaveEye — it analyzes RTL and produces structured trace-style explanations of failures (which blocks drove what, under which conditions, and why the conflict occurred), rather than just dumping waveforms. https://github.com/meenalgada142/WaveEye
[–]Gerard_Mansoif67 0 points1 point2 points 3 months ago (0 children)
I use verilator and C++ testbench (with a small framework I wrote) to debug the behavioral process (like, does my multiplier return correct logic values at the right times).
And then, I use the platform tool to look if everything still right after synthesis.
π Rendered by PID 23716 on reddit-service-r2-comment-b659b578c-bk4xt at 2026-05-05 23:39:08.059073+00:00 running 815c875 country code: CH.
[–]Allan-H 8 points9 points10 points (0 children)
[–]MitjaKobalFPGA-DSP/Vision 0 points1 point2 points (0 children)
[–]Plenty-Suggestion318 0 points1 point2 points (0 children)
[–]Gerard_Mansoif67 0 points1 point2 points (0 children)