Commit 30363ccd authored by Grzegorz Daniluk's avatar Grzegorz Daniluk

fasec: fix eeprom, sfp, thermometer tristate buffers

parent 63580516
This diff is collapsed.
...@@ -51,17 +51,27 @@ package wr_fasec_pkg is ...@@ -51,17 +51,27 @@ package wr_fasec_pkg is
sfp_rxp_i : in std_logic; sfp_rxp_i : in std_logic;
sfp_rxn_i : in std_logic; sfp_rxn_i : in std_logic;
sfp_det_i : in std_logic := '1'; sfp_det_i : in std_logic := '1';
sfp_sda_b : inout std_logic; sfp_sda_i : in std_logic;
sfp_scl_b : inout std_logic; sfp_sda_o : out std_logic;
sfp_sda_t : out std_logic;
sfp_scl_i : in std_logic;
sfp_scl_o : out std_logic;
sfp_scl_t : out std_logic;
sfp_rate_select_o : out std_logic; sfp_rate_select_o : out std_logic;
sfp_tx_fault_i : in std_logic := '0'; sfp_tx_fault_i : in std_logic := '0';
sfp_tx_disable_o : out std_logic; sfp_tx_disable_o : out std_logic;
sfp_los_i : in std_logic := '0'; sfp_los_i : in std_logic := '0';
eeprom_scl_b : inout std_logic; eeprom_sda_i : in std_logic;
eeprom_sda_b : inout std_logic; eeprom_sda_o : out std_logic;
eeprom_sda_t : out std_logic;
thermo_id : inout std_logic; eeprom_scl_i : in std_logic;
eeprom_scl_o : out std_logic;
eeprom_scl_t : out std_logic;
thermo_id_i : in std_logic;
thermo_id_o : out std_logic;
thermo_id_t : out std_logic;
uart_rxd_i : in std_logic; uart_rxd_i : in std_logic;
uart_txd_o : out std_logic; uart_txd_o : out std_logic;
......
...@@ -121,8 +121,12 @@ entity wrc_board_fasec is ...@@ -121,8 +121,12 @@ entity wrc_board_fasec is
sfp_rx_p_i : in std_logic; sfp_rx_p_i : in std_logic;
sfp_rx_n_i : in std_logic; sfp_rx_n_i : in std_logic;
sfp_det_i : in std_logic := '1'; sfp_det_i : in std_logic := '1';
sfp_sda_b : inout std_logic; sfp_sda_i : in std_logic;
sfp_scl_b : inout std_logic; sfp_sda_o : out std_logic;
sfp_sda_t : out std_logic;
sfp_scl_i : in std_logic;
sfp_scl_o : out std_logic;
sfp_scl_t : out std_logic;
sfp_rate_select_o : out std_logic; sfp_rate_select_o : out std_logic;
sfp_tx_fault_i : in std_logic := '0'; sfp_tx_fault_i : in std_logic := '0';
sfp_tx_disable_o : out std_logic; sfp_tx_disable_o : out std_logic;
...@@ -131,13 +135,19 @@ entity wrc_board_fasec is ...@@ -131,13 +135,19 @@ entity wrc_board_fasec is
--------------------------------------------------------------------------- ---------------------------------------------------------------------------
-- I2C EEPROM -- I2C EEPROM
--------------------------------------------------------------------------- ---------------------------------------------------------------------------
eeprom_scl_b : inout std_logic; eeprom_sda_i : in std_logic;
eeprom_sda_b : inout std_logic; eeprom_sda_o : out std_logic;
eeprom_sda_t : out std_logic;
eeprom_scl_i : in std_logic;
eeprom_scl_o : out std_logic;
eeprom_scl_t : out std_logic;
--------------------------------------------------------------------------- ---------------------------------------------------------------------------
-- Onewire interface -- Onewire interface
--------------------------------------------------------------------------- ---------------------------------------------------------------------------
thermo_id : inout std_logic; thermo_id_i : in std_logic;
thermo_id_o : out std_logic;
thermo_id_t : out std_logic;
--------------------------------------------------------------------------- ---------------------------------------------------------------------------
-- UART -- UART
...@@ -475,17 +485,27 @@ begin -- architecture struct ...@@ -475,17 +485,27 @@ begin -- architecture struct
sfp_rxp_i => sfp_rx_p_i, sfp_rxp_i => sfp_rx_p_i,
sfp_rxn_i => sfp_rx_n_i, sfp_rxn_i => sfp_rx_n_i,
sfp_det_i => sfp_det_i, sfp_det_i => sfp_det_i,
sfp_sda_b => sfp_sda_b, sfp_sda_i => sfp_sda_i,
sfp_scl_b => sfp_scl_b, sfp_sda_o => sfp_sda_o,
sfp_sda_t => sfp_sda_t,
sfp_scl_i => sfp_scl_i,
sfp_scl_o => sfp_scl_o,
sfp_scl_t => sfp_scl_t,
sfp_rate_select_o => sfp_rate_select_o, sfp_rate_select_o => sfp_rate_select_o,
sfp_tx_fault_i => sfp_tx_fault_i, sfp_tx_fault_i => sfp_tx_fault_i,
sfp_tx_disable_o => sfp_tx_disable_o, sfp_tx_disable_o => sfp_tx_disable_o,
sfp_los_i => sfp_los_i, sfp_los_i => sfp_los_i,
-- --
eeprom_scl_b => eeprom_scl_b, eeprom_sda_i => eeprom_sda_i,
eeprom_sda_b => eeprom_sda_b, eeprom_sda_o => eeprom_sda_o,
eeprom_sda_t => eeprom_sda_t,
eeprom_scl_i => eeprom_scl_i,
eeprom_scl_o => eeprom_scl_o,
eeprom_scl_t => eeprom_scl_t,
-- --
thermo_id => thermo_id, thermo_id_i => thermo_id_i,
thermo_id_o => thermo_id_o,
thermo_id_t => thermo_id_t,
-- --
uart_rxd_i => uart_rxd_i, uart_rxd_i => uart_rxd_i,
uart_txd_o => uart_txd_o, uart_txd_o => uart_txd_o,
......
...@@ -125,8 +125,12 @@ entity xwrc_board_fasec is ...@@ -125,8 +125,12 @@ entity xwrc_board_fasec is
sfp_rxp_i : in std_logic; sfp_rxp_i : in std_logic;
sfp_rxn_i : in std_logic; sfp_rxn_i : in std_logic;
sfp_det_i : in std_logic := '1'; sfp_det_i : in std_logic := '1';
sfp_sda_b : inout std_logic; sfp_sda_i : in std_logic;
sfp_scl_b : inout std_logic; sfp_sda_o : out std_logic;
sfp_sda_t : out std_logic;
sfp_scl_i : in std_logic;
sfp_scl_o : out std_logic;
sfp_scl_t : out std_logic;
sfp_rate_select_o : out std_logic; sfp_rate_select_o : out std_logic;
sfp_tx_fault_i : in std_logic := '0'; sfp_tx_fault_i : in std_logic := '0';
sfp_tx_disable_o : out std_logic; sfp_tx_disable_o : out std_logic;
...@@ -135,13 +139,19 @@ entity xwrc_board_fasec is ...@@ -135,13 +139,19 @@ entity xwrc_board_fasec is
--------------------------------------------------------------------------- ---------------------------------------------------------------------------
-- I2C EEPROM -- I2C EEPROM
--------------------------------------------------------------------------- ---------------------------------------------------------------------------
eeprom_scl_b : inout std_logic; eeprom_sda_i : in std_logic;
eeprom_sda_b : inout std_logic; eeprom_sda_o : out std_logic;
eeprom_sda_t : out std_logic;
eeprom_scl_i : in std_logic;
eeprom_scl_o : out std_logic;
eeprom_scl_t : out std_logic;
--------------------------------------------------------------------------- ---------------------------------------------------------------------------
-- Onewire interface -- Onewire interface
--------------------------------------------------------------------------- ---------------------------------------------------------------------------
thermo_id : inout std_logic; thermo_id_i : in std_logic;
thermo_id_o : out std_logic;
thermo_id_t : out std_logic;
--------------------------------------------------------------------------- ---------------------------------------------------------------------------
-- UART -- UART
...@@ -307,18 +317,6 @@ architecture struct of xwrc_board_fasec is ...@@ -307,18 +317,6 @@ architecture struct of xwrc_board_fasec is
signal dac_dpll_load_p1 : std_logic; signal dac_dpll_load_p1 : std_logic;
signal dac_dpll_data : std_logic_vector(15 downto 0); signal dac_dpll_data : std_logic_vector(15 downto 0);
-- EEPROM
signal eeprom_sda_out : std_logic;
signal eeprom_sda_in : std_logic;
signal eeprom_scl_out : std_logic;
signal eeprom_scl_in : std_logic;
-- SFP EEPROM
signal sfp_sda_out : std_logic;
signal sfp_sda_in : std_logic;
signal sfp_scl_out : std_logic;
signal sfp_scl_in : std_logic;
-- OneWire -- OneWire
signal onewire_in : std_logic_vector(1 downto 0); signal onewire_in : std_logic_vector(1 downto 0);
signal onewire_en : std_logic_vector(1 downto 0); signal onewire_en : std_logic_vector(1 downto 0);
...@@ -498,14 +496,14 @@ begin -- architecture struct ...@@ -498,14 +496,14 @@ begin -- architecture struct
dac_dpll_data_o => dac_dpll_data, dac_dpll_data_o => dac_dpll_data,
phy16_o => phy16_from_wrc, phy16_o => phy16_from_wrc,
phy16_i => phy16_to_wrc, phy16_i => phy16_to_wrc,
scl_o => eeprom_scl_out, scl_o => eeprom_scl_t,
scl_i => eeprom_scl_in, scl_i => eeprom_scl_i,
sda_o => eeprom_sda_out, sda_o => eeprom_sda_t,
sda_i => eeprom_sda_in, sda_i => eeprom_sda_i,
sfp_scl_o => sfp_scl_out, sfp_scl_o => sfp_scl_t,
sfp_scl_i => sfp_scl_in, sfp_scl_i => sfp_scl_i,
sfp_sda_o => sfp_sda_out, sfp_sda_o => sfp_sda_t,
sfp_sda_i => sfp_sda_in, sfp_sda_i => sfp_sda_i,
sfp_det_i => sfp_det_i, sfp_det_i => sfp_det_i,
spi_sclk_o => flash_sclk_o, spi_sclk_o => flash_sclk_o,
spi_ncs_o => flash_ncs_o, spi_ncs_o => flash_ncs_o,
...@@ -569,19 +567,15 @@ begin -- architecture struct ...@@ -569,19 +567,15 @@ begin -- architecture struct
--onewire_in(0) <= onewire_i; --onewire_in(0) <= onewire_i;
--onewire_in(1) <= '1'; --onewire_in(1) <= '1';
thermo_id <= '0' when onewire_en(0) = '1' else 'Z'; thermo_id_t <= '0' when onewire_en(0) = '1' else '1';
onewire_in(0) <= thermo_id; thermo_id_o <= '0';
onewire_in(0) <= thermo_id_i;
onewire_in(1) <= '1'; onewire_in(1) <= '1';
eeprom_scl_b <= '0' when eeprom_scl_out = '0' else 'Z'; eeprom_sda_o <= '0';
eeprom_sda_b <= '0' when eeprom_sda_out = '0' else 'Z'; eeprom_scl_o <= '0';
eeprom_scl_in <= eeprom_scl_b; sfp_sda_o <= '0';
eeprom_sda_in <= eeprom_sda_b; sfp_scl_o <= '0';
sfp_scl_b <= '0' when sfp_scl_out = '0' else 'Z';
sfp_sda_b <= '0' when sfp_sda_out = '0' else 'Z';
sfp_scl_in <= sfp_scl_b;
sfp_sda_in <= sfp_sda_b;
s00_axi_aclk_o <= clk_pll_62m5; s00_axi_aclk_o <= clk_pll_62m5;
......
...@@ -20,25 +20,25 @@ set_property IOSTANDARD LVCMOS18 [get_ports pll25dac_cs_n_o] ...@@ -20,25 +20,25 @@ set_property IOSTANDARD LVCMOS18 [get_ports pll25dac_cs_n_o]
set_property PACKAGE_PIN N7 [get_ports pll20dac_cs_n_o] set_property PACKAGE_PIN N7 [get_ports pll20dac_cs_n_o]
set_property IOSTANDARD LVCMOS18 [get_ports pll20dac_cs_n_o] set_property IOSTANDARD LVCMOS18 [get_ports pll20dac_cs_n_o]
set_property PACKAGE_PIN J14 [get_ports eeprom_sda_b] set_property PACKAGE_PIN J14 [get_ports eeprom_i2c_sda_io]
set_property IOSTANDARD LVCMOS18 [get_ports eeprom_sda_b] set_property IOSTANDARD LVCMOS18 [get_ports eeprom_i2c_sda_io]
set_property SLEW FAST [get_ports eeprom_sda_b] set_property SLEW FAST [get_ports eeprom_i2c_sda_io]
set_property PACKAGE_PIN H14 [get_ports eeprom_scl_b] set_property PACKAGE_PIN H14 [get_ports eeprom_i2c_scl_io]
set_property IOSTANDARD LVCMOS18 [get_ports eeprom_scl_b] set_property IOSTANDARD LVCMOS18 [get_ports eeprom_i2c_scl_io]
set_property SLEW FAST [get_ports eeprom_scl_b] set_property SLEW FAST [get_ports eeprom_i2c_scl_io]
set_property PACKAGE_PIN K10 [get_ports thermo_id] set_property PACKAGE_PIN K10 [get_ports thermo_id_tri_io]
set_property IOSTANDARD LVCMOS18 [get_ports thermo_id] set_property IOSTANDARD LVCMOS18 [get_ports thermo_id_tri_io]
set_property IOSTANDARD LVCMOS25 [get_ports SFP_sda] set_property IOSTANDARD LVCMOS25 [get_ports sfp_i2c_sda_io]
set_property PACKAGE_PIN AB17 [get_ports SFP_sda] set_property PACKAGE_PIN AB17 [get_ports sfp_i2c_sda_io]
set_property PACKAGE_PIN G16 [get_ports SFP_rx_los] set_property PACKAGE_PIN G16 [get_ports SFP_rx_los]
set_property IOSTANDARD LVCMOS18 [get_ports SFP_rx_los] set_property IOSTANDARD LVCMOS18 [get_ports SFP_rx_los]
set_property PACKAGE_PIN V4 [get_ports SFP_rxp] set_property PACKAGE_PIN V4 [get_ports SFP_rxp]
set_property PACKAGE_PIN K15 [get_ports SFP_tx_fault] set_property PACKAGE_PIN K15 [get_ports SFP_tx_fault]
set_property IOSTANDARD LVCMOS18 [get_ports SFP_tx_fault] set_property IOSTANDARD LVCMOS18 [get_ports SFP_tx_fault]
set_property PACKAGE_PIN AB16 [get_ports SFP_scl] set_property PACKAGE_PIN AB16 [get_ports sfp_i2c_scl_io]
set_property IOSTANDARD LVCMOS25 [get_ports SFP_scl] set_property IOSTANDARD LVCMOS25 [get_ports sfp_i2c_scl_io]
set_property PACKAGE_PIN J15 [get_ports SFP_mod_abs] set_property PACKAGE_PIN J15 [get_ports SFP_mod_abs]
set_property IOSTANDARD LVCMOS18 [get_ports SFP_mod_abs] set_property IOSTANDARD LVCMOS18 [get_ports SFP_mod_abs]
set_property PACKAGE_PIN G14 [get_ports sfp_rate_select_o] set_property PACKAGE_PIN G14 [get_ports sfp_rate_select_o]
...@@ -70,3 +70,5 @@ set_property IOSTANDARD LVCMOS25 [get_ports {dio_oe_n[2]}] ...@@ -70,3 +70,5 @@ set_property IOSTANDARD LVCMOS25 [get_ports {dio_oe_n[2]}]
set_clock_groups -asynchronous -group [get_clocks clk_fpga_0] -group [get_clocks clk_sys] set_clock_groups -asynchronous -group [get_clocks clk_fpga_0] -group [get_clocks clk_sys]
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment