Hi,
looking at the csv file, you have the format
time unit: us, i_clk, G_MISO, G_SCK, G_MOSI, G_SS.
Therefore you fscanf() should be a bit more complicated. Something like this:
for (i=0; i<2^16; i=i+1) begin
r = $fscanf(file1,"%d, %d, %d, %d", t[i], s1[i], s2[i], s3[i] );
end
Reading from a file with $fscanf() increments the file position index, thereby repeated $fscanf calls advance in the text processing. Depending on your CSV size, you may need to adapt the for(..) conditions.
P.S. You may also youse while(..) loop and observe the result of the $fscanf(). I have named it "r" in the example and it will return a -1 upon EOF (end of file) condition. You may also just use $feof(file..); task.
Hope that helps.