Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
15 years ago

Nios II Etherent Standard Design Example on 3C120 development kit

Hi All,

After trying multiple SOPC designs, several revisions of quartus/NIOS EDS, I have settled on the NiosII Ethernet example from the altera site

http://www.altera.com/support/examples/nios2/exm-net-std-de.html

The design is as simple as possible hardware wise. There are several issues in porting this to the 3C120 Dev Kit - (with help from others) I will try to list them here in this thread.

That the pin out used in the QAR file routes the Ethernet lines to the mezzanine connector rather then using the standard 881111 marvel phy on the baseboard. To use the baseboard phy I redefined the following pins in the pin planner

enet_resetn AD2

enet_txd0 W4

enet_txd1 AA5

enet_txd2 Y5

enet_txd3 W3

enet_rxd0 W8

enet_rxd1 AA6

enet_rxd2 W7

enet_rxd3 Y6

enet_tx_en AA7

enet_mdio L5

enet_mdc N8

enet_gtx_clk T8

enet_rx_dv AB4

enet_rx_clk B14

I also enabled RGMII mode in the software by adding the 881111 to the phy profile

alt_tse_system_info tse_mac_device[MAXNETS] = {

//Macro defined in altera_avalon_tse_system_info, should match TSE configuration

TSE_SYSTEM_EXT_MEM_NO_SHARED_FIFO(

TSE_MAC, //tse_name

0, //offset

SGDMA_TX, //sgdma_tx_name

SGDMA_RX, //sgdma_rx_name

TSE_PHY_AUTO_ADDRESS, //phy_address

&marvell_cfg_rgmii, //phy_cfg_fp

DESCRIPTOR_MEMORY) //desc_mem_name

};

I added a 125 mhz enet phy pll generating 125, 25 and 2.5 mhz on it's 3 outputs. I added SOF files restraining the RGMII interfaces ala the linux design

The following is what I receive from the target

InterNiche Portable TCP/IP, v3.1

Copyright 1996-2008 by InterNiche Technologies. All rights reserved.

prep_tse_mac 0

Static IP Address is 169.254.1.234

prepped 1 interface, initializing...

[tse_mac_init]

INFO : TSE MAC 0 found at address 0x00000800

INFO : PHY Marvell 88E1111 found at PHY address 0x12 of MAC Group[0]

INFO : PHY[0.0] - Automatically mapped to tse_mac_device[0]

INFO : PHY[0.0] - Restart Auto-Negotiation, checking PHY link...

WARNING : PHY[0.0] - Auto-Negotiation FAILED

MARVELL : Enabling auto crossover

MARVELL : PHY reset

INFO : PHY[0.0] - Checking link...

INFO : PHY[0.0] - Link not yet established, restart auto-negotiation...

INFO : PHY[0.0] - Restart Auto-Negotiation, checking PHY link...

WARNING : PHY[0.0] - Auto-Negotiation FAILED

WARNING : PHY[0.0] - Link could not established

WARNING : PHY[0.0] - Auto-Negotiation not completed! Speed = 100, Duplex = Full

TSEMAC SW reset bit never cleared!

OK, x=10002, CMD_CONFIG=0x00002000

MAC post-initialization: CMD_CONFIG=0x04000200

[tse_sgdma_read_init] RX descriptor chain desc (1 depth) created

mctest init called

IP address of et1 : 169.254.1.234

Created "Inet main" task (Prio: 2)

Created "clock tick" task (Prio: 3)

Simple Socket Server starting up

[sss_task] Simple Socket Server listening on port 30

Simple Socket

Server

MAC:0007ED1180C9

IP ADDRESS:

169.254.1.234

TCP PORT:30

Telnet to me!!!!

Wondering if someone can tell me what I missed... The OS is obviously up... There is no phy link established...

16 Replies