# I have to read binary file to testbench

Status
Not open for further replies.

#### kinjarapudushyanth

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 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.