<h1>devcfg v3_1</h1><p>The is the main header file for the Device Configuration Interface of the Zynq device. The device configuration interface has three main functionality. 1. AXI-PCAP 2. Security Policy 3. XADC This current version of the driver supports only the AXI-PCAP and Security Policy blocks. There is a separate driver for XADC.</p>
<p>AXI-PCAP is used for download/upload an encrypted or decrypted bitstream. DMA embedded in the AXI PCAP provides the master interface to the Device configuration block for any DMA transfers. The data transfer can take place between the Tx/RxFIFOs of AXI-PCAP and memory (on chip RAM/DDR/peripheral memory).</p>
<p>The current driver only supports the downloading the FPGA bitstream and readback of the decrypted image (sort of loopback). The driver does not know what information needs to be written to the FPGA to readback FPGA configuration register or memory data. The application above the driver should take care of creating the data that needs to be downloaded to the FPGA so that the bitstream can be readback. This driver also does not support the reading of the internal registers of the PCAP. The driver has no knowledge of the PCAP internals.</p>
<p><b> Initialization and Configuration </b></p>
<p>The device driver enables higher layer software (e.g., an application) to communicate with the Device Configuration device.</p>
<p><aclass="el"href="xdevcfg_8c.html#afcaaa8ac67cf7316c54d1cba36e83e08">XDcfg_CfgInitialize()</a> API is used to initialize the Device Configuration Interface. The user needs to first call the <aclass="el"href="xdevcfg_8h.html#a33bfeb1455b8553f55d614ec46a52670">XDcfg_LookupConfig()</a> API which returns the Configuration structure pointer which is passed as a parameter to the <aclass="el"href="xdevcfg_8c.html#afcaaa8ac67cf7316c54d1cba36e83e08">XDcfg_CfgInitialize()</a> API.</p>
<p><b>Interrupts</b> The Driver implements an interrupt handler to support the interrupts provided by this interface.</p>
<p><b> Threads </b></p>
<p>This driver is not thread safe. Any needs for threads or thread mutual exclusion must be satisfied by the layer above this driver.</p>
<p><b> Asserts </b></p>
<p>Asserts are used within all Xilinx drivers to enforce constraints on argument values. Asserts can be turned off on a system-wide basis by defining, at compile time, the NDEBUG identifier. By default, asserts are turned on and it is recommended that users leave asserts on during development.</p>
<p><b> Building the driver </b></p>
<p>The <aclass="el"href="struct_x_dcfg.html">XDcfg</a> driver is composed of several source files. This allows the user to build and link only those parts of the driver that are necessary.</p>