]> jspc29.x-matter.uni-frankfurt.de Git - trb3sc.git/commitdiff
RST komma distribution implemented
authorMichael Boehmer <mboehmer@ph.tum.de>
Tue, 18 Jan 2022 13:52:05 +0000 (14:52 +0100)
committerMichael Boehmer <mboehmer@ph.tum.de>
Tue, 18 Jan 2022 13:52:05 +0000 (14:52 +0100)
cts/trb3sc_cts.vhd
pinout/basic_constraints.lpf
tdctemplate/trb3sc_tdctemplate.vhd

index d2ba907a474c2bf35a0d059fab9439276f9ed7f6..e3293b693e7167a2f30740301cf3104d1b6aa2cd 100644 (file)
@@ -248,6 +248,8 @@ architecture trb3sc_arch of trb3sc_cts is
   signal pulse_raising_egde_x        : std_logic;
   signal pulse_raising_edge          : std_logic;
   signal send_rst_i                  : std_logic;
+  signal send_rst_word_i             : std_logic_vector(7 downto 0);
+  signal send_dlm_word_i             : std_logic_vector(7 downto 0);
 
 --  attribute syn_keep : boolean;
 --  attribute syn_preserve : boolean;  
@@ -352,11 +354,11 @@ gen_PCSB : if USE_BACKPLANE = c_NO and USE_ADDON = c_NO generate
       RX_DLM_OUT(3)      => rx_dlm_i,
       RX_DLM_WORD_OUT    => open,
       TX_DLM_IN          => tx_dlm_i,
-      TX_DLM_WORD_IN     => test_reg(15 downto 8), --x"aa",
+      TX_DLM_WORD_IN     => send_dlm_word_i, --x"aa",
       RX_RST_OUT         => open,
       RX_RST_WORD_OUT    => open,
       TX_RST_IN          => pulse_raising_edge, --'0',
-      TX_RST_WORD_IN     => test_reg(7 downto 0), --x"00",
+      TX_RST_WORD_IN     => send_rst_word_i, --x"00",
       -- sync operation
       WORD_SYNC_IN       => '1', -- CTS MASTER
       WORD_SYNC_OUT      => word_sync_i,
@@ -419,10 +421,18 @@ gen_PCSB : if USE_BACKPLANE = c_NO and USE_ADDON = c_NO generate
   PCSSW       <= "01001110"; --SFP2 on B3, AddOn on D1      
 
   -- just for testing
-  destroy_link_i <= test_reg(24); --common_ctrl_reg(88);
-  send_rst_i     <= test_reg(30);
-  enable_dlm_i   <= test_reg(31); --common_ctrl_reg(89);
+  enable_dlm_i    <= test_reg(31);
+  send_rst_i      <= test_reg(30);
+  destroy_link_i  <= test_reg(24);
+  send_dlm_word_i <= test_reg(15 downto 8);
+  send_rst_word_i <= test_reg(7 downto 0);
 
+  tx_dlm_i <= dlm_send_qq;
+
+  -- LED feedback
+  LED_WHITE(1)    <= not send_rst_word_i(1);
+  LED_WHITE(0)    <= not send_rst_word_i(0);
+  
   -- DLM generator
   THE_DLM_SEND_PROC: process( master_clk_i )
   begin
@@ -438,9 +448,7 @@ gen_PCSB : if USE_BACKPLANE = c_NO and USE_ADDON = c_NO generate
   end process THE_DLM_SEND_PROC;
   
   dlm_send_x <= '1' when (dlm_counter(13) = '1') and (word_sync_i = '1') and (enable_dlm_i = '1') else '0';
-  
-  tx_dlm_i <= dlm_send_qq;
-  
+    
 -- HDR_IO(10 downto 1)    <= (others => '0');
 -- TEST_LINE(15 downto 0) <= (others => '0');
   
index 5724364e94cb5329480f33d84dc1cdf74383fb30..97dd583b5c541eeb984ed8b3534bce571a1a4e77 100644 (file)
@@ -58,8 +58,8 @@ LOCATE COMP          "THE_MEDIA_INTERFACE/gen_pcs0.THE_SERDES/PCSD_INST" SITE "P
 LOCATE COMP          "THE_MEDIA_INTERFACE/gen_pcs3.THE_SERDES/PCSD_INST" SITE "PCSB" ;
 LOCATE COMP          "THE_MEDIA_INTERFACE/THE_SERDES/PCSD_INST" SITE "PCSB" ; # needed for trb3sc_tdctemplate with DS 
 #REGION               "MEDIA_UPLINK" "R96C107D" 19 24;
-REGION               "MEDIA_UPLINK" "R96C55D" 19 24;
-LOCATE UGROUP        "THE_MEDIA_INTERFACE/media_interface_group" REGION "MEDIA_UPLINK" ;
+#REGION               "MEDIA_UPLINK" "R96C55D" 19 24;
+#LOCATE UGROUP        "THE_MEDIA_INTERFACE/media_interface_group" REGION "MEDIA_UPLINK" ;
 
 ##more space for media interface on backplane master
 #LOCATE COMP          "THE_MEDIA_INT_MIXED/gen_pcs0.THE_SERDES/PCSD_INST" SITE "PCSA" ;
index 9bcf08304c31e77512bb5f180b0c18d070620777..97a90bd6d3d07fb23501246f6ab27d2691c53b34 100644 (file)
@@ -158,7 +158,10 @@ architecture trb3sc_arch of trb3sc_tdctemplate is
   
   signal tx_reset_state    : std_logic_vector(3 downto 0);
   signal global_reset_i    : std_logic;
-  
+
+  signal send_rst_i                  : std_logic;
+  signal send_rst_word_i             : std_logic_vector(7 downto 0);
+
 begin
 
 ---------------------------------------------------------------------------
@@ -234,8 +237,8 @@ end generate;
       RX_DLM_WORD_OUT    => open,
       TX_DLM_IN          => rx_dlm_i, -- DLM komma ping
       TX_DLM_WORD_IN     => x"aa",
-      RX_RST_OUT         => open,
-      RX_RST_WORD_OUT    => open,
+      RX_RST_OUT         => send_rst_i, --open,
+      RX_RST_WORD_OUT    => send_rst_word_i, --open,
       TX_RST_IN          => '0',
       TX_RST_WORD_IN     => x"00",
       -- sync operation
@@ -541,8 +544,8 @@ end generate;
   LED_ORANGE    <= not debug_i(24 + 2); -- LHD  --debug_clock_reset(1);
   LED_RED       <= not debug_i(24 + 1); -- LRR  --not sed_error_i;
   LED_YELLOW    <= not debug_i(24 + 0); -- LTR  --debug_clock_reset(2);
-  LED_WHITE(0)  <= time_counter(26) and time_counter(19);
-  LED_WHITE(1)  <= time_counter(20);
+  LED_WHITE(0)  <= not send_rst_word_i(0); --time_counter(26) and time_counter(19);
+  LED_WHITE(1)  <= not send_rst_word_i(1); --time_vector(20);
   LED_SFP_GREEN <= not med2int(0).stat_op(9) & '1';  --SFP Link Status
   LED_SFP_RED   <= not (med2int(0).stat_op(10) or med2int(0).stat_op(11)) & '1';  --SFP RX/TX