H
himassk
Guest
Hi,
Please clarify me about blocking and nonblocking statement
difference in RTL design.
CODE1:
always@(X or Y or Z)
begin
Q1 = X & Y;
Q2 = Q1 & Z;
end
CODE2:
always@(X or Y or Z)
begin
Q1 <= X & Y;
Q2 <= Q1 & Z;
end
Theoritically Q2 in CODE 2 is assigned with the previous value of
Q1&Z and Q2 in CODE 1 is assigned with the updated value of Q1&Z.
But RTL design generated (after synthesis) for both codes are
obsolutely same.
If the RTL design mapped in to core is same then how these two codes
function differently?
In simulation we can see the difference because the compiler stores
the previous value of Q1 in to temperory buffer and assigns to Q2.
But in RTL design no buffer is available, so how can the
functionality difference occurs in practicle?
Thanks in advance.
Regards,
SruthiTeja.
Please clarify me about blocking and nonblocking statement
difference in RTL design.
CODE1:
always@(X or Y or Z)
begin
Q1 = X & Y;
Q2 = Q1 & Z;
end
CODE2:
always@(X or Y or Z)
begin
Q1 <= X & Y;
Q2 <= Q1 & Z;
end
Theoritically Q2 in CODE 2 is assigned with the previous value of
Q1&Z and Q2 in CODE 1 is assigned with the updated value of Q1&Z.
But RTL design generated (after synthesis) for both codes are
obsolutely same.
If the RTL design mapped in to core is same then how these two codes
function differently?
In simulation we can see the difference because the compiler stores
the previous value of Q1 in to temperory buffer and assigns to Q2.
But in RTL design no buffer is available, so how can the
functionality difference occurs in practicle?
Thanks in advance.
Regards,
SruthiTeja.