Hello everyone,
when I launch simulation Questa give me this error:
“(vsim-8323) scoreboard.sv(59): $fscanf : Argument number 3 is an unpacked type, and may only be printed with the ‘%p’ format.”
I use in scoreboard a function that reads 19 bits outputs from a txt file that contains them in this mode :
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
...
My function is:
forever begin
data_out = $fopen("out.txt", "r");
if (data_out == `NULL) begin
$display("data_out handle was NULL");
$finish;
end
end
@(posedge bfm.clk)
begin
while(!$feof)
begin
scan_file = $fscanf(data_out, "%b\n", expected_output);
count = count++;
end
end
This must read txt file “out” and must enter the read data output (19 lines) in expected_output that is this queue:
parameter n_pixel_total = 1049088;
logic unsigned [18:0] expected_output [$:n_pixel_total];
What is the problem?
Thank you all