Commit 359052ac authored by Maciej Lipinski's avatar Maciej Lipinski Committed by Grzegorz Daniluk

[wr_streamers] added generic to set simulation startup timer value

when streamers are used in a simulation of top entity, the startup
timer is needed, thought it should be appropriate for the simulation
time. when streamers are simulated alone, the startup timer is
not needed. the added generic allows to set the timer (i.e. override
the default value to zero)
parent 2750389f
......@@ -182,7 +182,8 @@ package streamers_pkg is
g_tx_max_words_per_frame : integer := 256;
g_tx_timeout : integer := 1024;
g_escape_code_disable : boolean := FALSE;
g_simulation : integer := 0);
g_simulation : integer := 0;
g_sim_startup_cnt : integer := 6250);--100us
port (
clk_sys_i : in std_logic;
rst_n_i : in std_logic;
......
......@@ -74,8 +74,11 @@ entity xtx_streamer is
-- code. This is justified if only one block of a known number of words is sent/expected
g_escape_code_disable : boolean := FALSE;
-- simulation mode (used for startaup-timer)
g_simulation : integer :=0
-- simulation mode: it is set to override the startaup-timer, the value with which
-- the timer is overriden is set in the second generic
g_simulation : integer :=0;
-- startup counter, used only in simulatin mode (value in 16ns cycles)
g_sim_startup_cnt : integer := 6250-- 100us
);
port (
......@@ -176,8 +179,7 @@ architecture rtl of xtx_streamer is
signal link_ok_delay_cnt : unsigned(25 downto 0);
constant c_link_ok_rst_delay : unsigned(25 downto 0) := to_unsigned(62500000, 26);-- 1s
constant c_link_ok_rst_delay_sim : unsigned(25 downto 0) := to_unsigned(6250 , 26);-- 100us
constant c_link_ok_rst_delay_sim : unsigned(25 downto 0) := to_unsigned(g_sim_startup_cnt, 26);
begin -- rtl
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment