Skip to content
Snippets Groups Projects
Commit 0775eedc authored by BRONES Romain's avatar BRONES Romain
Browse files

fix: Reduce memory area by using real number of BPM

*  Instead of deriving ID field width
parent 3011a6a0
Branches
Tags
No related merge requests found
...@@ -69,40 +69,40 @@ begin ...@@ -69,40 +69,40 @@ begin
-- Port A is read write from AXI controller, Port B is read only from logic -- Port A is read write from AXI controller, Port B is read only from logic
inst_refx_table: entity desy.ram_tdp inst_refx_table: entity desy.ram_tdp
generic map( generic map(
G_ADDR => C_W_BPMID, G_ADDR => C_W_MM_IDCNT,
G_DATA => C_W_BPMPOS G_DATA => C_W_BPMPOS
) )
port map( port map(
pi_clk_a => clk, pi_clk_a => clk,
pi_en_a => reforbitx_i.en, pi_en_a => reforbitx_i.en,
pi_we_a => reforbitx_i.we, pi_we_a => reforbitx_i.we,
pi_addr_a => reforbitx_i.addr(C_W_BPMID-1 downto 0), pi_addr_a => reforbitx_i.addr(C_W_MM_IDCNT-1 downto 0),
pi_data_a => reforbitx_i.data, pi_data_a => reforbitx_i.data,
po_data_a => reforbitx_o.data, po_data_a => reforbitx_o.data,
pi_clk_b => clk, pi_clk_b => clk,
pi_en_b => '1', pi_en_b => '1',
pi_we_b => '0', pi_we_b => '0',
pi_addr_b => bpm_id, pi_addr_b => bpm_id(C_W_MM_IDCNT-1 downto 0),
pi_data_b => (others => '0'), pi_data_b => (others => '0'),
po_data_b => table_refx po_data_b => table_refx
); );
inst_refy_table: entity desy.ram_tdp inst_refy_table: entity desy.ram_tdp
generic map( generic map(
G_ADDR => C_W_BPMID, G_ADDR => C_W_MM_IDCNT,
G_DATA => C_W_BPMPOS G_DATA => C_W_BPMPOS
) )
port map( port map(
pi_clk_a => clk, pi_clk_a => clk,
pi_en_a => reforbity_i.en, pi_en_a => reforbity_i.en,
pi_we_a => reforbity_i.we, pi_we_a => reforbity_i.we,
pi_addr_a => reforbity_i.addr(C_W_BPMID-1 downto 0), pi_addr_a => reforbity_i.addr(C_W_MM_IDCNT-1 downto 0),
pi_data_a => reforbity_i.data, pi_data_a => reforbity_i.data,
po_data_a => reforbity_o.data, po_data_a => reforbity_o.data,
pi_clk_b => clk, pi_clk_b => clk,
pi_en_b => '1', pi_en_b => '1',
pi_we_b => '0', pi_we_b => '0',
pi_addr_b => bpm_id, pi_addr_b => bpm_id(C_W_MM_IDCNT-1 downto 0),
pi_data_b => (others => '0'), pi_data_b => (others => '0'),
po_data_b => table_refy po_data_b => table_refy
); );
......
...@@ -52,13 +52,13 @@ addrmap corr_matrixpi { ...@@ -52,13 +52,13 @@ addrmap corr_matrixpi {
mem { mem {
desc = "X Reference orbit."; desc = "X Reference orbit.";
memwidth = `C_W_BPMPOS; memwidth = `C_W_BPMPOS;
mementries = 2**`C_W_BPMID; mementries = 2**`C_W_MM_IDCNT;
} external REFORBITX; } external REFORBITX;
mem { mem {
desc = "Y Reference orbit."; desc = "Y Reference orbit.";
memwidth = `C_W_BPMPOS; memwidth = `C_W_BPMPOS;
mementries = 2**`C_W_BPMID; mementries = 2**`C_W_MM_IDCNT;
} external REFORBITY; } external REFORBITY;
mem { mem {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment