18 use IEEE.STD_LOGIC_1164.
all;
19 use IEEE.NUMERIC_STD.
all;
20 library xil_defaultlib;
38 reg_sel : in std_logic_vector(3 downto 0);
40 mux_sel : in std_logic_vector(3 downto 0);
68 data_in : in std_logic_vector(31 downto 0);
80 signal latch_enable, temp0, temp1, Reg_enable, commdet_delay : std_logic;
81 signal delay_cnt, mux_cntrl, data_delay : std_logic_vector (3 downto 0);
82 signal data_out_int, dataout : std_logic_vector (227 downto 0);
83 signal temp2, ttc_redge, ttc_20M : std_logic;
84 signal bcn, reg_sel_i : std_logic_vector (4 downto 0);
85 signal data_out_int_i : std_logic_vector(227 downto 0);
86 signal crc_error_i : std_logic;
93 bcn <= dataout(196 downto 192);
109 if (bcn = "11111") then
132 dtype :
entity work.
d_type
148 ttc_redge <= temp1 xor temp2 after 1 ns;
154 state_machine :
entity work.
tac_sm
158 MGT_COMMADET => MGT_COMMADET,
164 Mux_value => Delay_cnt
173 if reg_enable = '1' then
174 data_delay <= delay_cnt;
in data_in std_logic_vector( 227 downto 0)
data in
in address std_logic_vector( 4 downto 0)
shift depth
out data_out std_logic_vector( 227 downto 0)
data out
in srl_en std_logic
enable of shifter
in clk std_logic
ttc clock
out q std_logic
out of d_type
in MGT_COMMADET std_logic
mgt commadet
out latch_enable std_logic
latch enable
First Stage Synchronisation of process FPGA.
in clk_280 std_logic
MGT rx clock.
in MGT_Commadet std_logic
MGT commadet.
in latch_enable std_logic
latch enable of 226 bits
in align_frame std_logic
align frame
out data_out std_logic_vector( 227 downto 0)
frame data out of 226 bits
in mux_cntrl std_logic_vector( 3 downto 0)
first stage mux slect bits
in notable_error std_logic
nottable error
in disperr_error std_logic
disperr erro
in data_in std_logic_vector( 31 downto 0)
rx data
out commdet_delay std_logic := '0'
MGT commadet pipe.
in crc_error_in std_logic
crc error
in enable_mgt std_logic
MGT rx data regsiter enable.
First Stage state machine.
out Reg_enable std_logic
enable
in TTC_CLK_edge std_logic
raising edge of TTC clock of 40NHz
in clk_280M std_logic
MGT rx clock of 280MHz for process and 160MHz for control.
in rx_clk280 std_logic
rx clock of the mgt
out delay_num std_logic_vector( 3 downto 0)
first stage dealy counter value
in reset std_logic
reset active high
out crc_error_out std_logic
crc_error to the error counter
in rx_resetdone std_logic
rx reset done of the MGT
in MGT_Commadet std_logic
comma detected for incoming data
out delay_latch std_logic
delay latch
in mux_sel std_logic_vector( 3 downto 0)
setting BC mux
in align_frame std_logic
bit indicating if data is an alignment frame or not
in notable_error std_logic
notable channel error
in disperr_error std_logic
disperr channel error
in data_in std_logic_vector( 31 downto 0)
rx data in
in start std_logic
start pulse for the calibration to start
out reg224_latch std_logic
latch enable
in crc_error_in std_logic
crc channel error
in enable_mgt std_logic
enable mgt rx register
out disp_notable_error std_logic_vector( 1 downto 0)
combined disperr and notable errors
out ttc_pipe std_logic
ttc pipe
out data_out_reg224 std_logic_vector( 223 downto 0) :=( others => '0')
data before mux
out align_frame_out std_logic
align frame output
in TTC_clk std_logic
ttc clk of 40MHz
out bcn_synch std_logic
bcn synch
out data_out std_logic_vector( 223 downto 0)
data out of 224 bits
in reg_sel std_logic_vector( 3 downto 0)
setting the first stage mux