3
\$\begingroup\$

Is there a way to dump the memory in verilog using vcd dump? Since now i have written this:

module sampler(clk, pixel);
 input clk;
 input[7:0] pixel;
 wire[7:0] pixel;
 reg [7:0] macro_block [0:63];
 reg [5:0] address;
 always @ (posedge clk or negedge clk) begin
 macro_block[address]=pixel;
 address<=address+1;
 end
endmodule
module tb();
 reg clk;
 reg[7:0] pixel;
 sampler s(clk,pixel);
 initial begin
 $dumpfile("test.vcd");
 $dumpvars(0,tb);
 clk=0;
 pixel=1;
 $monitor("%g %b",$time, clk);
 #5 $finish;
 end
 always begin
 #1 clk <= ~clk;
 end
endmodule

but the array macro_block is not shown in gtkwave, is it possible to shown?

asked Feb 3, 2013 at 20:51
\$\endgroup\$

1 Answer 1

4
\$\begingroup\$

Depends on your simulator. For Icarus, I think you need an explicit dumpvars statement for every array row you want to dump. I don't recall if you need the [msb:lsb] subscript. For CVC, you can use the +dump_arrays plusarg. I use CVC all the time and view arrays in gtkwave.

answered Feb 4, 2013 at 5:44
\$\endgroup\$
0

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.