add_file -vhdl -lib work "../../trb3/base/trb3_components.vhd"
add_file -vhdl -lib work "../../trbnet/trb_net_std.vhd"
add_file -vhdl -lib work "../../trbnet/trb_net_components.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/gbe_trb/base/gbe_protocols.vhd"
#Basic Infrastructure
add_file -vhdl -lib work "../../trb3sc/gbe_hub/reset_handler.vhd"
add_file -vhdl -lib work "../../trbnet/special/spi_slim.vhd"
add_file -vhdl -lib work "../../trbnet/special/spi_databus_memory.vhd"
add_file -vhdl -lib work "../../trbnet/special/fpga_reboot.vhd"
-add_file -vhdl -lib work "../../TOMcat/code/tomcat_tools.vhd"
-add_file -vhdl -lib work "../../trb3sc/code/debuguart.vhd"
add_file -vhdl -lib work "../../trbnet/special/uart.vhd"
add_file -vhdl -lib work "../../trbnet/special/uart_rec.vhd"
add_file -vhdl -lib work "../../trbnet/special/uart_trans.vhd"
+add_file -vhdl -lib work "../../trbnet/special/trb_net_i2cwire2.vhd"
+add_file -vhdl -lib work "../../TOMcat/code/tomcat_tools.vhd"
+add_file -vhdl -lib work "../../trb3sc/code/debuguart.vhd"
add_file -vhdl -lib work "../../trb3sc/code/load_settings.vhd"
add_file -vhdl -lib work "../../trb3sc/code/spi_master_generic.vhd"
add_file -vhdl -lib work "../../vhdlbasics/interface/i2c_gstart2.vhd"
add_file -vhdl -lib work "../../vhdlbasics/interface/i2c_sendb2.vhd"
add_file -vhdl -lib work "../../vhdlbasics/interface/i2c_slim2.vhd"
-add_file -vhdl -lib work "../../trbnet/special/trb_net_i2cwire2.vhd"
#SlowControl files
add_file -vhdl -lib work "../../trbnet/trb_net_onewire.vhd"
add_file -vhdl -lib work "../../trbnet/trb_net16_addresses.vhd"
-#Media interface
-add_file -vhdl -lib work "../../trbnet/media_interfaces/sync/med_sync_define_RS.vhd"
-#add_file -vhdl -lib work "../../trbnet/media_interfaces/sync/rx_control_RS.vhd"
-#add_file -vhdl -lib work "../../trbnet/media_interfaces/sync/tx_control_RS.vhd"
-add_file -vhdl -lib work "../../trbnet/media_interfaces/sync/main_rx_reset_RS.vhd"
-add_file -vhdl -lib work "../../trbnet/media_interfaces/sync/main_tx_reset_RS.vhd"
-#add_file -vhdl -lib work "../../trbnet/media_interfaces/sync/sci_reader_RS.vhd"
#TrbNet Endpoint
add_file -vhdl -lib work "../../trbnet/trb_net16_term_buf.vhd"
#GbE
add_file -vhdl -lib work "../../trbnet/gbe_trb_ecp3/media/gbe_med_fifo.vhd"
add_file -vhdl -lib work "../../trbnet/gbe_trb_ecp3/media/serdes_gbe_4ch_ds.vhd"
+add_file -vhdl -lib work "../../trbnet/gbe_trb/base/gbe_sci_reader.vhd"
+add_file -vhdl -lib work "../../trbnet/media_interfaces/sync/med_sync_define_RS.vhd"
+add_file -vhdl -lib work "../../trbnet/media_interfaces/sync/main_rx_reset_RS.vhd"
+add_file -vhdl -lib work "../../trbnet/media_interfaces/sync/main_tx_reset_RS.vhd"
+
+add_file -vhdl -lib work "../../trbnet/gbe_trb/base/inserter.vhd"
+add_file -vhdl -lib work "../../trbnet/gbe_trb/base/remover.vhd"
+add_file -vhdl -lib work "../../trbnet/gbe_trb_ecp3/cores/fifo_inserter.vhd"
+add_file -vhdl -lib work "../../trbnet/gbe_trb_ecp3/cores/fifo_remover.vhd"
+
+add_file -vhdl -lib work "../../trbnet/gbe_trb/base/rx_rb.vhd"
+add_file -vhdl -lib work "../../trbnet/gbe_trb/base/tx_fifo.vhd"
+add_file -vhdl -lib work "../../trbnet/gbe_trb/base/gbe_lsm.vhd"
+add_file -vhdl -lib work "../../trbnet/gbe_trb/base/scatter_ports.vhd"
+add_file -vhdl -lib work "../../trbnet/gbe_trb/base/gather_ports.vhd"
+add_file -vhdl -lib work "../../trbnet/gbe_trb/base/sgl_ctrl.vhd"
+
+add_file -vhdl -lib work "../../trbnet/gbe_trb_ecp3/cores/rb_4k_9.vhd"
+add_file -vhdl -lib work "../../trbnet/gbe_trb_ecp3/cores/fifo_4k_9.vhd"
+
+### here!!!
add_file -vhdl -lib work "../../trbnet/gbe_trb/base/gbe_wrapper_fifo.vhd"
add_file -vhdl -lib work "../../trbnet/gbe_trb/base/gbe_logic_wrapper.vhd"
add_file -vhdl -lib work "../../trbnet/gbe_trb/base/trb_net16_gbe_frame_receiver.vhd"
add_file -vhdl -lib work "../../trbnet/gbe_trb/base/trb_net16_gbe_receive_control.vhd"
add_file -vhdl -lib work "../../trbnet/gbe_trb/base/trb_net16_gbe_main_control.vhd"
-#add_file -vhdl -lib work "../../trbnet/gbe_trb/base/trb_net16_gbe_mac_control.vhd"
add_file -vhdl -lib work "../../trbnet/gbe_trb/base/gbe_mac_control.vhd"
add_file -vhdl -lib work "../../trbnet/gbe_trb/base/trb_net16_gbe_protocol_prioritizer.vhd"
add_file -vhdl -lib work "../../trbnet/gbe_trb/base/trb_net16_gbe_protocol_selector.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 -vhdl -lib work "../../trbnet/gbe_trb/base/gbe_sci_reader.vhd"
-add_file -vhdl -lib work "../../trbnet/gbe_trb/base/inserter.vhd"
-add_file -vhdl -lib work "../../trbnet/gbe_trb/base/remover.vhd"
-add_file -vhdl -lib work "../../trbnet/gbe_trb_ecp3/cores/fifo_inserter.vhd"
-add_file -vhdl -lib work "../../trbnet/gbe_trb_ecp3/cores/fifo_remover.vhd"
-
#add_file -vhdl -lib work "../../trbnet/gbe_trb/base/parser.vhd"
-add_file -vhdl -lib work "../../trbnet/gbe_trb/base/rx_rb.vhd"
-add_file -vhdl -lib work "../../trbnet/gbe_trb/base/tx_fifo.vhd"
-add_file -vhdl -lib work "../../trbnet/gbe_trb/base/gbe_lsm.vhd"
-add_file -vhdl -lib work "../../trbnet/gbe_trb/base/scatter_ports.vhd"
-add_file -vhdl -lib work "../../trbnet/gbe_trb/base/gather_ports.vhd"
-add_file -vhdl -lib work "../../trbnet/gbe_trb/base/sgl_ctrl.vhd"
-
-add_file -vhdl -lib work "../../trbnet/gbe_trb_ecp3/cores/rb_4k_9.vhd"
-add_file -vhdl -lib work "../../trbnet/gbe_trb_ecp3/cores/fifo_4k_9.vhd"
-
add_file -vhdl -lib work "../../trbnet/gbe_trb/ipcores/ecp3/fifo_8kx9.vhd"
add_file -vhdl -lib work "../../trbnet/gbe_trb/ipcores/ecp3/fifo_4096x9.vhd"
add_file -vhdl -lib work "../../trbnet/gbe_trb/ipcores/ecp3/fifo_512x32.vhd"
add_file -vhdl -lib work "../../trbnet/gbe_trb/ipcores/ecp3/fifo_2kx9x18_wcnt.vhd"
add_file -vhdl -lib work "../../trbnet/gbe_trb/ipcores/ecp3/fifo_4kx18x9_wcnt.vhd"
-add_file -vhdl -lib work "../../trbnet/special/handler_lvl1.vhd"
-add_file -vhdl -lib work "../../trbnet/special/handler_data.vhd"
-add_file -vhdl -lib work "../../trbnet/special/handler_ipu.vhd"
-add_file -vhdl -lib work "../../trbnet/special/handler_trigger_and_data.vhd"
-add_file -vhdl -lib work "../../trbnet/trb_net16_endpoint_hades_full_handler_record.vhd"
-add_file -vhdl -lib work "../../trbnet/special/bus_register_handler.vhd"
-
add_file -vhdl -lib work "./trb3sc_gbe_hub.vhd"
use work.trb_net_components.all;
use work.trb3_components.all;
use work.version.all;
-use work.trb_net_gbe_components.all;
+--use work.trb_net_gbe_components.all;
use work.med_sync_define_RS.all;
-- BUG: backplane handling!!!
-- LED
---------------------------------------------------------------------------
-- LED are green, orange, red, yellow, white(2), rj_green(2), rj_red(2), sfp_green(2), sfp_red(2)
- LED_GREEN <= not status_raw(12 * 8 + 6); -- link active
- LED_ORANGE <= not status_raw(12 * 8 + 2); -- AN complete
- LED_RED <= not status_raw(12 * 8 + 1); -- RX ready
- LED_YELLOW <= not status_raw(12 * 8 + 0); -- TX ready
+ LED_GREEN <= not status_raw(12 * 8 + 6); -- link active
+ LED_ORANGE <= not status_raw(12 * 8 + 2); -- AN complete
+ LED_RED <= not status_raw(12 * 8 + 1); -- RX ready
+ LED_YELLOW <= not status_raw(12 * 8 + 0); -- TX ready
LED_HUB_LINKOK(1) <= not status_raw(10 * 8 + 7); --'0'; -- C2
LED_HUB_TX(1) <= not status_raw(10 * 8 + 2); --'0';