]> jspc29.x-matter.uni-frankfurt.de Git - TOMcat.git/commitdiff
OOB registers added
authorMichael Boehmer <mboehmer@ph.tum.de>
Sun, 31 Jul 2022 21:08:31 +0000 (23:08 +0200)
committerMichael Boehmer <mboehmer@ph.tum.de>
Sun, 31 Jul 2022 21:08:31 +0000 (23:08 +0200)
gbe/tomcat_gbe.prj
gbe/tomcat_gbe.vhd

index aec088ac82e23c51705d51504b386e3bb7f7d618..15b97152d4307924bd958e2d518e4f7804adcd62 100644 (file)
@@ -62,7 +62,7 @@ add_file -vhdl -lib work "../../trbnet/trb_net_components.vhd"
 add_file -vhdl -lib work "tdc_release/tdc_version.vhd"
 add_file -vhdl -lib work "../../trbnet/gbe_trb/base/trb_net_gbe_protocols.vhd"
 add_file -vhdl -lib work "../../trbnet/gbe_trb/base/trb_net_gbe_components.vhd"
-add_file -vhdl -lib work "../../trbnet/trb_net16_hub_func.vhd"
+#add_file -vhdl -lib work "../../trbnet/trb_net16_hub_func.vhd"
 
 #Basic Infrastructure
 add_file -vhdl -lib work "../../trb3sc/gbe_hub/reset_handler.vhd"
@@ -197,9 +197,9 @@ add_file -vhdl -lib work "../../trbnet/gbe_trb/protocols/trb_net16_gbe_response_
 add_file -vhdl -lib work "../../trbnet/gbe_trb/protocols/trb_net16_gbe_response_constructor_Ping.vhd"
 add_file -vhdl -lib work "../../trbnet/gbe_trb/protocols/trb_net16_gbe_response_constructor_DHCP.vhd"
 add_file -vhdl -lib work "../../trbnet/gbe_trb/protocols/trb_net16_gbe_response_constructor_SCTRL.vhd"
-add_file -vhdl -lib work "../../trbnet/gbe_trb/protocols/trb_net16_gbe_response_constructor_KillPing.vhd"
+#add_file -vhdl -lib work "../../trbnet/gbe_trb/protocols/trb_net16_gbe_response_constructor_KillPing.vhd"
 add_file -vhdl -lib work "../../trbnet/gbe_trb/protocols/trb_net16_gbe_response_constructor_Forward.vhd"
-add_file -verilog -lib work "../../trbnet/gbe_trb_ecp5/media/ecp5-5g/serdes_gbe_softlogic.v"
+#add_file -verilog -lib work "../../trbnet/gbe_trb_ecp5/media/ecp5-5g/serdes_gbe_softlogic.v"
 
 add_file -vhdl -lib work "../../trbnet/gbe_trb/ipcores/ecp5/fifo_4096x9.vhd"
 add_file -vhdl -lib work "../../trbnet/gbe_trb/ipcores/ecp5/fifo_512x32.vhd"
index 258b5030703f1d3f5c2e0997ab891b567dba40b1..a857b5264ce3903b94d2822518128585269e8f9c 100644 (file)
@@ -186,6 +186,13 @@ architecture arch of tomcat_gbe is
   
   signal sgl_debug                  : std_logic_vector(15 downto 0);
 
+  signal blink_counter              : unsigned(9 downto 0);
+  
+  signal oob_reg_0_int              : std_logic_vector(31 downto 0);
+  signal oob_reg_1_int              : std_logic_vector(31 downto 0);
+  signal oob_reg_2_int              : std_logic_vector(31 downto 0);
+  signal oob_reg_3_int              : std_logic_vector(31 downto 0);
+  
 begin
 
 ---------------------------------------------------------------------------
@@ -222,12 +229,23 @@ begin
   );
   
 
+---------------------------------------------------------------------------
+---------------------------------------------------------------------------
+THE_BLINK_COUNTER_PROC: process( clk_sys )
+begin
+  if( rising_edge(clk_sys) ) then
+    if( tick_ms_int = '1' ) then
+      blink_counter <= blink_counter + 1;
+    end if;
+  end if;
+end process THE_BLINK_COUNTER_PROC;
+
 ---------------------------------------------------------------------------
 -- GbE interface (SFP)
 ---------------------------------------------------------------------------
   GBE_SFP_INTERFACE: entity gbe_med_fifo
   generic map(
-    SERDES_NUM => 0
+    SERDES_NUM => 3
   )
   port map(
     RESET                 => reset_i,
@@ -273,7 +291,7 @@ begin
 ---------------------------------------------------------------------------
   GBE_COPPER_INTERFACE: entity gbe_med_fifo
   generic map(
-    SERDES_NUM => 3
+    SERDES_NUM => 0
   )
   port map(
     RESET                 => reset_i,
@@ -439,6 +457,11 @@ begin
       FWD_EOP_IN               => fwd_eop_int,
       FWD_READY_OUT            => fwd_ready_int,
       FWD_FULL_OUT             => fwd_full_int,
+      --
+      OOB_REGISTER_0_OUT       => oob_reg_0_int,
+      OOB_REGISTER_1_OUT       => oob_reg_1_int,
+      OOB_REGISTER_2_OUT       => oob_reg_2_int,
+      OOB_REGISTER_3_OUT       => oob_reg_3_int,
       -- reset
       MAKE_RESET_OUT           => reset_via_gbe,
       -- debug
@@ -519,8 +542,13 @@ begin
       TIMERS_OUT                   => timer,
       MY_ADDRESS_OUT               => open
     );
-    
-  common_stat_reg <= (others => '0');
+
+  common_stat_reg(159 downto 128) <= oob_reg_3_int;
+  common_stat_reg(127 downto 96)  <= oob_reg_2_int;
+  common_stat_reg(95 downto 64)   <= oob_reg_1_int;
+  common_stat_reg(63 downto 32)   <= oob_reg_0_int;
+  
+--  common_stat_reg <= (others => '0');
   
 -------------------------------------------------------------------------------
 -- Bus Handler
@@ -616,9 +644,9 @@ begin
   LED_SFP_GREEN   <= not (status(0) and status(1) and status(2)); --'0';
   LED_SFP_YELLOW  <= not status(5); --'0';
   LED_SFP_RED     <= not status(6); --'0';
-  LED(3)          <= not '1'; --additional_reg(7); --'0';
-  LED(2)          <= not '1'; --additional_reg(6); --'0';
-  LED(1)          <= not '1'; --additional_reg(5); --'0';
+  LED(3)          <= not std_logic(blink_counter(8)); --additional_reg(7); --'0';
+  LED(2)          <= not additional_reg(6); --'0';
+  LED(1)          <= not additional_reg(5); --'0';
   LED(0)          <= not additional_reg(4); --'0';
 
   -- 0 red