[WIP, PoC] implementation of RFC 74 "Structured VCD"#1670
Conversation
|
So, I've tried with a struct signal in an Elaboratable and seems to be working fine too. I've also checked how Verilator does things, and seems like they just use a In fact this PoC just does that, prevents flattening of the signals and passes the correct scope to PyVCD. With respect to the scope types, I guess |
I'm not sure I remember exactly. @wanda-phi, do you? |
no idea, sorry |
|
@alikates I think the reason was probably that we tried to stay 100% VCD-compliant and not use non-standard records. I thought for a bit that the goal was to emit the same signals as when doing Verilog export, but I don't think there's actually direct correspondence, even the names don't match. (I still haven't found time to review the PR, sorry. It has been another heatwave here.) |
|
What I meant is that by using
No worries, take care! |
|
So now there's an awkward situation where structs look good, but interface members are still flattened. Not sure what it would take to match how structs are handled, but it might be worth of a separate RFC/implementation. |
Initial proof of concept implementation of RFC 74 "Structured VCD".
It needs a version of pyvcd with the new
vhdl_recordandvhdl_arrayscope types. I have a fork here.This is mainly me slamming my head against the wall until it kind of works.
Keep in mind that right now this only works for individual signals passed through the
tracesargument of write_vcd. I guess I'll need to edit the fragment traversal part to also extract the slice signals from the actual design.The changes mainly consist on recursively traversing the struct/array members, extending the scope with the name of the parent and adding it to the
trace_namesdict. As I said, I'll need to implement adding the design signals tosignal_names, but the algorithm is probably the same.This can be tested with:
Surfer is sometimes having issues reading the VCDs. Here are some screenshots of how the previous tests is rendered in both Surfer and GTKWave: