T
Tommy
Guest
Is there any good reason to have two almost similar processes, with
almost similar sensitivity list?
I have a problem with a size of the design. I'm using Lattice LC4128V
and currently the design is using 130/128 logic functions. In on vhdl
block there is two processes almost similar, like shown below. I got
the code from the other designer and I'm just starting with VHDL, so I
ask for your help. Can I save in logic elements by combining these two
processes and does it affect the functionality or timing in some way?
architecture ltr of dio_write is
signal IO_WRITE_tmp : std_logic;
begin
process(AT_CLK, xRESET_IN)
begin
if(xRESET_IN = '0') then
D_WRITE <= '0';
elsif (AT_CLK = '1' and AT_CLK'event) then
D_WRITE <= not AT_xWR;
end if;
end process;
process (D_WRITE, AT_CLK, xRESET_IN)
begin
if(xRESET_IN = '0') then
IO_WRITE_tmp <= '0';
elsif ( AT_CLK='1' and AT_CLK'event) then --D_WRITE='1' and
IO_WRITE_tmp <= D_WRITE;
end if;
end process;
IO_WRITE <= not ((not IO_WRITE_tmp) and (not AT_xWR));
end rtl;"
almost similar sensitivity list?
I have a problem with a size of the design. I'm using Lattice LC4128V
and currently the design is using 130/128 logic functions. In on vhdl
block there is two processes almost similar, like shown below. I got
the code from the other designer and I'm just starting with VHDL, so I
ask for your help. Can I save in logic elements by combining these two
processes and does it affect the functionality or timing in some way?
architecture ltr of dio_write is
signal IO_WRITE_tmp : std_logic;
begin
process(AT_CLK, xRESET_IN)
begin
if(xRESET_IN = '0') then
D_WRITE <= '0';
elsif (AT_CLK = '1' and AT_CLK'event) then
D_WRITE <= not AT_xWR;
end if;
end process;
process (D_WRITE, AT_CLK, xRESET_IN)
begin
if(xRESET_IN = '0') then
IO_WRITE_tmp <= '0';
elsif ( AT_CLK='1' and AT_CLK'event) then --D_WRITE='1' and
IO_WRITE_tmp <= D_WRITE;
end if;
end process;
IO_WRITE <= not ((not IO_WRITE_tmp) and (not AT_xWR));
end rtl;"