I was intended to use a customized task in an always @*
block, like:
input [31:0] a;
input b;
output reg [31:0] c;
task mytask;
begin
if (b) begin
c = a;
end
end
endtask
always @* begin
// ... (b is not included)
mytask;
// ... (b is not included)
end
What I think is that when signal b
changes from 0
to 1
, c
will be set to the content of a
. Then I found the always
block is not sensitive to signal b
(using ISim 14.7).
Is this a bug or designed to behave like this?