03-09-2011 06:16 PM
I have an SP605 that I have been working on to create a NIC like device (data sent to SP605 via PCI, which is then sent via Ethernet to a remote PC).
I have two different problems"
1) If I create a default setup using the Ethernetlite IP, the default LWIP echo server doesn't work. If all I do is replace the Ethernetlite with the Soft_TEMAC, everything works fine. I create the project using the DDR3 MPMC, Ethernetlite IP, PCIe, Timer,UART, and I set all of the interrupt bits. I would rather use the Ethernetlite version as I do not want to pay for the Soft_TEMAC (don't need a lot of performance).
I think (I am probably wrong) that its a PHY problem. That is, that the PHY is trying to use a GB connection instead of a 100 MB connection. I set the LWIP setting that tells it to stop auto-negotiating and to using 100 MB, but that didn't make a difference.
Any ideas? Anyone else get this working? Seems to me that the default setup, with the default LWIP echo server should work out of the box. Esspecially when the Soft_TEMAC version works fine.
2) Using the Soft_TEMAC for now, I have begun working on the overall design of this thing. I have the remote PC talking to the Soft_TEMAC using LWIP just fine. I also have the host PC talking to DDR3 via PCIe just fine as well (don't forget to enable the PCIe device so that the C_PCIBAR2IPIFBAR translations work :).
The issue I am having is once I write the first 1KB of DDR3 memory via PCIe, Ethernet stops working. I cannot verify if its a problem with the microblaze, or something else. The UART doesn't print anything else, and the Soft_TEMAC stops working (LWIP could be broken, or the microblaze could have stalled.... no idea).
I noticed that the Soft_TEMAC uses the MPMC for its FIFO (64KB). Which means that its using the DDR3 for its buffers. If that is the case, can these memory ranges overlap? That is, could I be overwriting the Soft_TEMAC buffers via PCIe? And if so, which portions of the DDR3 is the Soft_TEMAC using? How do you prevent that? I verfied that the linkerscript is putting my code in the BRAM, so I do not think I am overwriting code.
Thanks a ton for your help,
03-10-2011 07:04 AM
I believe I have solved one of my problems.
When you click generate linker script, it doesn't read in your current settings (I assumed it did). SO, my code was in fact being placed in the DDR3 memory, and I was in fact overwritting my code.
To fix my problem, I can go into the linker script, and add another memory region just for PCIe, and the linker script makes sure that that memory is not touched by code :). I will test today to see how it goes. My hope is that I should be able to clear all of the PCIe region, and not affect my code at all.
Still need help with number ! though. Anyone know how to get the Ethernetlie IP working with the SP605?
03-10-2011 07:53 AM
Your assessment is correct. I think your link is being established at GB whereas Ethernetlite can operate only at 10/100Mbps. Try modifying your NIC settings to force a 100Mbps full duplex link. It should do the trick.
03-10-2011 09:39 AM
Do you mean the NIC settings on the Switch or on the SP605? If you mean the SP605 how do you do that?
It would be strange to me if you couldn't use the SP605 on a GB network.
As for my other problem, I can confirm that linking was the issue. By setting up the linker script to have another memory instance, the problem seems to be solved. Basically I divided the DDR3 memory instance into two memory instances. The first region is for PCIe, and the other region is for my code and ethernet frames.
So if I can just figure out how to setup the Ethernetlite, I will be in good shape :)
03-10-2011 09:42 AM
I was talking about hte NIC on your PC/Switch. The trouble is SP605 can be on a GB network. The Ethernetlite core on the other hand is a free core restricted to 10/100 Mbps only.
03-10-2011 10:05 AM
Thats what I thought. :(
When we go to production, is it possible to use a 10/100 MB PHY instead of a PHY that auto-negotiates 1GB with the network? If so I will not worry about it.
Thanks for the quick replies
03-10-2011 10:09 AM
Yes, you can always do that. All PHYs give you an option of locking down the speed. As a matter of fact you can do include a phy-write from your software to set the link speed to 100 Mbps as well. This will work the same way as setting your NIC to 100 Mbps. SP605 being a general purpose evaluation board defaults to PHY configuration to auto-negotiation.
03-10-2011 10:16 AM
Awesome.... I'm a noob :)
How exactly do you tell the phy to run at 100 MB (or at least point me to a document). I looked everywhere a couple of days ago for something like that and came up dry.
03-11-2011 02:32 PM
The PHY data sheet will give you this information. All you really need is the register offset and then you can use one of the driver functions like XLltemac_PhyRead, XLltemac_PhyWrite to write to them ...
P.S. Most PHY manufacturers require you to sign an NDA to get access to their datasheets.
08-11-2011 05:20 PM
I want to talk with my PC through PCIe too. I would like to uee your design as a reference, which cores did you use? Can you pos your MHS file to this fprum please?