Hello.
I'm new to VHDL and sometimes get mixed up. Maybe you could help me clear something up.
I know variable assignment is instant whereas with signal assignment there is a delta delay. In the following code :
rd_en <= rd = '1' and empty ='0';
process
begin
if rising_edge(Clk) then
if Rd_en then
datum_out <= Fifo(0);
Fifo(14 downto 0) <= Fifo(15 downto 1);
wr_addrs := wr_addrs -1;
if wr_addrs = 7 then
empty <= '1';
end if;
end if;
end if;
end process;
My question is the following: Due to delta delay from signal assignment even if rd = '1' and empty = '0' i will not read until the next clock cycle because rd_en will nto instantly take on the value of '1'. Which means i'm basically losing one clock. If I don't declare rd_en as a signal and instead declare it as a variable. Then i could simply create another process stating if rd = '1' and empty = '0' then rd_en := 1; . Would doing so save me that clock cycle ? would it work ?
thank you in advance for any help.
I'm new to VHDL and sometimes get mixed up. Maybe you could help me clear something up.
I know variable assignment is instant whereas with signal assignment there is a delta delay. In the following code :
rd_en <= rd = '1' and empty ='0';
process
begin
if rising_edge(Clk) then
if Rd_en then
datum_out <= Fifo(0);
Fifo(14 downto 0) <= Fifo(15 downto 1);
wr_addrs := wr_addrs -1;
if wr_addrs = 7 then
empty <= '1';
end if;
end if;
end if;
end process;
My question is the following: Due to delta delay from signal assignment even if rd = '1' and empty = '0' i will not read until the next clock cycle because rd_en will nto instantly take on the value of '1'. Which means i'm basically losing one clock. If I don't declare rd_en as a signal and instead declare it as a variable. Then i could simply create another process stating if rd = '1' and empty = '0' then rd_en := 1; . Would doing so save me that clock cycle ? would it work ?
thank you in advance for any help.