SD_REFCLK_N_IN : in std_logic;
SD_PRSNT_N_IN : in std_logic_vector(3 downto 0); -- SFP Present ('0' = SFP in place, '1' = no SFP mounted)
SD_LOS_IN : in std_logic_vector(3 downto 0); -- SFP Loss Of Signal ('0' = OK, '1' = no signal)
- SD_TXDIS_OUT : out std_logic_vector(3 downto 0); -- SFP disable
+ SD_TXDIS_OUT : out std_logic_vector(3 downto 0); -- SFP disable
+ --Control Interface
+ SCI_DATA_IN : in std_logic_vector(7 downto 0) := (others => '0');
+ SCI_DATA_OUT : out std_logic_vector(7 downto 0) := (others => '0');
+ SCI_ADDR : in std_logic_vector(8 downto 0) := (others => '0');
+ SCI_READ : in std_logic := '0';
+ SCI_WRITE : in std_logic := '0';
+ SCI_ACK : out std_logic := '0';
-- Status and control port
STAT_OP : out std_logic_vector (4*16-1 downto 0);
CTRL_OP : in std_logic_vector (4*16-1 downto 0);
signal clk_tx : std_logic;
signal clk_rx : std_logic;
signal clk_ref : std_logic;
-
+
+ signal sci_ch_i : std_logic_vector(3 downto 0);
+ signal sci_addr_i : std_logic_vector(8 downto 0);
+ signal sci_data_in_i : std_logic_vector(7 downto 0);
+ signal sci_data_out_i : std_logic_vector(7 downto 0);
+ signal sci_read_i : std_logic;
+ signal sci_write_i : std_logic;
+ signal sci_write_shift_i : std_logic_vector(2 downto 0);
+ signal sci_read_shift_i : std_logic_vector(2 downto 0);
+
+
attribute syn_keep : boolean;
attribute syn_preserve : boolean;
attribute syn_keep of led_counter : signal is true;
end generate;
+ PROC_SCI : process begin
+ wait until rising_edge(clk_sys);
+ if SCI_READ = '1' or SCI_WRITE = '1' then
+ sci_ch_i(0) <= not SCI_ADDR(6) and not SCI_ADDR(7) and (SCI_READ or SCI_WRITE);
+ sci_ch_i(1) <= SCI_ADDR(6) and not SCI_ADDR(7) and (SCI_READ or SCI_WRITE);
+ sci_ch_i(2) <= not SCI_ADDR(6) and SCI_ADDR(7) and (SCI_READ or SCI_WRITE);
+ sci_ch_i(3) <= SCI_ADDR(6) and SCI_ADDR(7) and (SCI_READ or SCI_WRITE);
+ sci_addr_i <= SCI_ADDR;
+ sci_data_in_i <= SCI_DATA_IN;
+ end if;
+ sci_read_shift_i <= sci_read_shift_i(1 downto 0) & SCI_READ;
+ sci_write_shift_i <= sci_write_shift_i(1 downto 0) & SCI_WRITE;
+ SCI_DATA_OUT <= sci_data_out_i;
+ end process;
+
+ sci_write_i <= or_all(sci_write_shift_i);
+ sci_read_i <= or_all(sci_read_shift_i);
+ SCI_ACK <= sci_write_shift_i(2) or sci_read_shift_i(2);
+
-- Instantiation of serdes module
gen_serdes_200 : if FREQUENCY = 200 generate
THE_SERDES: serdes_full_ctc
TX_DIV2_MODE_CH3_C => '0', --full rate
RX_DIV2_MODE_CH3_C => '0', --full rate
- SCI_WRDATA => (others => '0'),
- SCI_RDDATA => open,
- SCI_ADDR => (others => '0'),
- SCI_SEL_QUAD => '0',
- SCI_SEL_CH0 => '0',
- SCI_SEL_CH1 => '0',
- SCI_SEL_CH2 => '0',
- SCI_SEL_CH3 => '0',
- SCI_RD => '0',
- SCI_WRN => '0',
+ SCI_WRDATA => sci_data_in_i,
+ SCI_RDDATA => sci_data_out_i,
+ SCI_ADDR => sci_addr_i(5 downto 0),
+ SCI_SEL_QUAD => sci_addr_i(8),
+ SCI_SEL_CH0 => sci_ch_i(0),
+ SCI_SEL_CH1 => sci_ch_i(1),
+ SCI_SEL_CH2 => sci_ch_i(2),
+ SCI_SEL_CH3 => sci_ch_i(3),
+ SCI_RD => sci_read_i,
+ SCI_WRN => sci_write_i,
TX_SERDES_RST_C => CLEAR,
TX_SYNC_QD_C => '0',
SD_PRSNT_N_IN : in std_logic_vector(3 downto 0); -- SFP Present ('0' = SFP in place, '1' = no SFP mounted)\r
SD_LOS_IN : in std_logic_vector(3 downto 0); -- SFP Loss Of Signal ('0' = OK, '1' = no signal)\r
SD_TXDIS_OUT : out std_logic_vector(3 downto 0); -- SFP disable\r
+ --Control Interface\r
+ SCI_DATA_IN : in std_logic_vector(7 downto 0) := (others => '0');\r
+ SCI_DATA_OUT : out std_logic_vector(7 downto 0) := (others => '0');\r
+ SCI_ADDR : in std_logic_vector(8 downto 0) := (others => '0');\r
+ SCI_READ : in std_logic := '0';\r
+ SCI_WRITE : in std_logic := '0'; \r
+ SCI_ACK : out std_logic := '0';\r
-- Status and control port\r
STAT_OP : out std_logic_vector (4*16-1 downto 0);\r
CTRL_OP : in std_logic_vector (4*16-1 downto 0);\r