RTEMS 6.1-rc5
Loading...
Searching...
No Matches
Macros | Enumerations | Functions
zynq-devcfg.h File Reference

Device configuration support. More...

#include <rtems/libio.h>

Go to the source code of this file.

Macros

#define ZYNQ_DEVCFG_NAME   "/dev/fpga"
 
#define ZYNQ_DEVCFG_DRIVER_TABLE_ENTRY
 
#define ZYNQ_DEVCFG_PCAP_DMA_ALIGN   64
 
#define ZYNQ_DEVCFG_CFG_DUMMY   ( 0xffffffff )
 
#define ZYNQ_DEVCFG_CFG_BUS_WIDTH_SYNC   ( 0x000000bb )
 
#define ZYNQ_DEVCFG_CFG_BUS_WIDTH_DETECT   ( 0x11220044 )
 
#define ZYNQ_DEVCFG_CFG_SYNC   ( 0xaa995566 )
 
#define ZYNQ_DEVCFG_CONFIG_FRAME_LEN   ( 101 * 4 )
 Zynq configuration frame length in bytes.
 
#define ZYNQ_DEVCFG_IOCTL_VERSION_MAX_LEN   16
 

Enumerations

enum  zynq_devcfg_ioctl {
  ZYNQ_DEVCFG_IOCTL_VERSION , ZYNQ_DEVCFG_IOCTL_FPGA_PROGRAM_PRE , ZYNQ_DEVCFG_IOCTL_FPGA_PROGRAM_POST , ZYNQ_DEVCFG_IOCTL_FPGA_PROGRAM_WAIT_DONE ,
  ZYNQ_DEVCFG_IOCTL_SET_SECURE , ZYNQ_DEVCFG_IOCTL_SET_WRITE_MODE_RESTRICTED
}
 

Functions

rtems_device_driver zynq_devcfg_init (rtems_device_major_number major, rtems_device_minor_number minor, void *args)
 
rtems_device_driver zynq_devcfg_open (rtems_device_major_number major, rtems_device_minor_number minor, void *args)
 
rtems_device_driver zynq_devcfg_close (rtems_device_major_number major, rtems_device_minor_number minor, void *args)
 
rtems_device_driver zynq_devcfg_read (rtems_device_major_number major, rtems_device_minor_number minor, void *args)
 Read from the PCAP controller.
 
rtems_device_driver zynq_devcfg_write (rtems_device_major_number major, rtems_device_minor_number minor, void *args)
 Write to the PCAP controller.
 
rtems_device_driver zynq_devcfg_control (rtems_device_major_number major, rtems_device_minor_number minor, void *args)
 

Detailed Description

Device configuration support.

Provides support for the Zynq7000 series device configuration interface controller. PCAP command sequences are written using the write interface, and PCAP responses are retrieved with the read interface. The driver can be used for reconfiguration of the FPGA, and also reading FPGA configuration data for error checking.

Macro Definition Documentation

◆ ZYNQ_DEVCFG_DRIVER_TABLE_ENTRY

#define ZYNQ_DEVCFG_DRIVER_TABLE_ENTRY
Value:
{ zynq_devcfg_init, zynq_devcfg_open, zynq_devcfg_close, zynq_devcfg_read, \
zynq_devcfg_write, zynq_devcfg_control }
rtems_device_driver zynq_devcfg_write(rtems_device_major_number major, rtems_device_minor_number minor, void *args)
Write to the PCAP controller.
Definition: zynq-devcfg.c:661
rtems_device_driver zynq_devcfg_read(rtems_device_major_number major, rtems_device_minor_number minor, void *args)
Read from the PCAP controller.
Definition: zynq-devcfg.c:570

Enumeration Type Documentation

◆ zynq_devcfg_ioctl

Enumerator
ZYNQ_DEVCFG_IOCTL_VERSION 

Argument: Buffer for character string of at least ZYNQ_DEVCFG_IOCTL_VERSION_MAX_LEN bytes.

ZYNQ_DEVCFG_IOCTL_FPGA_PROGRAM_PRE 

Argument: None.

ZYNQ_DEVCFG_IOCTL_FPGA_PROGRAM_POST 

Argument: None.

ZYNQ_DEVCFG_IOCTL_FPGA_PROGRAM_WAIT_DONE 

Argument: None.

ZYNQ_DEVCFG_IOCTL_SET_SECURE 

Argument: bool.

ZYNQ_DEVCFG_IOCTL_SET_WRITE_MODE_RESTRICTED 

Argument: bool.

Function Documentation

◆ zynq_devcfg_read()

rtems_device_driver zynq_devcfg_read ( rtems_device_major_number  major,
rtems_device_minor_number  minor,
void *  args 
)

Read from the PCAP controller.

Readback reads cannot be split into multiple DMA reads, this may cause the PCAP DMA to exhibit unexpected behavior. Therefore, the read length must match the preceding command sequence's expected data output length.

◆ zynq_devcfg_write()

rtems_device_driver zynq_devcfg_write ( rtems_device_major_number  major,
rtems_device_minor_number  minor,
void *  args 
)

Write to the PCAP controller.

Data format: dword aligned bistream data or PCAP commands. Bitstream data is expected to be formatted as Vivado 2016.4 outputs BIN-format bitstreams by default (not bit-swapped) BUT with the byte order within each dword changed to little endian. See UG470 for information on data ordering.