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.

I have to read binary file to testbench

Status
Not open for further replies.

kinjarapudushyanth

Newbie level 1
Joined
Nov 12, 2010
Messages
1
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,287
Hello sir,

I am using ISE 13.1 simulator for my project. I need to input the values from tesh bench. these input values are to be read from binary file. I used $readmemb("C:\my documents\data.bin",my_data); I am unable to receive binary values from file. I even tried read() comman it is also not working. Can anyone please help me with a example.

Thanks,
Dus
 

present a model for you:

//------------------Load file(Binary/Hex)----------------------------------------
reg [11:0] data_mem[0:16384]; //define a 12bit*16384 array
initial
begin
$readmemh("adc.txt",data_mem); //load data to data_mem
end
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top