Hi All,
I have some problems using SoPC builder (5.1) with DMA and PCI (Altera PCI compiler 4.1.0). I have system with PCI with 4 BARs, 4 user interfaces (three of them are actually memories, but implemented outside of the system) and DMA controller.
The PCI has this configuration: BAR0 1MByte, prefetchable - user memory BAR1 32kBytes, nonprefetchable - control io BAR2 4kBytes, nonprefetchable - control memory1 BAR3 1kByte, nonprefetchable - control memory2
"control io" is is connected to control port on DMA, CRA registers on PCI and some registers outside of the system
"user memory" is main memory of the system.
the DMA controller has connected its read port to PCI access, write port to the "user memory". it is configured to use burst transfers of
128 bytes, uses only words (because the PCI is 32bit), and it has 20bit length register.The first problem The DMA has 20bit length register. But when I write to the Length register anything that is longer than 10 bits, the DMA stops responding and does nothing. The way to produce is write 0x8C to the Control register (GO, Words only, Length=0 stop), zeroing the Status register and then write to the Length register. With lengths smaller than 0x400 it works fine.
And the second one I haven't found how to use IRQ of the DMA - is it functional? Maybe it is problem of PCI megacore... I want to create a PCI interrupt after end of DMA operation to let the control driver know that the operation is finished. I have enabled interrupts from Avalon (bit 7 of register
0x14 in PCI CRA), then I have set the I_EN bit in DMA Control register (bit 4), but the interrupt does not happen. It is also weird, that I dont see any IRQs in the SoPC builder, but the PCI should support IRQ...Do you anyone know, where could be the problem?
Any help appreciated,
Martin