dma on fpga pci card

I had posted earlier my issues with Fpga card.

formatting link

The AMIRIX fpga card uses powerspan II pci bus switch fro Tundra. The powerpc inside teh fpga has linux running..I have some data in my PLB master/slave module which has to be transferred to the host pc. So I was suggested to llok into DMA transfer part. I went through the powerspan II manual . It doesnt provide the details of data cycle for the DMA . i.e it only says to write the DMA configuration registers with the source address , destination address... and then raisethe go signal. Now my problem is that the source address needs to be the on-board RAM address. I dont want to use the onboard RAM.I dont want to use the powerpc either. I wanted to write a module in vhdl to do the confguration adn the forward the data to the bridge. I dont know whether this is possible. I

I dont have experience in this field. How can I do a transfer of data from my master/slave module to the host computer? Is there a way ? Thanks, Nitesh

Reply to
Nitesh
Loading thread data ...

You first need to find out if the PCI interface on your board has this capability. How is it implemented? One block diagram of an AMIRIX board shows an external PCI bridge, and a photo shows a chip marked "PLX" but I can't read the number.

So start with the supplied documentation, and if that proves inadequate, look at the board, find the PLX chip, and go to

formatting link
for further information on that chip and example driver software.

- Brian

Reply to
Brian Drummond

formatting link

If you want to write a VHDL module to do the DMA, you need to interface to the PCI core in your FPGA. The manual for the core should have information on DMA operation.

Reply to
John_H

The pci bridge used is powerspan II from tundra

formatting link
I dont think so I need a pci core. I am not sure about the pci core function but I feel it is same as what on-board pci bridge does. Right now At reset the powerpc running linux on it does the initialization I guess. I think I have to customize the vhdl interface at the front end which interfaces the fpga with the bridge and add a functionality of configuration.What I reaaly need to do after that is configure the bridge with right images in the registers at powerup. Then I need to figure out a way to do DMA transfer. I am trying to create a list of powerup functions( images,addresses) and the timing diagram for the data and address phases to do the dma.Then will start writing the code. I hope I am on the right track. Thanks, Nitesh

Reply to
Nitesh

I changed the front end core given by amirix for dma functionality. For a dma transfer what is the destination address that I should specify? How can I get this address. I am sending data from the card to the host memory. Nitesh

Reply to
Nitesh

Try a google search on scatter gather dma.

I don't know the details but I know you have to allocate blocks of memory in the pc space, program their locations and sizes to the pci, and then monitor the transfers and swap out buffers to disk before their overwritten.

Reply to
Anonymous

Let me rephrase my question. I have a fpga pci card with a dual pci bridge between the virtex II pro and the pci bus of the host computer to which this card is connected. The processor bus connects fpga with the bridge. The dual pci bridge from tundra is dma capable. I have changed a core (A processor bus master/slave) in the fpga to provide this dma functionality. My aim is to transfer data from the fpga to the host memory. I can provide the source address which is an address of a location inside the fpga. Now my problem is that what should be the destination address ? I have to send the data to the host RAM. Since this address has to be pre decided before a transaction can begin how can I get this value in the fpga so that I can program this from the fpga.

Reply to
Nitesh

As stated before, the software on the host computer side needs to allocate memory space for the DMA destination. If the address and size can be fixed, your task is simple. It's more likely that the memory allocation will be dynamic and the host system has to communicate the FPGA in some fashion what the address range is for the DMA. Then and only then should the FPGA do its DMA. You can't move data to the host memory, after all, if the host is executing out of the memory you're writing to. If the host allocates it, the memory won't be used by the operating system or other devices.

Reply to
John_H

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.