1 -------------------------------------------------------------------------------
3 -- Title : DIG Gigabit Ethernet Controller
4 -- Design : ethernet_controller
5 -- Author : Ryan Rivera
8 -------------------------------------------------------------------------------
10 -- File : c:\HDL_Designs\dig_gec\ethernet_controller\compile\DIG_GEC.vhd
11 -- Generated : Fri Mar 20 15:19:34 2009
12 -- From : c:/HDL_Designs/dig_gec/ethernet_controller/src/DIG_GEC.bde
13 -- By : Bde2Vhdl ver. 2.6
15 -------------------------------------------------------------------------------
19 -------------------------------------------------------------------------------
20 -- Design unit header --
22 use IEEE.std_logic_1164.
all;
33 GMII_RXD : in (7 downto 0);
34 user_addrs : in (7 downto 0);
35 user_tx_data_in : in (7 downto 0);
36 user_tx_size_in : in (10 downto 0);
48 udp_data_valid_out : out ;
49 GMII_TXD : out (7 downto 0);
50 udp_data_count : out (10 downto 0);
51 user_rx_data_out : out (7 downto 0)
57 ---- Component declarations -----
61 addrs :
in (
7 downto 0);
64 tip :
in (
31 downto 0);
65 tmac :
in (
47 downto 0);
72 dataout :
out (
7 downto 0);
79 addrs :
in (
7 downto 0);
81 checksum :
in (
15 downto 0);
83 data_length :
in (
10 downto 0);
84 dest_ip :
in (
31 downto 0);
85 dest_mac :
in (
47 downto 0);
86 dest_port :
in (
15 downto 0);
94 dataout :
out (
7 downto 0);
103 arp_data_out :
in (
7 downto 0);
107 udp_data_out :
in (
7 downto 0);
112 txd :
out (
7 downto 0)
117 addrs :
in (
7 downto 0);
119 data :
in (
7 downto 0);
123 arp_req_ip :
out (
31 downto 0);
124 arp_req_mac :
out (
47 downto 0);
125 arp_search_ip :
out (
31 downto 0);
126 capture_source_addrs :
out ;
130 dest_mac :
out (
47 downto 0);
134 src_mac :
out (
47 downto 0);
135 udp_data_count :
out (
10 downto 0);
136 udp_data_valid :
out ;
137 udp_dest_ip_out :
out (
31 downto 0);
138 udp_src_ip :
out (
31 downto 0);
139 udp_src_port :
out (
15 downto 0)
145 ip_from_udp :
in (
31 downto 0);
146 mac_from_udp :
in (
47 downto 0);
147 port_from_udp :
in (
15 downto 0);
150 dest_ip :
out (
31 downto 0);
151 dest_mac :
out (
47 downto 0);
152 dest_port :
out (
15 downto 0)
158 rx_data :
in (
7 downto 0);
159 out_data :
out (
7 downto 0)
164 addrs :
in (
7 downto 0);
166 length :
in (
10 downto 0);
169 cs :
out (
15 downto 0)
188 gen_data :
in (
7 downto 0);
190 user_data :
in (
7 downto 0);
191 udp_data_out :
out (
7 downto 0)
198 user_addrs :
in (
7 downto 0);
199 user_length :
in (
10 downto 0);
200 addrs_out :
out (
7 downto 0);
201 udp_tx_length :
out (
10 downto 0)
205 ---- Signal declarations used on the diagram ----
208 signal arp_crc_gen_en_sig : ;
209 signal arp_crc_gen_init_sig : ;
210 signal arp_crc_gen_rd_sig : ;
214 signal capture_addrs : ;
216 signal crc_chk_en_sig : ;
217 signal crc_chk_err_sig : ;
218 signal crc_chk_init_sig : ;
219 signal crc_gen_en_sig : ;
220 signal crc_gen_init_sig : ;
221 signal crc_gen_rd_sig : ;
222 signal dec_chk_err_sig : ;
223 signal en_tx_data_sig : ;
224 signal is_arp_packet_sig : ;
226 signal is_udp_packet_sig : ;
228 signal trigger_sig : ;
231 signal udp_crc_gen_en_sig : ;
232 signal udp_crc_gen_init_sig : ;
233 signal udp_crc_gen_rd_sig : ;
234 signal udp_datasplicer_sel : ;
235 signal udp_data_valid : ;
238 signal addrs_sig : (7 downto 0);
239 signal arp_data_out : (7 downto 0);
240 signal arp_req_ip : (31 downto 0);
241 signal arp_req_mac : (47 downto 0);
242 signal arp_search_ip : (31 downto 0);
243 signal checksum : (15 downto 0);
244 signal data_out : (7 downto 0);
245 signal dest_ip : (31 downto 0);
246 signal dest_mac : (47 downto 0);
247 signal dest_port : (15 downto 0);
248 signal frame_dest_mac : (47 downto 0);
249 signal frame_src_mac : (47 downto 0);
250 signal udp_data_count_sig : (10 downto 0);
251 signal udp_data_out : (7 downto 0);
252 signal udp_dest_ip : (31 downto 0);
253 signal udp_gen_data : (7 downto 0);
254 signal udp_src_ip : (31 downto 0);
255 signal udp_src_port : (15 downto 0);
256 signal udp_tx_length : (10 downto 0);
260 ---- Component instantiations ----
265 arp_busy => arp_busy,
267 crc_gen_en => arp_crc_gen_en_sig ,
268 crc_gen_init => arp_crc_gen_init_sig ,
269 crc_gen_rd => arp_crc_gen_rd_sig ,
270 dataout => arp_data_out ,
274 trigger => is_arp_packet_sig ,
282 a1 => arp_crc_gen_en_sig,
283 a2 => udp_crc_gen_en_sig,
284 ao => crc_gen_en_sig ,
285 b1 => arp_crc_gen_init_sig,
286 b2 => udp_crc_gen_init_sig,
287 bo => crc_gen_init_sig,
288 c1 => arp_crc_gen_rd_sig,
289 c2 => udp_crc_gen_rd_sig,
298 length => udp_tx_length ,
300 trigger => trigger_sig
306 arp_busy => arp_busy,
308 checksum => checksum,
310 crc_gen_en => udp_crc_gen_en_sig ,
311 crc_gen_init => udp_crc_gen_init_sig ,
312 crc_gen_rd => udp_crc_gen_rd_sig ,
313 data_length => udp_tx_length,
314 dataout => udp_gen_data ,
316 dest_mac => dest_mac,
317 dest_port => dest_port,
318 en_tx_data => en_tx_data_sig,
319 ping => capture_addrs,
321 trigger => trigger_sig,
324 udp_data_sel => sel_udp
329 arp_data_out => arp_data_out,
330 arp_tx_en => arp_tx_en,
331 arp_tx_er => arp_tx_er,
336 udp_data_out => udp_data_out,
337 udp_tx_en => udp_tx_en,
338 udp_tx_er => udp_tx_er
344 arp_req_ip => arp_req_ip,
345 arp_req_mac => arp_req_mac,
346 arp_search_ip => arp_search_ip,
347 capture_source_addrs => capture_addrs ,
349 crc_chk_en => crc_chk_en_sig,
350 crc_chk_err => dec_chk_err_sig,
351 crc_chk_init => crc_chk_init_sig,
353 dest_mac => frame_dest_mac,
356 is_arp => is_arp_packet_sig ,
358 is_udp => is_udp_packet_sig ,
360 src_mac => frame_src_mac,
361 udp_data_count => udp_data_count_sig,
362 udp_data_valid => udp_data_valid,
363 udp_dest_ip_out => udp_dest_ip,
364 udp_src_ip => udp_src_ip,
365 udp_src_port => udp_src_port
372 dest_mac => dest_mac,
373 dest_port => dest_port,
374 ip_from_udp => udp_src_ip,
375 mac_from_udp => frame_src_mac,
376 port_from_udp => udp_src_port,
383 enable => udp_data_valid ,
384 out_data => user_rx_data_out ,
388 udp_datasplicer_sel <= not(test_mode) and en_tx_data_sig;
390 crc_chk_err_sig <= is_udp_packet_sig and dec_chk_err_sig;
392 trigger_sig <= capture_addrs or trigger;
397 gen_data => udp_gen_data,
398 sel_user => udp_datasplicer_sel ,
399 udp_data_out => udp_data_out,
400 user_data => user_tx_data_in
405 addrs_out => addrs_sig,
406 ping_mode => capture_addrs,
407 test_mode => test_mode,
408 udp_tx_length => udp_tx_length,
409 user_addrs => user_addrs,
410 user_length => user_tx_size_in
414 ---- Terminal assignment ----
419 -- Output\buffer terminals
421 GMII_TXD <= data_out;
425 crc_chk_en <= crc_chk_en_sig;
426 crc_chk_err <= crc_chk_err_sig;
427 crc_chk_init <= crc_chk_init_sig;
428 crc_gen_en <= crc_gen_en_sig;
429 crc_gen_init <= crc_gen_init_sig;
430 crc_gen_rd <= crc_gen_rd_sig;
431 en_tx_data <= udp_datasplicer_sel;
432 udp_data_count <= udp_data_count_sig;
433 udp_data_valid_out <= udp_data_valid;