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"
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"
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
---------------------------------------------------------------------------
);
+---------------------------------------------------------------------------
+---------------------------------------------------------------------------
+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,
---------------------------------------------------------------------------
GBE_COPPER_INTERFACE: entity gbe_med_fifo
generic map(
- SERDES_NUM => 3
+ SERDES_NUM => 0
)
port map(
RESET => reset_i,
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
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
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