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.

can verilog read binary(like .obj) files

Status
Not open for further replies.

roger

Full Member level 3
Joined
Aug 27, 2003
Messages
162
Helped
4
Reputation
8
Reaction score
0
Trophy points
1,296
Activity points
1,617
verilog read binary file

if it can, how to do that :)
 

verilog read binary

I have tried , it seemed it cannot!
 

verilog binary file open

use PLI , can read binary file.
 

verilog reading hex data

patrickli said:
use PLI , can read binary file.

What PLI i should use ? please
 

verilog $memreadb

hi,
Verilog can open the binary files.
How to use the data in binary files?

If you want to get the data for memory, you can use the $memreadb().
If you only want to open the binary file, you may use the $open().
 

binary read verilog

We have to use $readmemb() to read files in binary form. $readmemh() to read hex files. I used it many-a-time, let you check out once. I hope no need of PLI or whatever mentioned....,...,

regards,
reddy
 

read binary file in verilog

reddy said:
We have to use $readmemb() to read files in binary form. $readmemh() to read hex files. I used it many-a-time, let you check out once. I hope no need of PLI or whatever mentioned....,...,

regards,
reddy

Hi reddy:
I can use this PLI for using hex data or bin data from ordinary file,
but whenever reading obj code file, modelsim shows

************************************************
warning (vsim-PLI-3409) Illegal binary digit 'ç' in data at line 1 of "./ac97.obj"
# ** Warning: (vsim-PLI-3409) Illegal binary digit ' : E:/project/Test1/read_obj/top.v(8)


what's wrong?

Please
 

verilog binary file

roger said:
************************************************
warning (vsim-PLI-3409) Illegal binary digit 'ç' in data at line 1 of "./ac97.obj"
# ** Warning: (vsim-PLI-3409) Illegal binary digit ' : E:/project/Test1/read_obj/top.v(8)


what's wrong?


pls check your obj file, there is illeagal letter in your obj file (not 0 or 1)

good luck!
 

verilog binary read

(1)binary file(.obj) & readmemb are two different concepts.

binary file(.obj) refers to the storing format of the file in machine.

the source of readmemb refers to files which content just include ASSIC character 0 & 1. The storing format of the file itself is not binary. The contents of the file what people can see are like binary strings.

(2)verilog1364-2001 can read binary file, using $fopen. But the simulator need the ability to support v2k function.

(3) another way is to use pli
 

verilog+binary files

use fid=$fopen("???","r");
$fread(temp,fid,"%h");
temp defined as register
 

$fread read .v verilog

if you use option like "w", each time you open the file will clear the original content of the file automatically. So use "a+" instead.

verilog 1634-2001 standard illustrates it clearly. :)
 

I uses $readmemb(),but I can not read into the memory when I pre-simulation at Modelsim 5.6,why?
I have put the test bench and *.vec at the same path! Sometimes I can read into the memory,are the software-Modelsim had some problem?
 

qjlsy said:
if you use option like "w", each time you open the file will clear the original content of the file automatically. So use "a+" instead.

verilog 1634-2001 standard illustrates it clearly. :)

Even I didn't use parameter "w"
, it still clear the content of the obj file,my environment

ModelSim5.8b

FYR
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top