From 33141cff8f5d0379e92607992493dd7eba40ef5e Mon Sep 17 00:00:00 2001
From: David Gabriel Monk <david.gabriel.monk@cern.ch>
Date: Wed, 12 Oct 2022 22:43:14 +0200
Subject: [PATCH] Update top/firmware/hdl/ipbus_decode_emp_payload.vhd

---
 top/firmware/hdl/ipbus_decode_emp_payload.vhd | 62 ++++++++++++-------
 1 file changed, 40 insertions(+), 22 deletions(-)

diff --git a/top/firmware/hdl/ipbus_decode_emp_payload.vhd b/top/firmware/hdl/ipbus_decode_emp_payload.vhd
index 34ddc33b..c6169d97 100644
--- a/top/firmware/hdl/ipbus_decode_emp_payload.vhd
+++ b/top/firmware/hdl/ipbus_decode_emp_payload.vhd
@@ -1,10 +1,10 @@
 -- Address decode logic for ipbus fabric
---
+-- 
 -- This file has been AUTOGENERATED from the address table - do not hand edit
---
+-- 
 -- We assume the synthesis tool is clever enough to recognise exclusive conditions
 -- in the if statement.
---
+-- 
 -- Dave Newbold, February 2011
 
 library IEEE;
@@ -17,7 +17,7 @@ package ipbus_decode_emp_payload is
   subtype ipbus_sel_t is std_logic_vector(IPBUS_SEL_WIDTH - 1 downto 0);
   function ipbus_sel_emp_payload(addr : in std_logic_vector(31 downto 0)) return ipbus_sel_t;
 
--- START automatically generated VHDL (Thu Sep 15 13:10:42 2022)
+-- START automatically generated VHDL (Wed Oct 12 22:40:11 2022)
   constant N_SLV_FE: integer := 0;
   constant N_SLV_CSR: integer := 1;
   constant N_SLV_FE_CHAN: integer := 2;
@@ -25,11 +25,17 @@ package ipbus_decode_emp_payload is
   constant N_SLV_MPROCESSOR: integer := 4;
   constant N_SLV_MEM1: integer := 5;
   constant N_SLV_MEM2: integer := 6;
-  constant N_SLV_BE_DAQ: integer := 7;
-  constant N_SLAVES: integer := 8;
+  constant N_SLV_MEM3: integer := 7;
+  constant N_SLV_MEM4: integer := 8;
+  constant N_SLV_MEM5: integer := 9;
+  constant N_SLV_MEM6: integer := 10;
+  constant N_SLV_MEM7: integer := 11;
+  constant N_SLV_MEM8: integer := 12;
+  constant N_SLV_BE_DAQ: integer := 13;
+  constant N_SLAVES: integer := 14;
 -- END automatically generated VHDL
 
-
+    
 end ipbus_decode_emp_payload;
 
 package body ipbus_decode_emp_payload is
@@ -38,21 +44,33 @@ package body ipbus_decode_emp_payload is
     variable sel: ipbus_sel_t;
   begin
 
--- START automatically generated VHDL (Thu Sep 15 13:10:42 2022)
-    if    std_match(addr, "-0----------------00000000000000") then
-      sel := ipbus_sel_t(to_unsigned(N_SLV_FE, IPBUS_SEL_WIDTH)); -- fe / base 0x00000000 / mask 0x40003fff
-    elsif std_match(addr, "-0----------------000000000001--") then
-      sel := ipbus_sel_t(to_unsigned(N_SLV_CSR, IPBUS_SEL_WIDTH)); -- csr / base 0x00000004 / mask 0x40003ffc
-    elsif std_match(addr, "-0----------------00001---------") then
-      sel := ipbus_sel_t(to_unsigned(N_SLV_FE_CHAN, IPBUS_SEL_WIDTH)); -- fe_chan / base 0x00000200 / mask 0x40003e00
-    elsif std_match(addr, "-0----------------00011111111111") then
-      sel := ipbus_sel_t(to_unsigned(N_SLV_MPROC_CTRL, IPBUS_SEL_WIDTH)); -- mproc_ctrl / base 0x000007ff / mask 0x40003fff
-    elsif std_match(addr, "-0----------------0010000-------") then
-      sel := ipbus_sel_t(to_unsigned(N_SLV_MPROCESSOR, IPBUS_SEL_WIDTH)); -- mprocessor / base 0x00000800 / mask 0x40003f80
-    elsif std_match(addr, "-0----------------01000---------") then
-      sel := ipbus_sel_t(to_unsigned(N_SLV_MEM1, IPBUS_SEL_WIDTH)); -- mem1 / base 0x00001000 / mask 0x40003e00
-    elsif std_match(addr, "-0----------------10000---------") then
-      sel := ipbus_sel_t(to_unsigned(N_SLV_MEM2, IPBUS_SEL_WIDTH)); -- mem2 / base 0x00002000 / mask 0x40003e00
+-- START automatically generated VHDL (Wed Oct 12 22:40:11 2022)
+    if    std_match(addr, "-0--------------0000000000000000") then
+      sel := ipbus_sel_t(to_unsigned(N_SLV_FE, IPBUS_SEL_WIDTH)); -- fe / base 0x00000000 / mask 0x4000ffff
+    elsif std_match(addr, "-0--------------00000000000001--") then
+      sel := ipbus_sel_t(to_unsigned(N_SLV_CSR, IPBUS_SEL_WIDTH)); -- csr / base 0x00000004 / mask 0x4000fffc
+    elsif std_match(addr, "-0--------------0000001---------") then
+      sel := ipbus_sel_t(to_unsigned(N_SLV_FE_CHAN, IPBUS_SEL_WIDTH)); -- fe_chan / base 0x00000200 / mask 0x4000fe00
+    elsif std_match(addr, "-0--------------0000011111111111") then
+      sel := ipbus_sel_t(to_unsigned(N_SLV_MPROC_CTRL, IPBUS_SEL_WIDTH)); -- mproc_ctrl / base 0x000007ff / mask 0x4000ffff
+    elsif std_match(addr, "-0--------------000010000-------") then
+      sel := ipbus_sel_t(to_unsigned(N_SLV_MPROCESSOR, IPBUS_SEL_WIDTH)); -- mprocessor / base 0x00000800 / mask 0x4000ff80
+    elsif std_match(addr, "-0--------------0001000---------") then
+      sel := ipbus_sel_t(to_unsigned(N_SLV_MEM1, IPBUS_SEL_WIDTH)); -- mem1 / base 0x00001000 / mask 0x4000fe00
+    elsif std_match(addr, "-0--------------0010000---------") then
+      sel := ipbus_sel_t(to_unsigned(N_SLV_MEM2, IPBUS_SEL_WIDTH)); -- mem2 / base 0x00002000 / mask 0x4000fe00
+    elsif std_match(addr, "-0--------------0011000---------") then
+      sel := ipbus_sel_t(to_unsigned(N_SLV_MEM3, IPBUS_SEL_WIDTH)); -- mem3 / base 0x00003000 / mask 0x4000fe00
+    elsif std_match(addr, "-0--------------0100000---------") then
+      sel := ipbus_sel_t(to_unsigned(N_SLV_MEM4, IPBUS_SEL_WIDTH)); -- mem4 / base 0x00004000 / mask 0x4000fe00
+    elsif std_match(addr, "-0--------------0101000---------") then
+      sel := ipbus_sel_t(to_unsigned(N_SLV_MEM5, IPBUS_SEL_WIDTH)); -- mem5 / base 0x00005000 / mask 0x4000fe00
+    elsif std_match(addr, "-0--------------0110000---------") then
+      sel := ipbus_sel_t(to_unsigned(N_SLV_MEM6, IPBUS_SEL_WIDTH)); -- mem6 / base 0x00006000 / mask 0x4000fe00
+    elsif std_match(addr, "-0--------------0111000---------") then
+      sel := ipbus_sel_t(to_unsigned(N_SLV_MEM7, IPBUS_SEL_WIDTH)); -- mem7 / base 0x00007000 / mask 0x4000fe00
+    elsif std_match(addr, "-0--------------1000000---------") then
+      sel := ipbus_sel_t(to_unsigned(N_SLV_MEM8, IPBUS_SEL_WIDTH)); -- mem8 / base 0x00008000 / mask 0x4000fe00
     elsif std_match(addr, "-1------------------------------") then
       sel := ipbus_sel_t(to_unsigned(N_SLV_BE_DAQ, IPBUS_SEL_WIDTH)); -- be_daq / base 0x40000000 / mask 0x40000000
 -- END automatically generated VHDL
-- 
GitLab