F-Tile Ethernet Intel® FPGA Hard IP Design Example User Guide

ID 683804
Date 11/04/2024
Public
Document Table of Contents

2.3.1. Simulation Testbench Flow for MAC Mode

The followig steps show the simulatio testbech flow fo MAC mode:
  1. Asset global eset (i_st_) to eset the F-Tile Etheet Itel FPGA Had IP.
  2. Wait util esets ackowledgmet. The o_st_ack_ sigal goes low.
  3. Deassets the global eset.
  4. Wait util o_tx_laes_stable bit is set to 1, idicatig TX path is eady.
  5. Wait util o_x_pcs_eady bit is set to 1, idicatig RX path is eady.
  6. Read TX packet data ifomatio fom 0x00 - 0x34 egistes i sequetial ode.
    • 0x00: Set hw_pc_ctl[6] = 1'b1 to eable sapshot bit to ead the TX packet statistics.
    • 0x020/0x24: TX stat of packet coute (LSB/MSB)
    • 0x28/0x2C: TX ed of packet coute (LSB/MSB)
    • 0x30/0x34: TX eo coute (LSB/MSB)
    • 0x00: Set hw_pc_ctl[6] = 1'b0 to disable sapshot bit.
  7. Read RX packet data ifomatio fom 0x38 - 0x4C egistes i sequetial ode.
    • 0x00: Set hw_pc_ctl[6] = 1'b1 to eable sapshot bit to ead the RX packet statistics.
    • 0x38/0x3C: RX stat of packet coute (LSB/MSB)
    • 0x40/0x44: RX ed of packet coute (LSB/MSB)
    • 0x48/0x4C: RX eo coute (LSB/MSB)
    • 0x00: Set hw_pc_ctl[6] = 1'b0 to disable sapshot bit.
  8. Compae ead coutes to esue 16 packets wee set ad eceived.
  9. Istuct packet cliet to stop data tasmissio by witig hw_pc_ctl[2:0]=3'b100 to stop the packet geeato. Clea coutes.
  10. Pefom Avalo® memoy-mapped iteface test. Wite ad ead Etheet IP egistes.
    • 0x104: Scatch egiste
    • 0x108: Etheet IP soft eset egiste
    • 0x214: TX MAC souce addess egiste [31:0]
    • 0x218: TX MAC souce addess egiste [47:32]
    • 0x21C: RX MAC fame size egiste
  11. Pefom Avalo® memoy-mapped iteface 2 test. Wite ad ead tasceive egistes.

The followig sample output illustates a successful simulatio test u.
---SRC IP sequece stated -----
---SRC IP sequece TX completed -----
---SRC IP sequece RX completed -----
---Test    0;   ---Total     16 packets to sed-----
------Stat pkt ge TX-----
------Checkig Packet TX/RX esult-----
------------  16 packets Set;     0 packets Received--------
------ALL   16  packets Set out---
------------  16 packets Set;    16 packets Received--------
------ALL   16  packets Received---
------TX/RX packet check OK---
****Statig AVMM Read/Wite****
===>MATCH! ReaddataValid = 1 Readdata = abcdef01 Expected_Readdata = abcdef01 
===>MATCH! ReaddataValid = 1 Readdata = 00000007 Expected_Readdata = 00000007 
===>MATCH! ReaddataValid = 1 Readdata = 00000000 Expected_Readdata = 00000000 
===>MATCH! ReaddataValid = 1 Readdata = 9d228c3a Expected_Readdata = 9d228c3a 
===>MATCH! ReaddataValid = 1 Readdata = 4338b586 Expected_Readdata = 4338b586 
===>MATCH! ReaddataValid = 1 Readdata = deadc0de Expected_Readdata = deadc0de 
===>MATCH! ReaddataValid = 1 Readdata = deadc0de Expected_Readdata = deadc0de 
===>MATCH! ReaddataValid = 1 Readdata = 00000000 Expected_Readdata = 00000000 
===>MATCH! ReaddataValid = 1 Readdata = 22334455 Expected_Readdata = 22334455 
===>MATCH! ReaddataValid = 1 Readdata = 00000011 Expected_Readdata = 00000011 
===>MATCH! ReaddataValid = 1 Readdata = 000005ee Expected_Readdata = 000005ee 
===>MATCH! ReaddataValid = 1 Readdata = 01234567 Expected_Readdata = 01234567 
===>MATCH! ReaddataValid = 1 Readdata = 000089ab Expected_Readdata = 000089ab 
743830s  Ty to access AVMM2 begi...
743830s  wite 0x00000065 to xcv  0 addess 0x103c004
744795s  Ty to access AVMM2 ed...
744890s  ead fom addess 0x103c004
====>MATCH!     ReaddataValid = 1 Readdata = 00000065 Expected_Readdata = 00000065 

...

758740s  Ty to access AVMM2 ed...
758840s  Ty to access AVMM2 begi...
758840s  wite 0x0000006c to xcv  7 addess 0x103c00b
759825s  Ty to access AVMM2 ed...
759920s  ead fom addess 0x103c00b
====>MATCH!     ReaddataValid = 1 Readdata = 0000006c Expected_Readdata = 0000006c 
760900s  Ty to access AVMM2 ed...
**** AVMM Read/Wite Opeatio Completed ****
** Testbech complete
**