Forum Discussion

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

RGMII interface on custom board

Hello everyone,

I'm trying to get the web server example design up and running on my custom board. I'm using the Micrel KSZ9021RL which has an RGMII interface. I've gotten to the point where it appears to be working in the Nios II Console but I get nothing on the RGMII tx lines when viewed in SignalTap. Here's what it's showing:

InterNiche Portable TCP/IP, v3.1 
Copyright 1996-2008 by InterNiche Technologies. All rights reserved. 
prep_tse_mac 0
Can't read the MAC address from your board. We will assign you
a MAC address.
Your Ethernet MAC address is 00:07:ed:ff:cd:15
Static IP Address is 192.168.1.234
prepped 1 interface, initializing...
INFO    : TSE MAC 0 found at address 0x00022000
INFO    : PHY Micrel KSZ9021RL found at PHY address 0x00 of MAC Group
INFO    : PHY - Automatically mapped to tse_mac_device
INFO    : PHY - Restart Auto-Negotiation, checking PHY link...
INFO    : PHY - Auto-Negotiation PASSED
INFO    : PHY - Checking link...
INFO    : PHY - Link established
INFO    : PHY - Speed = 100, Duplex = Full
OK, x=51, CMD_CONFIG=0x00000000
MAC post-initialization: CMD_CONFIG=0x04000203
 RX descriptor chain desc (1 depth) created
mctest init called
IP address of et1 : 192.168.1.234
Created "Inet main" task (Prio: 2)
Created "clock tick" task (Prio: 3)
Created "web server" task (Prio: 4)
Web Server starting up

Since I used the RGMII template, the -DTSE_MY_SYSTEM tag is in the BSP properties and the alt_tse_system_info structure has been created. I've also verfied that my transmit and receive clocks are present, currently 25 MHz for testing at 100 Mbps.

Does anyone have an idea on what I might be missing?

Thank you for looking!

Scott

13 Replies

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Probably not. What RGMII example project? I have seen and tried several, but I haven't combined any.

    I'm confused with one having scatter gather interfaces to the TSE and another reference project has packet sink and source. Which one do I need? I was about to put the packet sink in place of the scattergather. The manual shows scatter gather.
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Start Eclipse, create a new project from example projects and choose either web server (RGMII) or simple socket server (RGMII) example. It will create a new project and there will be a file called "tse_my_system.c". Copy it to Your project directory.

    Or You can create a new .c file and add the same contents to it:

    
    /* REQUIRED ONLY IF NETWORK IS RGMII */
    # ifdef ALT_INICHE
       # include "ipport.h"# endif
    # include "system.h"# include "altera_avalon_tse.h"# include "altera_avalon_tse_system_info.h"
    alt_tse_system_info tse_mac_device = {
            TSE_SYSTEM_EXT_MEM_NO_SHARED_FIFO(TSE_MAC, 0, SGDMA_TX, SGDMA_RX, TSE_PHY_AUTO_ADDRESS, &marvell_cfg_rgmii, DESCRIPTOR_MEMORY)
            
    };
    

    Then remember to edit this file and add your initialization stuff instead of Marvell structure.
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Yes, I used those examples. I had to modify this file to point to my TSE, SGDMA, descriptor memory etc. It seems to talk to the TSE just fine to control it, I just don't have any packets coming out of the TSE to the phy. I see packets coming from the network through the phy to the TSE, just not out of the TSE.

    My output looks pretty much like Scott's did, only it sees the phy at [6] like it should from the jumpers, it is 1000Mbs(as it should) . It can also sense correctly the 10/100/1000 speed interface that the phy negotiates on it's own as I change network speed(different routers). Since it doesn't have [packets going out, DHCP doesn't work, neither does a static IP though.