Such as the code displayed below, how can I dump the internal signal just like _x
into waveform when I use verilator with the version==4.210? Did I need to switch to upper version?
integer i;
reg [7:0] _x; // how to dump the internal signal in waveform?
always @(*) begin
if(!en) begin y=3'bzzz; ptr=0; _x=x; end
else begin
ptr=0;
y = 0;
_x=~_x;
for(i = 0; i < 8; i = i+1)
if(x[i] == 1) begin y = {7-i}[2:0]; ptr=1; end
end
end
By the way, the variable i
typed integer is dumped automatically in the waveform so that it may be surprise for me.
Furthermore, this is the cmd that I used: verilator --cc --exe --build --trace -Wno-fatal -j `nproc` sim_main.cpp top.v
.
I just read the mannual of verilator simply and roughly but nothing interesting found.
crjg is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.