Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
trace of struct array not working correctly #742
For the following code, the generated VCD dump file will only have tt[31:0].
I did some investigation in the Verilator source. The cause of this problem is when @tt@ signal is declared for tracing, Verilator use @bitRange@ infomation which is actually the the structure @tt_t@ information. And when @AstTraceDecl@ is created in @V3TraceDecl.cpp@, @arrayRange@ is not used. So the final VCD dump will only show the value of the first struct inside the array.
Note the tracing works with "--trace-structs" option.
Original Redmine Comment
Fixed in git towards 3.857.
Note without --trace-structs, as this is a packed array it should have and will now trace it as <63:0> as that is the size it has as a packed array. With --trace-structs, you'll see the separate fields, but the tracing is larger and slower thanks to the ugly VCD file format.