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.

how to read data from a txt file in verilog

Status
Not open for further replies.

tarkyss

Full Member level 6
Joined
Aug 1, 2005
Messages
340
Helped
26
Reputation
52
Reaction score
8
Trophy points
1,298
Location
China
Activity points
4,162
how to read a file in verilog

i use $fopen
integer file1;
file1=$fopen("~/a.txt");
it dosent work
why?
simulator is modelsim6
another question
when i used $readmemb
error encounted,
no system task readmemb?
why
 

readmemb verilog

tarkyss said:
i use $fopen
integer file1;
file1=$fopen("~/a.txt");
it dosent work
why?
simulator is modelsim6
another question
when i used $readmemb
error encounted,
no system task readmemb?
why
Hi, tarkyss
Does the text file read contains other data except for the binary or heximal data?
Verilog only provides $readmemb and $readmemh system tasks, which can not read string types and other types supported by C and VHDL.

Thomson
 

verilog read text file

make sure u have the file a.txt in the right directory . It should be in the directory from where u run ur simulations not where the verilog file might have been kept. Check that
 

how to read and write the text file in verilog

the problem is solved, thanks
 

reading from a text file in verilog designs

this problem is determined by the tool you used. i think it is easy to do that.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top