V
Verictor
Guest
Hi,
What is wrong with the integer i defined in the following task?
task delimited_out;
input [width-1:0] a; // width has been defined
somewhere else
input delimiter_width;
integer i;
begin
for (i = 1; i <= width/delimiter_width; i = i + 1)
begin
$display("the delimited_out is %b_", a[width-
delimiter*(i-1)-1 : width-delimiter*i]);
end
end
endtask
Compiler complains that "Illegal operand for constant expression for
i".
Thanks
What is wrong with the integer i defined in the following task?
task delimited_out;
input [width-1:0] a; // width has been defined
somewhere else
input delimiter_width;
integer i;
begin
for (i = 1; i <= width/delimiter_width; i = i + 1)
begin
$display("the delimited_out is %b_", a[width-
delimiter*(i-1)-1 : width-delimiter*i]);
end
end
endtask
Compiler complains that "Illegal operand for constant expression for
i".
Thanks