Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Memory Dump In Verilog

Status
Not open for further replies.

amanguptalibra

Newbie level 1
Joined
Apr 21, 2010
Messages
1
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Location
Noida,India
Activity points
1,286
Hi,
I have a created a 2D array as memory in my verilog code. I have developed a testbench for the same as well. Now I wish to take the dump of that memory to be displayed . How do I proceeed?
Also I might have to write that dump in a file.
 

To read array from test bench use:

initial $readmemh("data.txt",mem);


In above case you read hex data from data.txt file to read memory data. You can use for loop to traverse through all the location.

To write data to text file use: $dumpfile("data.txt");

Hope this helps
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top