displaying 2d arrays in virsim

M

Mayank

Guest
Hi everyone,

The code im working on has a module "ram" with a 2D array declared as
reg [7:0] mem [7:0]

However, when viewing waveforms in virsim, this 2D array does not show
up in the list for ram in the Hierarchy browser. What am i doing
wrong? is there a way of viewing the contents of 2D arrays in virsim?

Thanks in advance for your help,
Mayank
 
"Mayank" <prehistorictoad2k@yahoo.com> writes:

However, when viewing waveforms in virsim, this 2D array does not show
up in the list for ram in the Hierarchy browser. What am i doing
wrong? is there a way of viewing the contents of 2D arrays in virsim?
A cumbersome, but portable way:

wire [7:0] debugmem0 = mem[0];
wire [7:0] debugmem1 = mem[1];
wire [7:0] debugmem2 = mem[2];
wire [7:0] debugmem3 = mem[3];
wire [7:0] debugmem4 = mem[4];
wire [7:0] debugmem5 = mem[5];
wire [7:0] debugmem6 = mem[6];
wire [7:0] debugmem7 = mem[7];

Petter
--
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing on usenet and in e-mail?
 
Which VCS version? For a while, they have a new GUI named DVE that's
awesome (Personal opinion though) against VirSim. In any case, try
adding: $vcdplusmemon; along with $vcdpluson to your Verilog code to
see memories in VirSim. There are other ways such as via UCLI - command
line etc. Read their docu or contact vcs_support

HTH
Ajeetha, CVC
www.noveldv.com
 
I don't know about VirSim, but in ModelSim, you need to explicitely
dump out memory signals into the waveform viewer, i guess it's for
performance reason. You could try the same with VirSim.

Joe,
LogicSim -Your Personal Verilog Simulator
http://www.logicsim.com

Mayank wrote:
Hi everyone,

The code im working on has a module "ram" with a 2D array declared as
reg [7:0] mem [7:0]

However, when viewing waveforms in virsim, this 2D array does not show
up in the list for ram in the Hierarchy browser. What am i doing
wrong? is there a way of viewing the contents of 2D arrays in virsim?

Thanks in advance for your help,
Mayank
 

Welcome to EDABoard.com

Sponsor

Back
Top