P
Peng Yu
Guest
Hi there,
The simulator indicates that there is something wrong with the line
marked with /*error*/.
error message is:
Error: (vsim-PLI-3502) acc_set_value(): The object_handle
parameter is not a handle to a net, register, variable, or sequential
UDP.
But I don't why it isn't correct. Could somebody help me?
Best wishes,
Peng
module read_pattern;
integer file;
reg [3:0] bin [0:2];
//reg [3:0] bin;
integer i;
initial
begin
file = $fopen("my_read_pattern.pat", "r");
for(i = 0;i < 3;i = i + 1)
begin
// #10 $fscanf(file,"%b\n", bin);
#10 $fscanf(file,"%b\n", bin);/*error*/
end
$fclose(file);
end
always
@(bin[0], bin[1], bin[2])
$display("bin[0,1,2] = %b,%b,%b", bin[0], bin[1], bin[2]);
/*always
@(bin)
$display("bin = %b", bin);
*/
endmodule
The simulator indicates that there is something wrong with the line
marked with /*error*/.
error message is:
Error: (vsim-PLI-3502) acc_set_value(): The object_handle
parameter is not a handle to a net, register, variable, or sequential
UDP.
But I don't why it isn't correct. Could somebody help me?
Best wishes,
Peng
module read_pattern;
integer file;
reg [3:0] bin [0:2];
//reg [3:0] bin;
integer i;
initial
begin
file = $fopen("my_read_pattern.pat", "r");
for(i = 0;i < 3;i = i + 1)
begin
// #10 $fscanf(file,"%b\n", bin);
#10 $fscanf(file,"%b\n", bin);/*error*/
end
$fclose(file);
end
always
@(bin[0], bin[1], bin[2])
$display("bin[0,1,2] = %b,%b,%b", bin[0], bin[1], bin[2]);
/*always
@(bin)
$display("bin = %b", bin);
*/
endmodule