---------------------------------------------------------------------------
-- LED blink generator
---------------------------------------------------------------------------
-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;
+ 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 if;
-end process THE_BLINK_COUNTER_PROC;
+ end process THE_BLINK_COUNTER_PROC;
---------------------------------------------------------------------------
-- DLM timing generator
---------------------------------------------------------------------------
-THE_DLM_SEND_PROC: process( clk_sys )
-begin
- if( rising_edge(clk_sys) ) then
- inc_dlm_tag <= rst_dlm_ctr;
- rst_dlm_ctr <= rst_dlm_ctr_x;
- if( (reset_i = '1') or (rst_dlm_ctr = '1') or (aux_reg(31) = '0') ) then
- dlm_ctr <= (others => '0');
- elsif( aux_reg(31) = '1' ) then
- dlm_ctr <= dlm_ctr + 1;
+ THE_DLM_SEND_PROC: process( clk_sys )
+ begin
+ if( rising_edge(clk_sys) ) then
+ inc_dlm_tag <= rst_dlm_ctr;
+ rst_dlm_ctr <= rst_dlm_ctr_x;
+ if( (reset_i = '1') or (rst_dlm_ctr = '1') or (aux_reg(31) = '0') ) then
+ dlm_ctr <= (others => '0');
+ elsif( aux_reg(31) = '1' ) then
+ dlm_ctr <= dlm_ctr + 1;
+ end if;
end if;
- end if;
-end process THE_DLM_SEND_PROC;
+ end process THE_DLM_SEND_PROC;
-rst_dlm_ctr_x <= '1' when ((std_logic_vector(dlm_ctr) = aux_reg(23 downto 0)) and (aux_reg(31) = '1')) else '0';
+ rst_dlm_ctr_x <= '1' when ((std_logic_vector(dlm_ctr) = aux_reg(23 downto 0)) and (aux_reg(31) = '1')) else '0';
--- DLM "tag" for blinking LEDs :)
-THE_DLM_TAG_CTR_PROC: process( clk_sys )
-begin
- if( rising_edge(clk_sys) ) then
- if( (reset_i = '1') or (aux_reg(31) = '0') ) then
- dlm_tag_ctr <= (others => '0');
- elsif( inc_dlm_tag = '1' ) then
- dlm_tag_ctr <= dlm_tag_ctr + 1;
+ -- DLM "tag" for blinking LEDs :)
+ THE_DLM_TAG_CTR_PROC: process( clk_sys )
+ begin
+ if( rising_edge(clk_sys) ) then
+ if( (reset_i = '1') or (aux_reg(31) = '0') ) then
+ dlm_tag_ctr <= (others => '0');
+ elsif( inc_dlm_tag = '1' ) then
+ dlm_tag_ctr <= dlm_tag_ctr + 1;
+ end if;
end if;
- end if;
-end process THE_DLM_TAG_CTR_PROC;
+ end process THE_DLM_TAG_CTR_PROC;
+
+ dlm_inject_int <= rst_dlm_ctr;
+ dlm_tx_data_int <= std_logic_vector(dlm_tag_ctr);
---------------------------------------------------------------------------
-- GbE interface (SFP)
DEBUG_OUT => debug(63 downto 0) --open
);
- dlm_inject_int <= rst_dlm_ctr;
- dlm_tx_data_int <= std_logic_vector(dlm_tag_ctr);
-
---------------------------------------------------------------------------
---------------------------------------------------------------------------
THE_SGL_CTRL: entity sgl_ctrl
-- GPIO(13 downto 13) <= debug(33 downto 33);
-- GPIO <= (others => 'Z');
- TIMING_TEST <= dlm_found_int; --'0';
+ TIMING_TEST <= dlm_inject_int; --'0';
-------------------------------------------------------------------------------
-- LED
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 std_logic(blink_counter(8)); --additional_reg(7); --'0';
+ LED(3) <= not std_logic(blink_counter(7)); --additional_reg(7); --'0';
LED(2) <= not dlm_rx_data_int(7); --additional_reg(6); --'0';
LED(1) <= not dlm_rx_data_int(6); --additional_reg(5); --'0';
LED(0) <= not dlm_rx_data_int(5); --additional_reg(4); --'0';
end if;
end process THE_DLM_TAG_CTR_PROC;
+ dlm_inject_int <= rst_dlm_ctr;
+ dlm_tx_data_int <= std_logic_vector(dlm_tag_ctr);
+
---------------------------------------------------------------------------
-- GbE interface (SFP)
---------------------------------------------------------------------------
DEBUG_OUT => debug(63 downto 0) --open
);
- dlm_inject_int <= rst_dlm_ctr;
- dlm_tx_data_int <= std_logic_vector(dlm_tag_ctr);
-
debug(127 downto 64) <= (others => '0');
---------------------------------------------------------------------------
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 std_logic(blink_counter(8)); --additional_reg(7); --'0';
+ LED(3) <= not std_logic(blink_counter(7)); --additional_reg(7); --'0';
LED(2) <= not dlm_rx_data_int(7); --additional_reg(6); --'0';
LED(1) <= not dlm_rx_data_int(6); --additional_reg(5); --'0';
LED(0) <= not dlm_rx_data_int(5); --additional_reg(4); --'0';