1 ------------------------------------------------------------------------------- 2 -- File : AxiI2cQsfpCore.vhd 3 -- Company : SLAC National Accelerator Laboratory 4 -- Created : 2014-04-24 5 -- Last update: 2016-09-20 6 ------------------------------------------------------------------------------- 7 -- Description: AXI-Lite interface to QSFP 8 ------------------------------------------------------------------------------- 9 -- This file is part of 'SLAC Firmware Standard Library'. 10 -- It is subject to the license terms in the LICENSE.txt file found in the 11 -- top-level directory of this distribution and at: 12 -- https://confluence.slac.stanford.edu/display/ppareg/LICENSE.html. 13 -- No part of 'SLAC Firmware Standard Library', including this file, 14 -- may be copied, modified, propagated, or distributed except according to 15 -- the terms contained in the LICENSE.txt file. 16 ------------------------------------------------------------------------------- 19 use ieee.std_logic_1164.
all;
28 use unisim.vcomponents.
all;
31 --! @ingroup devices_transceivers_qsfp 45 -- AXI-Lite Register Interface 57 -- Note: PRESCALE_G = (clk_freq / (5 * i2c_freq)) - 1 58 -- FILTER_G = (min_pulse_time / clk_period) + 1 76 O => i2ci.scl,
-- Buffer output 77 IO => qsfpInOut.scl,
-- Buffer inout port (connect directly to top-level port) 78 I => i2co.scl,
-- Buffer input 79 T => i2co.scloen
);
-- 3-state enable input, high=input, low=output 83 O => i2ci.sda,
-- Buffer output 84 IO => qsfpInOut.sda,
-- Buffer inout port (connect directly to top-level port) 85 I => i2co.sda,
-- Buffer input 86 T => i2co.sdaoen
);
-- 3-state enable input, high=input, low=output 101 -- I2C Register Interface 104 -- AXI-Lite Register Interface 109 -- Register Inputs/Outputs 123 -- I2C Port Interface 126 -- I2C Register Interface in regInI2cRegMasterInType
out i2cRegMasterInI2cRegMasterInType
out qsfpOutAxiI2cQsfpOutType
in qsfpInAxiI2cQsfpInType
out axiWriteSlaveAxiLiteWriteSlaveType
out axiReadSlaveAxiLiteReadSlaveType
I2C_MIN_PULSE_Greal := 100.0E-9
I2cRegMasterInType i2cRegMasterIn
STATUS_CNT_WIDTH_Gnatural range 1 to 32:= 32
in axiReadMasterAxiLiteReadMasterType
natural := natural( AXI_CLK_FREQ_G* I2C_MIN_PULSE_G)+ 1 FILTER_C
in i2cRegMasterOutI2cRegMasterOutType
AXI_ERROR_RESP_Gslv( 1 downto 0) := AXI_RESP_SLVERR_C
in axiWriteMasterAxiLiteWriteMasterType
OUTPUT_EN_POLARITY_Ginteger range 0 to 1:= 0
in statusAxiI2cQsfpStatusType
out axiReadSlaveAxiLiteReadSlaveType
AxiI2cQsfpStatusType status
real := 5.0* I2C_SCL_FREQ_G I2C_SCL_5xFREQ_C
in axiWriteMasterAxiLiteWriteMasterType
I2C_SCL_FREQ_Greal := 100.0E+3
slv( 1 downto 0) := "10" AXI_RESP_SLVERR_C
AXI_ERROR_RESP_Gslv( 1 downto 0) := AXI_RESP_SLVERR_C
natural :=( getTimeRatio( AXI_CLK_FREQ_G, I2C_SCL_5xFREQ_C))- 1 PRESCALE_C
in axiReadMasterAxiLiteReadMasterType
I2cRegMasterOutType i2cRegMasterOut
STATUS_CNT_WIDTH_Gnatural range 1 to 32:= 32
inout qsfpInOutAxiI2cQsfpInOutType
out axiWriteSlaveAxiLiteWriteSlaveType
FILTER_Ginteger range 2 to 512:= 8
out regOutI2cRegMasterOutType
AXI_CLK_FREQ_Greal := 200.0E+6
out configAxiI2cQsfpConfigType
PRESCALE_Ginteger range 0 to 655535:= 62
AxiI2cQsfpConfigType config