dak-ju
Junior Member level 2
synthesis problem
Pls have a look at the following code in vhdl
if(clk'event and clk = 1) then
x <= y;
z <= x;
end if;
When I synthesize the code the rtl simulation shows z to be one clk cycle delayed version of y while in the netlist simulation it shows z to be two clk cycle delayed version of y(which should be the actual case.
My question are - is the above code perfect ? will it cause any problem in the validation of the h/w or will it be a problem in the final product on silicon?
Another observation that I would like to share is that if I add "after 1 ns " to line 2 and 3 of the above code I get perfect result in both rtl and netlist simulation.
Is it mandatory to add " after 1 ns" for all flop design?
Thanks and Regards
dak-ju
Pls have a look at the following code in vhdl
if(clk'event and clk = 1) then
x <= y;
z <= x;
end if;
When I synthesize the code the rtl simulation shows z to be one clk cycle delayed version of y while in the netlist simulation it shows z to be two clk cycle delayed version of y(which should be the actual case.
My question are - is the above code perfect ? will it cause any problem in the validation of the h/w or will it be a problem in the final product on silicon?
Another observation that I would like to share is that if I add "after 1 ns " to line 2 and 3 of the above code I get perfect result in both rtl and netlist simulation.
Is it mandatory to add " after 1 ns" for all flop design?
Thanks and Regards
dak-ju