K
Kiran
Guest
Hi,
In the following code,
always @(posedge clk or negedge rstn)
begin
if (rstn == 1'b0)
begin
.
.
a <= 1'b0;//reset condition
end
else
begin
.
.
if ( condition1 == TRUE )
begin
a <= 1'b0;
end
.
.
if (condition2 == TRUE)
begin
a <= 1'b1;
end
end
.
end
what's happening is that FF 'a' is being assigned under 2 unrelated if
statements. 'condition1' and 'condition2' are not related. Will this
cause a simulation vs. synthesis mismatch? What will happen in
simulation & synthesis for this kind of code?
Thanks.
In the following code,
always @(posedge clk or negedge rstn)
begin
if (rstn == 1'b0)
begin
.
.
a <= 1'b0;//reset condition
end
else
begin
.
.
if ( condition1 == TRUE )
begin
a <= 1'b0;
end
.
.
if (condition2 == TRUE)
begin
a <= 1'b1;
end
end
.
end
what's happening is that FF 'a' is being assigned under 2 unrelated if
statements. 'condition1' and 'condition2' are not related. Will this
cause a simulation vs. synthesis mismatch? What will happen in
simulation & synthesis for this kind of code?
Thanks.