A
Al
Guest
Hi to all,
writing some code I've noticed that to enable the data on a FF with the
combination of two or more signals there are different ways of writing
code (of course), which will turn in different implementation (maybe).
I was wondering which is the difference between the following:
-- first case
process (clk, nrst)
if nrst = '0' then
A <= '0';
if rising_edge (clk) then
if enA_1 = '1' and enA_2 = '1' then
A <= B;
end if;
end if;
end process;
-- second case
process (clk, nrst)
if nrst = '0' then
A <= '0';
if rising_edge (clk) then
if enA_1 = '1' then
if enA_2 = '1' then
A <= B;
end if;
end if;
end if;
end process;
I think there will be quite a big difference in the implementation: a
combinational AND Cell and a sequential Cell will be implemented in the
first case, while only a sequential Cell in the second case. Is this
correct?
My consideration is based on the Actel gate array layout, but I think
the principle are the same for all the layouts (combinational and
sequential Cells).
Could you confirm this?
Thanks a lot
Al
--
Alessandro Basili
CERN, PH/UGC
Hardware Designer
writing some code I've noticed that to enable the data on a FF with the
combination of two or more signals there are different ways of writing
code (of course), which will turn in different implementation (maybe).
I was wondering which is the difference between the following:
-- first case
process (clk, nrst)
if nrst = '0' then
A <= '0';
if rising_edge (clk) then
if enA_1 = '1' and enA_2 = '1' then
A <= B;
end if;
end if;
end process;
-- second case
process (clk, nrst)
if nrst = '0' then
A <= '0';
if rising_edge (clk) then
if enA_1 = '1' then
if enA_2 = '1' then
A <= B;
end if;
end if;
end if;
end process;
I think there will be quite a big difference in the implementation: a
combinational AND Cell and a sequential Cell will be implemented in the
first case, while only a sequential Cell in the second case. Is this
correct?
My consideration is based on the Actel gate array layout, but I think
the principle are the same for all the layouts (combinational and
sequential Cells).
Could you confirm this?
Thanks a lot
Al
--
Alessandro Basili
CERN, PH/UGC
Hardware Designer