G
gurvin
Guest
hi,
i've a question regarding delays......
1)
let's say i've a signal sig1 high for 2 clocks and a signal sig2 which
is delayed version of sig1 ie
always @(posedge clk)
sig2 <= sig1;
now i would like to know the behaviour when i add delays to them on
LHS and RHS side....i mean
1)always @(posedge clk)
#2 sig2 <= sig1;
2)always @(posedge clk)
sig2 <= #2 sig1;
2) i tried this one also....
always @(negedge clk)
sig2 <= sig1;
and sig1 is generated from a task like
task
....
....
@(negedge clk);
#2 sig1 = 1'b1;
@(posedge clk);
#2;
#2 sig1 = 1'b0;
end
half clk period is 4ns....
in this sig2 is always 0 although sig1 is generated properly..
is this something related to event scheduling or ???
thx!
i've a question regarding delays......
1)
let's say i've a signal sig1 high for 2 clocks and a signal sig2 which
is delayed version of sig1 ie
always @(posedge clk)
sig2 <= sig1;
now i would like to know the behaviour when i add delays to them on
LHS and RHS side....i mean
1)always @(posedge clk)
#2 sig2 <= sig1;
2)always @(posedge clk)
sig2 <= #2 sig1;
2) i tried this one also....
always @(negedge clk)
sig2 <= sig1;
and sig1 is generated from a task like
task
....
....
@(negedge clk);
#2 sig1 = 1'b1;
@(posedge clk);
#2;
#2 sig1 = 1'b0;
end
half clk period is 4ns....
in this sig2 is always 0 although sig1 is generated properly..
is this something related to event scheduling or ???
thx!