adivy
Newbie level 6
I am able to read only the first line in input text file .Can anyone please help me out in debugging this code
In1 and In2 are 32 bit register values and AE is 1 bit binary value.Read is a task inside the testbench which uses file inputs .Code is:
Input txt file is:
FFFFFF FFFFFF 1
FAFAFA FAFAFA 1
000000 AAAAAA 1
In1 and In2 are 32 bit register values and AE is 1 bit binary value.Read is a task inside the testbench which uses file inputs .Code is:
Code Verilog - [expand] 1 2 3 4 5 6 7 8 9 10 file=$fopen("input.txt","r"); while (!$feof(file) ) @(posedge MCLK) begin ret = $fscanf(file,"%h%h%b \n",in1,in2,AE); read(in1,in2,AE); end $fclose(file);
Input txt file is:
FFFFFF FFFFFF 1
FAFAFA FAFAFA 1
000000 AAAAAA 1