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.

Verilog 2001 File I/O: read large file?

Status
Not open for further replies.

davyzhu

Advanced Member level 1
Joined
May 23, 2004
Messages
494
Helped
5
Reputation
10
Reaction score
2
Trophy points
1,298
Location
oriental
Activity points
4,436
Hi all,

I want to read one data @(posedge clock) and compare with my module output.
The data file may contain one million data and very large.

What's the most efficient way to do it?

My boss told me to use $readmemh, but it seems waste RAM.
Does Verilog 2001 support buffered read like in C? Where can I find the definition?

BTW, I use Modelsim 6.

Any suggestions will be appreciated!
Best regards,
Davy
 

davyzhu said:
Hi all,

I want to read one data @(posedge clock) and compare with my module output.
The data file may contain one million data and very large.

What's the most efficient way to do it?

I would like to understand what kind of design this is to offer efficient comment/suggestion. On the face of it, the verification architecture/approach seems to be not well thought out. For e.g. if this is an image processing system, an offline UNIX diff is a far better choice.


My boss told me to use $readmemh, but it seems waste RAM.
Does Verilog 2001 support buffered read like in C? Where can I find the definition?

Davy

$readmemh can take start and end addr as well. So you could read say 1024 locations at one go, hence using only a 1K memory.

Does that help?

Regards
Ajeetha, CVC
www.noveldv.com
 

    davyzhu

    Points: 2
    Helpful Answer Positive Rating
Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top