Forum Discussion

drbarryh's avatar
drbarryh
Icon for Contributor rankContributor
1 month ago

Correct way to configure the RGMII input and output pins on a MAX10 FPGA

Greetings ALTERA Expetrs,

I am using an ALTERA Triple Speed Ethernet IP core configured n MAC only mode, which talks to a MARVELL 88E1111 PHY. Actually for this example i am using an ALTERA MAX10 10M50-C Development kit. I am having trouble understanding exactly HOW to configure the DDR RGMII input and output pins.

After instantiating the Triple Speed Ethernet IP in a top level System Verilog file and connecting up Avalon MM, Avalon Tx/Rx ST interfaces etc, and connecting up clocks and resets, do i need to to connect up my RGMII DDR outputs using altddio_out IP and my RGMII DDR inputs to FPGSA pins using altddio_in IP blocks ?

This is how i am thinking i need to connect my DDR RGMII FPGA pins up to my Triple Speed Ethernet RGMII tx in and rx in busses on the IP:

Connect the TX Clock output :

altddio_out #(.width(1), .INTENDED_DEVICE_FAMILY("max10"))

altddio_out_a_txc (.outclock (clk_125MHz),

  .datain_h (1'b1),

 .datain_l (1'b0),.dataout (RGMII_ETH_TXC), // TSE clock TX PORT A

 .oe (1'b1),

 .outclocken (1'b1),

.aclr (1'b0),

.aset (1'b0)

);

Connect the RGMI TX data outputs :

altddio_out #(

.width(4),

.INTENDED_DEVICE_FAMILY("max10")

) altddio_out_a_txd (

.outclock (clk_125MHz), // 125 MHz Transmit clock for RGMII

.datain_h (rgmii_out_ddr), // rising edge

.datain_l (rgmii_out_ddr), // falling edge

.dataout (rgmii_out),

.aclr (1'b0),

.aset (1'b0),

.oe (1'b1),

.outclocken (1'b1)

);

Where in the above code rgmii_out wires are going to FPGA DDR RGMI TX output pins, and rgmii_out_ddr is from the Triple speed IP core.

For the RX side for the INPUT DDR RGIM Rx data bus:

altddio_in #(.width(4), .INTENDED_DEVICE_FAMILY("max10"))  altddio_in_a_rxd (

.inclock (RGMII_ETH_RXC),

.datain (rgmii_in),

.dataout_h (rgmii_rxd),

.dataout_l (/* unused */)

);

Do these sort of DDR interface IP instantiations looks correct ?

All help gratefully received !

Thanks, Dr Barry H

3 Replies

  • FvM's avatar
    FvM
    Icon for Super Contributor rankSuper Contributor

    Hi Barry,
    not sure why you're instantiating dedicated DDR IO. TSE IP in RGMII mode already interfaces to DDR RX and TX data.


    Regards
    Frank

    • drbarryh's avatar
      drbarryh
      Icon for Contributor rankContributor

      Hi Frank, thanks for your reply. Yes i figured that out with the error messages i received from Quartus after i tried instantiating my own DDR I/Os ! The error message was saying that the TSE already instanced some GPIO Lite DDR I/Os (the MAX10 equivalent). I just am not that familiar with the MAX10 FPGA's or the TSE, and just getting back into Quartus as well after many years using Vivado and Xilinx FPGAs !

      But i am getting better gradually !

      Now i have managed to reconstruct the ALTERA MAX 10 example design using the following approach :

      Create a new project -> use the par file: max10tse_q_18_0_std.par from the MAX10 TSE Example design, in Quartus 2018 it fails to reconstruct the Qsys platform because of a lot of missing IPs (like the packet gen, packet mon etc.). But then i tried it from the  max10tse_q_17_0_std.par version, then tried to do an update to Quartus 2018 and luckily that works and gets me all the missing Qsys IPs. 

      I then tried to compile that project in Quartus 2018 and hey presto it compiled ok and met timing! Great progress i thought ! I connected a Windows 10 PC to my dev kit using an Ethernet cable and programmed in its MAC address as the DST address for the Tests. Also tried the same tests using a UBUNTU PC. But i get the same failed results at the moment.

      But when i try out the TCL scripts in the sc_tcl sub directory and run them, the TEST_MAC_LB "1000M" and  TEST_MAC_PHY_LB "1000M" commands both fail, after i of course run the source main.tcl script.
      I am using a ALTERA MAX10 10M50-C dev kit as my base for these tests. In the stats_chk command results i see all frames transmitted (100000) but 0 frames are being received.

      Any ideas on what is still going wrong and a solution would be most appreciated ! I am stuck now :)

      Thanks, Dr Barry H

  • FvM's avatar
    FvM
    Icon for Super Contributor rankSuper Contributor

    Hi Barry,
    not sure why you're instantiating dedicated DDR IO. TSE IP in RGMII mode already interfaces to DDR RX and TX data.


    Regards
    Frank