I've got an initial
block which calls a task named power_task
as below
initial begin
#10;
power_task;
end
Inside the power task, I've two signals power_a
and power_b
. Initially, power_a
goes low and after a certain skew, power_b
goes low. As long as both the signals are low, I need to check the output q
. Output q
should be low during the time window where power_a
and power_b
signals are low. Since there are no other signals like a clock, I'm not sure how to continuously monitor q
. I've written something like below
task power_task;
#1;
power_a=0;
#5; //skew
power_b=0;
if (power_a==0 && power_b==0 && q==0) begin
$display("pass");
end
#50;
power_b=1;
#5;
power_a=1;
end
endtask
In the above task, the if
statements check the value of q
only after both signals are low and not during the entire 50 ns time window. Can someone please help?