]> jspc29.x-matter.uni-frankfurt.de Git - soda.git/commitdiff
New ipx files constructed for serdesses. Different serdes for up an downstream
authorPeter Lemmens <p.j.j.lemmens@rug.nl>
Wed, 11 Sep 2013 12:40:05 +0000 (14:40 +0200)
committerPeter Lemmens <p.j.j.lemmens@rug.nl>
Wed, 11 Sep 2013 12:40:05 +0000 (14:40 +0200)
downstream: no tx-fifo for sync operation but does have rx-fifo for reply (async)
upstream:   no rx-fifo for sync operation but does have tx-fifo for reply (asynx)

Clock domains now separated.

SOURCE:
tx-clock=fabric-clock (200MHz). THis is the origin of SODA/master-clock
rx-clock=fabric clock. Phase differences taken care of by rx-fifo

CLIENT:
rx-clock=reconstructed clock
tx-clock=rx-clock

17 files changed:
soda_client.ldf
soda_source.ldf
source/TB_soda_chain.vhd
source/serdes_sync_downstream.txt
source/serdes_sync_downstream.vhd
source/serdes_sync_upstream.txt
source/serdes_sync_upstream.vhd
source/soda_client.vhd
source/soda_components.vhd
source/soda_hub.vhd
source/soda_packet_builder.vhd
source/soda_packet_handler.vhd
source/soda_reply_handler.vhd
source/soda_reply_pkt_builder.vhd
source/soda_source.vhd
source/soda_superburst_gen.vhd
source/trb3_periph_sodasource.vhd

index a2c60d4d82c14f3127af8b7c361f6e9f1dad9d22..874c4b515f5e8fb39069ee9bdafa2bc5f9bc4181 100644 (file)
         <Source name="source/soda_superburst_gen.vhd" type="VHDL" type_short="VHDL">
             <Options/>
         </Source>
+        <Source name="source/med_ecp3_sfp_sync_up.vhd" type="VHDL" type_short="VHDL">
+            <Options/>
+        </Source>
+        <Source name="source/serdes_sync_upstream.vhd" type="VHDL" type_short="VHDL">
+            <Options/>
+        </Source>
+        <Source name="source/serdes_sync_upstream.lpc" type="LPC_Module" type_short="LPC">
+            <Options/>
+        </Source>
+        <Source name="source/serdes_sync_upstream.ipx" type="IPX_Module" type_short="IPX">
+            <Options/>
+        </Source>
         <Source name="../trbnet/trb_net_components.vhd" type="VHDL" type_short="VHDL">
             <Options/>
         </Source>
         <Source name="../trbnet/media_interfaces/trb_net16_med_ecp3_sfp.vhd" type="VHDL" type_short="VHDL">
             <Options/>
         </Source>
-        <Source name="../trbnet/media_interfaces/med_ecp3_sfp_sync.vhd" type="VHDL" type_short="VHDL">
-            <Options/>
-        </Source>
         <Source name="../trbnet/lattice/ecp3/trb_net16_fifo_arch.vhd" type="VHDL" type_short="VHDL">
             <Options/>
         </Source>
index 5933fd5dfadd237e6033cd2d7f0c8e569f09f680..a9f9e315c700382f798d4d19d4d496443a422ae5 100644 (file)
         <Source name="source/soda_source.vhd" type="VHDL" type_short="VHDL">
             <Options/>
         </Source>
-        <Source name="source/soda_d8crc8.vhd" type="VHDL" type_short="VHDL">
+        <Source name="source/soda_superburst_gen.vhd" type="VHDL" type_short="VHDL">
+            <Options/>
+        </Source>
+        <Source name="source/soda_packet_handler.vhd" type="VHDL" type_short="VHDL">
             <Options/>
         </Source>
         <Source name="source/soda_packet_builder.vhd" type="VHDL" type_short="VHDL">
             <Options/>
         </Source>
-        <Source name="source/soda_packet_handler.vhd" type="VHDL" type_short="VHDL">
+        <Source name="source/soda_d8crc8.vhd" type="VHDL" type_short="VHDL">
             <Options/>
         </Source>
-        <Source name="source/soda_superburst_gen.vhd" type="VHDL" type_short="VHDL">
+        <Source name="source/med_ecp3_sfp_sync_down.vhd" type="VHDL" type_short="VHDL">
+            <Options/>
+        </Source>
+        <Source name="source/serdes_sync_downstream.vhd" type="VHDL" type_short="VHDL">
+            <Options/>
+        </Source>
+        <Source name="source/serdes_sync_downstream.lpc" type="LPC_Module" type_short="LPC">
+            <Options/>
+        </Source>
+        <Source name="source/serdes_sync_downstream.ipx" type="IPX_Module" type_short="IPX">
             <Options/>
         </Source>
         <Source name="../trbnet/trb_net_components.vhd" type="VHDL" type_short="VHDL">
@@ -68,9 +80,6 @@
         <Source name="../trbnet/special/spi_slim.vhd" type="VHDL" type_short="VHDL">
             <Options/>
         </Source>
-        <Source name="../trbnet/media_interfaces/ecp3_sfp/serdes_sync_0.vhd" type="VHDL" type_short="VHDL">
-            <Options/>
-        </Source>
         <Source name="../trbnet/special/spi_master.vhd" type="VHDL" type_short="VHDL">
             <Options/>
         </Source>
         <Source name="../trbnet/media_interfaces/trb_net16_lsm_sfp.vhd" type="VHDL" type_short="VHDL">
             <Options/>
         </Source>
-        <Source name="../trbnet/media_interfaces/ecp3_sfp/sfp_1_200_int.vhd" type="VHDL" type_short="VHDL">
-            <Options/>
-        </Source>
         <Source name="../trbnet/media_interfaces/sync/med_sync_define.vhd" type="VHDL" type_short="VHDL">
             <Options/>
         </Source>
         <Source name="../trbnet/media_interfaces/trb_net16_med_ecp3_sfp.vhd" type="VHDL" type_short="VHDL">
             <Options/>
         </Source>
-        <Source name="../trbnet/media_interfaces/med_ecp3_sfp_sync.vhd" type="VHDL" type_short="VHDL">
-            <Options/>
-        </Source>
         <Source name="source/trb3_periph_sodasource.vhd" type="VHDL" type_short="VHDL">
             <Options top_module="trb3_periph_sodasource"/>
         </Source>
         <Source name="source/soda_SOB_faker.vhd" type="VHDL" type_short="VHDL">
             <Options/>
         </Source>
+        <Source name="../trbnet/media_interfaces/ecp3_sfp/sfp_1_200_int.vhd" type="VHDL" type_short="VHDL">
+            <Options/>
+        </Source>
         <Source name="soda_source.lpf" type="Logic Preference" type_short="LPF">
             <Options/>
         </Source>
index b928d27898def6d8af7a9615af5624c1e05485c2..0ada9e4662fcbde92e1674b86e63bdc18dcd3ee3 100644 (file)
@@ -18,12 +18,14 @@ end entity;
 architecture TestBench of TB_soda_chain is\r
 \r
  -- Clock period definitions
- constant clk_period: time:= 4ns;
+ constant sysclk_period: time:= 5ns;
+ constant sodaclk_period: time:= 4.999ns;
 \r
 \r
 --Inputs
        signal rst_S                                                    : std_logic;
-       signal clk_S                                                    : std_logic;
+       signal sys_clk_S                                                : std_logic;
+       signal soda_clk_S                                               : std_logic;
        signal enable_S                                         : std_logic := '0';
        signal SOB_S                                                    : std_logic := '0';
        signal src_dnstream_dlm_word_S  : std_logic_vector(7 downto 0)  := (others => '0');\r
@@ -50,7 +52,7 @@ begin
 
        THE_SOB_SOURCE : soda_start_of_burst_faker
                port map(
-                       SYSCLK                                          => clk_S,
+                       SYSCLK                                          => sys_clk_S,
                        RESET                                                   => rst_S,
                        SODA_BURST_PULSE_OUT            => SOB_S
                );
@@ -58,7 +60,7 @@ begin
 \r
        THE_SODA_SOURCE : soda_source
                port map(
-                       SYSCLK                                  => clk_S,
+                       SYSCLK                                  => sys_clk_S,
                        RESET                                           => rst_S,
                        CLEAR                                           => '0',
                        CLK_EN                                  => '1',
@@ -75,14 +77,13 @@ begin
                        SODA_READ_IN                    => soda_read,
                        SODA_WRITE_IN                   => soda_write,
                        SODA_ACK_OUT                    => soda_ack,\r
-                       LEDS_OUT                                        =>      soda_leds,
-                       TEST_LINE                               =>      open,\r
-                       STAT                                            =>      open
+                       LEDS_OUT                                        =>      soda_leds
                );
 
        A_SODA_HUB : soda_hub
                port map(
-                       SYSCLK                                  => clk_S,
+                       SYSCLK                                  => sys_clk_S,
+                       SODACLK                                 => soda_clk_S,
                        RESET                                           => rst_S,
                        CLEAR                                           => '0',
                        CLK_EN                                  => '1',
@@ -110,7 +111,8 @@ begin
 \r
                A_SODA_CLIENT : soda_client
                        port map(
-                               SYSCLK                                  => clk_S,
+                               SYSCLK                                  => sys_clk_S,
+                               SODACLK                                 => soda_clk_S,
                                RESET                                           => rst_S,
                                CLEAR                                           => '0',
                                CLK_EN                                  => '1',
@@ -126,7 +128,8 @@ begin
                                SODA_READ_IN                    => soda_read,
                                SODA_WRITE_IN                   => soda_write,
                                SODA_ACK_OUT                    => soda_ack,\r
-                               STAT                                            =>      open
+                               LEDS_OUT                                        =>      open,
+                               LINK_DEBUG_IN                   =>      (others => '0')
                        );
 
        end generate;
@@ -141,71 +144,73 @@ begin
                                soda_addr                       <=      "0000";
                                soda_data_in            <= x"08000000";         -- soda_reset
                                soda_write                      <= '1';
-               wait for clk_period;
+               wait for sysclk_period;
                                soda_write                      <= '0';
-               wait for clk_period;
+               wait for sysclk_period;
                                soda_addr                       <=      "0000";
                                soda_data_in            <= x"00000000";         -- soda_reset
                                soda_write                      <= '1';
-               wait for clk_period;
+               wait for sysclk_period;
                                soda_write                      <= '0';
 ------------------------------------------------------------------------------------------------------------
                wait for 2us;
                                soda_addr                       <=      "0100";
                                soda_data_in            <= x"FFFFFFFD";         -- 
                                soda_write                      <= '1';
-               wait for clk_period;
+               wait for sysclk_period;
                                soda_write                      <= '0';
 ------------------------------------------------------------------------------------------------------------
                wait for 700us;
                                soda_addr                       <=      "0000";
                                soda_data_in            <= x"40000000";         -- time_calibration
                                soda_write                      <= '1';
-               wait for clk_period;
+               wait for sysclk_period;
                                soda_write                      <= '0';
 ------------------------------------------------------------------------------------------------------------
                wait for 700us;
                                soda_addr                       <=      "0100";
                                soda_data_in            <= x"FFFFFFFE";         -- time_calibration
                                soda_write                      <= '1';
-               wait for clk_period;
+               wait for sysclk_period;
                                soda_write                      <= '0';
 ------------------------------------------------------------------------------------------------------------
                wait for 100us;
                                soda_addr                       <=      "1001";
                                soda_read                       <= '1';
-               wait for clk_period;
+               wait for sysclk_period;
                                soda_read                       <= '0';
        end process;
 
 ------------------------------------------------------------------------------------------------------------
  -- Clock process definitions
 ------------------------------------------------------------------------------------------------------------
- clk_proc :process
- begin
-               clk_S <= '0';
-               wait for clk_period/2;
-               clk_S <= '1';
-               wait for clk_period/2;
- end process; 
-
- -- reset process
- reset_proc: process
- begin
-rst_S <= '1';
-wait for clk_period * 5; 
-rst_S <= '0';
-wait;
- end process;
-\r
--- burst_proc :process
--- begin
---SOB_S <= '0';
---wait for 2.35us;
---SOB_S <= '1';
---wait for 50ns;
--- end process; 
+       sysclk_proc :process
+               begin
+                       sys_clk_S <= '0';
+               wait for sysclk_period/2;
+                       sys_clk_S <= '1';
+               wait for sysclk_period/2;
+       end process; 
+
+       sodaclk_proc :process
+               begin
+                       soda_clk_S <= '0';
+               wait for sodaclk_period/2;
+                       soda_clk_S <= '1';
+               wait for sodaclk_period/2;
+       end process; 
+
 
+------------------------------------------------------------------------------------------------------------
+-- reset process
+------------------------------------------------------------------------------------------------------------
+       reset_proc: process
+               begin
+                       rst_S <= '1';
+               wait for sysclk_period * 5; 
+                       rst_S <= '0';
+               wait;
+       end process;
 \r
 end TestBench;\r
 \r
index 7fe2574b2617216f6a227f8a360c9108d738040d..7ea13c86a94cea103b8ec94387011cd617daae09 100644 (file)
@@ -52,7 +52,7 @@ CCLMARK                 "7"
 CH0_SSLB                "DISABLED"
 CH0_SPLBPORTS           "DISABLED"
 CH0_PCSLBPORTS          "DISABLED"
-INT_ALL                 "ENABLED"
-QD_REFCK2CORE           "ENABLED"
+INT_ALL                 "DISABLED"
+QD_REFCK2CORE           "DISABLED"
 
 
index e79f77839d7e4d15541d47524f5fea30ac8ffc35..36d0a695002d612765d96e3a8189afb722a88b8c 100644 (file)
@@ -1580,7 +1580,6 @@ entity serdes_sync_downstream is
     tx_serdes_rst_c    :   in std_logic;
     tx_pll_lol_qd_s   :   out std_logic;
     rst_qd_c    :   in std_logic;
-    refclk2fpga   :   out std_logic;
     serdes_rst_qd_c    :   in std_logic);
 
 end serdes_sync_downstream;
@@ -2138,8 +2137,6 @@ end component;
    attribute FREQUENCY_PIN_FF_TX_H_CLK_2 of PCSD_INST : label is "100";
    attribute FREQUENCY_PIN_FF_TX_H_CLK_3: string;
    attribute FREQUENCY_PIN_FF_TX_H_CLK_3 of PCSD_INST : label is "100";
-   attribute FREQUENCY_PIN_REFCK2CORE: string;
-   attribute FREQUENCY_PIN_REFCK2CORE of PCSD_INST : label is "200";
    attribute black_box_pad_pin: string;
    attribute black_box_pad_pin of PCSD : component is "HDINP0, HDINN0, HDINP1, HDINN1, HDINP2, HDINN2, HDINP3, HDINN3, HDOUTP0, HDOUTN0, HDOUTP1, HDOUTN1, HDOUTP2, HDOUTN2, HDOUTP3, HDOUTN3, REFCLKP, REFCLKN";
 
@@ -2170,7 +2167,6 @@ begin
 vlo_inst : VLO port map(Z => fpsc_vlo);
 vhi_inst : VHI port map(Z => fpsc_vhi);
 
-  refclk2fpga <= refclk2fpga_sig;
     rx_los_low_ch0_s <= rx_los_low_ch0_sig;
     rx_cdr_lol_ch0_s <= rx_cdr_lol_ch0_sig;
   tx_pll_lol_qd_s <= tx_pll_lol_qd_sig;
index df3f7f31495446d492bf7992499dadd94b5ad7c0..1c55bd727e250ff3bb7b2528a3cd5bb4c41765cc 100644 (file)
@@ -52,7 +52,7 @@ CCLMARK                 "7"
 CH0_SSLB                "DISABLED"
 CH0_SPLBPORTS           "DISABLED"
 CH0_PCSLBPORTS          "DISABLED"
-INT_ALL                 "ENABLED"
-QD_REFCK2CORE           "ENABLED"
+INT_ALL                 "DISABLED"
+QD_REFCK2CORE           "DISABLED"
 
 
index a73106d2123a78709c907da1cc27de9d7648907b..af538de836847faa1c18d92396b89bd0375e139f 100644 (file)
@@ -1579,7 +1579,6 @@ entity serdes_sync_upstream is
     tx_serdes_rst_c    :   in std_logic;
     tx_pll_lol_qd_s   :   out std_logic;
     rst_qd_c    :   in std_logic;
-    refclk2fpga   :   out std_logic;
     serdes_rst_qd_c    :   in std_logic);
 
 end serdes_sync_upstream;
@@ -2137,8 +2136,6 @@ end component;
    attribute FREQUENCY_PIN_FF_TX_H_CLK_2 of PCSD_INST : label is "100";
    attribute FREQUENCY_PIN_FF_TX_H_CLK_3: string;
    attribute FREQUENCY_PIN_FF_TX_H_CLK_3 of PCSD_INST : label is "100";
-   attribute FREQUENCY_PIN_REFCK2CORE: string;
-   attribute FREQUENCY_PIN_REFCK2CORE of PCSD_INST : label is "200";
    attribute black_box_pad_pin: string;
    attribute black_box_pad_pin of PCSD : component is "HDINP0, HDINN0, HDINP1, HDINN1, HDINP2, HDINN2, HDINP3, HDINN3, HDOUTP0, HDOUTN0, HDOUTP1, HDOUTN1, HDOUTP2, HDOUTN2, HDOUTP3, HDOUTN3, REFCLKP, REFCLKN";
 
@@ -2169,7 +2166,6 @@ begin
 vlo_inst : VLO port map(Z => fpsc_vlo);
 vhi_inst : VHI port map(Z => fpsc_vhi);
 
-  refclk2fpga <= refclk2fpga_sig;
     rx_los_low_ch0_s <= rx_los_low_ch0_sig;
     rx_cdr_lol_ch0_s <= rx_cdr_lol_ch0_sig;
   tx_pll_lol_qd_s <= tx_pll_lol_qd_sig;
index 5696766de7801ca93695028679537ac6b7fec264..6642b41bb2ad8f4a649b294f775c4e4620868851 100644 (file)
@@ -12,6 +12,7 @@ use work.soda_components.all;
 entity soda_client is
        port(
                SYSCLK                                  : in    std_logic; -- fabric clock
+               SODACLK                                 : in    std_logic; -- recovered clock
                RESET                                           : in    std_logic; -- synchronous reset
                CLEAR                                           : in    std_logic; -- asynchronous reset
                CLK_EN                                  : in    std_logic; 
@@ -35,8 +36,6 @@ end soda_client;
 architecture Behavioral of soda_client is
 
        --SODA
-
-       signal enable_S                                         : std_logic := '0';
        signal soda_cmd_word_S                          : std_logic_vector(30 downto 0) := (others => '0');
        signal soda_cmd_valid_S                         : std_logic := '0';
        signal start_of_superburst_S            : std_logic := '0';
@@ -48,7 +47,7 @@ architecture Behavioral of soda_client is
        type STATES is (SLEEP,RD_RDY,WR_RDY,RD_ACK,WR_ACK,DONE);
        signal CURRENT_STATE, NEXT_STATE: STATES;
 
-  -- slave bus signals
+-- slave bus signals
        signal bus_ack_x        : std_logic;
        signal bus_ack          : std_logic;
        signal store_wr_x       : std_logic;
@@ -60,34 +59,34 @@ architecture Behavioral of soda_client is
        signal tx_dlm_out_S             : std_logic;
 \r
 --     debug\r
-signal debug_status_S          : std_logic_vector(31 downto 0) := (others => '0');
-signal debug_rx_cnt_S          : std_logic_vector(31 downto 0) := (others => '0');
-signal debug_tx_cnt_S          : std_logic_vector(31 downto 0) := (others => '0');
-signal debug_SOS_cnt_S         : std_logic_vector(31 downto 0) := (others => '0');
-signal debug_cmd_cnt_S         : std_logic_vector(31 downto 0) := (others => '0');
+       signal debug_status_S           : std_logic_vector(31 downto 0) := (others => '0');
+       signal debug_rx_cnt_S           : std_logic_vector(31 downto 0) := (others => '0');
+       signal debug_tx_cnt_S           : std_logic_vector(31 downto 0) := (others => '0');
+       signal debug_SOS_cnt_S          : std_logic_vector(31 downto 0) := (others => '0');
+       signal debug_cmd_cnt_S          : std_logic_vector(31 downto 0) := (others => '0');
 
 begin
        
        packet_handler : soda_packet_handler
                port map(
-                       SYSCLK                                          =>      SYSCLK,
-                       RESET                                                   => RESET,
-                       CLEAR                                                   =>      '0',
-                       CLK_EN                                          =>      '1',
+                       SODACLK                                                 =>      SODACLK,
+                       RESET                                                           => RESET,
+                       CLEAR                                                           =>      '0',
+                       CLK_EN                                                  =>      '1',
                        --Internal Connection
-                       START_OF_SUPERBURST             => start_of_superburst_S,
-                       SUPER_BURST_NR                          => super_burst_nr_S,
-                       SODA_CMD_VALID_S                        => soda_cmd_valid_S,
-                       SODA_CMD_WORD_S                 => soda_cmd_word_S,
-                       CRC_VALID_OUT                           => crc_valid_S,\r
-                       CRC_DATA_OUT                            => crc_data_S,
-                       RX_DLM_IN                                       => RX_DLM_IN,
-                       RX_DLM_WORD_IN                          => RX_DLM_WORD_IN
+                       START_OF_SUPERBURST_OUT         => start_of_superburst_S,
+                       SUPER_BURST_NR_OUT                      => super_burst_nr_S,
+                       SODA_CMD_VALID_OUT                      => soda_cmd_valid_S,
+                       SODA_CMD_WORD_OUT                               => soda_cmd_word_S,
+                       CRC_VALID_OUT                                   => crc_valid_S,\r
+                       CRC_DATA_OUT                                    => crc_data_S,
+                       RX_DLM_IN                                               => RX_DLM_IN,
+                       RX_DLM_WORD_IN                                  => RX_DLM_WORD_IN
                );
 
        reply_packet_builder : soda_reply_pkt_builder           \r
                port map(
-                       SYSCLK                                  =>      SYSCLK,
+                       SODACLK                                 =>      SODACLK,
                        RESET                                           =>      RESET,
                        CLEAR                                           =>      '0',
                        CLK_EN                                  => CLK_EN,
@@ -115,7 +114,7 @@ begin
                                CURRENT_STATE <= NEXT_STATE;
                                bus_ack       <= bus_ack_x;
                                store_wr      <= store_wr_x;
-                       store_rd      <= store_rd_x;
+                               store_rd      <= store_rd_x;
                        end if;
                end if;
        end process STATE_MEM;
index 6894a563e144f2464dcd93291c5c1f5263cd17e6..4c5d9b6b694add7e448d3a659f354b9376187ef0 100644 (file)
@@ -24,20 +24,20 @@ package soda_components is
                        BURST_COUNT : integer range 1 to 64 := 16   -- number of bursts to be counted between super-bursts
                );
                port(
-                       SYSCLK                                          : in    std_logic; -- fabric clock
-                       RESET                                                   : in    std_logic; -- synchronous reset 
-                       CLEAR                                                   : in    std_logic; -- asynchronous reset
-                       CLK_EN                                          : in    std_logic;
+                       SODACLK                                                 : in    std_logic; -- fabric clock
+                       RESET                                                           : in    std_logic; -- synchronous reset 
+                       CLEAR                                                           : in    std_logic; -- asynchronous reset
+                       CLK_EN                                                  : in    std_logic;
                        --Internal Connection
-                       SODA_BURST_PULSE_IN             : in    std_logic := '0';       -- 
-                       START_OF_SUPERBURST             : out   std_logic := '0';
-                       SUPER_BURST_NR_OUT              : out   std_logic_vector(30 downto 0) := (others => '0')
+                       SODA_BURST_PULSE_IN                     : in    std_logic := '0';       -- 
+                       START_OF_SUPERBURST_OUT         : out   std_logic := '0';
+                       SUPER_BURST_NR_OUT                      : out   std_logic_vector(30 downto 0) := (others => '0')
                        );
        end component;
 
        component soda_packet_builder
                port(
-                       SYSCLK                                          : in    std_logic; -- fabric clock
+                       SODACLK                                         : in    std_logic; -- fabric clock
                        RESET                                                   : in    std_logic; -- synchronous reset
                        CLEAR                                                   : in    std_logic; -- asynchronous reset
                        CLK_EN                                          : in    std_logic;
@@ -56,20 +56,20 @@ package soda_components is
 
        component soda_packet_handler
                port(
-                       SYSCLK                                          : in    std_logic; -- fabric clock
-                       RESET                                                   : in    std_logic; -- synchronous reset
-                       CLEAR                                                   : in    std_logic; -- asynchronous reset
-                       CLK_EN                                          : in    std_logic;
+                       SODACLK                                                 : in    std_logic; -- fabric clock
+                       RESET                                                           : in    std_logic; -- synchronous reset
+                       CLEAR                                                           : in    std_logic; -- asynchronous reset
+                       CLK_EN                                                  : in    std_logic;
                        --Internal Connection
-                       START_OF_SUPERBURST             : out std_logic := '0';
-                       SUPER_BURST_NR                          : out std_logic_vector(30 downto 0) := (others => '0');
-                       SODA_CMD_VALID_S                        : out std_logic := '0';
-                       SODA_CMD_WORD_S                 : out std_logic_vector(30 downto 0) := (others => '0');
-                       EXPECTED_REPLY_OUT              : out   std_logic_vector(7 downto 0) := (others => '0');
-                       CRC_VALID_OUT                           : out std_logic := '0';\r
-                       CRC_DATA_OUT                            : out std_logic_vector(7 downto 0) := (others => '0');
-                       RX_DLM_IN                                       : in std_logic;
-                       RX_DLM_WORD_IN                          : in    std_logic_vector(7 downto 0) := (others => '0')
+                       START_OF_SUPERBURST_OUT         : out std_logic := '0';
+                       SUPER_BURST_NR_OUT                      : out std_logic_vector(30 downto 0) := (others => '0');
+                       SODA_CMD_VALID_OUT                      : out std_logic := '0';
+                       SODA_CMD_WORD_OUT                               : out std_logic_vector(30 downto 0) := (others => '0');
+                       EXPECTED_REPLY_OUT                      : out   std_logic_vector(7 downto 0) := (others => '0');
+                       CRC_VALID_OUT                                   : out std_logic := '0';\r
+                       CRC_DATA_OUT                                    : out std_logic_vector(7 downto 0) := (others => '0');
+                       RX_DLM_IN                                               : in std_logic;
+                       RX_DLM_WORD_IN                                  : in    std_logic_vector(7 downto 0) := (others => '0')
                );
        end component;
 \r
@@ -113,6 +113,7 @@ package soda_components is
        component soda_hub
                port(
                        SYSCLK                                          : in    std_logic; -- fabric clock
+                       SODACLK                                         : in    std_logic; -- recovered clock
                        RESET                                                   : in    std_logic; -- synchronous reset
                        CLEAR                                                   : in    std_logic; -- asynchronous reset
                        CLK_EN                                          : in    std_logic; 
@@ -140,6 +141,7 @@ package soda_components is
        component soda_client   -- box containing soda_source components
                port(
                        SYSCLK                                  : in    std_logic; -- fabric clock
+                       SODACLK                                 : in    std_logic; -- recovered clock
                        RESET                                           : in    std_logic; -- synchronous reset
                        CLEAR                                           : in    std_logic; -- asynchronous reset
                        CLK_EN                                  : in    std_logic; 
@@ -162,7 +164,7 @@ package soda_components is
                        
        component soda_reply_pkt_builder\r
                port(\r
-                       SYSCLK                                  : in    std_logic; -- fabric clock\r
+                       SODACLK                                 : in    std_logic; -- fabric clock\r
                        RESET                                           : in    std_logic; -- synchronous reset\r
                        CLEAR                                           : in    std_logic; -- asynchronous reset\r
                        CLK_EN                                  : in    std_logic; \r
@@ -183,7 +185,7 @@ package soda_components is
                        CLEAR                                                   : in    std_logic; -- asynchronous reset
                        CLK_EN                                          : in    std_logic;
                        --Internal Connection
-                       LAST_PACKET                                     : in    t_PACKET_TYPE_SENT      := c_NO_PACKET;
+               --      LAST_PACKET                                     : in    t_PACKET_TYPE_SENT      := c_NO_PACKET;
                        EXPECTED_REPLY_IN                       : in    std_logic_vector(7 downto 0) := (others => '0');
                        RX_DLM_IN                                       : in    std_logic       := '0';
                        RX_DLM_WORD_IN                          : in    std_logic_vector(7 downto 0) := (others => '0');
@@ -242,5 +244,15 @@ package soda_components is
                        SODA_BURST_PULSE_OUT    : out   std_logic := '0'
                        );
        end component;
+
+       component posedge_to_pulse
+               port (
+                       IN_CLK                  : in  std_logic;
+                       OUT_CLK                 : in  std_logic;
+                       CLK_EN                  : in  std_logic;
+                       SINGAL_IN               : in  std_logic;
+                       PULSE_OUT               : out std_logic
+               );
+       end component;
 \r
 end package;
index d8b6a6de81866a8771d689a4b96a732bb7d84f33..d42d4d2c97797cbb9d7ee7f2a5383a187064973c 100644 (file)
@@ -12,6 +12,7 @@ use work.soda_components.all;
 entity soda_hub is
        port(
                SYSCLK                                          : in    std_logic; -- fabric clock
+               SODACLK                                         : in    std_logic; -- fabric clock
                RESET                                                   : in    std_logic; -- synchronous reset
                CLEAR                                                   : in    std_logic; -- asynchronous reset
                CLK_EN                                          : in    std_logic; 
@@ -77,25 +78,25 @@ architecture Behavioral of soda_hub is
        
        hub_packet_handler : soda_packet_handler
                port map(
-                       SYSCLK                                          =>      SYSCLK,
-                       RESET                                                   => RESET,
-                       CLEAR                                                   =>      '0',
-                       CLK_EN                                          =>      '1',
+                       SODACLK                                                 =>      SODACLK,
+                       RESET                                                           => RESET,
+                       CLEAR                                                           =>      '0',
+                       CLK_EN                                                  =>      '1',
                        --Internal Connection
-                       START_OF_SUPERBURST             => start_of_superburst_S,
-                       SUPER_BURST_NR                          => super_burst_nr_S,
-                       SODA_CMD_VALID_S                        => soda_cmd_valid_S,
-                       SODA_CMD_WORD_S                 => soda_cmd_word_S,
-                       EXPECTED_REPLY_OUT              =>      expected_reply_S,
-                       CRC_VALID_OUT                           => crc_valid_S,\r
-                       CRC_DATA_OUT                            => crc_data_S,
-                       RX_DLM_IN                                       => RXTOP_DLM_IN,
-                       RX_DLM_WORD_IN                          => RXTOP_DLM_WORD_IN
+                       START_OF_SUPERBURST_OUT         => start_of_superburst_S,
+                       SUPER_BURST_NR_OUT                      => super_burst_nr_S,
+                       SODA_CMD_VALID_OUT                      => soda_cmd_valid_S,
+                       SODA_CMD_WORD_OUT                               => soda_cmd_word_S,
+                       EXPECTED_REPLY_OUT                      =>      expected_reply_S,
+                       CRC_VALID_OUT                                   => crc_valid_S,\r
+                       CRC_DATA_OUT                                    => crc_data_S,
+                       RX_DLM_IN                                               => RXTOP_DLM_IN,
+                       RX_DLM_WORD_IN                                  => RXTOP_DLM_WORD_IN
                );
 
        reply_packet_builder : soda_reply_pkt_builder           \r
                port map(
-                       SYSCLK                                  =>      SYSCLK,
+                       SODACLK                                 =>      SODACLK,
                        RESET                                           =>      RESET,
                        CLEAR                                           =>      '0',
                        CLK_EN                                  => CLK_EN,
@@ -112,7 +113,7 @@ architecture Behavioral of soda_hub is
                        
                packet_builder : soda_packet_builder
                        port map(
-                               SYSCLK                                  =>      SYSCLK,
+                               SODACLK                                 =>      SODACLK,
                                RESET                                           =>      RESET,
                                CLEAR                                           =>      '0',
                                CLK_EN                                  => CLK_EN,
@@ -134,7 +135,7 @@ architecture Behavioral of soda_hub is
                        CLEAR                                                   =>      '0',
                        CLK_EN                                          =>      '1',
                        --Internal Connection
-                       LAST_PACKET                                     =>      last_packet_sent_S,
+--                     LAST_PACKET                                     =>      last_packet_sent_S,
                        EXPECTED_REPLY_IN                       => expected_reply_S,
                        RX_DLM_IN                                       => RXBTM_DLM_IN(i),
                        RX_DLM_WORD_IN                          => RXBTM_DLM_WORD_IN(i),
index 145ffd86ba408131c701f381db5e6e5ee8d9ce59..d86a6b0b9fa130f81803fdc7f2a5ed0b9b051d3f 100644 (file)
@@ -10,7 +10,7 @@ use work.soda_components.all;
 \r
 entity soda_packet_builder is\r
        port(\r
-               SYSCLK                                          : in    std_logic; -- fabric clock\r
+               SODACLK                                         : in    std_logic; -- fabric clock\r
                RESET                                                   : in    std_logic; -- synchronous reset\r
                CLEAR                                                   : in    std_logic; -- asynchronous reset\r
                CLK_EN                                          : in    std_logic; \r
@@ -53,7 +53,7 @@ begin
 \r
        tx_crc8: soda_d8crc8 
                port map(
-                       CLOCK                           => SYSCLK,
+                       CLOCK                           => SODACLK,
                        RESET                           => RESET,
                        SOC_IN                  => soc_S,
                        DATA_IN                 => crc_datain_S,
@@ -71,9 +71,9 @@ begin
        TX_DLM_OUT                                      <=      soda_pkt_valid_S;\r
        \r
        \r
-       packet_fsm_proc : process(SYSCLK)--, RESET, packet_state_S, crc_valid_S, START_OF_SUPERBURST, soda_cmd_strobe_S)\r
+       packet_fsm_proc : process(SODACLK)--, RESET, packet_state_S, crc_valid_S, START_OF_SUPERBURST, soda_cmd_strobe_S)\r
        begin\r
-               if rising_edge(SYSCLK) then\r
+               if rising_edge(SODACLK) then\r
                        if (RESET='1') then\r
                                packet_state_S  <=      c_IDLE;\r
                        else\r
@@ -161,9 +161,9 @@ begin
                end if;\r
        end process;\r
 \r
-       soda_packet_fill_proc : process(SYSCLK, packet_state_S)\r
+       soda_packet_fill_proc : process(SODACLK, packet_state_S)\r
        begin\r
-               if rising_edge(SYSCLK) then\r
+               if rising_edge(SODACLK) then\r
                        case packet_state_S is\r
                                        when c_IDLE     =>\r
                                                TIME_CAL_OUT                    <= '0';\r
@@ -224,9 +224,9 @@ begin
        end process;\r
 \r
 \r
-       crc_gen_proc : process(SYSCLK, packet_state_S)\r
+       crc_gen_proc : process(SODACLK, packet_state_S)\r
        begin\r
-               if rising_edge(SYSCLK) then\r
+               if rising_edge(SODACLK) then\r
                        case packet_state_S is\r
                                        when c_IDLE     =>\r
                                                crc_data_valid_S        <= '0';\r
index eb07be1d4e3b0e57b26f3a80e57a20c9dd062d8a..48690fe6ae821dab0890ee3806dd62bbdbf49a07 100644 (file)
@@ -10,20 +10,20 @@ use work.soda_components.all;
 
 entity soda_packet_handler is
        port(
-               SYSCLK                                          : in    std_logic; -- fabric clock
-               RESET                                                   : in    std_logic; -- synchronous reset
-               CLEAR                                                   : in    std_logic; -- asynchronous reset
-               CLK_EN                                          : in    std_logic;
+               SODACLK                                                 : in    std_logic; -- fabric clock
+               RESET                                                           : in    std_logic; -- synchronous reset
+               CLEAR                                                           : in    std_logic; -- asynchronous reset
+               CLK_EN                                                  : in    std_logic;
                --Internal Connection
-               START_OF_SUPERBURST             : out std_logic := '0';
-               SUPER_BURST_NR                          : out std_logic_vector(30 downto 0) := (others => '0');
-               SODA_CMD_VALID_S                        : out std_logic := '0';
-               SODA_CMD_WORD_S                 : out std_logic_vector(30 downto 0) := (others => '0');
-               EXPECTED_REPLY_OUT              : out   std_logic_vector(7 downto 0) := (others => '0');
-               CRC_VALID_OUT                           : out std_logic := '0';\r
-               CRC_DATA_OUT                            : out std_logic_vector(7 downto 0) := (others => '0');
-               RX_DLM_IN                                       : in std_logic;
-               RX_DLM_WORD_IN                          : in    std_logic_vector(7 downto 0) := (others => '0')
+               START_OF_SUPERBURST_OUT         : out std_logic := '0';
+               SUPER_BURST_NR_OUT                      : out std_logic_vector(30 downto 0) := (others => '0');
+               SODA_CMD_VALID_OUT                      : out std_logic := '0';
+               SODA_CMD_WORD_OUT                               : out std_logic_vector(30 downto 0) := (others => '0');
+               EXPECTED_REPLY_OUT                      : out   std_logic_vector(7 downto 0) := (others => '0');
+               CRC_VALID_OUT                                   : out std_logic := '0';\r
+               CRC_DATA_OUT                                    : out std_logic_vector(7 downto 0) := (others => '0');
+               RX_DLM_IN                                               : in std_logic;
+               RX_DLM_WORD_IN                                  : in    std_logic_vector(7 downto 0) := (others => '0')
        );
 end soda_packet_handler;
 
@@ -49,9 +49,9 @@ architecture Behavioral of soda_packet_handler is
 
 begin
 
-       packet_fsm_proc : process(SYSCLK)
+       packet_fsm_proc : process(SODACLK)
        begin
-               if rising_edge(SYSCLK) then
+               if rising_edge(SODACLK) then
                        if (RESET='1') then
                                packet_state_S  <=      c_RST;
                        else
@@ -126,18 +126,18 @@ begin
                end if;
        end process;
 
-       soda_packet_collector_proc : process(SYSCLK, packet_state_S)
+       soda_packet_collector_proc : process(SODACLK, packet_state_S)
        begin
-               if rising_edge(SYSCLK) then
+               if rising_edge(SODACLK) then
                        case packet_state_S is
                                        when c_RST      =>
-                                               START_OF_SUPERBURST                                     <= '0';
-                                               soda_cmd_valid_S                                                <= '0';
+                                               START_OF_SUPERBURST_OUT                         <= '0';
+                                               SODA_CMD_VALID_OUT                                      <= '0';
                                                soda_pkt_valid_S                                                <= '0';
                                                soda_pkt_word_S                                         <= (others=>'0');
                                        when c_IDLE     =>
-                                               START_OF_SUPERBURST                                     <= '0';
-                                               soda_cmd_valid_S                                                <= '0';
+                                               START_OF_SUPERBURST_OUT                         <= '0';
+                                               SODA_CMD_VALID_OUT                                      <= '0';
                                                soda_pkt_valid_S                                                <= '0';
                                                soda_pkt_word_S                                         <= (others=>'0');
                                        when c_SODA_PKT1        =>
@@ -158,26 +158,26 @@ begin
                                                soda_pkt_valid_S                                                <= '1';
                                                EXPECTED_REPLY_OUT                                      <=      soda_pkt_word_S(7 downto 0);
                                                if (soda_pkt_word_S(31)= '1') then
-                                                       START_OF_SUPERBURST                             <= '1';
-                                                       SUPER_BURST_NR                                          <= soda_pkt_word_S(30 downto 0);
+                                                       START_OF_SUPERBURST_OUT                 <= '1';
+                                                       SUPER_BURST_NR_OUT                              <= soda_pkt_word_S(30 downto 0);
                                                else
-                                                       soda_cmd_valid_S                                        <= '1';
-                                                       soda_cmd_word_S                                 <= soda_pkt_word_S(30 downto 0);
+                                                       SODA_CMD_VALID_OUT                              <= '1';
+                                                       SODA_CMD_WORD_OUT                                       <= soda_pkt_word_S(30 downto 0);
                                                end if;
                                        when others     =>
-                                               START_OF_SUPERBURST                                     <= '0';
+                                               START_OF_SUPERBURST_OUT                         <= '0';
                                                soda_pkt_valid_S                                                <= '0';
                                                soda_pkt_word_S                                         <= (others=>'0');
-                                               soda_cmd_valid_S                                                <= '0';
-                                               soda_cmd_word_S                                         <= (others=>'0');
+                                               SODA_CMD_VALID_OUT                                      <= '0';
+                                               SODA_CMD_WORD_OUT                                               <= (others=>'0');
                        end case;
                        
                end if;
        end process;
 
-       crc_check_proc : process(SYSCLK, packet_state_S)
+       crc_check_proc : process(SODACLK, packet_state_S)
        begin
-               if rising_edge(SYSCLK) then
+               if rising_edge(SODACLK) then
                        case packet_state_S is
                        when c_RST=>
                        CRC_VALID_OUT <= '0';
index 4d33d05227cd49c662e93af7572ec60d85735858..db11bd898b80f9c762e6a08b6a3cf3e69e29a7c4 100644 (file)
@@ -15,7 +15,7 @@ entity soda_reply_handler is
                CLEAR                                                   : in    std_logic; -- asynchronous reset
                CLK_EN                                          : in    std_logic;
                --Internal Connection
-               LAST_PACKET                                     : in    t_PACKET_TYPE_SENT      := c_NO_PACKET;
+--             LAST_PACKET     _IN                     : in    t_PACKET_TYPE_SENT      := c_NO_PACKET;
                EXPECTED_REPLY_IN                       : in    std_logic_vector(7 downto 0) := (others => '0');
                RX_DLM_IN                                       : in    std_logic       := '0';
                RX_DLM_WORD_IN                          : in    std_logic_vector(7 downto 0)    := (others => '0');
index ccb1349db14df3a098330de6c8fae5c1224aa5c7..259b20aea0ab656f2ec1db7255e6fbfa184c2403 100644 (file)
@@ -10,7 +10,7 @@ use work.soda_components.all;
 \r
 entity soda_reply_pkt_builder is\r
        port(\r
-               SYSCLK                                  : in    std_logic; -- fabric clock\r
+               SODACLK                                 : in    std_logic; -- fabric clock\r
                RESET                                           : in    std_logic; -- synchronous reset\r
                CLEAR                                           : in    std_logic; -- asynchronous reset\r
                CLK_EN                                  : in    std_logic; \r
@@ -31,9 +31,9 @@ architecture Behavioral of soda_reply_pkt_builder is
 \r
 begin\r
        
-       reply_fsm_proc : process(SYSCLK)
+       reply_fsm_proc : process(SODACLK)
        begin
-               if rising_edge(SYSCLK) then\r
+               if rising_edge(SODACLK) then\r
                        if (RESET='1') then
                                packet_state_S          <= c_IDLE;
                        else
@@ -53,9 +53,9 @@ begin
                end if;
        end process;
 
-       collect_reply_proc : process(SYSCLK)
+       collect_reply_proc : process(SODACLK)
        begin
-               if rising_edge(SYSCLK) then\r
+               if rising_edge(SODACLK) then\r
                        if (RESET='1') then
                                TX_DLM_OUT                      <= '0';\r
                                TX_DLM_WORD_OUT <= (others=>'0');
index ed7ae7c0c3a9d7c0cac984473888f4267f77ee22..37a0d68f17c4bc52d29778f6a4fd23f46d9e4e76 100644 (file)
@@ -29,8 +29,6 @@ entity soda_source is
                SODA_WRITE_IN                   : in    std_logic := '0';
                SODA_ACK_OUT                    : out   std_logic := '0';
                LEDS_OUT           : out  std_logic_vector(3 downto 0)
---             TEST_LINE                               : out  std_logic_vector(15 downto 0);
---             STAT                                            : out  std_logic_vector(31 downto 0) -- DEBUG
                );
 end soda_source;
 
@@ -75,19 +73,19 @@ begin
        superburst_gen :  soda_superburst_generator
                generic map(BURST_COUNT         => 16)
                port map(
-                       SYSCLK                                  =>      SYSCLK,
-                       RESET                                           =>      RESET,
-                       CLEAR                                           =>      '0',
-                       CLK_EN                                  =>      CLK_EN,
+                       SODACLK                                         =>      SYSCLK,         -- Here sysclk is the same as sodaclk; we are still at the source
+                       RESET                                                   =>      RESET,
+                       CLEAR                                                   =>      '0',
+                       CLK_EN                                          =>      CLK_EN,
                        --Internal Connection
-                       SODA_BURST_PULSE_IN     =>      SODA_BURST_PULSE_IN,
-                       START_OF_SUPERBURST     =>      start_of_superburst_S,
-                       SUPER_BURST_NR_OUT      =>      super_burst_nr_S
+                       SODA_BURST_PULSE_IN             =>      SODA_BURST_PULSE_IN,
+                       START_OF_SUPERBURST_OUT =>      start_of_superburst_S,
+                       SUPER_BURST_NR_OUT              =>      super_burst_nr_S
                );
 
        packet_builder : soda_packet_builder
                port map(
-                       SYSCLK                                  =>      SYSCLK,
+                       SODACLK                                 =>      SYSCLK,
                        RESET                                           =>      RESET,
                        CLEAR                                           =>      '0',
                        CLK_EN                                  => CLK_EN,
@@ -110,7 +108,7 @@ begin
                        CLEAR                                                   =>      '0',
                        CLK_EN                                          =>      '1',
                        --Internal Connection
-                       LAST_PACKET                                     =>      last_packet_sent_S,
+--                     LAST_PACKET                                     =>      last_packet_sent_S,
                        EXPECTED_REPLY_IN                       => expected_reply_S,
                        RX_DLM_IN                                       => RX_DLM_IN,
                        RX_DLM_WORD_IN                          => RX_DLM_WORD_IN,
@@ -160,18 +158,18 @@ begin
 -----------------------------------------------------------
 --     Transmission history for reply-checking                                 --
 -----------------------------------------------------------
-       packet_history_proc : process(SYSCLK)
-       begin
-               if rising_edge(SYSCLK) then
-                       if( RESET = '1' ) then
-                               last_packet_sent_S      <= c_NO_PACKET;
-                       elsif (start_of_superburst_S='1') then
-                               last_packet_sent_S      <= c_BST_PACKET;
-                       elsif (soda_cmd_strobe_S='1') then
-                               last_packet_sent_S      <= c_CMD_PACKET;
-                       end if;
-               end if;
-       end process;
+--     packet_history_proc : process(SYSCLK)
+--     begin
+--             if rising_edge(SYSCLK) then
+--                     if( RESET = '1' ) then
+--                             last_packet_sent_S      <= c_NO_PACKET;
+--                     elsif (start_of_superburst_S='1') then
+--                             last_packet_sent_S      <= c_BST_PACKET;
+--                     elsif (soda_cmd_strobe_S='1') then
+--                             last_packet_sent_S      <= c_CMD_PACKET;
+--                     end if;
+--             end if;
+--     end process;
 
 ---------------------------------------------------------
 -- RegIO Statemachine
index 7ba315b970ca4f55c9ad2af4a97f7f7bc2f34fd0..2bad6c7469580a188eae56b4df046912b5e73ad3 100644 (file)
@@ -15,14 +15,14 @@ entity soda_superburst_generator is
                BURST_COUNT : natural range 1 to 256 := 16   -- number of bursts to be counted between super-bursts
                );
        port(
-               SYSCLK                                  : in    std_logic; -- fabric clock
-               RESET                                           : in    std_logic; -- synchronous reset
-               CLEAR                                           : in    std_logic; -- asynchronous reset
-               CLK_EN                                  : in    std_logic;
+               SODACLK                                         : in    std_logic; -- fabric clock
+               RESET                                                   : in    std_logic; -- synchronous reset
+               CLEAR                                                   : in    std_logic; -- asynchronous reset
+               CLK_EN                                          : in    std_logic;
                --Internal Connection
-               SODA_BURST_PULSE_IN     : in    std_logic := '0';       -- 
-               START_OF_SUPERBURST     : out   std_logic := '0';
-               SUPER_BURST_NR_OUT      : out   std_logic_vector(30 downto 0) := (others => '0')
+               SODA_BURST_PULSE_IN             : in    std_logic := '0';       -- 
+               START_OF_SUPERBURST_OUT : out   std_logic := '0';
+               SUPER_BURST_NR_OUT              : out   std_logic_vector(30 downto 0) := (others => '0')
                );
 end soda_superburst_generator;
 
@@ -30,8 +30,6 @@ architecture Behavioral of soda_superburst_generator is
 
        constant        cBURST_COUNT                            : std_logic_vector(7 downto 0)  := conv_std_logic_vector(BURST_COUNT - 1,8);
 
-       signal  clk_S                                                   : std_logic;
-       signal  rst_S                                                   : std_logic;
        signal  soda_burst_pulse_S              : std_logic     := '0';
        signal  start_of_superburst_S   : std_logic     := '0';
        signal  super_burst_nr_S                        : std_logic_vector(30 downto 0) := (others => '0');             -- from super-burst-nr-generator
@@ -40,33 +38,29 @@ architecture Behavioral of soda_superburst_generator is
 
 begin
 
-       clk_S                                                   <= SYSCLK;
-       rst_S                                                   <= RESET;
-       START_OF_SUPERBURST             <= start_of_superburst_S;
        SUPER_BURST_NR_OUT              <=      super_burst_nr_S;
        
-       burst_pulse_edge_proc : process(clk_S, rst_S, SODA_BURST_PULSE_IN, soda_burst_pulse_S, burst_counter_S)
+       burst_pulse_edge_proc : process(SODACLK)
        begin
-               if rising_edge(clk_S) then
+               if rising_edge(SODACLK) then
                        soda_burst_pulse_S <= SODA_BURST_PULSE_IN;
-                       if (rst_S='1') then
+                       if (RESET='1') then
                                burst_counter_S <= cBURST_COUNT;
-                               start_of_superburst_S   <= '0';
+                               START_OF_SUPERBURST_OUT <= '0';
                                super_burst_nr_S                        <= (others => '0');
                        elsif ((SODA_BURST_PULSE_IN = '1') and (soda_burst_pulse_S = '0')) then
                                if (burst_counter_S = x"00") then
-                                       start_of_superburst_S   <= '1';
+                                       START_OF_SUPERBURST_OUT <= '1';
                                        super_burst_nr_S                        <= super_burst_nr_S + 1;
                                        burst_counter_S <= cBURST_COUNT;
                                else
-                                       start_of_superburst_S   <= '0';
+                                       START_OF_SUPERBURST_OUT <= '0';
                                        burst_counter_s <=      burst_counter_s - 1;
                                end if;
                        else
-                               start_of_superburst_S           <= '0';
+                               START_OF_SUPERBURST_OUT         <= '0';
                        end if;
                end if;
        end process;
-       
 
 end Behavioral;
index 52f059dc59fef495bad325a48fb0474e6062c876..1abcca703173fc1ad116f28bba366d0529b64b4a 100644 (file)
@@ -215,16 +215,16 @@ architecture trb3_periph_sodasource_arch of trb3_periph_sodasource is
   signal rx_dlm_word       : std_logic_vector(7 downto 0);
 
        --SODA
-       signal rst_S                                                    : std_logic;
-       signal clk_S                                                    : std_logic;
-       signal enable_S                                         : std_logic := '0';
-       signal soda_cmd_word_S                          : std_logic_vector(31 downto 0) := (others => '0');
-       signal soda_cmd_strobe_S                        : std_logic := '0';
-       signal SOS_S                                                    : std_logic := '0';
-       signal super_burst_nr_S                         : std_logic_vector(30 downto 0) := (others => '0');             -- from super-burst-nr-generator
-       signal SOB_S                                                    : std_logic := '0';
-       signal dlm_word_S                                               : std_logic_vector(7 downto 0)  := (others => '0');
-       signal dlm_valid_S                                      : std_logic;
+--     signal rst_S                                                    : std_logic;
+--     signal clk_S                                                    : std_logic;
+--     signal enable_S                                         : std_logic := '0';
+--     signal soda_cmd_word_S                          : std_logic_vector(31 downto 0) := (others => '0');
+--     signal soda_cmd_strobe_S                        : std_logic := '0';
+--     signal SOS_S                                                    : std_logic := '0';
+--     signal super_burst_nr_S                         : std_logic_vector(30 downto 0) := (others => '0');             -- from super-burst-nr-generator
+--     signal SOB_S                                                    : std_logic := '0';
+--     signal dlm_word_S                                               : std_logic_vector(7 downto 0)  := (others => '0');
+--     signal dlm_valid_S                                      : std_logic;
        
 begin
 ---------------------------------------------------------------------------
@@ -573,8 +573,7 @@ THE_SYNC_LINK : med_ecp3_sfp_sync
 ---------------------------------------------------------------------------
 -- The Soda Central
 ---------------------------------------------------------------------------         
---  tx_dlm_i <= '0';
---  tx_dlm_word <= x"00";
+
 THE_SOB_SOURCE : soda_start_of_burst_faker
        port map(
                SYSCLK                                          => clk_sys_i,