Forum Discussion
Altera_Forum
Honored Contributor
11 years agoThe Quartus compiler seems to create a combinational and a registered variant of variable t1 and uses it to fed the different expressions containing t1 respectively. Interestingly, the functionally identical register t1 and D~reg0 are kept separate.
I think, it makes no sense to say variable t1 is not registered. Another example of registered variable usage is the Quartus binary counter template.library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
entity test is
Port ( clk: in std_logic;
A: in STD_LOGIC;
B: in STD_LOGIC;
C : out STD_LOGIC;
D : out STD_LOGIC;
E : out STD_LOGIC);
end test;
architecture rtl of test is
begin
process (clk)
variable t1: std_logic;
begin
if rising_edge(clk) then
C <= t1;
t1 := A and B;
D <= t1;
end if;
E <= t1;
end process;
end rtl;