Line 79... |
Line 79... |
-----------------------------------------------------------------------------
|
-----------------------------------------------------------------------------
|
signal s_EMPTY, s_FULL : std_logic;
|
signal s_EMPTY, s_FULL : std_logic;
|
signal s_RX_DATA : std_logic_vector(SIZE_DBUS_GPIF-1 downto 0);
|
signal s_RX_DATA : std_logic_vector(SIZE_DBUS_GPIF-1 downto 0);
|
signal s_RD_EN, s_WR_EN : std_logic;
|
signal s_RD_EN, s_WR_EN : std_logic;
|
signal s_TX_DATA : std_logic_vector(SIZE_DBUS_GPIF-1 downto 0);
|
signal s_TX_DATA : std_logic_vector(SIZE_DBUS_GPIF-1 downto 0);
|
signal s_RDYX : std_logic;
|
|
|
|
signal s_ABORT, s_ABORT_TMP : std_logic;
|
signal s_ABORT, s_ABORT_TMP : std_logic;
|
|
|
signal s_RX_DATA_TMP : std_logic_vector(SIZE_DBUS_GPIF-1 downto 0);
|
signal s_RX_DATA_TMP : std_logic_vector(SIZE_DBUS_GPIF-1 downto 0);
|
signal s_EMPTY_TMP, s_FULL_TMP : std_logic;
|
signal s_EMPTY_TMP, s_FULL_TMP : std_logic;
|
Line 158... |
Line 157... |
-- you want.
|
-- you want.
|
-- type : sequential
|
-- type : sequential
|
-- inputs : i_SYSCLK
|
-- inputs : i_SYSCLK
|
-- outputs: s_RX_DATA_TMP
|
-- outputs: s_RX_DATA_TMP
|
rx_throtling: process (i_SYSCLK, i_nReset)
|
rx_throtling: process (i_SYSCLK, i_nReset)
|
variable v_rx_throtle_count : std_logic_vector(6 downto 0); -- counter variable
|
-- counter variable
|
|
variable v_rx_throtle_count : std_logic_vector(6 downto 0);
|
begin
|
begin
|
if i_nReset = '0' then
|
if i_nReset = '0' then
|
v_rx_throtle_count := (others => '0');
|
v_rx_throtle_count := (others => '0');
|
s_RD_EN <= '0';
|
s_RD_EN <= '0';
|
elsif i_SYSCLK = '1' and i_SYSCLK'event then
|
elsif i_SYSCLK = '1' and i_SYSCLK'event then
|
if v_rx_throtle_count >= 63 then
|
if v_rx_throtle_count >= 2 then
|
s_RD_EN <= '1';
|
s_RD_EN <= '1';
|
v_rx_throtle_count := (others => '0');
|
v_rx_throtle_count := (others => '0');
|
else
|
else
|
v_rx_throtle_count := v_rx_throtle_count + 1;
|
v_rx_throtle_count := v_rx_throtle_count + 1;
|
s_RD_EN <= '0';
|
s_RD_EN <= '0';
|
Line 191... |
Line 191... |
end process rx_consumer;
|
end process rx_consumer;
|
|
|
|
|
-- dummy logic to "use" these signals and avoid that they are removed by
|
-- dummy logic to "use" these signals and avoid that they are removed by
|
-- the optimizer
|
-- the optimizer
|
process(s_RX_DATA_TMP, s_EMPTY_TMP, s_FULL_TMP, s_ABORT_TMP, s_RDYX)
|
process(s_RX_DATA_TMP, s_EMPTY_TMP, s_FULL_TMP, s_ABORT_TMP)
|
variable result : std_logic := '0';
|
variable result : std_logic := '0';
|
begin
|
begin
|
result := '0';
|
result := '0';
|
for i in s_RX_DATA_TMP'range loop
|
for i in s_RX_DATA_TMP'range loop
|
result := result or s_RX_DATA_TMP(i);
|
result := result or s_RX_DATA_TMP(i);
|
Line 218... |
Line 218... |
-- outputs: s_RX_DATA_TMP
|
-- outputs: s_RX_DATA_TMP
|
rom_adress_counter: process (i_SYSCLK, i_nReset)
|
rom_adress_counter: process (i_SYSCLK, i_nReset)
|
begin
|
begin
|
if i_nReset = '0' then
|
if i_nReset = '0' then
|
s_rom_adress <= (others => '0');
|
s_rom_adress <= (others => '0');
|
--DEBUG s_WR_EN <= '1';
|
--s_WR_EN <= '1';
|
s_WR_EN <= '0';
|
s_WR_EN <= '0';
|
elsif i_SYSCLK = '1' and i_SYSCLK'event then
|
elsif i_SYSCLK = '1' and i_SYSCLK'event then
|
if s_rom_adress = 24 then
|
if s_rom_adress = 24 then
|
s_rom_adress <= s_rom_adress;
|
s_rom_adress <= s_rom_adress;
|
s_WR_EN <= '0';
|
s_WR_EN <= '0';
|
else
|
else
|
s_rom_adress <= s_rom_adress + 1;
|
s_rom_adress <= s_rom_adress + 1;
|
--DEBUG s_WR_EN <= '1';
|
--s_WR_EN <= '1';
|
s_WR_EN <= '0';
|
s_WR_EN <= '0';
|
end if;
|
end if;
|
end if;
|
end if;
|
end process rom_adress_counter;
|
end process rom_adress_counter;
|
|
|