Forum Discussion
RMII Mode Selection / Strapping CYCLONE III
Hi,
I am working in ALTERA CYCLONE III . I have designed a module with the following NIOS II Processor + Custom Ethernet MAC working in RMII Mode + SSRAM. The Ethernet PHY used in this FPGA is DP83848C. Since I am working with a custom Ethernet MAC with RMII Mode , I have to configure the PHY to RMII. Referring the Spec of DP83848C PHY,we can select RMII mode by strapping mechanism.To do so , RX_DV/MII_MODE pin of DP83848C has to connected to VCC through a external 2.2K ohm Resistor.Whether we can configure some registers to make this selection in the CYCLONE III or we have make some external connections ? Please Note : See the Attached PHY Document17 Replies
- Altera_Forum
Honored Contributor
The weak pull-up option on a Cyclone III is too weak for your Phy (it is 7k Min at 3.3V) so you must have an external pull-up.
- Altera_Forum
Honored Contributor
Hi ,
Thanks for the Info . Could be please explain in detail why its not possible ( How you identified the specifications you mentioned ? ) I am having CYCLONE III Eval Board . How to connect external pull - up ? Regards, Jagadeesh.B - Altera_Forum
Honored Contributor
The information is on page 9 of the datasheet (http://www.altera.com/literature/hb/cyc3/cyc3_ciii52001.pdf).
If no footprint is available on the PCB to put the pull-up it may be tricky to add. See if you can access the PHY pin or a via connected to the signal. It may be easier to adapt your design to MII instead of RMII. - Altera_Forum
Honored Contributor
hi.
i have a question, whether nios can be design to rmii. i know, tsw only has mii. gmii,rgmii. - Altera_Forum
Honored Contributor
you can use the TSE in MII mode and write your own wrapper to convert MII to/from RMII
- Altera_Forum
Honored Contributor
how can i do it ,could you give me some helps?
thanks - Altera_Forum
Honored Contributor
Basically you can do it with a state machine. On a MII interface you transfer 4 bits on a 25MHz clock, whereas on an RMII interface you transfer 2 bits on a 50 MHz clock. You can put a state machine in the 50MHz clock domain that processes the high bits on every other cycle and the low bits on the next ones.
- Altera_Forum
Honored Contributor
To Daixiwen:thank you for your reply,but I have a question.When using the IP 192.168.0.67,the system gives the INFO:PHY[-66.-17]-speed=unknown,duplex=half.And when using the IP 219.245.66.185,the system gives teh INFO : PHY[0.0] - Speed = 1000, Duplex = Full.I don't know the reason.Does it have sth to do with network segment?
here is the detail: Running... INFO : TSE MAC 0 found at address 0x00002000 INFO : PHY National DP83640 found at PHY address 0x01 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... INFO : PHY[0.0] - Auto-Negotiation PASSED INFO : PHY[0.0] - Checking link... INFO : PHY[0.0] - Link established INFO : PHY[0.0] - Speed = 1000, Duplex = Full Waiting for link...OK IP address: 219.245.66.185 IP netmask: 255.255.255.0 IP gateway: 219.245.66.254 UDP Dest IP address: 219.245.66.200 Running... INFO : TSE MAC 0 found at address 0x00002000 INFO : PHY National DP83640 found at PHY address 0x01 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... INFO : PHY[0.0] - Auto-Negotiation PASSED INFO : PHY[0.0] - Checking link... INFO : PHY[0.0] - Link established INFO : PHY[0.0] - Speed = 1000, Duplex = Full Waiting for link...OK IP address: 192.168.0.67 IP netmask: 255.255.255.0 IP gateway: 192.168.0.1 UDP Dest IP address: 192.168.0.68 INFO:PHY[-66.-17]-speed=unknown,duplex=Half another doubt is:when I got the INFO posted above,Could I ensure my interface converter mii to rmii worked! waiting for your reply,thank you! - Altera_Forum
Honored Contributor
In both cases you have this line
--- Quote Start --- INFO : PHY[0.0] - Speed = 1000, Duplex = Full --- Quote End --- which indicates that the MDIO communication with the PHY chip is working correctly. I have no idea where this line --- Quote Start --- INFO:PHY[-66.-17]-speed=unknown,duplex=Half --- Quote End --- is coming from but -66 and -17 are obviously bogus so it's probably a software crash that leads the function to be called with wrong parameters. Anyway, this just shows that the MDIO is working. It's using different signals than the MII or RMII lines, so this doesn't say if your RMII interface is working correctly. If you don't see any network traffic you should check on both sides (MII and RMII) with SignalTap is you see any packet coming or going from the Ethernet interface. - Altera_Forum
Honored Contributor
Dear daixiwen:
I can't get the package by using the wireshark(tools for capture pcakage),How can i do it,could you give me some advice?By the way ,may I ask a question:Do you konw anyone who successed by using the PHY RMII interface connected mii interface which supply by TSE! By the way ,could you understand chinese language? waiting for your reply,thank you!