Verilog 读取数据的一种方法(这里写自定义目录标题)
读取数据时遇到以上错误,在xcelium未报错但在vivado中报错,改用for loop一个个赋值
initial begin
file = $fopen("data/icdesign/ams/Adt_high_speed_IO/user/lilyyang/vivado/PostProcessing/PostProcessing.srcs/sources_1/new/hilbert33.vmem", "r");
if (file == 0) begin
$display("Error opening file");
$finish;
end
for (j = 0; j < N_ORDER; j = j + 1) begin
if ($fscanf(file, "%h", temp) == 0) begin
$display("Error reading from file");
$fclose(file);
$finish;
end
coeff[i] = temp;
end
$fclose(file);
end