D
dipesh.trivedi
Guest
hi friends,
i have the code which is like this,
always @(negedge WEN)
@(posedge clk); @(posedge clk); @(posedge clk); @(posedge
clk);
a <= 1'b1;
@(posedge clk); @(posedge clk); @(posedge clk); @(posedge
clk);
b <= 1'b1;
@(negedge WEN)
@(posedge clk); @(posedge clk); @(posedge clk); @(posedge
clk);
c <= 1'b1;
@(posedge clk); @(posedge clk); @(posedge clk); @(posedge
clk);
d <= 1'b1;
what i understood is a and b assigns when first negedge occurs on WEN.
and c and d assigns on the second negedge on WEN. is this because of
the always statement???
if i write it as follows then,
always @(negedge WEN)
@(posedge clk); @(posedge clk); @(posedge clk); @(posedge
clk);
a <= 1'b1;
@(posedge clk); @(posedge clk); @(posedge clk); @(posedge
clk);
b <= 1'b1;
always @(negedge WEN)
@(posedge clk); @(posedge clk); @(posedge clk); @(posedge
clk);
c <= 1'b1;
@(posedge clk); @(posedge clk); @(posedge clk); @(posedge
clk);
d <= 1'b1
will it assigned at the first negedge on WEN???
i have the code which is like this,
always @(negedge WEN)
@(posedge clk); @(posedge clk); @(posedge clk); @(posedge
clk);
a <= 1'b1;
@(posedge clk); @(posedge clk); @(posedge clk); @(posedge
clk);
b <= 1'b1;
@(negedge WEN)
@(posedge clk); @(posedge clk); @(posedge clk); @(posedge
clk);
c <= 1'b1;
@(posedge clk); @(posedge clk); @(posedge clk); @(posedge
clk);
d <= 1'b1;
what i understood is a and b assigns when first negedge occurs on WEN.
and c and d assigns on the second negedge on WEN. is this because of
the always statement???
if i write it as follows then,
always @(negedge WEN)
@(posedge clk); @(posedge clk); @(posedge clk); @(posedge
clk);
a <= 1'b1;
@(posedge clk); @(posedge clk); @(posedge clk); @(posedge
clk);
b <= 1'b1;
always @(negedge WEN)
@(posedge clk); @(posedge clk); @(posedge clk); @(posedge
clk);
c <= 1'b1;
@(posedge clk); @(posedge clk); @(posedge clk); @(posedge
clk);
d <= 1'b1
will it assigned at the first negedge on WEN???