Differences in Synthesis and Simulation between below codes.
Difference is
1st piece of code BLOCKING STATEMENT
RightShift = RightShift & Strobe;
2nd piece of code NON BLOCKING STATEMENT
RightShift <= RightShift & Strobe;
module test (
ClockB,
Strobe,
Xflag,
Mask,
RightShift,
SelectFirst,
CheckStop
);
input ClockB, Strobe, Xflag, Mask;
output RightShift, SelectFirst, CheckStop;
reg RightShift, SelectFirst, CheckStop;
always @ (negedge ClockB)
begin
RightShift = RightShift & Strobe;
SelectFirst <= RightShift | Xflag;
CheckStop <= SelectFirst ^ Mask;
end
endmodule
#################################################################################
module test (
ClockB,
Strobe,
Xflag,
Mask,
RightShift,
SelectFirst,
CheckStop
);
input ClockB, Strobe, Xflag, Mask;
output RightShift, SelectFirst, CheckStop;
reg RightShift, SelectFirst, CheckStop;
always @ (negedge ClockB)
begin
RightShift <= RightShift & Strobe;
SelectFirst <= RightShift | Xflag;
CheckStop <= SelectFirst ^ Mask;
end
endmodule
##############################################