constant INCLUDE_UART : integer := c_YES;
constant INCLUDE_SPI : integer := c_YES;
constant INCLUDE_LCD : integer := c_YES;
+ constant INCLUDE_DEBUG_INTERFACE: integer := c_NO;
--input monitor and trigger generation logic
constant INCLUDE_TRIGGER_LOGIC : integer := c_NO;
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 "../../trb3sc/code/trb3sc_tools.vhd"
+add_file -vhdl -lib work "../../trb3sc/code/debuguart.vhd"
add_file -vhdl -lib work "../../trb3sc/code/lcd.vhd"
add_file -vhdl -lib work "../../trbnet/special/uart.vhd"
add_file -vhdl -lib work "../../trbnet/special/uart_rec.vhd"
constant INCLUDE_UART : integer := c_YES;
constant INCLUDE_SPI : integer := c_YES;
constant INCLUDE_LCD : integer := c_YES;
+ constant INCLUDE_DEBUG_INTERFACE: integer := c_NO;
--input monitor and trigger generation logic
constant INCLUDE_TRIGGER_LOGIC : integer := c_YES;
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 "../../trb3sc/code/trb3sc_tools.vhd"
+add_file -vhdl -lib work "../../trb3sc/code/debuguart.vhd"
add_file -vhdl -lib work "../../trb3sc/code/lcd.vhd"
add_file -vhdl -lib work "../../trbnet/special/uart.vhd"
add_file -vhdl -lib work "../../trbnet/special/uart_rec.vhd"
DEBUG_ACTIVE : out std_logic;
- BUS_DEBUG_TX : in CTRLBUS_TX;
+ BUS_DEBUG_TX : in CTRLBUS_TX := (data => (others => '0'), unknown => '1', others => '0');
BUS_DEBUG_RX : out CTRLBUS_RX;
STATUS : out std_logic_vector(31 downto 0)
BUS_TX : out CTRLBUS_TX;
--Control master for default settings
- BUS_MASTER_IN : in CTRLBUS_TX;
+ BUS_MASTER_IN : in CTRLBUS_TX := (data => (others => '0'), unknown => '1', others => '0');
BUS_MASTER_OUT : out CTRLBUS_RX;
BUS_MASTER_ACTIVE : out std_logic;
constant INCLUDE_UART : integer := c_YES;
constant INCLUDE_SPI : integer := c_YES;
constant INCLUDE_LCD : integer := c_YES;
+ constant INCLUDE_DEBUG_INTERFACE: integer := c_NO;
--input monitor and trigger generation logic
constant INCLUDE_TRIGGER_LOGIC : integer := c_NO;
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 "../../trb3sc/code/trb3sc_tools.vhd"
+add_file -vhdl -lib work "../../trb3sc/code/debuguart.vhd"
add_file -vhdl -lib work "../../trb3sc/code/lcd.vhd"
add_file -vhdl -lib work "../../trbnet/special/uart.vhd"
add_file -vhdl -lib work "../../trbnet/special/uart_rec.vhd"
constant INCLUDE_UART : integer := c_YES;
constant INCLUDE_SPI : integer := c_YES;
constant INCLUDE_LCD : integer := c_YES;
+ constant INCLUDE_DEBUG_INTERFACE: integer := c_NO;
--input monitor and trigger generation logic
constant INCLUDE_TRIGGER_LOGIC : integer := c_YES;
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 "../../trb3sc/code/trb3sc_tools.vhd"
+add_file -vhdl -lib work "../../trb3sc/code/debuguart.vhd"
add_file -vhdl -lib work "../../trb3sc/code/lcd.vhd"
add_file -vhdl -lib work "../../trbnet/special/uart.vhd"
add_file -vhdl -lib work "../../trbnet/special/uart_rec.vhd"
--Address settings
constant INIT_ADDRESS : std_logic_vector := x"F3CC";
constant BROADCAST_SPECIAL_ADDR : std_logic_vector := x"61";
-
+
+--set to 0 for backplane serdes, set to 3 for front SFP serdes
+ constant SERDES_NUM : integer := 0;
constant INCLUDE_UART : integer := c_YES;
constant INCLUDE_SPI : integer := c_YES;
constant INCLUDE_LCD : integer := c_YES;
-
+ constant INCLUDE_DEBUG_INTERFACE: integer := c_NO;
+
--input monitor and trigger generation logic
constant INCLUDE_TRIGGER_LOGIC : integer := c_NO;
constant INCLUDE_STATISTICS : integer := c_NO;
TOPNAME => "trb3sc_pulser",
lm_license_file_for_synplify => "1702\@hadeb05.gsi.de", #"27000\@lxcad01.gsi.de";
lm_license_file_for_par => "1702\@hadeb05.gsi.de",
-lattice_path => '/d/jspc29/lattice/diamond/3.5_x64',
+lattice_path => '/d/jspc29/lattice/diamond/3.6_x64',
synplify_path => '/d/jspc29/lattice/synplify/J-2014.09-SP2/',
-synplify_command => "/d/jspc29/lattice/diamond/3.5_x64/bin/lin64/synpwrap -fg -options",
+synplify_command => "/d/jspc29/lattice/diamond/3.6_x64/bin/lin64/synpwrap -fg -options",
#synplify_command => "/d/jspc29/lattice/synplify/J-2014.09-SP2/bin/synplify_premier_dp",
nodelist_file => 'nodelist_frankfurt.txt',
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 "../../trb3sc/code/trb3sc_tools.vhd"
+add_file -vhdl -lib work "../../trb3sc/code/debuguart.vhd"
add_file -vhdl -lib work "../../trb3sc/code/lcd.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/spi_ltc2600.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 "../../trb3/base/code/input_to_trigger_logic.vhd"
+add_file -vhdl -lib work "../../trb3/base/code/input_statistics.vhd"
+
#SlowControl files
add_file -vhdl -lib work "../../trbnet/trb_net16_regio_bus_handler.vhd"
TRIG_LEFT : in std_logic; --Trigger Input
--Backplane for slaves on trbv3scbp1
--- BACK_GPIO : inout std_logic_vector(3 downto 0);
+ BACK_GPIO : inout std_logic_vector(3 downto 0);
--AddOn Connector
OUTP : out std_logic_vector(16 downto 1);
signal timer : TIMERS;
signal lcd_data : std_logic_vector(511 downto 0);
+ signal sfp_los_i, sfp_txdis_i, sfp_prsnt_i : std_logic;
+
attribute syn_keep of GSR_N : signal is true;
attribute syn_preserve of GSR_N : signal is true;
attribute syn_keep of bussci_rx : signal is true;
THE_MEDIA_INTERFACE : entity work.med_ecp3_sfp_sync
generic map(
- SERDES_NUM => 3,
- IS_SYNC_SLAVE => c_YES
+ SERDES_NUM => SERDES_NUM,
+ IS_SYNC_SLAVE => c_YES
)
port map(
- CLK => clk_full_osc,
+ CLK_REF_FULL => med2int(0).clk_full,
+ CLK_INTERNAL_FULL => clk_full_osc,
SYSCLK => clk_sys,
RESET => reset_i,
CLEAR => clear_i,
TX_DLM => open,
TX_DLM_WORD => open,
- --SFP Connection
- SD_RXD_P_IN => SERDES_RX(0),
- SD_RXD_N_IN => SERDES_RX(1),
- SD_TXD_P_OUT => SERDES_TX(0),
- SD_TXD_N_OUT => SERDES_TX(1),
- SD_REFCLK_P_IN => '0',
- SD_REFCLK_N_IN => '0',
- SD_PRSNT_N_IN => SFP_MOD0(1),
- SD_LOS_IN => SFP_LOS(1),
- SD_TXDIS_OUT => SFP_TX_DIS(1),
- --Control Interface
- BUS_RX => bussci_rx,
- BUS_TX => bussci_tx,
- -- Status and control port
- STAT_DEBUG => med_stat_debug(63 downto 0),
- CTRL_DEBUG => open
- );
-
-SFP_TX_DIS(0) <= '1';
+ --SFP Connection
+ SD_REFCLK_P_IN => '0',
+ SD_REFCLK_N_IN => '0',
+ SD_PRSNT_N_IN => sfp_prsnt_i,
+ SD_LOS_IN => sfp_los_i,
+ SD_TXDIS_OUT => sfp_txdis_i,
+ --Control Interface
+ BUS_RX => bussci_rx,
+ BUS_TX => bussci_tx,
+ -- Status and control port
+ STAT_DEBUG => med_stat_debug(63 downto 0),
+ CTRL_DEBUG => open
+ );
+
+ SFP_TX_DIS(0) <= '1';
+ gen_sfp_con : if SERDES_NUM = 3 generate
+ sfp_los_i <= SFP_LOS(1);
+ sfp_prsnt_i <= SFP_MOD0(1);
+ SFP_TX_DIS(1) <= sfp_txdis_i;
+ end generate;
+ gen_bpl_con : if SERDES_NUM = 0 generate
+ sfp_los_i <= BACK_GPIO(1);
+ sfp_prsnt_i <= BACK_GPIO(1);
+ BACK_GPIO(0) <= sfp_txdis_i;
+ end generate;
+
---------------------------------------------------------------------------
-- Endpoint