How to capture packets on PC from Ethernet Packet Generator on FPGA?

0

I'm starting to use Max 10 FPGA Development Kit, and for my project I need to send packets from board, generated "on fly", without using NIOS II software developnet tool.

The basis for the project is MAX 10 Single-Port Triple Speed Ethernet and On-Board PHY Chip Design Example and here is User Guide.

As written in user guide, I'm trying to configure my board trough System Console, by using TCL scripts provided by example - eth_gen_mon.tcl, main.tcl, tse_mac_config.tcl, tse_marvel_phy.tcl, tse_stat_read.tcl.

I'm modyfied main.tcl by adding proc TEST_MAC_EXT {speed_test} which is copy Avalon-ST Reverse Loopback Test procedure, but it's turn Ethernet Packet Generator ON.

After completing test and gathering statistic I'm receive this report

% TEST_MAC_EXT 100M
==============================================================================
    Starting TSE MAC Configuration System Console                               
==============================================================================
Info: Opened JTAG Master Service
Info: Configure TSE MAC

TSE MAC Rev              = 0x00001001
TSE MAC write Scratch    = 0xabcd0123
TSE MAC read Scratch     = 0xabcd0123
Command Config           = 0x00000030
Command Config           = 0x00000033
MAC Address 0            = 0x4286a3b8
MAC Address 1            = 0x00007f03
Frame Length             = 0x000000ff
Pause Quanta             = 0x00002000
RX Section Empty         = 0x00001fec
RX Section Full          = 0x00000010
TX Section Empty         = 0x00001fec
TX Section Full          = 0x00000010
RX Almost Empty          = 0x00000008
RX Almost Full           = 0x00000008
TX Almost Empty          = 0x00000008
TX Almost Full           = 0x00000003
MDIO Address 0           = 0x00000000
MDIO Address 1           = 0x00000000
Regiter Status           = 0x00000000
TX IPG Length            = 0x0000000c
TX Command Status        = 0x00000000
RX Command Status        = 0x00000000

Info: Closed JTAG Master Service
==============================================================================
          Starting Marvell PHY Configuration System Console                   
==============================================================================
Info: Opened JTAG Master Service
Info: Configure On Board Ethernet PHY Chip

Configure PHY.
Set PHY SPEED to 100Mbps
Enable PHY Auto-Negotiation
Enable PHY In Full Duplex Mode
PHY read Control Register                       = 0x00003100
Advertise PHY 100BASE-TX Full Duplex
PHY read AN Advertisement Register              = 0x00000101
PHY read 1000BASE-T Control Register            = 0x00000c00
PHY read 1000BASE-T Status Register             = 0x00000000
Set PHY Synchronizing FIFO to maximum
Set PHY HWCFG_MODE for RGMII to Copper
PHY read Extended PHY Specific Status Register  = 0x0000848b
Set RGMII TX and RX Timing Control
Info: Applying Software Reset on Marvell PHY
PHY read Extended PHY Specific Control Register = 0x00000ce2
PHY read Control Register                       = 0x00003100
PHY read Status Register                        = 0x00007949
PHY Link Up.
PHY Speed and Duplex Resolved.
PHY operating in Full Duplex mode.
PHY operating Speed 100Mbps

Info: Closed JTAG Master Service
==============================================================================
    Starting Ethernet Generator / Monitor System Console            
==============================================================================



Info: Opened JTAG Master Service


Use Ethernet Generator
Number of packets        = 100
Configuration setting:
- Length                 :  Random
- Packets length         : 256
- Pattern                : Random
Random seed 0            = 0x56789abc
Random seed 1            = 0x00001234
Source address 0         = 0x4286a3b8
Source address 1         = 0x00007f03
Destination address 0    = 0xffffffff
Destination address 1    = 0x0000ffff
Start Ethernet Generator
Running -> Number of packets received = 22
Running -> Number of packets received = 53
Running -> Number of packets received = 58
Running -> Number of packets received = 75
Running -> Number of packets received = 86
Running -> Number of packets received = 87
Running -> Number of packets received = 96
Monitor receive done
Number of packets received OK        = 0
Number of packets received error     = 101
Packets received with CRC errors

Info: Closed JTAG Master Service


Info: Opened JTAG Master Service

TSE MAC Statistics Counters Map
==============================
Addr     Name                Read Value
----     ----                ----------
0x68     aFramesTransmittedOK                106
0x6c     aFramesReceivedOK                   85
0x70     aFrameCheckSequenceErrors           0
0x74     aAlignmentErrors                    0
0x78     aOctetsTransmittedOK                70763
0x7c     aOctetsReceivedOK                   8541
0x80     aTxPAUSEMACCtrlFrames               0
0x84     aRxPAUSEMACCtrlFrames               0
0x88     ifInErrors                          24
0x8c     ifOutErrors                         0
0x90     ifInUcastPkts                       0
0x94     ifInMulticastPkts                   71
0x98     ifInBroadcastPkts                   17
0x9c     ifOutDiscards                       0
0xa0     ifOutUcastPkts                      0
0xa4     ifOutMulticastPkts                  5
0xa8     ifOutBroadcastPkts                  101
0xac     etherStatsDropEvents                0
0xb0     etherStatsOctets                    29437
0xb4     etherStatsPkts                      112
0xb8     etherStatsUndersizePkts             0
0xbc     etherStatsOversizePkts              24
0xc0     etherStatsPkts64Octets              11
0xc4     etherStatsPkts65to127Octets         52
0xc8     etherStatsPkts128to255Octets        25
0xcc     etherStatsPkts256to511Octets        0
0xd0     etherStatsPkts512to1023Octets       0
0xd4     etherStatsPkts1024to1518Octets      0
0xd8     etherStatsPkts1519toXOctets         0
0xdc     etherStatsJabbers                   0
0xe0     etherStatsFragments                 0

Info: Closed JTAG Master Service

I've tried different settings to configure Ethernet Packet Generator, like lenth, pattern, source and destination MAC adress and I'm still can't capture anything by Wireshark.

Is MAC enough for capturing?

tcl
fpga
ethernet
asked on Stack Overflow Nov 12, 2017 by Ilya Mirolubov • edited Nov 13, 2017 by Ilya Mirolubov

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0