at91cap7e ATMEL Corporation, at91cap7e Datasheet - Page 50

no-image

at91cap7e

Manufacturer Part Number
at91cap7e
Description
Customizable Microcontroller
Manufacturer
ATMEL Corporation
Datasheet

Available stocks

Company
Part Number
Manufacturer
Quantity
Price
Part Number:
at91cap7e-NA-ZJ
Manufacturer:
Atmel
Quantity:
10 000
11.5.1
Figure 11-6. PIO interface to FPGA
11.5.2
50
AT91CAP7E
PIO-FPGA Connections
PIO-FPGA Access Routines
ARM Microcontroller
System
ARM
Since the processor must manage the flow of data to keep the PIO busy, there is a significant
overhead in processing time. Note that DMA is not possible using this architecture, therefore
the bandwidth is limited by the number of cycles the software programmer allocates for the
processor to communicate with the PIO. For example, if there is a routine running that de-
mands 100% of the processor cycles and concurrently there is serial data (e.g. SPI, USART,
USB, or TWI) to be transferred to/from the FPGA, one of these processes must wait. If the
data from the FPGA is not buffered on time, it will probably be overrun by the next byte/word.
To accomplish a proper data transfer to/from the FPGA, we need to transfer 32 bits of ad-
dress (or possibly less), 32 bits of data, and some control signals. For this approach, one will
need to use more that a 32 bit PIO port. At least 2 more PIO bits are necessary for control
signals.
The
Based on the resources shown above, we can define a software algorithm to transfer data
from/to FPGA.
Þ write_to_fpga: Algorithm to write 32 bits of data to FPGA, this assumes that, the
Þ read_from_fpga: Algorithm to read data from the FPGA, this assumes that, the direction
PIO 32
PIO 2
Data
Ctrl
bits
bits
direction of the bidirectional buffers in the PIO’s has been previously set.
of the bidirectional buffers in the PIO’s has been previously set.
Figure 11-6
PIO_DATA = ADDRESS; // Pass the address to write
PIO_CTRL = START | WR; // Send start of address cycle
PIO_CTRL = CLEAR; // Clear PIO ctrl, this ends the address cycle
PIO_DATA = DATA; // Set data to transfer
PIO_CTRL = START; // Data is ready in PIO
PIO_CTRL = CLEAR; // This end the data cycle
PIO_DATA = ADDRESS; // Set the address to read
PIO_CTRL = START | RD; // Send start of address cycle
PIO_CTRL = CLEAR; // Clear PIO ctrl, this ends the address cycle
shows the 32+2 PIO interface to a FPGA.
Address / Data
WR / RD _
Start
FPGA
Logic
FPGA
8549A–CAP–10/08

Related parts for at91cap7e