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
No related branches found
No related tags found
No related merge requests found
......@@ -69,40 +69,40 @@ begin
-- Port A is read write from AXI controller, Port B is read only from logic
inst_refx_table: entity desy.ram_tdp
generic map(
G_ADDR => C_W_BPMID,
G_ADDR => C_W_MM_IDCNT,
G_DATA => C_W_BPMPOS
)
port map(
pi_clk_a => clk,
pi_en_a => reforbitx_i.en,
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,
po_data_a => reforbitx_o.data,
pi_clk_b => clk,
pi_en_b => '1',
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'),
po_data_b => table_refx
);
inst_refy_table: entity desy.ram_tdp
generic map(
G_ADDR => C_W_BPMID,
G_ADDR => C_W_MM_IDCNT,
G_DATA => C_W_BPMPOS
)
port map(
pi_clk_a => clk,
pi_en_a => reforbity_i.en,
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,
po_data_a => reforbity_o.data,
pi_clk_b => clk,
pi_en_b => '1',
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'),
po_data_b => table_refy
);
......
......@@ -52,13 +52,13 @@ addrmap corr_matrixpi {
mem {
desc = "X Reference orbit.";
memwidth = `C_W_BPMPOS;
mementries = 2**`C_W_BPMID;
mementries = 2**`C_W_MM_IDCNT;
} external REFORBITX;
mem {
desc = "Y Reference orbit.";
memwidth = `C_W_BPMPOS;
mementries = 2**`C_W_BPMID;
mementries = 2**`C_W_MM_IDCNT;
} external REFORBITY;
mem {
......
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