I am trying to read the data from external file named "data.in" in verilog rest bench. I am trying to store data from the file in two variables, data1 and data2. Here is some part of the input file. Only hex data is to be read. No need to read the comments.
// This is a generated input file.
//
// rj
// Left Right No.
003E 002E // r1
002E 0017 // r2
0026 0030 // r3
0005 002C // r4
0034 0015 // r5
000B 0023 // r6
0007 0021 // r7
0028 0001 // r8
0007 0012 // r9
//
// Coefficient u
00D3 0034 // 1
0116 01F2 // 2
0016 0154 // 3
01D0 002E // 4
I have already tried memread, fscanf but no luck. any help is great. thanks in advance.