Skip to content
Snippets Groups Projects
Commit 75cd0184 authored by Eric Kooistra's avatar Eric Kooistra
Browse files

Report that g_nof_blocks >= 2. Disable output in case of re-enable, to ensure...

Report that g_nof_blocks >= 2. Disable output in case of re-enable, to ensure re-start with nof_blk_max sync in first out_sync interval.
parent 6e7c766c
No related branches found
No related tags found
1 merge request!132Renamed proc_dp_verify_sync_v2() into overloaded proc_dp_verify_sync() and...
......@@ -102,7 +102,7 @@ USE work.dp_stream_pkg.ALL;
ENTITY dp_bsn_sync_scheduler IS
GENERIC (
g_bsn_w : NATURAL := c_dp_stream_bsn_w;
g_block_size : NATURAL := 256; -- = number of data valid per BSN block
g_block_size : NATURAL := 256; -- = number of data valid per BSN block, must be >= 2
g_pipeline : NATURAL := 1 -- use '1' on HW, use '0' for easier debugging in Wave window
);
PORT (
......@@ -140,8 +140,8 @@ ARCHITECTURE rtl OF dp_bsn_sync_scheduler IS
nof_blk_min : NATURAL;
nof_blk_max : NATURAL;
nof_blk : NATURAL;
extra : INTEGER;-- RANGE -g_block_size TO g_block_size;
accumulate : INTEGER;-- RANGE -g_block_size TO g_block_size;
extra : NATURAL RANGE 0 TO g_block_size;
accumulate : NATURAL RANGE 0 TO g_block_size*2;
hold_eop : STD_LOGIC;
update_bsn : STD_LOGIC;
output_enable : STD_LOGIC;
......@@ -160,6 +160,8 @@ ARCHITECTURE rtl OF dp_bsn_sync_scheduler IS
BEGIN
ASSERT g_block_size >= 2 REPORT "g_block_size must be >= 2." SEVERITY FAILURE;
-- Capture monitoring info
mon_input_current_bsn <= in_sosi.bsn(g_bsn_w-1 DOWNTO 0) WHEN rising_edge(clk) AND in_sosi.sop = '1';
mon_input_bsn_at_sync <= in_sosi.bsn(g_bsn_w-1 DOWNTO 0) WHEN rising_edge(clk) AND in_sosi.sync = '1';
......@@ -225,11 +227,20 @@ BEGIN
v.blk_cnt := 0;
END IF;
-- If ctrl_enable is still active after initialization then continue with enable
-- Enable / disable control
IF ctrl_enable = '0' THEN
v.enable := '0';
v.enable := '0'; -- disable when ctrl_enable requests disable
ELSIF ctrl_enable_evt = '1' THEN
v.enable := '0'; -- disable when ctrl_enable requests re-enable
ELSIF r.enable_init = '0' THEN
v.enable := '1';
IF r.hold_eop = '1' THEN
-- enable after in_sosi.eop, so that r.enable has caused
-- v.output_enable = '0', to ensure that a re-enable starts
-- with the nof_blk_max sync interval. Otherwise
-- v.output_enable = '1' can cause that re-enable can restart
-- with the nof_blk_min sync interval
v.enable := '1';
END IF;
END IF;
-- Hold input eop to detect when input has finished a block and to detect
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment