HMBSI1536-87 Introduced reset for command queue in data streamer component
This commit is contained in:
parent
5020183bdc
commit
bb72dda61b
1 changed files with 25 additions and 3 deletions
|
|
@ -114,7 +114,7 @@ architecture rtl of data_streamer_7 is
|
|||
|
||||
constant CONST_IP_ID_NUMBER : std_logic_vector(7 downto 0) := 8x"0d";
|
||||
constant CONST_IP_ID_MFR_NUMBER: std_logic_vector(7 downto 0) := 8x"04";
|
||||
constant CONST_IP_VER_MINOR : std_logic_vector(7 downto 0) := 8x"05";
|
||||
constant CONST_IP_VER_MINOR : std_logic_vector(7 downto 0) := 8x"06";
|
||||
constant CONST_IP_VER_MAJOR : std_logic_vector(7 downto 0) := 8x"07";
|
||||
|
||||
subtype CMD_BITS is natural range 3 downto 0;
|
||||
|
|
@ -217,7 +217,10 @@ architecture rtl of data_streamer_7 is
|
|||
|
||||
signal is_slim : std_logic;
|
||||
|
||||
signal cmd_available_step : std_logic;
|
||||
signal cmd_available_step : std_logic;
|
||||
|
||||
signal cmd_queue_rst_sreg : std_logic_vector( 2 downto 0);
|
||||
signal cmd_queue_rst : std_logic;
|
||||
|
||||
begin
|
||||
|
||||
|
|
@ -232,6 +235,25 @@ begin
|
|||
-- ---------------------------------------
|
||||
-- COMMAND QUEUE
|
||||
-- ---------------------------------------
|
||||
|
||||
-- This process initialises a reset shift register for the command queue whenever the FPGA is reset
|
||||
-- to an all ones pattern. When the FPGA reset goes away the shift register starts filling up with '0's.
|
||||
CMD_Q_RST : process (clk, rst_n)
|
||||
begin
|
||||
if rst_n = '0' then
|
||||
cmd_queue_rst_sreg <= (others => '1');
|
||||
elsif (clk'event and clk = '1') then
|
||||
-- Shift in '0' on every rising edge of the clock when there is no FPGA reset active
|
||||
cmd_queue_rst_sreg <= cmd_queue_rst_sreg(cmd_queue_rst_sreg'LENGTH-2 downto 0) & '0';
|
||||
end if;
|
||||
end process CMD_Q_RST;
|
||||
|
||||
-- The final reset driving the command queue is the logic OR of control_clear_cmd comming from
|
||||
-- the register block and the MSB of the reset shift register. This results on the command queue
|
||||
-- receiving a clear whenever the FPGA itself is reset.
|
||||
cmd_queue_rst <= control_clear_cmd or cmd_queue_rst_sreg(cmd_queue_rst_sreg'LENGTH-1);
|
||||
|
||||
-- Instantiate the command queue
|
||||
cmd_queue_inst : entity work.cmd_queue_7
|
||||
generic map(
|
||||
QUEUE_DEPTH => CMD_QUEUE_DEPTH
|
||||
|
|
@ -239,7 +261,7 @@ begin
|
|||
port map
|
||||
(
|
||||
clock => clk,
|
||||
sclr => control_clear_cmd,
|
||||
sclr => cmd_queue_rst,
|
||||
|
||||
wrreq => cmd_q_write,
|
||||
data => cmd_q_write_data,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue