C
Christiano
Guest
In the book of Volnei pedroni in section 6.9 (bad Clocking) it shows that the optimal code for a circuit that works for Both transitions of CLOCK is the one below:
process(clk)
begin
if(clk'event and clk='1') then
x <= d;
end if;
end process;
process(clk)
begin
if(clk'event and clk='0') then
y <= d;
end if;
end process;
However, it would not be correct to write the form below?
process(clk)
begin
if(clk'event and clk='1') then
x <= d;
end if;
if(clk'event and clk='0') then
y <= d;
end if;
end process;
process(clk)
begin
if(clk'event and clk='1') then
x <= d;
end if;
end process;
process(clk)
begin
if(clk'event and clk='0') then
y <= d;
end if;
end process;
However, it would not be correct to write the form below?
process(clk)
begin
if(clk'event and clk='1') then
x <= d;
end if;
if(clk'event and clk='0') then
y <= d;
end if;
end process;