Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronic 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.

Register Log in

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
 

yadog

Member level 1
Joined
Mar 12, 2006
Messages
33
Helped
3
Reputation
6
Reaction score
3
Trophy points
1,288
Activity points
1,427
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.
Toggle Sidebar

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top