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

Generate completely independent 2009 and 2024 versions dependent on g_tree_len.

parent f2b6cd2d
No related branches found
No related tags found
1 merge request!418Do not assign default value for g_reset in common_fifo_sc. To avoid clutter in...
...@@ -79,6 +79,7 @@ begin ...@@ -79,6 +79,7 @@ begin
-- 2009 -- 2009
-- Capture asynchronous reset assertion, to also support i_rst when there is -- Capture asynchronous reset assertion, to also support i_rst when there is
-- no clk. -- no clk.
without_pipe : if g_tree_len = 0 generate
u_async : entity work.common_async u_async : entity work.common_async
generic map ( generic map (
g_rst_level => c_out_rst_level, g_rst_level => c_out_rst_level,
...@@ -88,20 +89,31 @@ begin ...@@ -88,20 +89,31 @@ begin
rst => i_rst, rst => i_rst,
clk => clk, clk => clk,
din => c_out_rst_level_n, din => c_out_rst_level_n,
dout => o_rst dout => out_rst
); );
end generate;
-- 2024 -- 2024
-- Pass on synchronized reset with sufficient g_tree_len to ease timing -- Pass on synchronized reset with sufficient g_tree_len to ease timing
-- closure by FF duplication in out_rst tree. Keep rst = '0' to break -- closure by FF duplication in out_rst tree. Keep rst = '0' to break
-- combinatorial path with in_rst to ease timing closure in the reset tree -- combinatorial path with in_rst to ease timing closure in the reset tree
-- network. Use g_tree_len = 0 for wire out_rst <= o_rst, so no reset tree -- network. Use g_tree_len = 0 for no clocked reset tree as in 2009.
-- as in 2009. -- Instantiate u_async again to keep 2009 and 2024 completely independent.
no_pipe : if g_tree_len = 0 generate -- To avoid delta-cycle differences due to e.g. out_rst <= o_rst when
out_rst <= o_rst; -- wires -- g_tree_len = 0, that could lead to different results in a simulation tb.
end generate; with_pipe : if g_tree_len > 0 generate
u_async : entity work.common_async
generic map (
g_rst_level => c_out_rst_level,
g_delay_len => g_delay_len
)
port map (
rst => i_rst,
clk => clk,
din => c_out_rst_level_n,
dout => o_rst
);
gen_pipe : if g_tree_len > 0 generate
u_pipe : entity work.common_async u_pipe : entity work.common_async
generic map ( generic map (
g_rst_level => c_out_rst_level, g_rst_level => c_out_rst_level,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment