10 USE ieee.std_logic_1164.
all;
11 USE ieee.std_logic_arith.
all;
16 bcn : IN std_logic_vector (3 DOWNTO 0);
22 crc : IN std_logic_vector (8 DOWNTO 0);
38 tx_data : OUT std_logic_vector (31 DOWNTO 0)
49 signal cntr : unsigned(3 downto 0);
50 constant fexid : std_logic_vector(1 downto 0):="01";
51 constant fexfld : std_logic_vector(8 downto 0):= (others => '0');
70 SIGNAL current_state : STATE_TYPE;
75 clocked_proc :
PROCESS (
82 current_state <= idle;
83 ELSIF (clk'EVENT AND clk = '1') THEN
88 cntr <= (others => '0');
95 current_state <= empty;
100 current_state <= idle;
109 current_state <= kchar;
111 current_state <= empty;
119 current_state <= empty;
121 cntr <= (others => '0') ;
122 crc_data <= x"00" &'0'& fexfld & fexid & bcn & x"00" ;
125 current_state <= empty_1;
127 cntr <= (others => '0') ;
133 current_state <= trialer_0;
135 current_state <= trialer_1;
137 current_state <= empty_1;
146 current_state <= wait1;
148 current_state <= empty_data;
149 ELSIF (cntr = 4) THEN
150 current_state <= wait0;
152 current_state <= str;
156 crc_data <= x"00" &'0'& fexfld & fexid & bcn & x"00" ;
157 cntr <= (others => '0') ;
159 current_state <= wait_3;
161 cntr <= (others => '0') ;
164 crc_data <= x"00" &'0'& fexfld & fexid & bcn & x"00" ;
165 current_state <= wait_2;
172 current_state <= wait1;
174 current_state <= empty_data;
183 current_state <= str;
185 cntr <= (others => '0') ;
191 current_state <= fin;
193 current_state <= fin1;
195 current_state <= wait_2;
198 cntr <= (others => '0') ;
204 current_state <= fin;
206 current_state <= fin1;
208 current_state <= wait_3;
216 current_state <= str;
225 current_state <= empty;
227 current_state <= fin1;
230 current_state <= idle;
233 END PROCESS clocked_proc;
235 END ARCHITECTURE fsm;
in bcn std_logic_vector( 3 DOWNTO 0)
bnc of the tobs
in tobo_data std_logic_vector( 31 DOWNTO 0)
tob data
in reset std_logic
reset synch
out tx_ctrl std_logic
tx control of the MGT
in crc std_logic_vector( 8 DOWNTO 0)
crc bits
in clk std_logic
fabric clock of 280MHz
in tobo_data_reg std_logic_vector( 31 DOWNTO 0)
tob data pipe
in tobo_valid std_logic
tob valid
out crc_data std_logic_vector( 31 DOWNTO 0)
input to the crc calculator
out crc_start std_logic
stsrt crc generation
out tx_data std_logic_vector( 31 DOWNTO 0)
MGT tx data.
in tobo_sync std_logic
tob synch