AMC13
Firmwares for the different applications of the AMC13 uTCA board made at Boston University
 All Classes Variables
udp_if_flat.vhd
1 -- UDP_if created from
2 -- VHDL Entity ipbus_v2_lib.UDP_if.symbol and
3 -- VHDL Entity ipbus_v2_lib.rxblock.symbol
4 -- Dave Sankey Sep 2012
5 
6 LIBRARY ieee;
7 USE ieee.std_logic_1164.all;
8 USE ieee.numeric_std.all;
9 
10 ENTITY UDP_if IS
11 generic(
12 -- Number of address bits to select RX or TX buffer
13 -- Number of RX and TX buffers is 2**BUFWIDTH
14  BUFWIDTH: natural := 2;
15 
16 -- Numer of address bits to select internal buffer
17 -- Number of internal buffers is 2**INTERNALWIDTH
18  INTERNALWIDTH: natural := 1;
19 
20 -- Number of address bits within each buffer
21 -- Size of each buffer is 2**ADDRWIDTH
22  ADDRWIDTH: natural := 11;
23 
24 -- UDP port for IPbus traffic in this instance
25  IPBUSPORT: std_logic_vector(15 DOWNTO 0) := x"C351";
26 
27 -- Flag whether this instance ignores everything except IPBus traffic
28  SECONDARYPORT: std_logic := '0'
29 
30 );
31  PORT(
32  mac_clk: IN std_logic;
33  rst_macclk: IN std_logic;
34  ipb_clk: IN std_logic;
35  rst_ipb: IN std_logic;
36  IP_addr: IN std_logic_vector(31 DOWNTO 0);
37  MAC_addr: IN std_logic_vector(47 DOWNTO 0);
38  enable: IN std_logic;
39  RARP: IN std_logic;
40  mac_rx_data: IN std_logic_vector(7 DOWNTO 0);
41  mac_rx_error: IN std_logic;
42  mac_rx_last: IN std_logic;
43  mac_rx_valid: IN std_logic;
44  mac_tx_ready: IN std_logic;
45  pkt_done_read: IN std_logic;
46  pkt_done_write: IN std_logic;
47  raddr: IN std_logic_vector(11 DOWNTO 0);
48  waddr: IN std_logic_vector(11 DOWNTO 0);
49  wdata: IN std_logic_vector(31 DOWNTO 0);
50  we: IN std_logic;
51  busy: OUT std_logic;
52  mac_tx_data: OUT std_logic_vector(7 DOWNTO 0);
53  mac_tx_error: OUT std_logic;
54  mac_tx_last: OUT std_logic;
55  mac_tx_valid: OUT std_logic;
56  My_IP_addr: OUT std_logic_vector(31 DOWNTO 0);
57  pkt_rdy: OUT std_logic;
58  rdata: OUT std_logic_vector(31 DOWNTO 0);
59  rxpacket_ignored: OUT std_logic;
60  rxpacket_dropped: OUT std_logic
61  );
62 
63 END UDP_if ;
64 
65 ARCHITECTURE flat OF UDP_if IS
66 
67  SIGNAL addra: std_logic_vector(12 DOWNTO 0);
68  SIGNAL addrb: std_logic_vector(12 DOWNTO 0);
69  SIGNAL cksum: std_logic;
70  SIGNAL clr_sum: std_logic;
71  SIGNAL dia: std_logic_vector(7 DOWNTO 0);
72  SIGNAL do_sum: std_logic;
73  SIGNAL dob: std_logic_vector(7 DOWNTO 0);
74  SIGNAL int_data: std_logic_vector(7 DOWNTO 0);
75  SIGNAL int_valid: std_logic;
76  SIGNAL outbyte: std_logic_vector(7 DOWNTO 0);
77  SIGNAL payload_addr: std_logic_vector(12 DOWNTO 0);
78  SIGNAL payload_data: std_logic_vector(7 DOWNTO 0);
79  SIGNAL payload_send: std_logic;
80  SIGNAL payload_we: std_logic;
81  SIGNAL req_resend: std_logic;
82  SIGNAL rx_reset: std_logic;
83  SIGNAL rx_wea: std_logic;
84  SIGNAL rxram_busy: std_logic;
85  SIGNAL rxram_end_addr: std_logic_vector(12 DOWNTO 0);
86  SIGNAL rxram_send: std_logic;
87  SIGNAL udpaddrb: std_logic_vector(12 DOWNTO 0);
88  SIGNAL udpdob: std_logic_vector(7 DOWNTO 0);
89  SIGNAL udpram_busy: std_logic;
90  SIGNAL udpram_send: std_logic;
91  SIGNAL wea: std_logic;
92 --
93  SIGNAL My_IP_addr_sig: std_logic_vector(31 DOWNTO 0);
94  SIGNAL pkt_drop_rarp: std_logic;
95  SIGNAL rarp_addr: std_logic_vector(12 DOWNTO 0);
96  SIGNAL rarp_data: std_logic_vector(7 DOWNTO 0);
97  SIGNAL rarp_end_addr: std_logic_vector(12 DOWNTO 0);
98  SIGNAL rarp_mode: std_logic;
99  SIGNAL rarp_send: std_logic;
100  SIGNAL rarp_we: std_logic;
101 --
102  SIGNAL arp_addr: std_logic_vector(12 DOWNTO 0);
103  SIGNAL arp_data: std_logic_vector(7 DOWNTO 0);
104  SIGNAL arp_end_addr: std_logic_vector(12 DOWNTO 0);
105  SIGNAL arp_send: std_logic;
106  SIGNAL arp_we: std_logic;
107  SIGNAL rx_cksum: std_logic;
108  SIGNAL rx_clr_sum: std_logic;
109  SIGNAL clr_sum_payload: std_logic;
110  SIGNAL clr_sum_ping: std_logic;
111  SIGNAL rx_do_sum: std_logic;
112  SIGNAL do_sum_payload: std_logic;
113  SIGNAL do_sum_ping: std_logic;
114  SIGNAL rx_int_data: std_logic_vector(7 DOWNTO 0);
115  SIGNAL int_data_payload: std_logic_vector(7 DOWNTO 0);
116  SIGNAL int_data_ping: std_logic_vector(7 DOWNTO 0);
117  SIGNAL rx_int_valid: std_logic;
118  SIGNAL int_valid_payload: std_logic;
119  SIGNAL int_valid_ping: std_logic;
120  SIGNAL rx_outbyte: std_logic_vector(7 DOWNTO 0);
121  SIGNAL ping_addr: std_logic_vector(12 DOWNTO 0);
122  SIGNAL ping_data: std_logic_vector(7 DOWNTO 0);
123  SIGNAL ping_end_addr: std_logic_vector(12 DOWNTO 0);
124  SIGNAL ping_send: std_logic;
125  SIGNAL ping_we: std_logic;
126  SIGNAL status_block: std_logic_vector(127 downto 0);
127  SIGNAL status_request: std_logic;
128  SIGNAL status_data: std_logic_vector(7 downto 0);
129  SIGNAL status_addr: std_logic_vector(12 downto 0);
130  SIGNAL status_we: std_logic;
131  SIGNAL status_end_addr: std_logic_vector(12 downto 0);
132  SIGNAL status_send: std_logic;
133  SIGNAL pkt_drop_arp: std_logic;
134  SIGNAL pkt_drop_payload: std_logic;
135  SIGNAL pkt_drop_ping: std_logic;
136  SIGNAL pkt_drop_resend: std_logic;
137  SIGNAL pkt_drop_status: std_logic;
138  signal last_rx_last: std_logic;
139  signal my_rx_last: std_logic;
140 --
141  signal mac_tx_last_sig, mac_tx_error_sig: std_logic;
142 --
143  signal ipbus_in_hdr, ipbus_out_hdr: std_logic_vector(31 downto 0);
144  signal pkt_broadcast, ipbus_out_valid: std_logic;
145  signal rxram_dropped_sig, rxpayload_dropped_sig: std_logic;
146  signal pkt_drop_ipbus, pkt_drop_reliable, pkt_byteswap: std_logic;
147  signal next_pkt_id: std_logic_vector(15 downto 0); -- Next expected packet ID
148 --
149  signal we_125: std_logic;
150  signal rst_ipb_125: std_logic;
151 --
152  SIGNAL rxram_write_buf, rxram_send_buf: std_logic_vector(INTERNALWIDTH - 1 downto 0);
153  SIGNAL rxram_sent, internal_busy, rxram_req_send, rxram_send_x: std_logic;
154  SIGNAL rxram_end_addr_x: std_logic_vector(12 downto 0);
155  SIGNAL rxram_addra, rxram_addrb: std_logic_vector(INTERNALWIDTH + ADDRWIDTH - 1 downto 0);
156 --
157  SIGNAL rx_read_buffer, rx_read_buffer_125: std_logic_vector(BUFWIDTH - 1 downto 0);
158  SIGNAL rx_write_buffer, tx_read_buffer: std_logic_vector(BUFWIDTH - 1 downto 0);
159  SIGNAL tx_write_buffer, tx_write_buffer_125, resend_buf: std_logic_vector(BUFWIDTH - 1 downto 0);
160  SIGNAL rx_full_addra, tx_full_addrb: std_logic_vector(BUFWIDTH + ADDRWIDTH - 1 downto 0);
161  SIGNAL rx_full_addrb, tx_full_addra: std_logic_vector(BUFWIDTH + ADDRWIDTH - 3 downto 0);
162  signal pkt_resend, pkt_rcvd, rx_ram_busy, rx_req_send_125, udpram_sent: std_logic;
163  signal busy_125, enable_125, rarp_125, rx_ram_sent, tx_ram_written: std_logic;
164  signal rxreq_not_found: std_logic;
165  signal resend_pkt_id: std_logic_vector(15 downto 0);
166  signal clean_buf: std_logic_vector(2**BUFWIDTH - 1 downto 0);
167 
168 BEGIN
169 
170  rxpacket_dropped <= rxram_dropped_sig or rxpayload_dropped_sig or rxreq_not_found;
171  rxpacket_ignored <= my_rx_last and pkt_drop_arp and pkt_drop_ping and
172  pkt_drop_payload and pkt_drop_rarp and pkt_drop_resend and pkt_drop_status;
173 
174  mac_tx_last <= mac_tx_last_sig;
175  mac_tx_error <= '0';
176 
177  rx_do_sum <= do_sum_ping or do_sum_payload;
178  rx_clr_sum <= clr_sum_ping or clr_sum_payload;
179  rx_int_valid <= int_valid_ping or int_valid_payload;
180  rx_int_data <= int_data_payload when int_valid_payload = '1' else int_data_ping;
181 
182  rxram_addra <= rxram_write_buf & addra(ADDRWIDTH - 1 downto 0);
183  rxram_addrb <= rxram_send_buf & addrb(ADDRWIDTH - 1 downto 0);
184 
185  rx_full_addra <= rx_write_buffer & payload_addr(ADDRWIDTH - 1 downto 0);
186  rx_full_addrb <= rx_read_buffer & raddr(ADDRWIDTH - 3 downto 0);
187 
188  tx_full_addra <= tx_write_buffer & waddr(ADDRWIDTH - 3 downto 0);
189  tx_full_addrb <= tx_read_buffer & udpaddrb(ADDRWIDTH - 1 downto 0);
190 
191 -- force rx_last to match documentation!
192 rx_last_kludge: process(mac_clk)
193  begin
194  if rising_edge(mac_clk) then
195  last_rx_last <= mac_rx_last
196 -- pragma translate_off
197  after 4 ns
198 -- pragma translate_on
199  ;
200  end if;
201  end process;
202 
203  my_rx_last <= mac_rx_last and not last_rx_last;
204 
205  My_IP_addr <= My_IP_addr_sig;
206 
207  -- Instance port mappings.
208  IPADDR: entity work.udp_ipaddr_block
209  PORT MAP (
210  mac_clk => mac_clk,
211  rst_macclk => rst_macclk,
212  rx_reset => rx_reset,
213  enable_125 => enable_125,
214  rarp_125 => rarp_125,
215  IP_addr => IP_addr,
216  mac_rx_data => mac_rx_data,
217  mac_rx_error => mac_rx_error,
218  mac_rx_last => my_rx_last,
219  mac_rx_valid => mac_rx_valid,
220  pkt_drop_rarp => pkt_drop_rarp,
221  My_IP_addr => My_IP_addr_sig,
222  rarp_mode => rarp_mode
223  );
224  RARP_block: entity work.udp_rarp_block
225  PORT MAP (
226  mac_clk => mac_clk,
227  rst_macclk => rst_macclk,
228  enable_125 => enable_125,
229  MAC_addr => MAC_addr,
230  rarp_mode => rarp_mode,
231  rarp_addr => rarp_addr,
232  rarp_data => rarp_data,
233  rarp_end_addr => rarp_end_addr,
234  rarp_send => rarp_send,
235  rarp_we => rarp_we
236  );
237  ARP: entity work.udp_build_arp
238  PORT MAP (
239  mac_clk => mac_clk,
240  rx_reset => rx_reset,
241  mac_rx_data => mac_rx_data,
242  mac_rx_valid => mac_rx_valid,
243  mac_rx_last => my_rx_last,
244  mac_rx_error => mac_rx_error,
245  pkt_drop_arp => pkt_drop_arp,
246  MAC_addr => MAC_addr,
247  My_IP_addr => My_IP_addr_sig,
248  arp_data => arp_data,
249  arp_addr => arp_addr,
250  arp_we => arp_we ,
251  arp_end_addr => arp_end_addr,
252  arp_send => arp_send
253  );
254  payload: entity work.udp_build_payload
255  PORT MAP (
256  mac_clk => mac_clk,
257  rx_reset => rx_reset,
258  mac_rx_data => mac_rx_data,
259  mac_rx_valid => mac_rx_valid,
260  mac_rx_last => my_rx_last,
261  mac_rx_error => mac_rx_error,
262  pkt_drop_payload => pkt_drop_payload,
263  pkt_byteswap => pkt_byteswap,
264  outbyte => rx_outbyte,
265  payload_data => payload_data,
266  payload_addr => payload_addr,
267  payload_we => payload_we,
268  payload_send => payload_send,
269  do_sum_payload => do_sum_payload,
270  clr_sum_payload => clr_sum_payload,
271  int_data_payload => int_data_payload,
272  int_valid_payload => int_valid_payload,
273  cksum => rx_cksum,
274  ipbus_in_hdr => ipbus_in_hdr
275  );
276  ping: entity work.udp_build_ping
277  PORT MAP (
278  mac_clk => mac_clk,
279  rx_reset => rx_reset,
280  mac_rx_data => mac_rx_data,
281  mac_rx_valid => mac_rx_valid,
282  mac_rx_last => my_rx_last,
283  mac_rx_error => mac_rx_error,
284  pkt_drop_ping => pkt_drop_ping,
285  outbyte => rx_outbyte,
286  ping_data => ping_data,
287  ping_addr => ping_addr,
288  ping_we => ping_we,
289  ping_end_addr => ping_end_addr,
290  ping_send => ping_send,
291  do_sum_ping => do_sum_ping,
292  clr_sum_ping => clr_sum_ping,
293  int_data_ping => int_data_ping,
294  int_valid_ping => int_valid_ping
295  );
296  resend: entity work.udp_build_resend
297  PORT MAP (
298  mac_clk => mac_clk,
299  rx_reset => rx_reset,
300  mac_rx_data => mac_rx_data,
301  mac_rx_error => mac_rx_error,
302  mac_rx_last => my_rx_last,
303  mac_rx_valid => mac_rx_valid,
304  pkt_drop_resend => pkt_drop_resend,
305  pkt_resend => pkt_resend,
306  resend_pkt_id => resend_pkt_id
307  );
308  status: entity work.udp_build_status
309  PORT MAP (
310  mac_clk => mac_clk,
311  rx_reset => rx_reset,
312  mac_rx_data => mac_rx_data,
313  mac_rx_valid => mac_rx_valid,
314  mac_rx_last => my_rx_last,
315  mac_rx_error => mac_rx_error,
316  pkt_drop_status => pkt_drop_status,
317  status_block => status_block,
318  status_request => status_request ,
319  status_data => status_data,
320  status_addr => status_addr,
321  status_we => status_we,
322  status_end_addr => status_end_addr,
323  status_send => status_send
324  );
325  status_buffer: entity work.udp_status_buffer
326  GENERIC MAP (
327  BUFWIDTH => BUFWIDTH,
328  ADDRWIDTH => ADDRWIDTH
329  )
330  PORT MAP (
331  mac_clk => mac_clk,
332  rst_macclk => rst_macclk,
333  rst_ipb_125 => rst_ipb_125,
334  rx_reset => rx_reset,
335  ipbus_in_hdr => ipbus_in_hdr,
336  ipbus_out_hdr => ipbus_out_hdr,
337  ipbus_out_valid => ipbus_out_valid,
338  mac_rx_error => mac_rx_error,
339  mac_rx_last => my_rx_last,
340  mac_tx_error => mac_tx_error_sig,
341  mac_tx_last => mac_tx_last_sig,
342  pkt_broadcast => pkt_broadcast,
343  pkt_drop_arp => pkt_drop_arp,
344  pkt_drop_ipbus => pkt_drop_ipbus ,
345  pkt_drop_payload => pkt_drop_payload,
346  pkt_drop_ping => pkt_drop_ping,
347  pkt_drop_rarp => pkt_drop_rarp,
348  pkt_drop_reliable => pkt_drop_reliable,
349  pkt_drop_resend => pkt_drop_resend,
350  pkt_drop_status => pkt_drop_status,
351  pkt_rcvd => pkt_rcvd,
352  req_not_found => rxreq_not_found,
353  rx_ram_sent => rx_ram_sent,
354  rx_req_send_125 => rx_req_send_125,
355  rxpayload_dropped => rxpayload_dropped_sig,
356  rxram_dropped => rxram_dropped_sig,
357  status_request => status_request ,
358  tx_ram_written => tx_ram_written ,
359  udpram_send => udpram_send,
360  next_pkt_id => next_pkt_id,
361  status_block => status_block
362  );
363  rx_byte_sum: entity work.udp_byte_sum
364  PORT MAP (
365  mac_clk => mac_clk,
366  do_sum => rx_do_sum,
367  clr_sum => rx_clr_sum,
368  mac_rx_data => mac_rx_data,
369  mac_rx_valid => mac_rx_valid,
370  int_data => rx_int_data,
371  int_valid => rx_int_valid,
372  run_byte_sum => '0',
373  cksum => rx_cksum,
374  outbyte => rx_outbyte
375  );
376  rx_reset_block: entity work.udp_do_rx_reset
377  PORT MAP (
378  mac_clk => mac_clk,
379  rst_macclk => rst_macclk,
380  mac_rx_last => my_rx_last,
381  mac_rx_valid => mac_rx_valid,
382  rx_reset => rx_reset
383  );
384  rx_packet_parser: entity work.udp_packet_parser
385  GENERIC MAP (
386  IPBUSPORT => IPBUSPORT,
387  SECONDARYPORT => SECONDARYPORT
388  )
389  PORT MAP (
390  mac_clk => mac_clk,
391  rx_reset => rx_reset,
392  enable_125 => enable_125,
393  mac_rx_data => mac_rx_data,
394  mac_rx_valid => mac_rx_valid,
395  MAC_addr => MAC_addr,
396  My_IP_addr => My_IP_addr_sig,
397  next_pkt_id => next_pkt_id,
398  pkt_broadcast => pkt_broadcast,
399  pkt_byteswap => pkt_byteswap,
400  pkt_drop_arp => pkt_drop_arp,
401  pkt_drop_ipbus => pkt_drop_ipbus ,
402  pkt_drop_payload => pkt_drop_payload,
403  pkt_drop_ping => pkt_drop_ping,
404  pkt_drop_rarp => pkt_drop_rarp,
405  pkt_drop_reliable => pkt_drop_reliable,
406  pkt_drop_resend => pkt_drop_resend,
407  pkt_drop_status => pkt_drop_status
408  );
409  rx_ram_mux: entity work.udp_rxram_mux
410  PORT MAP (
411  mac_clk => mac_clk,
412  rx_reset => rx_reset,
413  rarp_mode => rarp_mode,
414  rarp_addr => rarp_addr,
415  rarp_data => rarp_data,
416  rarp_end_addr => rarp_end_addr,
417  rarp_send => rarp_send,
418  rarp_we => rarp_we,
419  pkt_drop_arp => pkt_drop_arp,
420  arp_data => arp_data,
421  arp_addr => arp_addr,
422  arp_we => arp_we ,
423  arp_end_addr => arp_end_addr,
424  arp_send => arp_send,
425  pkt_drop_ping => pkt_drop_ping,
426  ping_data => ping_data,
427  ping_addr => ping_addr,
428  ping_we => ping_we,
429  ping_end_addr => ping_end_addr,
430  ping_send => ping_send,
431  pkt_drop_status => pkt_drop_status,
432  status_data => status_data,
433  status_addr => status_addr,
434  status_we => status_we,
435  status_end_addr => status_end_addr,
436  status_send => status_send,
437  mac_rx_valid => mac_rx_valid,
438  rxram_busy => internal_busy,
439  dia => dia,
440  addra => addra,
441  wea => wea,
442  rxram_end_addr => rxram_end_addr,
443  rxram_send => rxram_send,
444  rxram_dropped => rxram_dropped_sig
445  );
446  internal_ram: entity work.udp_DualPortRAM
447  GENERIC MAP (
448  BUFWIDTH => INTERNALWIDTH,
449  ADDRWIDTH => ADDRWIDTH
450  )
451  PORT MAP (
452  ClkA => mac_clk,
453  ClkB => mac_clk,
454  wea => wea,
455  addra => rxram_addra,
456  addrb => rxram_addrb,
457  dia => dia,
458  dob => dob
459  );
460  internal_ram_selector: entity work.udp_buffer_selector
461  GENERIC MAP (
462  BUFWIDTH => INTERNALWIDTH
463  )
464  PORT MAP (
465  mac_clk => mac_clk,
466  rst_macclk => rst_macclk,
467  written => rxram_send,
468  we => wea,
469  sent => rxram_sent,
470  req_resend => '0',
471  resend_buf => (Others => '0'),
472  busy => internal_busy,
473  write_buf => rxram_write_buf,
474  req_send => rxram_req_send,
475  send_buf => rxram_send_buf,
476  clean_buf => open
477  );
478  internal_ram_shim: entity work.udp_rxram_shim
479  GENERIC MAP (
480  BUFWIDTH => INTERNALWIDTH
481  )
482  PORT MAP (
483  mac_clk => mac_clk,
484  rst_macclk => rst_macclk,
485  rxram_end_addr => rxram_end_addr ,
486  rxram_send => rxram_send,
487  rxram_write_buf => rxram_write_buf,
488  rxram_req_send => rxram_req_send ,
489  rxram_send_buf => rxram_send_buf ,
490  rxram_busy => rxram_busy,
491  rxram_end_addr_x => rxram_end_addr_x,
492  rxram_send_x => rxram_send_x,
493  rxram_sent => rxram_sent
494  );
495  ipbus_rx_ram: entity work.udp_DualPortRAM_rx
496  GENERIC MAP (
497  BUFWIDTH => BUFWIDTH,
498  ADDRWIDTH => ADDRWIDTH
499  )
500  PORT MAP (
501  clk125 => mac_clk,
502  clk => ipb_clk,
503  rx_wea => rx_wea ,
504  rx_addra => rx_full_addra,
505  rx_addrb => rx_full_addrb,
506  rx_dia => payload_data,
507  rx_dob => rdata
508  );
509  rx_ram_selector: entity work.udp_buffer_selector
510  GENERIC MAP (
511  BUFWIDTH => BUFWIDTH
512  )
513  PORT MAP (
514  mac_clk => mac_clk,
515  rst_macclk => rst_macclk,
516  written => pkt_rcvd,
517  we => rx_wea ,
518  sent => rx_ram_sent,
519  req_resend => '0',
520  resend_buf => (Others => '0'),
521  busy => rx_ram_busy,
522  write_buf => rx_write_buffer,
523  req_send => rx_req_send_125,
524  send_buf => rx_read_buffer_125,
525  clean_buf => open
526  );
527  ipbus_tx_ram: entity work.udp_DualPortRAM_tx
528  GENERIC MAP (
529  BUFWIDTH => BUFWIDTH,
530  ADDRWIDTH => ADDRWIDTH
531  )
532  PORT MAP (
533  clk => ipb_clk,
534  clk125 => mac_clk,
535  tx_wea => we,
536  tx_addra => tx_full_addra,
537  tx_addrb => tx_full_addrb,
538  tx_dia => wdata,
539  tx_dob => udpdob
540  );
541  tx_ram_selector: entity work.udp_buffer_selector
542  GENERIC MAP (
543  BUFWIDTH => BUFWIDTH
544  )
545  PORT MAP (
546  mac_clk => mac_clk,
547  rst_macclk => rst_macclk,
548  written => tx_ram_written,
549  we => we_125 ,
550  sent => udpram_sent,
551  req_resend => req_resend,
552  resend_buf => resend_buf,
553  busy => busy_125,
554  write_buf => tx_write_buffer_125,
555  req_send => udpram_send,
556  send_buf => tx_read_buffer,
557  clean_buf => clean_buf
558  );
559  tx_byte_sum: entity work.udp_byte_sum
560  PORT MAP (
561  mac_clk => mac_clk,
562  do_sum => do_sum ,
563  clr_sum => clr_sum,
564  mac_rx_data => udpdob ,
565  mac_rx_valid => udpram_busy,
566  int_data => int_data,
567  int_valid => int_valid,
568  run_byte_sum => int_valid,
569  cksum => cksum,
570  outbyte => outbyte
571  );
572  rx_transactor: entity work.udp_rxtransactor_if
573  PORT MAP (
574  mac_clk => mac_clk,
575  rx_reset => rx_reset,
576  payload_send => payload_send,
577  payload_we => payload_we,
578  rx_ram_busy => rx_ram_busy,
579  pkt_rcvd => pkt_rcvd,
580  rx_wea => rx_wea ,
581  rxpayload_dropped => rxpayload_dropped_sig
582  );
583  tx_main: entity work.udp_tx_mux
584  PORT MAP (
585  mac_clk => mac_clk,
586  rst_macclk => rst_macclk,
587  rxram_end_addr => rxram_end_addr_x,
588  rxram_send => rxram_send_x,
589  rxram_busy => rxram_busy,
590  addrb => addrb,
591  dob => dob,
592  udpram_send => udpram_send,
593  udpram_busy => udpram_busy,
594  udpaddrb => udpaddrb,
595  udpdob => udpdob ,
596  do_sum => do_sum ,
597  clr_sum => clr_sum,
598  int_data => int_data,
599  int_valid => int_valid,
600  cksum => cksum,
601  outbyte => outbyte,
602  mac_tx_data => mac_tx_data,
603  mac_tx_valid => mac_tx_valid,
604  mac_tx_last => mac_tx_last_sig,
605  mac_tx_error => mac_tx_error_sig,
606  mac_tx_ready => mac_tx_ready,
607  ipbus_out_hdr => ipbus_out_hdr,
608  ipbus_out_valid => ipbus_out_valid
609  );
610  tx_transactor: entity work.udp_txtransactor_if
611  GENERIC MAP (
612  BUFWIDTH => BUFWIDTH
613  )
614  PORT MAP (
615  mac_clk => mac_clk,
616  rst_macclk => rst_macclk,
617  pkt_resend => pkt_resend,
618  resend_pkt_id => resend_pkt_id,
619  ipbus_out_hdr => ipbus_out_hdr,
620  ipbus_out_valid => ipbus_out_valid,
621  tx_read_buffer => tx_read_buffer ,
622  udpram_busy => udpram_busy,
623  clean_buf => clean_buf,
624  req_not_found => rxreq_not_found,
625  req_resend => req_resend,
626  resend_buf => resend_buf,
627  udpram_sent => udpram_sent
628  );
629  clock_crossing_if: entity work.udp_clock_crossing_if
630  GENERIC MAP (
631  BUFWIDTH => BUFWIDTH
632  )
633  PORT MAP (
634  mac_clk => mac_clk,
635  rst_macclk => rst_macclk,
636  busy_125 => busy_125,
637  rx_read_buffer_125 => rx_read_buffer_125,
638  rx_req_send_125 => rx_req_send_125,
639  tx_write_buffer_125 => tx_write_buffer_125,
640  enable_125 => enable_125,
641  rarp_125 => rarp_125,
642  rst_ipb_125 => rst_ipb_125,
643  rx_ram_sent => rx_ram_sent,
644  tx_ram_written => tx_ram_written ,
645  we_125 => we_125,
646 --
647  ipb_clk => ipb_clk,
648  rst_ipb => rst_ipb,
649  enable => enable,
650  pkt_done_read => pkt_done_read,
651  pkt_done_write => pkt_done_write,
652  RARP => RARP,
653  we => we,
654  busy => busy,
655  pkt_rdy => pkt_rdy,
656  rx_read_buffer => rx_read_buffer ,
657  tx_write_buffer => tx_write_buffer
658  );
659 
660 END flat;