pymtl3 icon indicating copy to clipboard operation
pymtl3 copied to clipboard

Adding fst and struct trace support

Open KelvinChung2000 opened this issue 1 year ago • 6 comments

I have added support for tracing the structure correctly in the waveform

I have also added fst format to reduce the trace file size since tracing the structure increases the file size.

KelvinChung2000 avatar Apr 02 '24 17:04 KelvinChung2000

Are there any ways to check if the metadata has changed so we can make Verilator perform a recompile? Now, if I turn the vl_trace_struct off, I must delete the obj directory to make the flag take effect.

KelvinChung2000 avatar Apr 04 '24 15:04 KelvinChung2000

I think we write some specific metadata into a comment in the generated verilog so when we regenerate the verilog with different metadata it ends up forcing a recompile? Maybe you can see how we do this for VCD tracing? We have a way where if you turn on VCD tracing it results in forcing Verilator to do a recompile?

cbatten avatar Apr 04 '24 15:04 cbatten

Here's where we do the check: https://github.com/pymtl/pymtl3/blob/4b3bc183b14ffacd069f48dc5997b00045aea53f/pymtl3/passes/backends/verilog/import_/VerilogVerilatorImportPass.py#L340-L347

yo96 avatar Apr 04 '24 15:04 yo96

Is the [0] after a 1-bit signal in the trace added by Verilator? Or is it coming from the RTL translation pass?

KelvinChung2000 avatar Apr 04 '24 15:04 KelvinChung2000

Is the [0] after a 1-bit signal in the trace added by Verilator? Or is it coming from the RTL translation pass?

I think it comes from the translated verilog.

yo96 avatar Apr 04 '24 15:04 yo96

I want to fix that, but it will probably be in another pull request. I will open an issue and ask where to look.

KelvinChung2000 avatar Apr 04 '24 15:04 KelvinChung2000