help inreading .csv file into verilog

Status
Not open for further replies.

biren275

Newbie level 2
Joined
Jul 21, 2009
Messages
2
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Location
gandhinagar
Activity points
1,292
reading csv in verilog

hi ,
I want to read .csv file into verilog.
i wrote this code please check it and modify it so it can work.

module test1();
integer infile;
integer array [60:0][80:0];
integer value;
integer i,j;
infile=$fopen("Book1.csv","r");
if(infile==null)
begin
$display("error1");
end
else
$display("file loaded and opened");
for(i=0;i<60;i++)
begin
for (j=0;j<=80;j++)
begin
$fscanf(infile,"%i",array[j]);

$fdisplay("%i",arary);
end
end
infile=$flcose("Book1.csv");
endmodule
 

Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…