Altera_Forum
Honored Contributor
16 years agoDMA reading multiple PIOs
Hi,
My system contains a total of twenty two (22) 16-bit I/O ports (Altera PIOs) that are used to read external (10 bit) ADCs. My system is running at 85MHz and my maximum sample rate should be around 1usec. I am currently reading these I/O ports individually (using the IORD_ALTERA_AVALON_PIO_DATA command) and I am not getting a fast enough through-put. Although they are sequential in memory addresses, and each PIO spans 16 memory addresses i.e.; PIO#1 memory space is 0x0060a100 through 0x0060a10f PIO#2 memory space is 0x0060a110 through 0x0060a11f . . . PIO#22 memory space is 0x0060a250 through 0x0060a25f I am not certain of why there is a 16 address memory span associated with this device, but it may be that each address represents a single bit of the 16 bit value. Since I don’t know how the PIO core is structured, and since the IORD_ALTERA_AVALON_PIO_DATA command returns a 16 bit short value, I feel there must be some manipulation within this routine that fetches/extracts the 16 bits and places them into a ‘short’ structure. My question is, is there a way to use the Altera ‘DMA’ to perform a read on the Altera I/O’s? What I really need is a way for the DMA to read the PIOs sequentially and transfer this data to SRAM. I believe if this is possible, I could improve my sampling rate by offloading the read function to the DMA. Thanks in advance for any and all help. Fred