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

Use reg_dp_strobe_total_count constants from dp_components_pkg.vhd.

parent 8aba99eb
No related branches found
No related tags found
1 merge request!288Resolve L2SDP-836
...@@ -30,15 +30,17 @@ USE common_lib.common_pkg.ALL; ...@@ -30,15 +30,17 @@ USE common_lib.common_pkg.ALL;
PACKAGE dp_components_pkg IS PACKAGE dp_components_pkg IS
CONSTANT c_dp_clk_MHz : NATURAL := 200; CONSTANT c_dp_clk_MHz : NATURAL := 200;
CONSTANT c_dp_sync_timeout : NATURAL := c_dp_clk_MHz*10**6 + c_dp_clk_MHz*10**5; -- 10% margin for nominal 1 s CONSTANT c_dp_sync_timeout : NATURAL := c_dp_clk_MHz*10**6 + c_dp_clk_MHz*10**5; -- 10% margin for nominal 1 s
CONSTANT c_dp_bsn_monitor_v2_reg_adr_w : NATURAL := ceil_log2(7); -- = 3 CONSTANT c_dp_bsn_monitor_v2_reg_adr_w : NATURAL := ceil_log2(7); -- = 3
CONSTANT c_dp_bsn_monitor_v2_reg_adr_span : NATURAL := 2**c_dp_bsn_monitor_v2_reg_adr_w; -- = 8 CONSTANT c_dp_bsn_monitor_v2_reg_adr_span : NATURAL := 2**c_dp_bsn_monitor_v2_reg_adr_w; -- = 8
CONSTANT c_dp_strobe_total_count_reg_adr_w : NATURAL := ceil_log2(15*2 + 1); -- = 5 CONSTANT c_dp_strobe_total_count_reg_nof_words : NATURAL := 15*2 + 1; -- = 31
CONSTANT c_dp_strobe_total_count_reg_adr_span : NATURAL := 2**c_dp_strobe_total_count_reg_adr_w; -- = 32 CONSTANT c_dp_strobe_total_count_reg_adr_w : NATURAL := ceil_log2(c_dp_strobe_total_count_reg_nof_words); -- = 5
CONSTANT c_dp_strobe_total_count_nof_counts_max : NATURAL := 2**c_dp_strobe_total_count_reg_adr_w / 2 - 1; -- = 15 CONSTANT c_dp_strobe_total_count_reg_adr_span : NATURAL := 2**c_dp_strobe_total_count_reg_adr_w; -- = 32
CONSTANT c_dp_strobe_total_count_reg_nof_counts_max : NATURAL := 2**c_dp_strobe_total_count_reg_adr_w / 2 - 1; -- = 15
CONSTANT c_dp_strobe_total_count_reg_clear_adr : NATURAL := c_dp_strobe_total_count_reg_nof_counts_max*2; -- after counters in REGMAP
END dp_components_pkg; END dp_components_pkg;
......
...@@ -99,15 +99,15 @@ END dp_strobe_total_count; ...@@ -99,15 +99,15 @@ END dp_strobe_total_count;
ARCHITECTURE rtl OF dp_strobe_total_count IS ARCHITECTURE rtl OF dp_strobe_total_count IS
CONSTANT c_nof_counts_max : NATURAL := c_dp_strobe_total_count_nof_counts_max; -- fixed by REGMAP -- Fixed by REGMAP
CONSTANT c_nof_words : NATURAL := c_nof_counts_max*2 + 1; -- +1 for clear CONSTANT c_nof_counts_max : NATURAL := c_dp_strobe_total_count_reg_nof_counts_max;
CONSTANT c_clear_adr : NATURAL := c_nof_counts_max*2; -- after counters in REGMAP CONSTANT c_clear_adr : NATURAL := c_dp_strobe_total_count_reg_clear_adr;
-- Define the size of the MM slave register -- Define the size of the MM slave register
CONSTANT c_mm_reg : t_c_mem := (latency => 1, CONSTANT c_mm_reg : t_c_mem := (latency => 1,
adr_w => c_dp_strobe_total_count_reg_adr_w, adr_w => c_dp_strobe_total_count_reg_adr_w,
dat_w => g_mm_w, -- Use MM bus data width = c_word_w = 32 for all MM registers dat_w => g_mm_w, -- Use MM bus data width = c_word_w = 32 for all MM registers
nof_dat => c_nof_words, nof_dat => c_dp_strobe_total_count_reg_nof_words,
init_sl => '0'); init_sl => '0');
TYPE t_cnt_arr IS ARRAY (INTEGER RANGE <>) OF STD_LOGIC_VECTOR(g_count_w-1 DOWNTO 0); TYPE t_cnt_arr IS ARRAY (INTEGER RANGE <>) OF STD_LOGIC_VECTOR(g_count_w-1 DOWNTO 0);
......
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