Hello,
I have also posted this message on the niosforums site. Hopefully someone here will have an insight to my problem.
I am developing on a system that is very similar to the Nios II evaluation kit. I am trying to transfer data to and from the LAN91C111 Ethernet MAC but have noticed some problems. The MAC is connected to the Nios II in exactly the same way as on the demo board.
It appears as though the Altera model for the interface to the LAN91C111 is incorrect. The data sheet for this device shows the timing when the LAN91C111 is used in asynchronous mode, and although the nRD & nWR signals meet the timing shown in the data sheet, the minimum cycle time appears to be violated.
In the SMSC LAN91C111 FAQ and Application Note 9.6, it clearly states that the minimum cycle time should be either 80ns or 100nS depending on whether the interface is operating as half or full duplex. When I try to use the DMA to read from the LAN91C111, it see a cycle time of 40nS (when clocking the Nios II with 50MHz). The timing for the LAN91C111 is not directly accessible from the SOPC builder, but looking at the class.ptf file for the LAN91C111, it shows the following:
Read_Wait_States = "20ns"; Write_Wait_States = "20ns"; Setup_Time = "20ns"; Hold_Time = "20ns";
in the SYSTEM_BUILDER_INFO section.
If I am interpreting this correctly, this will result in the 40nS cycle time for Read and Write operations which is in conflict with the SMSC FAQ and the App Note. I have measured this using an oscilloscope.
Now, this wouldn't be a huge problem for me, if I was able to change it, but it doesn't seem to be vary if I change the class.ptf file so that each of the above times are, say, 40nS. This is really the second part of my question. Should it be possible to change the timing as defined in the class.ptf file? I have tried changing it outside of the SOPC builder but it compiles the same regardless. Perhaps there is a trick here?
If anyone has had any luck with using DMA transfer to and from the LAN91C111, it would appreciate any tips you might have.
Many thanks, sja.