06-03-2009 01:08 PM
I am developing an embedded system which is based on Virtex4. I use EDK 10 and run Linux on the PPC. I am developing a Linux driver for DMA transactions using the MPMC.
My hardware core implements the LocalLink interface and connects to the MPMC. The driver I am developing uses the xlldma interface to communicate with the MPMC. I used the xilinx temac driver as a reference.
The probelm I have is that the driver works when I transmit packets at a low rate, but it hangs whenever I start transferring packets at a high rate. I can reproduce this bug easily. When I print the internal DMA buffer-ring I notice that the RX channel hangs even though there are buffers availablefor the MPMC to use. The bug occures more quickly when my hardware core sends small packets. After the MPMC hangs, I validate the mpmc data structure using xilinx API but it reports that the data is valid. Other channels in the MPMC continue to operate (For example: temac keeps working ). The MPMC does not hang if I only use one BD in the buffer ring.
Did anyone encounter similar problems ?
I would like to release this driver as open source as soon as I fix this bug.
06-03-2009 01:15 PM
Have you verified the custom hardware works without Linux? Have you simulated it? It could be that you have a hardware problem - for instance, the locallink is stuck in a state where the src_rdy/dst_rdy is prohibiting the transfer of packets across the interface.
06-03-2009 01:27 PM
I used ChipScope to examine the local link signals. The MPMC sets the DST_RDY_n to 1 (not ready) at some point and stays that way forever. This happens after multiple packets which do arrive to the software. The DST_RDY signal gets stuck after I raise the SOP signal on my side. The signals that my core sends confirms to the local link spac. I am pretty sure that the hardware works find because when I give the bd-ring a different number of buffers, it hangs in a different place. The hardware is tested and is known to work as long as I only give one buffer to the ring.