]> jspc29.x-matter.uni-frankfurt.de Git - trb3.git/commitdiff
Added automatic hardware information to CTS design
authorJan Michel <j.michel@gsi.de>
Tue, 7 May 2013 13:57:50 +0000 (15:57 +0200)
committerJan Michel <j.michel@gsi.de>
Tue, 7 May 2013 13:57:50 +0000 (15:57 +0200)
cts/config_default.vhd
cts/config_mainz_a2.vhd
cts/trb3_central.vhd

index 6676aa03d3c5dce95d23bdfe7d87219981e30efa..c6bb52f34b106c0313136c67a87cef2953e0c75c 100644 (file)
@@ -40,7 +40,8 @@ package config is
     type hub_mii_t is array(0 to 1) of integer;    
     type hub_ct    is array(0 to 16) of integer;
     type hub_cfg_t is array(0 to 1) of hub_ct;    
-
+    type hw_info_t is array(0 to 1) of std_logic_vector(31 downto 0);
+    
   --this is used to select the proper configuration in the main code    
     constant CFG_MODE : integer;
     
@@ -55,14 +56,14 @@ package config is
                                                   (1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0));
     constant IS_UPLINK_ONLY_ARR   : hub_cfg_t := ((0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0),
                                                   (0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0)); 
-                           
+    constant HARDWARE_INFO_ARR    : hw_info_t := (x"9000CEE0",x"9000CEE2");
                           
     constant INTERNAL_NUM         : integer;
     constant INTERFACE_NUM        : integer;
     constant IS_UPLINK            : hub_ct;
     constant IS_DOWNLINK          : hub_ct;
     constant IS_UPLINK_ONLY       : hub_ct;
-    
+    constant HARDWARE_INFO        : std_logic_vector(31 downto 0);
     
     -- MII_NUMBER        => 5, --(8)
     -- INT_NUMBER        => 5,
@@ -97,6 +98,7 @@ package body config is
   constant CFG_MODE : integer := USE_4_SFP;
   constant cts_rdo_additional_ports : integer := 1 + INCLUDE_TDC;
 
+  constant HARDWARE_INFO        : std_logic_vector (31 downto 0) := HARDWARE_INFO_ARR(INCLUDE_TDC);
   constant INTERNAL_NUM         : integer := INTERNAL_NUM_ARR(CFG_MODE);
   constant INTERFACE_NUM        : integer := INTERFACE_NUM_ARR(CFG_MODE);
   constant IS_UPLINK            : hub_ct  := IS_UPLINK_ARR(CFG_MODE);
index 7c57e9a4fd6f13138741fcb17949dafc66124c54..6ff60ff2555184ac768589051ed5258f15e3b2e0 100644 (file)
@@ -40,6 +40,7 @@ package config is
     type hub_mii_t is array(0 to 1) of integer;    
     type hub_ct    is array(0 to 16) of integer;
     type hub_cfg_t is array(0 to 1) of hub_ct;    
+    type hw_info_t is array(0 to 1) of std_logic_vector(31 downto 0);    
 
   --this is used to select the proper configuration in the main code    
     constant CFG_MODE : integer;
@@ -55,14 +56,14 @@ package config is
                                                   (1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0));
     constant IS_UPLINK_ONLY_ARR   : hub_cfg_t := ((0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0),
                                                   (0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0)); 
-                           
+    constant HARDWARE_INFO_ARR    : hw_info_t := (x"9000CEE0",x"9000CEE2");                           
                           
     constant INTERNAL_NUM         : integer;
     constant INTERFACE_NUM        : integer;
     constant IS_UPLINK            : hub_ct;
     constant IS_DOWNLINK          : hub_ct;
     constant IS_UPLINK_ONLY       : hub_ct;
-    
+    constant HARDWARE_INFO        : std_logic_vector(31 downto 0);    
     
     -- MII_NUMBER        => 5, --(8)
     -- INT_NUMBER        => 5,
@@ -97,6 +98,7 @@ package body config is
   constant CFG_MODE : integer := USE_4_SFP;
   constant cts_rdo_additional_ports : integer := 1 + INCLUDE_TDC;
 
+  constant HARDWARE_INFO        : std_logic_vector (31 downto 0) := HARDWARE_INFO_ARR(INCLUDE_TDC);
   constant INTERNAL_NUM         : integer := INTERNAL_NUM_ARR(CFG_MODE);
   constant INTERFACE_NUM        : integer := INTERFACE_NUM_ARR(CFG_MODE);
   constant IS_UPLINK            : hub_ct  := IS_UPLINK_ARR(CFG_MODE);
index 3effa893210e767927829d4c2a07da6dee709698..0f11f5e0e8e9039ee6b6e4f2084dfeedcc2908ac 100644 (file)
@@ -759,7 +759,7 @@ THE_MEDIA_ONBOARD : trb_net16_med_ecp3_sfp_4_onboard
     MII_IS_DOWNLINK      => IS_DOWNLINK,
     MII_IS_UPLINK_ONLY   => IS_UPLINK_ONLY,    
     COMPILE_VERSION                  => x"0001",
-    HARDWARE_VERSION                 => x"9000CEE0",
+    HARDWARE_VERSION                 => HARDWARE_INFO,
     INIT_ENDPOINT_ID                 => x"0005",
     BROADCAST_BITMASK                => x"7E",
     CLOCK_FREQUENCY                  => 100,