Zynq 7000 TRM
Zynq 7000 TRM
Notice of Disclaimer The information disclosed to you hereunder (the Materials) is provided solely for the selection and use of Xilinx products. To the maximum extent permitted by applicable law: (1) Materials are made available "AS IS" and with all faults, Xilinx hereby DISCLAIMS ALL WARRANTIES AND CONDITIONS, EXPRESS, IMPLIED, OR STATUTORY, INCLUDING BUT NOT LIMITED TO WARRANTIES OF MERCHANTABILITY, NON-INFRINGEMENT, OR FITNESS FOR ANY PARTICULAR PURPOSE; and (2) Xilinx shall not be liable (whether in contract or tort, including negligence, or under any other theory of liability) for any loss or damage of any kind or nature related to, arising under, or in connection with, the Materials (including your use of the Materials), including for any direct, indirect, special, incidental, or consequential loss or damage (including loss of data, profits, goodwill, or any type of loss or damage suffered as a result of any action brought by a third party) even if such damage or loss was reasonably foreseeable or Xilinx had been advised of the possibility of the same. Xilinx assumes no obligation to correct any errors contained in the Materials or to notify you of updates to the Materials or to product specifications. You may not reproduce, modify, distribute, or publicly display the Materials without prior written consent. Certain products are subject to the terms and conditions of the Limited Warranties which can be viewed at http://www.xilinx.com/warranty.htm; IP cores may be subject to warranty and support terms contained in a license issued to you by Xilinx. Xilinx products are not designed or intended to be fail-safe or for use in any application requiring fail-safe performance; you assume sole risk and liability for use of Xilinx products in Critical Applications: http://www.xilinx.com/warranty.htm#critapps. Copyright 20122013 Xilinx, Inc. Xilinx, the Xilinx logo, Artix, ISE, Kintex, Spartan, Virtex, Zynq, and other designated brands included herein are trademarks of Xilinx in the United States and other countries. CPRI is a trademark of Siemens AG. PCI, PCI Express, PCIe, and PCI-X are trademarks of PCI-SIG. All other trademarks are the property of their respective owners.
Revision History
The following table shows the revision history for this document. Change bars indicate the latest revisions. Date
04/08/2012 06/25/2012
Version
1.0 1.1 Xilinx initial release.
Revision
Removed Chapter 30, Board Design (now part of UG933, Zynq-7000 All Programmable SoC PCB Design and Pin Planning Guide).
www.xilinx.com
Date
08/08/2012
Version
1.2
Revision
Added information about the 7z010 CLG225 device and references to section 2.5.4 MIO-at-a-Glance Table throughout document. Added section headings 1.1.1 Block Diagram and 1.1.2 Documentation Resources, added sections 1.1.3 Notices and TrustZone Capabilities, and clarified PS MIO I/Os in Chapter 1. Updated Table 2-1. Changed 2.4.2 MIO-EMIO Connections heading to 2.5.2 IOP Interface Connections and clarified first paragraph. Updated Table 2-4. Added section 2.7.1 Clocks and Resets and Table 2-7, and updated Table 2-13 PS MIO I/Os in Chapter 2. Added note under Branch Prediction and Table 3-8 in Chapter 3. Updated Table 4-1 in Chapter 4. Added section 5.1.7 Read/Write Request Capability in Chapter 5. Updated NAND MIO pin assignments and Table 6-6 in Chapter 6. Updated section 7.2 Functional Description in Chapter 7. Added section heading 10.1.1 Features and added section 10.1.3 Notices in Chapter 10. Updated Parallel (SRAM/NOR) Interface features list and added section 11.1.3 Notices in Chapter 11. Reorganized, clarified, and expanded Chapter 12 to include programming models (added sections 12.1.4 Notices, 12.3 Programming Guide, and 12.5.2 MIO Programming). Added last note in section 13.3.4 Using ADMA in Chapter 13. Added Restrictions in Chapter 14. Clarified first paragraph, added section 15.1.3 Notices, and clarified Figure 15-7 through Figure 15-17 in Chapter 15. Added section 16.1.4 Notices in Chapter 16. Clarified sections 17.2.5 SPI FIFOs, 17.2.6 SPI Clocks, and 17.2.7 SPI EMIO Considerations in Chapter 17. Reorganized, clarified, and expanded Chapter 18 to include programming models (added sections 18.1.4 Notices and 18.5.1 MIO Programming). Reorganized, clarified, and expanded Chapter 19 to include programming models (added sections 19.1.3 Notices, 19.3 Programming Guide, and 19.5.1 MIO Programming). Updated Table 22-2 and Table 22-3 in Chapter 22. Added section CPU Clock Divisor Restriction in Chapter 25. Updated Table 26-4 in Chapter 26. Clarified section 27.3 I/O Signals in Chapter 27. Added section 28.1.2 Notices in Chapter 28. Clarified Mapping Summary and updated Table 29-1, Table 29-3, and Table 29-5 in Chapter 29. Added section 30.1.3 Notices in Chapter 30. Updated data sheet references in section A.3.1 Zynq-7000 AP SoC Documents of Appendix A. Updated register database in sections B.3 Module Summary through B.34 USB Controller (usb) in Appendix B. Changed product name from Extensible Processing Platform (EPP) to All Programmable SoC (AP SoC) throughout document. Added Table 1-1. Added 2.1.1 Notices, 2.4 PSPL Voltage Level Shifter Enables, 7z010 CLG225 Device Notice, VREF Source Considerations, updated Table 2-2, and added warning to 2.5.7 MIO Pin Electrical Parameters. Added Initialization of L1 Caches, 3.2.4 Memory Ordering, expanded 3.2.5 Memory Management Unit (MMU), added Cache Lockdown by Way Sequence and 3.9 CPU Initialization Sequence. Added Zynq-7000 AP SoC 7z010 CLG225 Device Notice and expanded Table 4-7. Updated and expanded tables in 6.3.4 Boot Devices through 6.3.8 Post Boot ROM State, reworked 6.3.6 Debug Status, and added 6.3.7 Accessible Addresses for Boot Image Address-Data Writes and DMA Done Status. Reworked Table 7-3. Added 8.1.2 Notices, Interrupt to PS Interrupt Controller, and Reset. Reorganized and expanded Chapter 9, DMA Controller. Added 10.1.3 Notices, expanded 10.1.6 I/O Signals, added 10.6.11 DRAM Write Latency Restriction, 10.8.1 ECC Initialization, 10.8.4 ECC Programming Model, and 10.9.1 Operating Modes. Added 12.2.4 I/O Mode Issues and updated 12.3.5 Rx/Tx FIFO Response to I/O Command Sequences. Reworked 16.3.3 I/O Configuration, added 16.4 IEEE 1588 Time Stamping and 16.6.7 MIO Pin Considerations. Added 18.2.7 CAN0-to-CAN1 Connection. Expanded 19.1 Introduction, 19.1.3 Notices, and Table 19-1. Added Receiver Timeout Mechanism, updated Figure 19-7. Added 19.2.9 UART0-to-UART1 Connection and 19.2.10 Status and Interrupts, expanded 19.2.11 Modem Control, reworked 19.3 Programming Guide and 19.4.2 Resets. Added 20.2.7 I2C0-to-I2C1 Connection. Added 21.1.2 PL Resources by Device Type, Voltage Level Shifters and reorganized content of Chapter 21, Programmable Logic Description. Added 25.7.1 Clock Throttle. Expanded 26.4.1 PL General Purpose User Resets. Updated register database in sections B.3 Module Summary through B.34 USB Controller (usb) in Appendix B.
10/30/2012
1.3
www.xilinx.com
Date
11/16/2012 03/07/2013
Version
1.4 1.5
Revision
Changed second bullet under NAND Flash Interface from Up to a 4 GB device to Up to a 1 GB device in Chapter 11, Static Memory Controller. Added 7z100 device and made minor clarifications to Chapter 1, Introduction. Made minor clarifications to Chapter 2, Signals, Interfaces, and Pins, Chapter 3, Application Processing Unit, Chapter 4, System Addresses, and Chapter 5, Interconnect. Clarified section 6.1 Introduction and other sections, and added PS Independent JTAG Non-Secure Boot section in Chapter 6, Boot and Configuration. Made minor clarifications to Chapter 7, Interrupts, Chapter 8, Timers, Chapter 9, DMA Controller, Chapter 10, DDR Memory Controller, Chapter 11, Static Memory Controller, and Chapter 12, Quad-SPI Flash Controller. Expanded 12.2 Functional Description in Chapter 12, Quad-SPI Flash Controller. Made minor clarifications to Chapter 13, SD/SDIO Controller. Made major clarifications/updates to Chapter 14, General Purpose I/O (GPIO). Reworked and expanded Chapter 15, USB Host, Device, and OTG Controllers. Made minor clarifications to Chapter 16, Gigabit Ethernet Controller. Reworked and expanded Chapter 17, SPI Controller. Made minor clarifications to Chapter 18, CAN Controller, and Chapter 19, UART Controller. Made major clarifications/updates to Chapter 20, I2C Controller (added new sections, 20.3 Programmers Guide, 20.4 System Functions, and 20.5 I/O Interface). Made minor clarifications to Chapter 21, Programmable Logic Description and added new sections 21.1.2 PL Resources by Device Type and 21.1.3 Notices. Made minor clarifications to Chapter 22, Programmable Logic Design Guide and Chapter 23, Programmable Logic Test and Debug. Reworked and expanded Chapter 24, Power Management. Made minor clarifications to Chapter 25, Clocks, Chapter 26, Reset System, Chapter 27, JTAG and DAP Subsystem, Chapter 28, System Test and Debug, and Chapter 29, On-Chip Memory (OCM). Reworked and expanded Chapter 30, XADC Interface. Made minor clarifications to Chapter 31, PCI Express. Reworked and expanded Chapter 32, Device Secure Boot. Updated Appendix A, Additional Resources. Updated register database in sections B.3 Module Summary through B.34 USB Controller (usb) in Appendix B.
www.xilinx.com
Table of Contents
Revision History . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
Chapter 1: Introduction
1.1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
1.1.1 Block Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .26 1.1.2 Documentation Resources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .27 1.1.3 Notices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .29
1.3 Programmable Logic Features and Descriptions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37 1.4 Interconnect Features and Description. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
1.4.1 PS Interconnect Based on AXI High Performance Data Path Switches. . . . . . . . . . . . . . . . . . . . . . . . . .38 1.4.2 PS-PL Interfaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .38
Power Pins. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . PS I/O Pins . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . PSPL Voltage Level Shifter Enables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . PS-PL MIO-EMIO Signals and Interfaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2.5.1 2.5.2 2.5.3 2.5.4 2.5.5 2.5.6 2.5.7
43 44 45 45
I/O Peripheral (IOP) Interface Routing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .46 IOP Interface Connections . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .47 MIO Pin Assignment Considerations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .48 MIO-at-a-Glance Table . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .51 MIO Signal Routing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .52 Default Logic Levels . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .52 MIO Pin Electrical Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .53
www.xilinx.com
3.4 L2-Cache . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91
3.4.1 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .91 3.4.2 Exclusive L2-L1 Cache Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .94 3.4.3 Cache Replacement Strategy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .95 3.4.4 Cache Lockdown . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .95 3.4.5 Enabling and Disabling the L2 Cache Controller . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .96 3.4.6 RAM Access Latency Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .97 3.4.7 Store Buffer Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .97 3.4.8 Optimizations Between Cortex-A9 and L2 Controller . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .98 3.4.9 Pre-fetching Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .99 3.4.10 Programming Model. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .100
www.xilinx.com
Chapter 5: Interconnect
5.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119
5.1.1 5.1.2 5.1.3 5.1.4 5.1.5 5.1.6 5.1.7 5.1.8 Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .119 Block Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .120 Datapaths . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .122 Clock Domains . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .123 Connectivity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .125 AXI ID . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .125 Read/Write Request Capability . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .126 Register Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .126
www.xilinx.com
6.2.3 Clock Requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .145 6.2.4 Reset Requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .145 6.2.5 Mode Pin Settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .146
Chapter 7: Interrupts
7.1 Environment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 184
7.1.1 7.1.2 7.1.3 7.1.4 7.2.1 7.2.2 7.2.3 7.2.4 Private, Shared and Software Interrupts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .185 Generic Interrupt Controller (GIC) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .185 Resets and Clocks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .185 Block Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .185 Software Generated Interrupts (SGI) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .187 CPU Private Peripheral Interrupts (PPI) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .187 Shared Peripheral Interrupts (SPI) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .188 Wait for Interrupt Event Signal (WFI) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .189
Chapter 8: Timers
8.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 193
8.1.1 System Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .194 8.1.2 Notices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .194
www.xilinx.com
www.xilinx.com
10.5 Controller PHY (DDRP) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 264 10.6 Initialization and Calibration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 265
10.6.1 DDR Clock Initialization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .265 10.6.2 DDR IOB Impedance Calibration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .266 10.6.3 DDR IOB Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .267 10.6.4 DDR Controller Register Programming . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .269 10.6.5 DRAM Reset and Initialization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .269 10.6.6 DRAM Input Impedance (ODT) Calibration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .269 10.6.7 DRAM Output Impedance (RON) Calibration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .270 10.6.8 DRAM Training . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .270 10.6.9 Write Data Eye Adjustment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .272 10.6.10 Alternatives to Automatic DRAM Training . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .272 10.6.11 DRAM Write Latency Restriction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .275
www.xilinx.com
10
www.xilinx.com
11
www.xilinx.com
12
14.3.4 Reading Data from GPIO Input Pins . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .339 14.3.5 Register Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .340
www.xilinx.com
13
15.7.1 Endpoint Queue Head Descriptor (dQH) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .379 15.7.2 Endpoint Transfer Descriptor (dTD) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .380 15.7.3 Endpoint Transfer Overlay Area . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .380
www.xilinx.com
14
www.xilinx.com
15
www.xilinx.com
16
www.xilinx.com
17
Start-up Sequence . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .562 Controller Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .562 Configure Interrupts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .563 Data Transfers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .563 Register Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .566
www.xilinx.com
18
25.2 CPU Clock . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 619 25.3 System-wide Clock Frequency Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 621
www.xilinx.com
19
25.4 Clock Generator Design . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 622 25.5 DDR Clocks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 624 25.6 IOP Clock Generator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 625
25.6.1 25.6.2 25.6.3 25.6.4 25.6.5 USB Clocks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .625 Ethernet Clocks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .626 SDIO, SMC, SPI, Quad-SPI and UART Clocks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .627 CAN Clocks. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .627 GPIO and I2C Clocks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .628
25.8 Trace Port Clock . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 632 25.9 Register Overview. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 632 25.10 Programming Model. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 633
25.10.1 25.10.2 25.10.3 25.10.4 Branch Clock Generator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .633 DDR Clocks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .634 Digitally Controlled Impedance (DCI) Clock . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .634 PLLs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .634
27.2 Functional Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 649 27.3 I/O Signals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 651 27.4 Programming Model. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 652
www.xilinx.com
20
27.4.1 Use Case I: Software Debug with Trace Port Enabled . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .652 27.4.2 Use Case II: PS and PL Debug with Trace Port Enabled . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .652
27.5 ARM DAP Controller . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 653 27.6 Trace Port Interface Unit (TPIU) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 655 27.7 Xilinx TAP Controller. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 655
www.xilinx.com
21
30.5 Programming Guide for the DRP Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 696 30.6 Programming Guide for the PL-JTAG Interface. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 696 30.7 System Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 696
30.7.1 Clocks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .696 30.7.2 Resets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .697
www.xilinx.com
22
32.3.5 JTAG and Debug Considerations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .710 32.3.6 Readback . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .711 32.3.7 Secure Boot Modes of Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .711
www.xilinx.com
23
B.25 B.26 B.27 B.28 B.29 B.30 B.31 B.32 B.33 B.34
On-Chip Memory (ocm) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Quad-SPI Flash Controller (qspi) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . SD Controller (sdio) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . System Level Control Registers (slcr) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Static Memory Controller (pl353) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . SPI Controller (SPI) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . System Watchdog Timer (swdt) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Triple Timer Counter (ttc) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . UART Controller (UART) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . USB Controller (usb) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1427 1431 1448 1489 1633 1660 1672 1676 1697 1717
www.xilinx.com
24
Chapter 1
Introduction
1.1 Overview
The Zynq-7000 family is based on the Xilinx All Programmable SoC (AP SoC) architecture. These products integrate a feature-rich dual-core ARM Cortex-A9 MPCore based processing system (PS) and Xilinx programmable logic (PL) in a single device, built on a state-of-the-art, high-performance, low-power (HPL), 28 nm, and high-k metal gate (HKMG) process technology. The ARM Cortex-A9 MPCore CPUs are the heart of the PS which also includes on-chip memory, external memory interfaces, and a rich set of I/O peripherals. The Zynq-7000 family offers the flexibility and scalability of an FPGA, while providing performance, power, and ease of use typically associated with ASIC and ASSPs. The range of devices in the Zynq-7000 AP SoC family enables designers to target cost-sensitive as well as high-performance applications from a single platform using industry-standard tools. While each device in the Zynq-7000 family contains the same PS, the PL and I/O resources vary between the devices. As a result, the Zynq-7000 AP SoC devices are able to serve a wide range of applications including: Automotive driver assistance, driver information, and infotainment Broadcast camera Industrial motor control, industrial networking, and machine vision IP and Smart camera LTE radio and baseband Medical diagnostics and imaging Multifunction printers Video and night vision equipment
The Zynq-7000 architecture conveniently maps the custom logic and software in the PL and PS respectively. It enables the realization of unique and differentiated system functions. The integration of the PS with the PL provides levels of performance that two-chip solutions (e.g., an ASSP with an FPGA) cannot match due to their limited I/O bandwidth, loose-coupling and power budgets. Xilinx and the Xilinx Alliance partners offer a large number of soft IP modules for the Zynq-7000 family. Stand-alone and Linux device drivers are available for the peripherals in the PS and the PL from Xilinx and additional OSes and board support packages (BSPs) from partners. The award-winning ISE Design Suite: Embedded Edition development environment enables a rapid product development for software, hardware, and systems engineers. Many third-party software development tools are also available.
www.xilinx.com
25
Chapter 1: Introduction
The processors in the PS always boot first, allowing a software centric approach for PL system boot and PL configuration. The PL can be configured as part of the boot process or configured at some point in the future. Additionally, the PL can be completely reconfigured or used with partial, dynamic reconfiguration (PR). PR allows configuration of a portion of the PL. This enables optional design changes such as updating coefficients or time-multiplexing of the PL resources by swapping in new algorithms as needed. This latter capability is analogous to the dynamic loading and unloading of software modules. The PL configuration data is referred to as a bitstream.
Zynq-7000 AP SoC
I/O Peripherals USB USB GigE GigE SD SDIO SD SDIO GPIO UART UART CAN CAN I2C I2C SPI SPI Memory Interfaces SRAM/ NOR ONFI 1.0 NAND Q-SPI CTRL
Processing System
Clock Generation 2x USB 2x GigE 2x SD IRQ Reset SWDT TTC System Level Control Regs MMU 32 KB I-Cache GIC DMA 8 Channel OCM Interconnect Central Interconnect CoreSight Components
MIO
EMIO
General-Purpose Ports
DMA Sync
IRQ
High-Performance Ports
ACP
Programmable Logic
SelectIO Resources
Notes: 1) Arrow direction shows control (master to slave) 2) Data flows in both directions: AXI 32bit/64bit, AXI 64bit, AXI 32bit, AHB 32bit, APB 32bit, Custom
DS190_01_030713
Figure 1-1:
www.xilinx.com
26
Chapter 1: Introduction
The Zynq-7000 AP SoC is composed of the following major functional blocks: Processing System (PS)
Application processor unit (APU) Memory interfaces I/O peripherals (IOP) Interconnect
Supplier
ARM ARM ARM ARM ARM Synopsys Synopsys Cadence Cadence Cadence Cadence Cadence Cadence Arasan r3p0
Version
r3p2-50rel0 r2p1 r1p1 r2p2 A07 2.20a Rev 07 r1p10 r1p23 r1p06 r1p08 Rev 06 8.9A_apr02nd_2010
The PL is derived from Xilinxs 7 Series FPGA technology (Artix-7 for the 7z010/7z020 and Kintex-7 for the 7z030/7z045/7z100). The PL is used to extend the functionality to meet specific application requirements. The PL includes many different types of resources including configurable logic blocks (CLBs), port and width configurable block RAM (BRAM), DSP slices with 25 x 18 multiplier, 48-bit accumulator and pre-adder (DSP48E1), a user configurable analog to digital convertor (XADC), clock management tiles (CMT), a configuration block with 256b AES for decryption and SHA for authentication, configurable SelectIO and optionally GTX multi-gigabit transceivers and integrated PCI Express (PCIe) block. To learn more about the PL resources, refer to the following Xilinx 7 Series FPGA User Guides: UG471, 7 Series FPGAs SelectIO Resources User Guide UG472, 7 Series FPGAs Clocking Resources User Guide
www.xilinx.com
27
Chapter 1: Introduction
UG473, 7 Series FPGAs Memory Resources User Guide UG474, 7 Series FPGAs Configurable Logic Block User Guide UG476, 7 Series FPGAs GTX Transceiver User Guide UG477, 7 Series FPGAs Integrated Block v1.3 for PCI Express User Guide UG479, 7 Series FPGAs DSP48E1 User Guide UG480, 7 Series FPGAs XADC User Guide
The PS and PL can be tightly or loosely coupled using multiple interfaces and other signals that have a combined total of over 3,000 connections. This enables the designer to effectively integrate user-created hardware accelerators and other functions in the PL fabric that are accessible to the processors and can also access memory resources in the processing system. The PS I/O peripherals, including the static/flash memory interfaces share a multiplexed I/O (MIO) of up to 54 MIO pins. Zynq-7000 AP SoC devices also include the capability to utilize the I/Os that are part of the PL domain for many of the PS I/O Peripherals. This is done through an extended multiplexed I/O interface (EMIO). The system includes many types of security, test and debug features. The Zynq-7000 AP SoC can be booted securely or non-securely. The PL configuration bitstream can be applied securely or non-securely. Both of these use the 256b triple-des AES decryption and SHA authentication blocks that are part of the PL. Therefore, to use these security features, the PL must be powered on. The boot process is multi-stage and minimally includes the Boot ROM and the first-stage boot loader (FSBL). The Zynq-7000 AP SoC includes a factory-programmed Boot ROM that is not user accessible. The boot ROM determines whether the boot is secure or non-secure, performs some initialization of the system and clean-ups, reads the mode pins to determine the primary boot device and finishes once it is satisfied it can execute the FSBL. After a system reset, the system automatically sequences to initialize the system and process the first stage boot loader from the selected external boot device. The process enables the user to configure the AP SoC platform as needed, including the PS and the PL. Optionally, the JTAG interface can be enabled to give the design engineer access to the PS and the PL for test and debug purposes. Power to the PL can be optionally shut off to reduce power consumption. In addition, the clocks in the PS can be dynamically slowed down or gated off to reduce power further. Zynq-7000 AP SoC devices support ARMs standby mode to obtain minimal power drain, but still are able to start up when certain events occur. Elements of the Zynq-7000 AP SoC are described from the point of view of the PS. For example, a general purpose slave interface on the PS to the PL means that the master resides in the PL. A high performance slave interface means the high performance master resides in the PL. A general purpose master interface means the PS is the master and the slave resides in the PL.
www.xilinx.com
28
Chapter 1: Introduction
1.1.3 Notices
Zynq-7000 AP SoC Device Family
The PS structure for all Zynq-7000 AP SoC devices is the same except for the following: 7z010 CLG225 Device The 7z010 CLG225 device (225 pin package) has a limited number of pins that reduces the capability of the MIO, DDR and XADC subsystems. 32 MIO pins, see section 2.5.3 MIO Pin Assignment Considerations 16 DDR data, see section 10.1.3 Notices in Chapter 10, DDR Memory Controller Four pairs of XADC signals, see Notices in Chapter 30, XADC Interface
Device Revisions
The visual markings are shown in UG865, Zynq-7000 All Programmable SoC Packaging and Pinout Advance Product Specification. Software can read the following registers in all Zynq-7000 AP SoC devices to determine silicon revision: devcfg.PS_VERSION slcr.PSS_IDCODE[IDCODE]
TrustZone Capabilities
TrustZone is hardware that is built into all Zynq-7000 AP SoC devices. The Technical Reference Manual includes TrustZone hardware descriptions. Please contact your Xilinx Sales Representative about obtaining detailed information related to operating the system in a secure mode.
www.xilinx.com
29
Chapter 1: Introduction
System Features
System-Level Control Registers (SLCRs)
A group of various registers that are used to control the PS behavior The register map is located in Chapter 4, System Addresses The SLCR registers related to a specific chapter are listed in the register overview table of that chapter and detailed in Appendix B, Register Details
Snoop control unit (SCU) to maintain L1 and L2 coherency Accelerator coherency port (ACP) from PL (master) to PS (slave)
64b AXI slave port Can access the L2 and the OCM Transactions are data coherent with L1 and L2 caches Dual ported Accessible by the CPUs, PL and central interconnect At level of L2, but is not cacheable Four channels for PS (memory copy to/from any memory in system) Four channels for PL (memory to PL, PL to memory)
DMA controller
www.xilinx.com
30
Chapter 1: Introduction
Individual interrupt masks and interrupt prioritization Five CPU-private peripheral interrupts (PPI) Sixteen CPU-private software generated interrupts (SGI) Distributes shared peripheral interrupts (SPI) from the rest of the system, PS and PL 20 from the PL Wait for interrupt (WFI) and wait for event (WFE) signals from CPU sent to PL Enhanced security features to support TrustZone technology
DDR Controller
Supports DDR3, DDR3L, DDR2, LPDDR-2
Rate is determined by speed and temperature grade of the device ECC on 16b
Autonomous DDR power down entry and exit based on programmable idle periods Data read strobe auto-calibration Write data byte enables supported for each data beat Low latency read mechanism using HPR queue Special urgent signaling to each port TrustZone regions programmable on 64 MB boundaries Exclusive accesses for two different IDs per port (locked transactions are not supported)
www.xilinx.com
31
Chapter 1: Introduction
Quad-SPI Controller
Key features of the linear Quad-SPI Controller are: Single or dual 1x and 2x read support 32-bit APB 3.0 interface for I/O mode that allows full device operations including program, read and configuration 32-bit AXI linear address mapping interface for read operations Single chip select line support Supports write protection signal Four-bit bidirectional I/O signals Read speed of x1, x2 and x4 Write speed of x1 and x4 Maximum Quad-SPI clock at master mode is 100 MHz 252-byte entry FIFO depth to improve Quad-SPI read efficiency Supports Quad-SPI device up to 128 Mb density Supports dual Quad-SPI with two quad-SPI devices in parallel
In addition, the linear address mapping mode features include: Supports regular read-only memory access through the AXI interface Up to two SPI flash memories Up to 16 MB addressing space for one memory and 32 MB for two memories AXI read acceptance capability of 4 Both AXI incrementing and wrapping-address burst read Automatically converts normal memory read operation to SPI protocol, and vice versa Serial, Dual and Quad-SPI modes
8/16-bit I/O width with one chip select signal ONFI specification 1.0 16-word read and 16-word write data FIFOs 8-word command FIFO Programmable I/O cycle timing ECC assist Asynchronous memory operating mode
www.xilinx.com
32
Chapter 1: Introduction
8-bit data bus width One chip select with up to 26 address signals (64 MB) Two chip selects with up to 25 address signals (32 MB + 32 MB) 16-word read and 16-word write data FIFOs 8-word command FIFO Programmable I/O cycle timing on a per chip select basis Asynchronous memory operating mode
GPIO
Up to 54 GPIO signals for device pins routed through the MIO
Outputs are 3-state capable 64 Inputs, 128 outputs (64 true outputs and 64 output enables) Enable, bit or bank data write, output enable and direction controls Status read of raw and masked interrupt Positive edge, negative edge, either edge, high level, low level sensitivities
The function of each GPIO can be dynamically programmed on an individual or group basis
Built-in DMA with scatter-gather IEEE 802.3-2008 and IEEE 1588 revision 2.0 Wake-on capability
www.xilinx.com
33
Chapter 1: Introduction
Built-in DMA USB 2.0 high speed device USB 2.0 high speed host controller The USB host controller registers and data structures are EHCI compatible Direct support for USB transceiver low pin interface (ULPI). The ULPI module supports 8 bits External PHY required Support up to 12 endpoints
Manual or auto start transmission of data Manual or auto slave select (SS) mode Supports up to three slave select lines Allows the use of an external peripheral select 3-to-8 decode Programmable delays for data transmission Programmable start detection mode Drives into three-state if not enabled
Slave mode
Multi-master environment
www.xilinx.com
34
Chapter 1: Introduction
Identifies an error condition if more than one master detected 25 MHz maximum via EMIO to PL SelectIO pins
Selectable master clock reference Programmable master baud rate divisor Supports 128-byte read and 128-byte write FIFOs
Programmable FIFO thresholds Supports programmable clock phase and polarity Supports manual or auto start transmission of data Software can poll for status or function as interrupt-driven Programmable interrupt generation
www.xilinx.com
35
Chapter 1: Introduction
Parity, framing and overrun error detection Line-break generation and detection Automatic echo, local loopback, and remote loopback channel modes Interrupts generation Rx and Tx signals are on the MIO and EMIO interfaces Modem control signals: CTS, RTS, DSR, DTR, RI, and DCD are available on the EMIO interface
Write transfer Read transfer Extended address support Support HOLD for slow processor service Supports TO interrupt flag to avoid stall condition
Slave transmitter Slave receiver Extended address support Fully programmable slave response address Supports HOLD to prevent overflow condition Supports TO interrupt flag to avoid stall condition
Software can poll for status or function as interrupt-driven device Programmable interrupt generation
PS MIO I/Os
The PS MIO I/O buffers are split into two voltage domains. Within each domain, each MIO is independently programmable. Two I/O voltage banks
Bank 0 voltage bank consists of pins 0:15 Bank 1 voltage bank consists of pins 16:53 1.8 and 2.5/3.3 volts
www.xilinx.com
36
Chapter 1: Introduction
6-input look-up tables (LUTs) Memory capability within the LUT Register and shift register functionality Cascadeable adders Dual port Up to 72-bits wide Configurable as dual 18 Kb Programmable FIFO logic Built-in error correction circuitry 25 18 two's complement multiplier/accumulator high-resolution (48 bit) signal processor Power saving 25-bit pre-adder to optimize symmetrical filter applications Advanced features: optional pipelining, optional ALU, and dedicated buses for cascading High-speed buffers and routing for low-skew clock distribution Frequency synthesis and phase shifting Low-jitter clock generation and jitter filtering High-performance SelectIO technology High-frequency decoupling capacitors within the package for enhanced signal integrity Digitally controlled impedance that can be 3-stated for lowest power, high-speed I/O operation High range (HR) IOs support 1.2 V to 3.3 V High performance (HP) IOs support 1.2 V to 1.8 V (7z030, 7z045, and 7z100 devices) High-performance transceivers capable of up to 12.5 Gb/s (GTX) Low-power mode optimized for chip-to-chip interfaces Advanced transmit pre- and post-emphasis, and receiver linear (CTLE) and decision feedback equalization (DFE), including adaptive equalization for additional margin
36 Kb block RAM
Clock management
Configurable I/Os
www.xilinx.com
37
Chapter 1: Introduction
Dual 12-bit 1 MSPS analog-to-digital converters (ADCs) Up to 17 flexible and user-configurable analog inputs On-chip or external reference option On-chip temperature (4C max error) and power supply (1% max error) sensors Continuous JTAG access to ADC measurements Compatible to the PCI Express base specification 2.1 with Endpoint and Root Port capability Supports Gen1 (2.5 Gb/s) and Gen2 (5.0 Gb/s) speeds Advanced configuration options, advanced error reporting (AER), and end-to-end CRC (ECRC) advanced error reporting and ECRC features
Integrated interface blocks for PCI Express designs (7z030, 7z045, and 7z100 devices)
Provides access to the 256 KB memory from the central interconnect and the PL CPUs and ACP interfaces have the lowest latency access to OCM via the SCU The central interconnect is 64-bits, connecting the IOP and DMA controller to the DDR memory controller, on-chip RAM, and the AXI_GP interfaces (via their switches) for the PL logic Connects the local DMA units in the Ethernet, USB and SD/SDIO controllers to the central interconnect Connects masters in the PS to the IOP
Central interconnect
www.xilinx.com
38
Chapter 1: Introduction
2.
Configuration signals which include the processor configuration access port (PCAP), configuration status, single event upset (SEU) and Program/Done/Init. These signals are connected to fixed logic within the PL configuration block, providing PS control.
One 64-bit cache coherent master port in the PL Connects to the snoop control unit for cache coherency between the CPUs and the PL 32-bit or 64-bit data master interfaces (independently programmed) Efficient resizing in 32-bit slave interface configuration mode Efficient upsizing to 64-bits for aligned 32-bit transfers in 32-bit slave interface configuration mode Automatic expansion to 64-bits for unaligned 32-bit transfers in 32-bit slave interface configuration mode Dynamic command upsizing translation between 32-bit and 64-bit interfaces, controllable via AxCACHE[1] Separate R/W programmable issuing capability for read and write commands Programmable release threshold of write commands Asynchronous clock frequency domain crossing for all AXI interfaces between the PL and PS Smoothing out of long-latency transfers using 1 KB (128 by 64 bit) data FIFOs for both reads and writes QoS signaling available from PL ports Command and data FIFO fill-level counts available to the PL Standard AXI 3.0 interfaces supported Large slave interface read acceptance capability in the range of 14 to 70 commands (burst length dependent) Large slave interface write acceptance capability in the range of 8 to 32 commands (burst length dependent) Two, 32-bit master interfaces Two, 32-bit slave interfaces Asynchronous clock frequency domain crossing for all AXI interfaces between the PL and PS Standard AXI 3.0 interfaces supported
www.xilinx.com
39
Chapter 1: Introduction
www.xilinx.com
40
Chapter 2
2.1.1 Notices
7z010 CLG225 Device
This device supports 32 MIO pins and at most one Ethernet interface through the MIO pins. This is shown in the MIO table in 2.5.4 MIO-at-a-Glance Table. One or both of the Ethernet controllers can interface to logic in the PL.
www.xilinx.com
41
USB Quad-SPI NAND, NOR/SRAM DDR Arb, AXI Idle, SRAM Int FTMD Trace, FTMT Trigs
MIO Pins, EMIO Signals, JTAG GigE, SDIO, SPI, I2C, CAN, UART, GPIO, TTC, SWDT
PS Power Pins
Boot Mode
PL Power Pins
UG585_c2_01_021413
Figure 2-1:
www.xilinx.com
42
Nominal Voltage
1.0V 1.8V 1.2V to 1.8V 1.8V to 3.3V 1.8V to 3.3V 1.8V 1.0V 1.8V 1.8V to 3.3V 1.5V 1.0V 1.8V to 2.0V N/A Ground Internal logic
www.xilinx.com
43
Warning: For MIO pins, the allowable Vin High level voltage depends on the settings of the
slcr.MIO_PIN_xx[IO_Type] and [DisableRcvr] bits. These restrictions and the restrictions for all I/O pins are defined in the Zynq-7000 AP SoC data sheets. Damage to the input buffer can occur when the limits are exceeded. PS Signal Pins Name Type
I I I I/O I/O Ref I/O N/A
7z010 Zynq-7000 CLG225 Family Voltage Node Pin Count Pin Count
1 1 1 16 32 1 73 2 1 1 1 16 16 0 51 1 VCCO_MIO0 VCCO_MIO0 VCCO_MIO1 VCCO_MIO0 VCCO_MIO1 VCCO_MIO1 VCCO_DDR ~
Description
System reference clock. See Chapter 25, Clocks. Power on reset, active low. See Chapter 26, Reset System. Debug system reset, active Low. Forces the system to enter a reset sequence. See Chapter 26, Reset System. Refer to section 2.5 PS-PL MIO-EMIO Signals and Interfaces and UG865 Zynq-7000 AP SoC Package and Pinout Guide. Voltage reference for RGMII differential input receivers, refer to UG933, Zynq-7000 AP SoC PCB Design and Pin Planning Guide. See Chapter 10, DDR Memory Controller. DDR DCI voltage reference pins, refer to UG933, Zynq-7000 AP SoC PCB Design and Pin Planning Guide . Voltage reference for DDR DQ and DQS differential input receivers, refer to UG933, Zynq-7000 AP SoC PCB Design and Pin Planning Guide.
PS_CLK PS_POR_B
DDR
PS_DDR_VREF
Ref
www.xilinx.com
44
Note: Functionally, there is no reason to enable the voltage level shifters until the PL is fully
configured. The PS does not allow the voltage level shifters to be enabled until the PL global signal, GHIGH, is High. The PL is fully programmed when the PL DONE signal is High. Both GHIGH and DONE are tracked as interrupts in the DevC subsystem.
www.xilinx.com
45
EMIO
Interface
PS PL
PL
AHB Masters
PL User Pins
AHB Slaves
APB Slaves
MIO Multiplexer
UG585_c2_02_101612
Figure 2-2:
MIO-EMIO Overview
Peripheral
TTC [0,1] SWDT SMC Quad-SPI [0,1] SDIO [0,1] GPIOs
EMIO Routing
Clock In, Wave Out. Three pairs of signals from each counter. Clock In, Reset Out Not available Not available 25 MHz 64 GPIO channels with input, output, 3-state control (GPIO banks 2 and 3)
Cross Reference
See Chapter 8, Timers See Chapter 8, Timers See Chapter 11, Static Memory Controller See Chapter 12, Quad-SPI Flash Controller See Chapter 13, SD/SDIO Controller See Chapter 14, General Purpose I/O (GPIO)
www.xilinx.com
Device Boundary
PS MIO Pins
46
Table 2-3:
Peripheral
USB [0,1] Ethernet [0,1] SPI [0,1] CAN [0,1] UART [0,1] I2C [0,1] PJTAG Trace Port IU Notes:
EMIO Routing
Not available MII/GMII (1) Available Available TX, RX, DTR, DCD, DSR, RI, RTS and CTS SCL, SDA {0, 1} TCK, TMS, TDI, TDO, 3-state for TDO Up to 32-bit data
Cross Reference
See Chapter 15, USB Host, Device, and OTG Controllers See Chapter 16, Gigabit Ethernet Controller See Chapter 17, SPI Controller See Chapter 18, CAN Controller See Chapter 19, UART Controller See Chapter 20, I2C Controller See Chapter 27, JTAG and DAP Subsystem See Chapter 28, System Test and Debug
1. When the Ethernet MII/GMII interface is routed through EMIO, other MII interfaces (e.g., RMII, RGMII, and SGMII) can be derived using appropriate shim logic in the PL that attaches to PL pins.
www.xilinx.com
47
WAVE_OUT
SWDT
TTC 1, 0
IOPs PS
S
AHB 32 APB AHB 32 APB
MIO
MIO [0]
USB 0
to EMIO
USB 1
MIO [1]
Boot Devices PLL VMODE
Central Interconnect
AXI 32
GigE 0
RGMII 0
MIO [2]
RGMII 1
GigE 1
MIO [6]
S S
SDIO 0
SDIO 0 SDIO 1
AHB 32
MIO [7]
SDIO 1
to EMIO QSPI 0
Slave Interconnect
AXI 32
M S M M
MIO [8]
APB
Quad SPI 0
QSPI 1
MIO [9]
APB
SMC
MIO [10]
M M
APB
GPIO
MIO [51]
Slave
AXI 32
M S M M M
MIO [52]
MIO [53]
Dervice Boundary
EMIO
UG585_c2_03_071012
www.xilinx.com
48
Interface Frequencies: The clocking frequency for an interface usually depends on device speed grade and whether the interface is routed via MIO or EMIO. The possible routing paths for each interface are listed in Table 2-3, page 46. The maximum clock frequency that can be used for each speed grade and routing path are defined in the Zynq-7000 AP SoC data sheets. Two MIO Voltage Banks: The MIO pins are split across two independently configured sets of I/O buffers: Bank 0, MIO[15:0] and Bank 1, MIO[53:16]. The signalling voltage is initially configured using the VMODE boot mode strapping pins. Each bank can be configure for 1.8V signalling or 2.5V/3.3V. Boot Mode Strapping Pins: These pins can be assigned to I/O peripherals in addition to functioning as boot mode pins. MIO pins [8:2], define the boot device, the initial PLL clock bypass mode, and the voltage mode (VMODE) for the MIO banks. The strapping pins are sampled a few PS_CLK clock cycles after the PS_POR_B reset signal de-asserts. The board design ties these signals to VCC or ground using 20 K pull-up and pull-down resisters. More information about the boot mode pin settings is provided in Chapter 6, Boot and Configuration. I/O Buffer Output Enable Control: The output enable for each MIO I/O buffer is controlled by a combination of the setting of the three-state override control bit, the selected signal type (input-only or not), and the state of the peripheral controller. The three-state override bit can be controlled from either of two places: the slcr.MIO_PIN[TRI_ENABLE] register bit or the slcr.MIO_MST_TRI register bits. These bits control the same flip-flop to help control the three-state signal of the I/O buffer. The I/O buffer output is enabled when the three-state flip-flop control = 0 and the signal is an output-only or the I/O peripheral desires to drive a signal configured as I/O. Boot from SD Card: The BootROM expects the SD card to be connected to MIO pins 40 through 45 (SDIO 0 interface). Static Memory Controller (SMC) Interface: Only one SMC memory interface can be used in a design. The SMC controller consumes many of the MIO pins and neither of the SMC memory interfaces can be routed to the EMIO. For example, if an 8-bit NAND Flash is implemented, then Quad-SPI, is not available and the test port is limited to 8-bits. If a 16-bit NAND Flash is implemented, then additional pins are consumed. Ethernet 0 is not available. The SRAM/NOR interface consumes up to 70% of the MIO pins, eliminating Ethernet and USB 0. The SRAM/NOR upper address pins are optional, as appropriate for the attached device. Also note that the SMC interface straddles the two MIO voltage banks. Quad-SPI Interface: The lower memory Quad-SPI interface (QSPI_0) must be used if the Quad-SPI memory subsystem is to be used. The upper interface (QSPI_1) is optional and is only used for a two-memory arrangement (parallel or stacked). Do not use the Quad-SPI 1 interface alone. MIO Pins [8:7] are Outputs: These MIO pins are available as output only. GPIO channels 7 and 8 can only be configured as outputs. MIO Pins in 7z010 CLG225 Device: This device has 32 MIO pins, 0:15, 28:39, 48, 49, 52, and 53. All other Zynq-7000 AP SoC devices include all 54 MIO pins and all devices have the same EMIO interface functionality. Refer to section 1.1.3 Notices. The 32 MIO pins available in the 7z010 CLG225 device restrict the functionality of the PS:
www.xilinx.com
49
Either one USB or one Ethernet controller via MIO No boot from SD Card No NOR/SRAM interfacing Width of NAND Flash limited to 8 bits
www.xilinx.com
50
MIO Bank 1
1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 2 3 3 3 3 3 3 3 3 3 3 4 4 4 4 4 4 4 4 4 4 5 5 5 5 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3
Pins not available in 7z010 CLG225. Not in CLG225.
The 20k ohm Boot Mode pull-up/down resistors tx are sampled at Reset.
Ethernet 0
tx data tx rx ctl ck rx data rx tx ctl ck
Ethernet 1
tx data tx rx ctl ck rx data rx ctl
MDIO ck d
ck
Quad SPI 0
cs cs io io io io s 1 0 0 1 2 3 clk
Quad SPI 1
fb s io io io io ck clk 0 1 2 3 1, 0 da st nx dir ta p t
USB 0
data ck data da st nx dir ta p t
USB 1
data ck data
SPI SDIO
SPI 1 SDIO 1
SPI 0 SDIO 0
SPI 1 SDIO 1
SPI 0 SDIO 0
SPI 1 SDIO 1
SPI 0 SDIO 0
SPI 1 SDIO 1
mo mi ss ss ss mi ss ss ss mo mo mi ss ss ss mi ss ss ss mo mo mi ss ss ss mi ss ss ss mo mo mi ss ss ss ck ck ck ck ck ck ck si so 0 1 2 so 0 1 2 si si so 0 1 2 so 0 1 2 si si so 0 1 2 so 0 1 2 si si so 0 1 2 1, 0 c c c c c c c io io io io io io io io io io io io io io io io io io io io io io io io io io io io ck m ck m ck m m ck m ck m ck m ck 0 1 2 3 0 1 2 3 0 1 2 3 0 1 2 3 0 1 2 3 0 1 2 3 0 1 2 3 d d d d d d d
SD Card Detect and Write Protect are available in any of the shaded positions in any combination of the four signals.
0 1 2 3 4 5 6 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53
SD Card Power Controls are available on an odd/even pin basis that corresponds to SDIO controllers 0 and 1.
0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1
0 1 2 3 4 5 6 7 8 9
1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 2 3 3 3 3 3 3 3 3 3 3 4 4 4 4 4 4 4 4 4 4 5 5 5 5 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3
rx tx rx tx tx rx tx rx rx tx tx rx rx tx tx rx rx tx tx rx rx tx tx rx rx tx tx rx rx tx tx rx rx tx tx rx rx tx tx rx rx tx tx rx
CAN
0 1
tx rx
CAN External Clocks are optionally available on any pin in any combination
rx tx tx rx ck d ck d
rx tx tx rx ck d ck d w ck w ck
rx tx tx rx ck d ck d
rx tx tx rx ck d ck d
rx tx tx rx ck d ck d w ck w ck
rx tx tx rx ck d ck d
rx tx tx rx ck d ck d
rx tx tx rx ck d ck d w ck w ck
rx tx tx rx ck d ck d
rx tx tx rx ck d ck d
ck r
ck r
ck r ck r
GPIOs are available for each MIO pin. Pins 0 ~ 31 are controlled by GPIO bank 0. Pins 32 ~ 53 are controlled by GPIO bank 1.
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 t t t t t t t t t t t t t t t t PJTAG Interface di do ck ms di do ck ms di do ck ms di do ck ms ck ctl 8 9 10 11 12 13 14 15 2 3 0 1 4 5 6 7 2 3 ck ctl 0 1
www.xilinx.com
51
Level 3 Muxing
0 1 2 3 4 5 6 7 Input Tie-Offs To Program Muxing Levels, refer to the select fields in Registers MIO_PIN_[53:00] EMIO Other MIO Pins
Controller Outputs
Level 2 Muxing
Controller Outputs
0 1 2 3
Level 1 Muxing
Controller Output
0 1
Level 0 Muxing
Notice: Not all mux inputs are populated with controller outputs.
UG585_c2_04_042312
Figure 2-4:
Any of the MIO pins can be programmed to be an external CAN controller reference clock using the CAN_MIOCLK_CTRL register.
www.xilinx.com
52
The default input signal logic levels are designed to be benign to the I/O peripheral. As a precaution, the related peripheral core should also be disabled when not in use. The logic levels are shown in the signal tables in each chapter for each I/O peripheral.
X-Ref Target - Figure 2-5
EMIO Inputs
MIO Pins
0 1
Figure 2-5:
Selections
LVCMOS (18, 25, 33), HSTL Enable, Disable Fast, Slow Enable, Disable Enable, Disable
Comments
Selects the drive and receiver type Enable when IO_Type = HSTL Selects edge rate for all I/O types Enables 3-state for all I/O types Enables pull-up for all I/O types
www.xilinx.com
53
WARNING! The allowable Vin High level voltage depends on the settings of the
slcr.MIO_PIN_xx[IO_Type] and [DisableRcvr] bits. The restrictions are defined in the Zynq-7000 AP SoC data sheets. Damage to the input buffer can occur when the limits are exceeded.
Note: The PL level shifters must be enabled via LVL_SHFTR_EN before PL logic communication can
occur, refer to section 2.7.1 Clocks and Resets. PL AXI Interfaces Interface Description
General Purpose (AXI_GP) General Purpose (AXI_GP) Accelerator Coherency Port, cache-coherent transaction (ACP) High Performance ports (AXI_HP) with read/write FIFOs and two dedicated memory ports on DDR controller and a path to the OCM. The AXI_HP interfaces are known also as AFI.
Master
PS PS PL PL PL PL PL PL PL
Slave
PL PL PS PS PS PS PS PS PS
Signals
Chapter 5, Interconnect has a section to describe each of these interfaces. The AXI signals are listed individually in section 5.6 PS-PL AXI Interface Signals. The AXI_ACP interface is also described in multiple places in Chapter 3, Application Processing Unit, including section 3.5.1 PL Co-processing Interfaces. The PS interconnect is shown in Figure 5-1.
www.xilinx.com
54
PS-PL signal groups are identified in Table 2-7. Table 2-7: PS-PL Signal Groups Signal Name
FCLKx IRQF2Px and IRQP2Fx EVENTx FPGA, DDR, EMIO DMACx EMIOx
Reference
2.7.1 Clocks and Resets 2.7.2 Interrupt Signals 2.7.3 Event Signals 2.7.4 Idle AXI, DDR Urgent/Arb, SRAM Interrupt Signals 2.7.5 DMA Req/Ack Signals Table 2-3
Note: The PL level shifters must be enabled via the slcr.LVL_SHFTR_EN register before PL logic
communication can occur, refer to section 2.7.1 Clocks and Resets.
Note: There is no guaranteed timing relationship between any of the four PL clocks and between
any of the other PS-PL signals. Each clock is independently programmed and operated. The FCLKCLKTRIGN[3:0] signals are currently not supported. They must be tied to ground in the PL. The FCLK clocks are described in Chapter 25, Clocks.
Resets
The PS reset subsystem provides four programmable reset signals to the PL. The reset signals are controlled by writing to the slcr.FPGA_RST_CTRL SLCR[FPGA[3:0]_OUT_RST] bit fields. The resets are independently programmed and are completely independent of the PL clocks and all other PS-PL signals. The PS reset subsystem is described in Chapter 26, Reset System. The PL clocks and resets are summarized in Table 2-8. Table 2-8:
PL Clocks PL Clock Throttle Control PL Resets
I/O
O I O
Reference
Chapter 25, Clocks Chapter 26, Reset System
www.xilinx.com
55
Destination
I/O
I O O O
Description
Causes one or both CPUs to wakeup from a WFE state. Asserted when one of the CPUs has executed the SEV instruction. CPU standby mode: asserted when a CPU is waiting for an event. CPU standby mode: asserted when a CPU is waiting for an interrupt.
Standby
EVENTSTANDBYWFI[1:0]
www.xilinx.com
56
Table 2-11:
PL AXI Idle, DDR Urgent/Arb and SRAM Interrupt Signals PL Signal Name
FPGAIDLEN DDRARB[3:0] EMIOSRAMINTIN
Type
Idle PL AXI interfaces DDR Urgent Signal SRAM
I/O
I I I
Destination
Central interconnect clock disable logic DDR memory controller
Reference
PL Signal Name
DMA[3:0]ACLK DMA[3:0]DRREADY DMA[3:0]DRVALID DMA[3:0]DRTYPE[1:0] DMA[3:0]DRLAST DMA[3:0]DAREADY DMA[3:0]DAVALID DMA[3:0]DATYPE[1:0]
I/O
I O I I I I O O
Reference
9.2.7 PL Peripheral Request Interface
Request
Acknowledge
Valid Type
Warning: The allowable Vin High level voltages are defined in the Zynq-7000 AP SoC data sheets.
Damage to the input buffer can occur when the limits are exceeded.
www.xilinx.com
57
Type
I/O I O I I I I I I I/O I/O I I I
Description
Most user I/O pins are capable of differential signaling and can be implemented as pairs. The top and bottom I/O pins are always single ended. Differential receive and transmit ports. Multi-Gigabit Serial Transceiver pins. Four transceivers are available in the Zynq-7000 AP SoC 7z030 device and 16 in the 7z045 and 7z100 devices. 1.0V analog power-supply pin for receiver and transmitter internal circuits. 1.2V analog power-supply pin for the transmit driver. 1.8V auxiliary analog Quad PLL voltage supply for the transceivers. Positive differential reference clock for the transceivers. Negative differential reference clock for the transceivers. Precision reference resistor pin for internal calibration termination. See Chapter 27, JTAG and DAP Subsystem. Refer to the 7-series documentation. Pre-configuration I/O standard type for the dedicated configuration bank 0. Active Low input enables internal pull-ups during configuration on all SelectIO pins. Dedicated differential analog inputs.
MGTAVTT_G# MGTVCCAUX_G# MGTREFCLK0/1P MGTREFCLK0/1N MGTAVTTRCAL MGTRREF PL_TCK, PL_TMS, PL_TDI, PL_TDO DONE, INIT_B, PROGRAM_B
PL JTAG
Configuration
XADC
N/A Reference input (1.25V) and ground. I 16 differential auxiliary analog inputs. Clock capable I/Os driving BUFRs, BUFIOs, BUFGs and MMCMs/PLLs. In addition, these pins can drive the BUFMR for multi-region BUFIO and BUFR support. These pins become regular user I/Os when not needed as a clock. Clock capable I/Os driving BUFRs, BUFIOs and MMCMs/PLLs. These pins become regular user I/Os when not needed for clocks. Four memory byte groups. DDR DQS strobe pin that belongs to the memory byte group T0-T3. Temperature-sensing diode pins. Tie to VCCO. Tie to ground.
Multi-function
I I I I I I
Temperature Reserved
www.xilinx.com
58
Chapter 3
www.xilinx.com
59
APU
CPUs
Snoopable Data buffers and caches
L1 Cache Line Updates
SCU
Tag RAM
M0
Cacheable and Noncacheable Accesses
M1 System Interconnect
S OCM M0
Tag RAM
L2 Cache
Data RAM
M1
DDR
System Interconnect
UG585_c3_01_100812
Figure 3-1:
ARM architecture supports multiple operating modes including supervisor, system, and user modes to provide different levels of protection at the application level. The architecture support for TrustZone technology helps to create a secure environment to run applications and protect their contents. TrustZone built into the ARM CPU processor and many peripherals enable a secure system to handle keys, private data, and encrypted information without allowing these secrets to leak to non-trusted programs or users. The APU contains a 32-bit watchdog timer and a 64-bit global timer with auto-decrement features that can be used as general-purpose timers and also as a mechanism to start up the processors from standby mode.
www.xilinx.com
60
www.xilinx.com
61
PL Fabric
M1
32-/ 64-bit
M2
32-/ 64-bit
32-/ 64-bit
ASYNC
ASYNC
DevC
Cortex-A9
NEON MMU L1 I/D Caches
Instruction Data Snoop
ASYNC
ASYNC
FIFO
FIFO
FIFO
FIFO
CPU_2x
L2 Cache
512 KB QoS
64-bit
DMA Controller
M1 CPU_2x
QoS
64-bit
M0
IOP Masters
M
IOP Slave
Reg & Data
OCM Interconnect
QoS
8 QoS
16
IOP
QoS CPU_1x
64-bit 64-bit
8
Read/Write Requests (e.g., 8 reads, 8 writes)
64-bit
On-chip RAM
256 kB
Central Interconnect
ASYNC QoS
32-bit 32-bit
ASYNC ASYNC
Clock Synchronizer
16
DDR Controller
DDR_3x 1 4
8 M1
8 M0
QoS
Quality of Service Priority Clock Domains are specified within Some Blocks
Master Interconnect
M3
M2
CPU_2x
UG585_c3_02_030712
Figure 3-2:
www.xilinx.com
62
www.xilinx.com
63
Cortex A9 Processor
Coresight Debug CoreSight Debug Access Port Profiling Monitor Block Register Rename Stage Program Trace Unit Virtual to Physical Register Pool Dual Instruction Decode Stage Branches Out of Order Multi-issue with Speculation Address Instruction Queue & Dispatch ALU Out of Order Write-back Stage 3 + 1 Dispatch Stage ALU/MUL
Coresight Trace
FPU/NEON
Instruction Queue
Prediction Queue
Instruction Cache
Instruction Interface
Data Interface
UG585_c3_04_030712
Figure 3-3:
Cortex A9 Architecture
Pipeline
The pipeline implemented in the Cortex-A9 CPU employs advanced fetching of instructions and branch prediction that decouples the branch resolution from potential memory latency-induced instruction stalls. In the Cortex-A9 CPU, up to four instruction-cache lines are pre-fetched to reduce the impact of memory latency on the instruction throughput. The CPU fetch unit can continuously forward two to four instructions per cycle to the instruction decode buffer to ensure efficient superscalar pipeline utilization. The CPU implements a superscalar decoder capable of decoding two full instructions per cycle, and any of the four CPU pipelines can select instructions from the issue queue. The parallel pipelines support concurrent execution across full dual arithmetic units, load-store unit, plus resolution of any branch each cycle. The Cortex-A9 CPU employs speculative execution of instructions enabled by dynamic renaming of physical registers into an available pool of virtual registers. The CPU employs this virtual register renaming to eliminate dependencies across registers without jeopardizing the correct execution of programs. This feature allows code acceleration through an effective hardware based unrolling of
www.xilinx.com
64
loops, and increases the pipeline utilization by removing data dependencies between adjacent instructions which also indirectly reduces interrupt latency. In the Cortex-A9 CPU, dependent load-store instructions can be forwarded for resolution within the memory system to further reduce pipeline stalls. The core supports up to four data cache line fill requests that can be through automatic or user-driven pre-fetching. A key feature of this CPU is the out-of-order write back of instructions that enables the pipeline resources to be released independent of the order in which the system provides the required data. Load/store instructions can be issued speculatively before condition of instruction or a preceding branch has been resolved or before data to be written has become available. If the condition required for the execution of the load/store fails, any of the side-effects, such as the action to modify registers, are flushed.
Branch Prediction
To minimize the branch penalty in its highly pipelined CPU, the Cortex A9 implements both static and dynamic branch prediction. Static branch prediction is provided by the instructions and is decided during compilation. Dynamic branch prediction uses the outcome of the previous executions of a specific branch to determine whether the branch should be taken or not. The dynamic branch prediction logic employs a global branch history buffer (GHB) which is a 4096-entry table holding 2-bit prediction information for specific branches and is updated every time a branch gets executed. The branch execution and the overall instruction throughput also benefit greatly from the implementation of a branch target address cache (BTAC) which holds the target addresses of the recent branches. This 512-entry address cache is organized as 2-way 256 entries and provides the target address for a specific branch to the pre-fetch unit before the actual target address is generated based on the calculation of the effective address and its translation to the physical address. Additionally, if an instruction loop fits in four BTAC entries, instruction cache accesses are turned off to lower power consumption.
Note: Both GHB and BTAC RAMs implement parity for protection; however, this support has limited
diagnostic value. Corruption in GHB data or BTAC data does not generate functional errors in the Cortex-A 9 processor. Corruption in GHB data or BTAC data results in a branch misprediction, that is, detected and corrected when the branch gets executed. The Cortex-A9 CPU can predict conditional branches, unconditional branches, indirect branches, PC-destination data-processing operations, and branches that switch between ARM and Thumb states. However, the following branch instructions are not predicted: Branches that switch between states (except ARM to Thumb transitions, and Thumb to ARM transitions). Instructions with the S suffix are not predicted as they are typically used to return from exceptions and have side effects that can change privilege mode and security state. All mode-changing instructions.
Users can enable program flow prediction by setting the Z bit in the CP15 c1 Control register to 1 . Refer to the System Control Register in the ARM Cortex-A9 Technical Reference Manual (see Appendix A, Additional Resources). Before switching the program flow prediction on, a BTAC flush operation must be performed which has the additional effect of setting the GHB into a known state.
www.xilinx.com
65
Cortex-A9 also employs an 8-entry return stack cache that holds the 32-bit subroutine return addresses. This feature greatly reduces the penalty of executing subroutine calls and can address nested routines up to eight levels deep.
Note: The application processing unit (APU), and the PS as a whole, support only little-endian
architecture for both instruction and data.
The Cortex-A9 includes a program trace module that provides ARM CoreSight technology compatible program-flow trace capabilities for either of the Cortex-A9 processors and provides full visibility into the processor's actual instruction flow. The Cortex-A9 PTM includes visibility over all code branches and program flow changes with cycle-counting enabling profiling analysis. The PTM block in conjunction with the CoreSight Design Kit provides the software developer the ability to non-obtrusively trace the execution history of multiple processors and either store this, along with time stamped correlation, into an on-chip buffer, or off chip through a standard trace interface so as to have improved visibility during development and debug. The Cortex A9 processor also implements program counters and event monitors that can be configured to gather statistics on the operation of the processor and the memory system.
www.xilinx.com
66
Each cache can be disabled independently, using the system control coprocessor. Refer to the System Control Register in the ARM Cortex-A9 Technical Reference Manual . The cache line lengths for both L1 caches are 32 bytes. Both caches are 4-way set-associative. L1 caches support 4 KB, 64 KB, 1 MB, and 16 MB virtual memory page. Neither of the two L1 caches supports the lock-down feature. The L1 caches have 64-bit interfaces to the integer core and AXI master ports. Cache replacement policy is either pseudo round-robin or pseudo random. The victim counter is read at time of miss, not allocation and it is incremented on allocation. An invalid line in the set is replaced in preference to using the victim counter. On a cache miss, critical word first filling of the cache is performed. To reduce power consumption, the number of full cache reads is reduced by taking advantage of the sequential nature of many cache operations. If a cache read is sequential to the previous cache read, and the read is within the same cache line, only the data RAM set that was previously read is accessed. Both L1 caches support parity. All memory attributes are exported to external memory systems. Support for TrustZone security exports the secure or non-secure status to the caches and memory system. Upon reset, the contents of both L1 caches are cleared to comply with security requirements
Note: The user must invalidate the instruction cache, the data cache, and BTAC before using them.
It is not required to invalidate the main TLB, even though it is recommended for safety reasons. This ensures compatibility with future revisions of the processor.
The L1 instruction-side cache (I-Cache) is responsible for providing an instruction stream to the Cortex-A9 processor. The L1 I-Cache interfaces directly to the pre-fetch unit which contains a two-level prediction mechanism as described in the Branch Prediction section of this chapter. The L1 instruction cache is virtually indexed and physically tagged. The L1 data-side cache (D-Cache) is responsible for holding the data used by the Cortex-A9 processor. Key features of the L1 D-Cache include: Data cache is physically indexed and physically tagged. D-Cache is non-blocking and therefore, load/store instructions can continue to hit the cache while it is performing allocations from external memory due to prior read/write misses. The data cache supports four outstanding reads and four outstanding writes. The CPU can support up to four outstanding preload (PLD) instructions. However, explicit load/store instructions have higher priority. The Cortex-A9 load/store unit supports speculative data pre-fetching which monitors sequential accesses made by program and starts fetching the next expected line before it has been requested. This feature is enabled in the cp15 Auxiliary Control register (DP bit). The pre-fetched lines can be dropped before allocation, and PLD instruction has higher priority. The data cache supports two 32-byte line-fill buffers and one 32-byte eviction buffer. The Cortex-A9 CPU has a store buffer with four 64-bit slots with data merging capability.
www.xilinx.com
67
Both data cache read misses and write misses are non-blocking with up to four outstanding data cache read misses and up to four outstanding data cache write misses being supported. The APU data caches offer full snoop coherency control utilizing the MESI algorithm. The data cache in Cortex-A9 contains local load/store exclusive monitor for LDREX/STREX synchronizations. These instructions are used to implement semaphores. The exclusive monitor handles one address only, with eight 8 words or one cache line granularity. Therefore, avoid interleaving LDREX/STREX sequences and always execute a CLREX instruction as part of any context switch. D-Cache only supports write-back/write-allocate policy. Write-through and write-back/no write-allocate policies are not implemented. L1 D-Cache offers support for exclusive operation with respect to the L2 cache. Exclusive operation implies that a cache line is valid only in L1 or L2 cache and never in both at the same time. A line-fill into L1 causes the line to be marked invalid in L2. At the same time, eviction of a line from L1 causes the line to be allocated in L2, even if it is not dirty. A line-fill into L1 from dirty L2 line forces eviction of the line to external memory. The exclusive operation, disabled by default, increases cache utilization and reduces power consumption.
Initialization of L1 Caches
Before using the L1 caches, the user must invalidate the instruction cache, the data cache, and the BTAC. It is not required to invalidate the main TLB, even though it is recommended for safety reasons. This ensures compatibility with future revisions of the processor. Steps to initialize L1 Caches: 1. Invalidate TLBs: mcr 2. p15, 0, r0, c8, c7, 0 (r0 = 0 )
3.
Invalidate Branch Predictor Array: mcr p15, 0, r0, c7, c5, 6 (r0 = 0 )
4.
Invalidate D-Cache: mcr p15, 0, r11, c7, c14, 2 (should be done for all the sets/ways)
5. 6.
Initialize MMU. Enable I-Cache and D-Cache: mcr p15, 0, r0, c1, c0, 0 (r0 = 0x1004 )
7.
Synchronization barriers: dsb isb (Allows MMU to start) (Flushes pre-fetch buffer)
www.xilinx.com
68
The only difference between Device and Strongly-ordered memory is that: A write to Strongly-ordered memory can complete only when it reaches the peripheral or memory component accessed by the write. A write to Device memory is permitted to complete before it reaches the peripheral or memory component accessed by the write.
Normal Memory
Normal memory is used to describe most parts of the memory system. All ROM and RAM devices are considered to be Normal memory. All code to be executed by the processor must be in Normal memory. Code is not architecturally permitted to be in a region of memory which is marked as Device or Strongly-ordered. The properties of Normal memory are as follows: The processor can repeat read and some write accesses. The processor can pre-fetch or speculatively access additional memory locations, with no side-effects (if permitted by MMU access permission settings). The processor does perform speculative writes.
www.xilinx.com
69
Unaligned accesses can be performed. Multiple accesses can be merged by processor hardware into a smaller number of accesses of a larger size. Multiple byte writes could be merged into a single double-word write, for example.
Memory Attributes
In addition to memory types, the ordering of accesses for regions of memory is also defined by the memory attributes. The following sub-sections discuss these attributes.
Shareability
Shareability domains define zones within the bus topology within which memory accesses are to be kept consistent (taking place in a predictable way) and potentially coherent (with hardware support). Outside of this domain, masters might not see the same order of memory accesses as inside it. The order of memory accesses takes place in these defined domains. Table 3-1 shows the different shareability options available in a Cortex A9 system: Table 3-1: Shareability Domains Abbreviation
NSH
Domain
Non-Shareable
Description
A domain consisting only of the local master. Accesses that never need to be synchronized with other cores, processors or devices. Not normally used in SMP systems. A domain (potentially) shared by multiple masters, but usually not all masters in the system. A system can have multiple inner shareable domains. An operation that affects one inner shareable domain does not affect other inner shareable domains in the system. A domain almost certainly shared by multiple masters, and quite likely consisting of several inner shareable domains. An operation that affects an outer shareable domain also implicitly affects all inner shareable domains within it. An operation on the full system affects all masters in the system; all non-shareable regions, all inner shareable regions and all outer shareable regions.
Inner Shareable
ISH
Outer Shareable
OSH
Full System
SY
Shareability only applies to Normal memory, and to Device memory in an implementation that does not include the large physical address extensions (LPAE). In an implementation that includes the LPAE Device memory is always outer shareable. For more information on LPAE, please refer to the ARM Technical Reference Manual.
Cacheability
Cacheable attributes apply only for the Normal memory type. These attributes provide a mechanism of coherency control with masters that lie outside the shareability domain of a region of memory. Each region of Normal memory is assigned a cacheable attribute that is one of: Write-back cacheable Write-through cacheable Non-cacheable
www.xilinx.com
70
Please go through the Cache Policies of ARM architecture, for information on these attributes. The Cortex-A9 CPU also provides independent cacheability attributes for Normal memory for two conceptual levels of cache, the inner and the outer cacheable. Inner refers to the innermost caches, and always includes the lowest level of cache i.e. L1 Cache. Outer cache refers to L2 Cache. No cache controlled by the inner cacheability attributes can lie outside a cache controlled by the outer cacheability attributes.
Memory Barriers
A memory barrier is an instruction or sequence of instructions that forces synchronization events by a processor with respect to retiring load/store instructions. Cortex A9 CPU requires three explicit memory barriers to support the memory order model. They are: Data memory barrier Data synchronization barrier Instruction synchronization barrier
These barriers provide the functionality to order and complete load/store instructions. This also helps in context synchronization.
Here, the order of memory accesses seen by the other processor might not be the order that appears in the program, for either loads or stores. The addition of barriers ensures that the observed order of both the reads and the writes allow transfer of data correctly. P1: STR R5, [R1] ; set new data
www.xilinx.com
71
DMB
; ensure that all observers see data before the flag ; send flag indicating data ready
WAIT ([R2]==1) ; wait on flag DMB ; ensure that the load of data is after the flag has been observed
www.xilinx.com
72
The following rules apply when a physical memory location is accessed with mismatched attributes: 1. When a memory location is accessed with mismatched attributes the only software visible effects are one or more of the following:
Uni-processor semantics for reads and writes to that memory location might be lost. This means: A read of the memory location by a thread of execution might not return the value most recently written to that memory location by that thread of execution. Multiple writes to the memory location by a thread of execution, which use different memory attributes, might not be ordered in program order.
There might be a loss of coherency when multiple threads of execution attempt to access a memory location. There might be a loss of properties derived from the memory type.
2.
If the mismatched attributes for a location mean that multiple cacheable accesses to the location might be made with different shareability attributes, then coherency is guaranteed only if each thread of execution that accesses the location with a cacheable attribute performs a clean and invalidate of the location. The possible loss of properties caused by mismatched attributes for a memory location are defined more precisely if all of the mismatched attributes define the memory location as one of:
3.
Strongly-ordered memory Device memory Normal inner non-cacheable, outer non-cacheable memory.
In these cases, the only possible software-visible effects of the mismatched attributes are one or more of:
Possible loss of properties derived from the memory type when multiple threads of execution attempt to access the memory location.
www.xilinx.com
73
Possible re-ordering of memory transactions to the memory location that use different memory attributes, potentially leading to a loss of coherency or uni-processor semantics. Any possible loss of coherency or uniprocessor semantics can be avoided by inserting DMB barrier instructions between accesses to the same memory location that might use different attributes.
4.
If the mismatched attributes for a memory location all assign the same shareability attribute to the location, any loss of coherency within a shareability domain can be avoided. To do so, software must use the techniques that are required for the software management of the coherency of cacheable locations between threads of execution in different shareability domains. This means:
If any thread of execution might have written to the location with the write-back attribute, before writing to the location not using the write-back attribute, a thread of execution must invalidate, or clean, the location from the caches. This avoids the possibility of overwriting the location with stale data. After writing to the location with the write-back attribute, a thread of execution must clean the location from the caches, to make the write visible to external memory. Before reading the location with a cacheable attribute, a thread of execution must invalidate the location from the caches, to ensure that any value held in the caches reflects the last value made visible in external memory.
In all cases:
Location refers to any byte within the current coherency granule. A clean and invalidate operation can be used instead of a clean operation, or instead of an invalidate operation. To ensure coherency, all cache maintenance and memory transactions must be completed, or ordered by the use of barrier operations.
5.
If all aliases of a memory location that permit write access to the location assign the same shareability and cacheability attributes to that location, and all these aliases use a definition of the shareability attribute that includes all the threads of execution that can access the location, then any thread of execution that reads the memory location using these shareability and cacheability attributes accesses it coherently, to the extent required by that common definition of the memory attributes.
www.xilinx.com
74
fine-grained memory system control through a set of virtual-to-physical address mappings and memory attributes held in instruction and data translation look-aside buffers (TLBs). In summary, the MMU is responsible for the following operations: Checking of Virtual Address and ASID (address space identifier) Checking of domain access permissions Checking of memory attributes Virtual-to-physical address translation Support for four page (region) sizes Mapping of accesses to cache, or external memory Four entries in the main TLB are lockable
Process
TLB
Translation Tables
UG585_c3_05_102112
Figure 3-4:
www.xilinx.com
75
Translation Tables
The translation of virtual to physical addresses is based on entries in translation tables; they are often called as page tables. These contain a series of entries, each of which describes the physical address translation for part of the memory map. Translation table entries are organized by virtual address. Each virtual address corresponds to exactly one entry in the translation table. In addition to describing the translation of that virtual page to a physical page, they also provide access permissions and memory attributes for that page or block. A single set of translation tables is used to give the translations and memory attributes which apply to instruction fetches and to data reads or writes. The process in which the MMU accesses page tables to translate addresses is known as page table walking. When developing a table-based address translation scheme, one of the most important design parameters is the memory page size described by each translation table entry. MMU instances support 4 KB and 64 KB pages, a 1 MB section, and a 16 MB super-section. Using bigger page sizes means a smaller translation table. Using a smaller page size, 4 KB, greatly increases the efficiency of dynamic memory allocation and defragmentation, but it would require one million entries to span the entire 4 GB address range. To reconcile these two requirements, the Cortex-A9 Processor MMU supports multi-level page table architecture with two levels of page table: level 1 (L1) and level 2 (L2), which are discussed in the following sub-sections.
www.xilinx.com
76
14 31 24 Fault 23 23 19 18 17 16 15 13 12 IGNORE 11 10 9
8 7 6 5
Page Table
IMP
Domain
SBZ NS SBZ
TEX[2:0]
NS
nG
IMP
NS
nG
IMP
Supersection
TEX[2:0]
AP[1:0]
AP[2]
Domain
Section
AP[1:0]
AP[2]
XN
Reserved
Reserved
UG585_c3_06_1022112
Figure 3-5:
The page table entry for a section (or super-section) contains the physical base address used to translate the virtual address. Many other bits listed in the page-table entry, including the access permissions (AP) and memory region attributes TEX, cacheable (C) or bufferable (B) types are examined in the next section.
www.xilinx.com
77
31
14 13
Virtual Address
31
20 19
31
14 13
2 10
Level 1 Table
0 31 20 19 18 17
10 2 10
31
20 19
Physical Address
UG585_c3_07_102112
Figure 3-6:
www.xilinx.com
78
1 0
0 0 1
SBZ
AP
Small Page
TEX [2:0]
APX
nG
AP
UG585_c3_08_1022112
Figure 3-7:
The fields mentioned in the above page table entries are discussed in Description of Page Table Entry Fields. Figure 3-8 summarizes the address translation process when using two layers of page tables. The bits [31:20] of the virtual address are used to index into the 4096-entry L1 page table, where the base address is given by the CP15 TTB register The L1 page table entry points to an L2 page table, which contains 256 entries. Bits [19:12] of the virtual address are used to select one of those entries which then gives the base address of the page. The final physical address is generated by combining that base address with the remaining bits of the physical address.
www.xilinx.com
XN
79
31
14 13
Virtual Address
31
20 19
12 11
31
14 13
2 10
31
10 9
2 10
31
12 11
Physical Address
UG585_c3_09_102112
Figure 3-8:
www.xilinx.com
80
AP0
0 1 0 1 0 1 0 1
Privileged
No access Read/Write Read/Write Read/Write ~ Read Read ~
Unprivileged
No access No access Read Read/Write ~ No access Read ~~
Description
Permission fault Privileged access only No user-mode write Full access Reserved Privileged Read only Read only Reserved
B
0 1 0 1 0 0 Y Strongly-ordered shareable device
Description
Memory Type
Strongly ordered Device Normal Normal Normal Device Normal
Outer and Inner write-through, no allocate on write Outer and Inner write-back, no allocate on write Outer and Inner non-cacheable Reserved Non-Shareable device Reserved Reserved Cached memory XX - Outer Policy YY - Inner Policy
Table 3-4:
Encoding Bits C
0 0 1 1
B
0 1 0 1
www.xilinx.com
81
Domains
A domain is a collection of memory regions. Domains are only valid for L1 Page table entries. The L1 page table entry format supports 16 domains, and requires the software that defines a translation table to assign each memory region to a domain. The domain field specifies which of the 16 domains the entry is in, and a two-bit field in the Domain Access Control Register (DACR) defines the permitted access for each domain. The possible settings for each domain are: No access - Any access using the translation table descriptor generates a Domain fault. Clients - On an access using the translation table descriptor, the access permission attributes are checked. Therefore, the access might generate a Permission fault. Managers - On an access using the translation table descriptor, the access permission attributes are not checked. Therefore, the access cannot generate a Permission fault.
TLB Organization
The Cortex-A9 MMU includes two levels of TLBs which include a unified TLB for both instruction and data and separate micro TLBs for each. The micro TLBs act as the first level TLBs and each have 32 fully associative entries. If an instruction fetch or a load/store address misses in the corresponding micro TLB, the unified or main TLB is accessed. The unified main TLB provides a 2-way associative 2x64 entry table (128 entries) and supports 4 lockable entries using the lock-by-entry model. The TLB
www.xilinx.com
82
uses a pseudo round-robin replacement policy to determine which entry in the TLB should be replaced in the case of a miss. Unlike some other RISC processors that require software to manage the updates of the TLB from the page table that resides in the memory, the main TLB in Cortex-A9 supports hardware page table walks to perform look-ups in the L1 data cache. This allows the page tables to be cached. The MMU can be configured to perform hardware translation table walks in cacheable regions by setting the IRGN bits in the Translation Table Base registers. If the encoding of the IRGN bits is write-back, then an L1 data cache look-up is performed and data is read from the data cache. If the encoding of the IRGN bits is write-through or non-cacheable, then an access to external memory is performed. TLB entries can be global, or can be assigned to particular processes or applications using the ASIDs associated with those processes. ASIDs enable TLB entries remain resident during context switches, avoiding the requirement of reloading them subsequently. a per-CPU basis. The ASID is incremented for each new process. When the ASID rolls over (ASID = 0 ,) a TLB flush request is sent to both CPUs. However, only the CPU that is in the middle of a context switch immediately updates its current ASID context. The other CPU continues to run using its current pre-rollover ASID until a scheduling interval occurs and then it context switches to a new process. TLB maintenance and configuration operations are controlled through a dedicated coprocessor, CP15, integrated within the core. This coprocessor provides a standard mechanism for configuring the level one memory system.
Note: The ARM Linux kernel manages the 8-bit TLB ASID space globally across all CPUs instead of on
Micro TLB
The first level of caching for the page table information is a micro TLB of 32 entries implemented on each of the instruction and data sides. These blocks provide a fully associative look-up of the virtual addresses in a cycle. The micro TLB returns the physical address to the cache for the address comparison, and also checks the protection attributes to signal either a pre-fetch abort or a data abort. All main TLB related operations affect both the instruction and data micro TLBs, causing them to be flushed. In the same way, any change of the Context ID register causes the micro TLBs to be flushed. The main or unified TLB, explained in the next section, should be invalidated after reset and before the MMU is enabled.
Main TLB
The main TLB is the second layer in the TLB structure that catches the misses from the Micro TLBs. It also provides a centralized source for lockable translation entries. Misses from the instruction and data micro TLBs are handled by a unified main TLB. Accesses to the main TLB take a variable number of cycles, according to competing requests from each of the micro TLBs and other implementation-dependent factors.
www.xilinx.com
83
Entries in the lockable region of the main TLB are lockable at the granularity of a single entry. As long as the lockable region does not contain any locked entries, it can be allocated with non-locked entries to increase overall main TLB storage size.
The operating system must ensure that, at most, one TLB entry matches at any time. A TLB can store entries based on the following block sizes: Supersections: Sections : Large pages : Small pages : 16 MB blocks of memory 1 MB blocks of memory 64 KB blocks of memory 4 KB blocks of memory
www.xilinx.com
84
Supersections, sections, and large pages are supported to permit mapping of a large region of memory while using only a single entry in a TLB. If no mapping for an address is found within the TLB, then the translation table is automatically read by hardware and a mapping is placed in the TLB. (The translation table entries are discussed in detail in Translation Table Base Register 0 and 1, page 84)
The MMU might not find a global mapping or a mapping for the currently selected ASID with a matching non-secure TLB ID (NSTID) for the virtual address in the TLB. In this case, the hardware does a translation table walk if the translation table walk is enabled by the PD0 or PD1 bit in the TTB Control register. If translation table walks are disabled, the processor returns a section translation fault. If the MMU finds a matching TLB entry, it uses the information in the entry as follows: 1. The access permission bits and the domain determine if the access is enabled. If the matching entry does not pass the permission checks, the MMU signals a memory abort. See the ARM Architecture Reference Manual for a description of access permission bits, abort types and priorities, and for a description of the Instruction Fault Status register (IFSR) and Data Fault Status register (DFSR). The memory region attributes specified in both the TLB entry and the CP15 c10 remap registers control the cache and write buffer, and determine if the access is: a. c. 3. Secure or non-secure Normal memory, device, or strongly-ordered b. Shared or not The MMU translates the virtual address to a physical address for the memory access.
2.
If the MMU does not find a matching entry, a hardware table walk occurs.
www.xilinx.com
85
Translation Request
Yes
Perform Translation
Translation Result
No
TLB Update
Yes
Yes
No
Translation Fault
UG585_c3_10_102112
Figure 3-9:
Translation Process
www.xilinx.com
86
The execution of a DSB instruction to ensure the completion of the TLB operation. A subsequent ISB instruction, or taking an exception, or returning from an exception.
The execution of an Instruction or Unified TLB maintenance operation is only guaranteed to be visible to subsequent instruction fetch after both:
The execution of a DSB instruction to ensure the completion of the TLB operation. A subsequent ISB instruction, or taking an exception, or returning from an exception.
The following rules apply when writing translation table entries. They ensure that the updated entries are visible to subsequent accesses and cache maintenance operations. A write to the translation tables, after it has been cleaned from the cache if appropriate, is only guaranteed to be seen by a translation table walk caused by an explicit load or store after the execution of both a DSB and an ISB. However, it is guaranteed that any writes to the translation tables are not seen by any explicit memory access that occurs in program order before the write to the translation tables. If the translation tables are held in write-back cacheable memory, the caches must be cleaned to the point of unification after writing to the translation tables and before the DSB instruction. This ensures that the updated translation table is visible to a hardware translation table walk. A write to the translation tables, after it has been cleaned from the cache if appropriate, is only guaranteed to be seen by a translation table walk caused by the instruction fetch of an instruction that follows the write to the translation tables after both a DSB and an ISB.
TLB Lockdown
The TLB supports the TLB lock-by-entry model as described in the ARM Architecture Reference Manual. See TLB Lockdown Register description in the ARM Cortex-A9 Technical Reference Manual.
3.2.6 Interfaces
AXI and Coherency Interfaces
Each Cortex-A9 processor provides two 64-bit pseudo AXI master interfaces for independent instruction fetch and data transactions. These interfaces operate at the speed of the processor cores (CPU_6x4x clock) and are capable of sustaining four double-word writes every five processor cycles when copying data across a cached region of memory. The instruction side interface is a read-only interface and does not have the write channel. These interfaces implement an extended version of the AXI protocol that also provides multiple optimizations to the L2 cache including support for L2 pre-fetch hints and speculative memory accesses. These optimizations are explained in more detail in the L2-Cache section of this chapter. The AXI transactions are all routed through the SCU to the OCM or the L2 cache controller based on their addresses. Each Cortex-A9 also provides a cache coherency bus (CCB) to the SCU to provide the information required for coherency management between the L1 and L2 caches.
www.xilinx.com
87
Other Interfaces
Each Cortex-A9 processor has multiple control bits that are driven through the System-Level Control register (SLCR). This includes a 4-bit interface that drives the CoreSight standard security signals and also static configuration signals for controlling CP15 and SW programmability. There are also other interfaces including the event and interrupt interfaces that are explained later in this chapter.
3.2.7 NEON
The Cortex-A9 NEON MPE extends the Cortex-A9 functionality to provide support for the ARM v7 advanced SIMD and vector floating-point v3 (VFPv3) instruction sets. The Cortex-A9 NEON MPE supports all addressing modes and data-processing operations described in the ARM Architecture Reference Manual.
The Cortex-A9 NEON MPE features are: SIMD vector and scalar single-precision floating-point computation
Unsigned and signed integers Single bit coefficient polynomials Single-precision floating-point values Addition and subtraction Multiplication with optional accumulation Maximum or minimum value driven lane selection operations Inverse square-root approximation Comprehensive data-structure load instructions, including register-bank-resident table lookup.
Scalar double-precision floating-point computation SIMD and scalar half-precision floating-point conversion 8, 16, 32, and 64-bit signed and unsigned integer SIMD computation
www.xilinx.com
88
8 or 16-bit polynomial computation for single-bit coefficients Structured data load capabilities Dual issue with Cortex-A9 processor ARM or Thumb instructions Independent pipelines for VFPv3 and advanced SIMD instructions Large, shared register file, addressable as:
Thirty-two 32-bit S (single) registers Thirty-two 64-bit D (double) registers Sixteen 128-bit Q (quad) registers
See the ARM Architecture Reference Manual for details of the advanced SIMD instructions and the NEON MPE operation.
www.xilinx.com
89
The SCU can also copy clean data from one processor cache to another and eliminate the need for main memory accesses to perform this task. Furthermore, it can move dirty data between the processors, skipping the shared state and avoiding the latency associated with the write-back. It is important to note that the Cortex A9 does not guarantee coherency between the L1 instructions caches as the processor is not capable of modifying the L1 contents directly.
2 additional writes for eviction traffic from the SCU 3 more write transactions from the ACP 14 read transactions per processor: 4 instruction reads 6 linefill reads 4 non-cacheable read
www.xilinx.com
90
3.4 L2-Cache
3.4.1 Summary
The L2 cache controller is based on the ARM PL310 and includes an 8-way set-associative 512 KB cache for dual Cortex-A9 cores. The L2 cache is physically addressed and physically tagged and supports a fixed 32-byte line size. These are the main features of the L2 cache: Supports snoop coherency control utilizing MESI algorithm Offers parity check for L2 cache memory Supports speculative read operations in the SMP mode Provides L1/L2 exclusive mode (i.e., data exists in either, but not both) Can be locked down by master, line, or way per master Implements 16-entry deep preload engine for loading data into L2 cache memory To improve latency, critical-word-first line-fill is supported Implements pseudo-random victim selection policy with deterministic option
Write-through and write-back Read allocate, write allocate, read and write allocate
The contents of the L2 data and tag RAMS are cleared upon reset to comply with security requirements The L2 controller implements multiple 256-bit line buffers to improve cache efficiency
Line fill buffers (LFBs) for external memory access to create a complete cache line into L2 cache memory. Four LFBs are implemented for AXI read interleaving support Two 256-bit line read buffers for each slave port. These buffers hold a line from the L2 cache in case of cache hit Three 256-bit eviction buffers hold evicted lines from the L2 cache, to be written back to main memory Three 256-bit store buffers hold bufferable writes before their draining to main memory, or L2 cache. They enable multiple writes to the same line to be merged
The controller implements selectable cache pre-fetching within 4k boundaries. The L2 cache controller forwards exclusive requests from L1 to DDR, OCM, or external memory
Note: The SCU does not maintain coherency between instruction and data L1 caches, so this
coherency must be maintained by software. The L2 Cache implements TrustZone security extension to offer enhanced OS security. The non-secure (NS) tag bit is added in tag RAM and is used for lookup in the same way as an address bit. The NS-tag bit is also added in all of the buffers. The NS bit in tag RAM is used to determine the security level of evictions to DDR and OCM. The controller restricts non-secure accesses for control, configuration, and maintenance registers to restrict access to secure data.
www.xilinx.com
91
Cache Response
This section describes the general behavior of the cache controller depending on the Cortex A9 transactions. These are the descriptions for the different type of transactions: Bufferable The transaction can be delayed by the interconnect or any of its components for an arbitrary number of cycles before reaching its final destination. This is usually only relevant to writes. The transaction at the final destination does not have to present the characteristics of the original transaction. For writes this means that a number of different writes can be merged together. For reads this means that a location can be pre-fetched or can be fetched just once for multiple read transactions. To determine if a transaction should be cached, this attribute should be used in conjunction with the read allocate and write allocate attributes. If the transfer is a read and it misses in the cache then it should be allocated. This attribute is not valid if the transfer is not cacheable. If the transfer is a write and it misses in the cache then it should be allocated. This attribute is not valid if the transfer is not cacheable.
Cacheable
In the ARM architecture, the inner attributes are used to control the behavior of the L1 caches and write buffers. The outer attributes are exported to the L2 or an external memory system. In the Cortex A9 processing system (similar to most modern processors), to improve performance and power, many optimizations are performed at many levels of the system which cannot be completely hidden from the outside world and might cause the violation of the expected sequential execution model. Examples of these optimizations are: Multi-issue speculative and out-of-order execution Usage of load/store merging to minimize the latency of load/stores In a multi-core processor, hardware-based cache coherency management can cause cache lines to migrate transparently between cores causing different cores to see updates to cached memory locations in different orders External system characteristics might create additional challenges when external masters are included in the coherent system through the ACP
Therefore, it is vital to define certain rules to constrain the order in which the memory accesses of one core relate to the surrounding instructions, or could be observed by other cores within a multi-core processor system. Typically the memory can be categorized into Normal, Strongly Ordered and Device regions. For more information please refer to section 3.2.4 Memory Ordering.
Table 3-5 shows the general behavior of the L2 cache controller in response to ARMv7 load/store transaction types that are supported by Cortex-A9.
www.xilinx.com
92
Table 3-5:
Device
www.xilinx.com
93
Table 3-5:
Cache Controller Behavior for SCU Requests (Contd) L2 Cache Controller Behavior
Read hit: Read from L2. Read miss: Line fill to L2. Write hit: Put in store buffer, write to L2 and memory when store buffer is drained. Write miss: Put in store buffer. When buffer has to be drained, check whether it is full. If it is not full then request word or line to memory before allocating the buffer to the L2. Allocation to L2. Write to memory. Read hit: Read from L2. Read miss: Line fill to L2. Write hit: Put in store buffer, write to L2 when store buffer is drained, and mark line as dirty. Write miss: Put in store buffer. When buffer has to be drained, check if it is full. If it is not full then request word or line to memory before allocating the buffer to L2. Allocation to L2. Outer write-through, allocate on both reads and writes
Both L1 and L2 caches have to be configured for exclusive caching. Setting the exclusive cache configuration bit 12 in the Auxiliary Control register for L2 and bit 7 of the ACTLR register in Cortex-A9 configure the L2 and L1 caches to operate exclusive to one another. For reads, the behavior is as follows: For a hit, the line is marked as non-valid (the tag RAM valid bit is reset,) and the dirty bit is unchanged. If the dirty bit is set, future accesses can still hit in this cache line but the line is part of the preferred choice for future evictions. For a miss, the line is not allocated into the L2 cache.
For writes, the behavior depends on the value of attributes from the SCU to indicate if the write transaction is an eviction from the L1 memory system and whether it is a clean eviction. AWUSERS[8] attribute indicates an eviction and AWUSERS[9] indicates a clean eviction. The behavior is summarized as follows: For a hit, the line is marked dirty unless the AWUSERS[9:8] = b11 . In this case, the dirty bit is unchanged.
www.xilinx.com
94
For a miss, if the cache line is evicted (AWUSERS[8] is 1 ,) the cache line is allocated and its dirty status depends on if it is evicted dirty or not. If the cache line is evicted dirty (AWUSERS[8] is 0 ,) the cache line is allocated only if it is write allocate.
Lockdown by Line
When enabled, all newly allocated cache lines get marked as locked. The controller then considers them as locked and does not naturally evict them. It is enabled by setting bit [0] of the lockdown by the Line Enable register. Bit [21] of the tag RAM shows the locked status of each cache line.
Note: An example of when the lockdown by line feature might be enabled is during the time when
a critical piece of software code is loaded into the L2 cache. The unlock all lines background operation enables the unlocking of all lines marked as locked by the lockdown by line mechanism. The status of this operation can be checked by reading the Unlock All Lines register. While an unlock all lines operation is in progress, the user cannot launch a background cache maintenance operation. If attempted, a SLVERR error is returned.
Lockdown by Way
The L2 cache is 8-way set-associative and allows users to lock the replacement algorithm on a way basis, enabling the set count to be reduced from 8-way all the way down to direct mapped. The 32-bit cache address consists of the following fields:
www.xilinx.com
95
[Tag Field], [Index Field], [Word Field], [Byte Field] When a cache lookup occurs, the index defines where to look in the cache ways. The number of ways defines the number of locations with the same index referred to as a set. Therefore, an 8-way set associative cache has eight locations where an address with Index A can exist. There are 2 11 or 2,024 indices in the 512K L2 cache. Lockdown format C, as the ARM Architecture Reference Manual describes, provides a method to restrict the replacement algorithm used for allocations of cache lines within a set. This method enables: Fetch of code or load data into the L2 cache Protection from being evicted because of other accesses This method can also be used to reduce cache pollution
The Lockdown register in the L2 cache controller is used to lock any of the eight ways in the L2 cache. To apply lockdown, the user sets each bit to 1 to lock each respective way. For example, set Bit [0] for Way 0, Bit [1] for Way 1.
Lockdown by Master
The lockdown by master feature is a superset of the lockdown by way feature. It enables multiple masters to share the L2 cache and makes the L2 cache behave as though these masters have dedicated smaller L2 caches. This feature enables the user to reserve ways of the L2 cache to specific master IDs. The L2 cache controller lockdown by master is only able to distinguish up to eight different masters. However, there are up to 64 AXI master IDs from the Cortex-A9 MP core. Table 3-6 shows how the 64 master ID values are grouped into eight lockable groups. Table 3-6:
A9 Core 0 A9 Core 1 A9 Core 2 A9 Core 3 ACP Group0 ACP Group1 ACP Group2 ACP Group3
ID Group
www.xilinx.com
96
cache controller master ports. The address latency introduced by the disabled cache controller is one cycle in the slave port from the SCU plus one cycle in the master ports.
Merging condition is based on address and security attribute. Merging takes place only when data is in the store buffer and it is not draining.
www.xilinx.com
97
When a write-allocate cacheable slot is drained, misses in the cache, and is not full, the store buffer sends a request via the master ports to the main interconnects or DDR to complete the cache line. The corresponding master port sends a read request through the interconnects and provides data to the store buffer in return. When the slot is full, it can be allocated into the cache.
These optimizations apply to the transfers from the processor and do not include the ACP.
Pre-fetch Hints
When the Cortex-A9 processor is configured to run in SMP mode, the automatic data pre-fetchers implemented in the CPUs issue special read accesses to the L2 cache controller. These special reads are called pre-fetch hints. When the L2 controller receives such pre-fetch hints, it allocates the targeted cache line into the L2 cache for a miss without returning any data back to the Cortex-A9 processor. The user can enable the pre-fetch hint generation by the Cortex-A9 processors through one of the two following methods: 1. Enabling the L2 pre-fetch hint feature by setting bit [1] of the ACTLR register. When enabled, this feature sets the Cortex-A9 processor to automatically issue L2 pre-fetch hint requests when it detects regular fetch patterns on a coherent memory. Use of PLE (pre-load engine) operations. When this feature is used in the Cortex-A9 processor, the PLE issues a series of L2 pre-fetch hint requests at the programmed addresses.
2.
No additional programming of the L2 Controller is required. Application of the pre-fetch hints to the OCM memory space does not cause any action because, unlike caches, transfer of data into OCM RAM requires explicit operations by software.
www.xilinx.com
98
The cache controller does not support strongly-ordered write accesses with this feature. The feature is also supported by the OCM if it is enabled in the Cortex-A9
www.xilinx.com
99
advance to achieve better performance. The pre-fetch offset enables this by setting the address of the pre-fetched cache line to Cache Line + 1 + Offset. The optimal value of the pre-fetch offset depends on the external memory read latency and on the L1 read issuing capability. The pre-fetch mechanism is not launched for a 4 KB boundary crossing. Pre-fetch accesses can use a large number of the address slots in the controller master ports. This prevents non-prefetch accesses being serviced and affects performance. To counter this effect, the controller can drop pre-fetch accesses. This can be controlled using bit 24 of the Pre-fetch Control register. When enabled, if a resource conflict exists between pre-fetch and non-pre-fetch accesses in the controller master ports, pre-fetch accesses are dropped. When data corresponding to these dropped pre-fetch accesses returns from the external memory, it is discarded and is not allocated into the L2 cache.
Initialization Sequence
As an example, a typical cache controller start-up programming sequence consists of the following register operations: Write 0x020202 to the register at 0xF8000A1C . This is a mandatory step. Write to the auxiliary, tag RAM latency, data RAM latency, pre-fetch, and Power Control registers using a read-modify-write to set up global configurations:
Associativity and way size Latencies for RAM accesses Allocation policy Pre-fetch and power capabilities Write 0xFFFF to 0x77C Poll cache maintenance register until invalidate operation is complete
Secure write to invalidate by way, offset 0x77C , to invalidate all entries in cache:
If required, write to register 9 to lockdown D and lockdown I. Write to the Interrupt Clear register to clear any residual raw interrupts set. Write to the interrupt mask register if it is desired to enable interrupts.
www.xilinx.com
100
Write to Control register 1 with the LSB set to 1 to enable the cache.
If a write is performed to the Auxiliary, Tag RAM latency, or Data RAM Latency Control register with the L2 cache enabled, a SLVERR (error) results. The L2 cache must be disabled by writing to the Control register before writing to these registers.
The following is the sequence that needs to be implemented in lockdown routine: 3. 4. 5. 6. Disable the Interrupts. Clean and Invalidate entire L2 cache. This step is for ensuring that the code to be locked is not loaded into L2 cache. Find the number of ways required for loading code based on the code size. Unlock the calculated ways and lock all the ways remaining. This is done by writing into Data LockDown registers. Please refer to the PL310 L2 Cache Controller Document for information on these registers. Load the code into the L2 cache using PLD instruction. PLD instruction always generates data references, this is the reason for using Data Lockdown registers. For more information on PLD instruction, please refer to the ARMv7 TRM. This step loads the code into unlocked ways. Lock the loaded ways and unlock the remaining ways by writing into Data Lockdown registers. Enable Interrupts.
7.
8. 9.
To check for whether the code is really locked into L2 cache, generate more references to the code that has been locked. These references can be monitored by L2 Cache Instruction Hit event. For more information on the available events of L2 cache and their initialization, please refer to the PL310 L2 Cache Controller Document. This event initialization should be done prior to code locking. So more the references to code, more the instruction hits. For example, the code that is locked can be called from a Timer Interrupt Handler which generates references as per the number of interrupts programmed.
www.xilinx.com
101
ACP Requests
The read and write requests performed on the ACP behave differently depending on whether the request is coherent or not. This behavior is as follows: ACP coherent read requests: An ACP read request is coherent when ARUSER[0] = 1 and ARCACHE[1] = 1 alongside ARVALID. In this case, the SCU enforces coherency. When the data is present in one of the Cortex-A9 processors, the data is read directly from the relevant processor, and returned to the ACP port. When the data is not present in any of the Cortex-A9 processors, the read request is issued on one of the SCU AXI master ports, along with all its AXI parameters, with the exception of the locked attribute. ACP non-coherent read requests: An ACP read request is non-coherent when ARUSER[0] = 0 or ARCACHE[1] = 0 alongside ARVALID. In this case, the SCU does not enforce coherency, and the read request is directly forwarded to one of the available SCU AXI master ports to the L2 cache controller or OCM. ACP coherent write requests: An ACP write request is coherent when AWUSER[0] = 1 and AWCACHE[1] = 1 alongside AWVALID. In this case, the SCU enforces coherency. When the data is present in one of the Cortex-A9 processors, the data is first cleaned and invalidated from the relevant CPU. When the data is not present in any of the Cortex-A9 processors, or when it has been cleaned and invalidated, the write request is issued on one of the SCU AXI master ports, along with all corresponding AXI parameters with the exception of the locked attribute.
www.xilinx.com
102
Note: The transaction can optionally allocate into the L2 cache if the write parameters are set accordingly.
ACP non-coherent write requests: An ACP write request is non-coherent when AWUSER[0] = 0 or AWCACHE[1] = 0 alongside AWVALID. In this case, the SCU does not enforce coherency, and the write request is forwarded directly to one of the available SCU AXI master ports.
ACP Usage
The ACP provides a low latency path between the PS and the accelerators implemented in the PL when compared with a legacy cache flushing and loading scheme. Steps that must take place in an example of a PL-based accelerator are as follows: 1. 2. 3. 4. The CPU prepares input data for the accelerator within its local cache space. The CPU sends a message to the accelerator using one of the general purpose AXI master interfaces to the PL. The accelerator fetches the data via the ACP, processes the data, and returns the result via the ACP. The accelerator sets a flag by writing to a known location to indicate that the data processing is complete. Status of this flag can be polled by the processor or could generate an interrupt.
Table 3-7 shows ACP read and write behavior based on current cache status. Clearly, access latency is small when cache hits occur. When compared to a tightly-coupled coprocessor, ACP access latencies are relatively long. Therefore, ACP is not recommended for fine-grained instruction level acceleration. On the other hand, for coarse-grain acceleration such as video frame-level processing, ACP does not have a clear advantage over traditional memory-mapped PL acceleration because the transaction overhead is small relative to the transaction time, and might potentially cause undesirable cache thrashing. ACP is therefore optimal for medium-grain acceleration such as block-level crypto accelerator, video macro-block level processing, etc. Table 3-7: ACP Read and Write Behavior Action
ACP Read - I (Invalid)
Description
SCU fetches data from external memory through one of two AXI master interfaces. Data is forwarded to the ACP directly. It does not affect the CPU L1 cache state. SCU fetches data from L1 cache with M status. It does not affect the L1 cache state. SCU fetches data from any L1 cache with S status. It does not affect the L1 cache state. SCU fetches data from the L1 cache with E status. It does not affect the L1 cache state. Data is written to external memory through one of two AXI master interfaces. It does not affect the CPU L1 cache state. Data in L1 cache with M status is flushed out to external memory first. After that, ACP data is written into external memory interface. L1 cache previously with M status is changed to I status. If the SCU overwrites the entire cache line, L1 cache flush is skipped.
ACP Read - M (Modified) ACP Read - S (Shared) ACP Read - E (Exclusive) ACP Write - I (Invalid) ACP Write - M (Modified)
www.xilinx.com
103
Table 3-7:
ACP Limitations
The accelerator coherency port (ACP) has these limitations: Exclusive access is not allowed for coherent memory. Locked access is not allowed for coherent memory. Write transactions with AWLEN = 3, AWSIZE = 3, and WSTRB line in the CPUs to get corrupted.
Continuous access to the OCM over the ACP can starve accesses from other AXI masters. To allow access from other masters, the ACP bandwidth to OCM should be moderated to less than the peak OCM bandwidth. This can be accomplished by regulating burst sizes to less than eight 64-bit words. Blocks such as PCIe which prioritize write requests over read requests should not be connected to the ACP port as they might create deadlock. Connecting these devices to the other the GP and HP AXI ports does not manifest the mentioned deadlock issue.
Note: The Xilinx HDL wrapper around the PS7 primitive provides a function to flag the third
limitation (cache lines being corrupted). If enabled, the Xilinx ACP adapter watches for transactions that could potentially corrupt the cache and generate an error response to the master that is requesting the write request. The write transaction is allowed to proceed to the ACP interface, so the possibility of cache corruption is NOT eliminated. The master is notified of the possible problem in order to take the appropriate action. The ACP adapter can also generate an interrupt signal to the CPUs, which can be used by the software to detect such a situation.
Event Interface
The event bus provides a low-latency and direct mechanism to transfer status and implement a wake mechanism between the APU and the PL. The event input and output signals on this interface use toggle signaling in which an event is communicated by toggling the signal to the opposite logic level on both edges. The event bus includes these signals: EVENTEVENTO EVENTEVENTI EVENTSTANDBYWFE[1:0] A toggle output signal indicating that either CPU is executing the SEV instruction. A toggle input signal that wakes up either one or both CPUs if they are in a standby state initiated by the WFE instruction. 2-level output signals indicating the state of the two CPUs. A bit is asserted if the corresponding CPU is in standby state following the execution of the WFE (wait for event) instruction. 2-level output signals indicating the state of the two CPUs. A bit is asserted if the corresponding CPU is in standby state following the execution of the WFI (wait for interrupt) instruction.
EVENTSTANDBYWFI[1:0]
www.xilinx.com
104
The event bus can be used to implement PL-based accelerators. The event output can be used to trigger an ACP accelerator to read from a predefined address. Further on in the process, the event input can be used to communicate that the data has been written back over the ACP and is ready to be consumed by a CPU. A detailed description of this example follows: 1. 2. 3. 4. CPU0 generates the data that is required by the accelerator in the L1/L2 cache. This data can contain both commands and information to be processed. CPU0 issues an SEV (send event) instruction, causing EVENTEVENTO to toggle to the PL. The signal is connected to an accelerator IP implemented in the PL. CPU0 next issues a WFE (wait For event) instruction, placing the CPU in a lower-power standby state. This is reflected in the EVENTSTANDBYWFE[0] status output to the PL. The accelerator notices the toggled EVENTEVENTO signal and realizes that CPU0 is waiting. The accelerator fetches data from a prearranged address and data format via the ACP interface and begins processing. After writing the result data back via the ACP, the accelerator asserts the EVENTEVENTI input to indicate that processing is complete and wakes up CPU0. CPU0 wakes from its standby state, which is reflected in the EVENTSTANDBYWFE[0] output, and CPU0 continues execution using the processed data.
5. 6.
www.xilinx.com
105
Boot Running
POR
Permanent Residence
Secure Monitor
UG585_c3_03_022212
Figure 3-10:
In Figure 3-10, it is assumed that the device security is on; however, this is not a necessary requirement to enable TrustZone security. In this figure, solid lines are used to show the boot flow and dotted lines are used to indicate processing transition after the system is running. The shaded blocks are software functional blocks that remain running after the system boots. In the TrustZone boot flow, Secure OS boots first and initiates a secure monitor as a secure gateway between the secure and non-secure operating systems. After the secure monitor starts, it can spawn a non-secure boot loader which in turn starts a non-secure OS. Before non-secure OS initiates, secure OS defines a set of events to force transition from non-secure OS to secure monitor. The possible events include SMC instruction, IRQ, FIQ, and data abort.
www.xilinx.com
106
In the secure monitor mode, the processor is always in the secure state independent to the SCR.NS bit. trigger erroneous asynchronous aborts in secure world. For example, a secure hypervisor runs some code with SCR.NS= 1 and the mask asynchronous abort bit CPSR.A= 1 . This non-secure code attempts to read and write memory that is marked as secure-only, and receives AXI DECERR. At that time, no exceptions occur because CPSR.A= 1 and the exceptions are masked. Once secure mode is re-entered, the hypervisor switches to other code, performs DSB/ISB, and clears CPSR.A= 0 . In this case, the Cortex-A9 processor still remembers the pending asynchronous external abort and takes an exception as soon as CPSR.A= 0 . In addition, the non-secure code might have done multi-word stores to secure memory, causing data to be modified in the L1 cache. When this data is eventually cast out, an asynchronous external abort might also be taken in the secure mode.
Note: Under certain circumstances, there is a possibility that Cortex-A9 TrustZone violations might
CP15 Register
Permitted Accesses
Read/write in privileged modes only Read/write in privileged modes only Read/write in privileged modes only Read/write in privileged modes only Read/write in privileged modes only Read/write in privileged modes only Read/write in privileged modes only Read/write in privileged modes only Read/write in privileged modes only Read/write in privileged modes only Read/write in privileged modes only Read/write in privileged modes only Read/write in privileged modes only Read/write in privileged modes only
c3 c5
DACR, Domain Access Control register DFSR, Data Fault Status register IFSR, Instruction Fault Status register ADFSR, Auxiliary Data Fault Status register AIFSR, Auxiliary Instruction Fault Status register
c6 c7
DFAR, Data Fault Address register IFAR, Instruction Fault Address register PAR, Physical Address register (VA to PA translation)
www.xilinx.com
107
Table 3-9:
c10 c12
CP15 Register
Permitted Accesses
Read/write in privileged modes only Read/write in privileged modes only Read/write in privileged modes only
Table 3-10 shows additional registers with access control at secure and non-secure states. Table 3-10:
c1
CP15 Register
Permitted Accesses
Read/write in privileged modes Read-only in non-secure privileged modes Read/write in privileged modes Read/write in privileged modes Read/write in privileged modes
c12
Because any context switch writes to CONTEXTIDR and causes the non-secure BTAC entries to be invalidated, BPIALL from secure state not affecting non-secure BTAC entries is not going to be a problem.
www.xilinx.com
108
Comment
No CPU debug at all Allow non-invasive debug, such as Trace and Performance Monitor, in Non-Secure mode Allow invasive debug, such as stop processor, in Non-Secure mode This allow CPU Trace and Profile under secure condition This allows Invasive debug for secure mode
www.xilinx.com
109
These are a few notes about the Trustzone support in L2: The L2 Control register can only be written to with an access tagged as secure, to enable or disable the L2 cache. The Auxiliary Control register can only be written to with an access tagged as secure. Bit [26] in the Auxiliary Control register is for NS lockdown enable. This bit should be used to determine whether non-secure accesses can modify a lockdown register. Non-Secure maintenance operations do not clean or invalidate secure data.
System Reset
Software Reset
Note: The APU in Zynq-7000 AP S0C devices does not support an independent reset for the NEON
coprocessors. the user must stop the associated clock, de-assert the reset, and then restart the clock. During a system or POR reset, hardware automatically takes care of this. Assuming the user wants to reset CPU0, the user must to set the following fields in the SLCR.A9_CPU_RST_CTRL (address 0X000244 ) register in the order listed: 1. 2. A9_RST0 = 1 to assert reset to CPU0 A9_CLKSTOP0 = 1 to stop clock to CPU0
Note: Unlike the POR or system resets, when the user applies a software reset to a single processor,
www.xilinx.com
110
3. 4.
Function
www.xilinx.com
111
To reduce power consumption in the L1 caches, the number of full cache reads is reduced by taking advantage of the sequential nature of memory accesses. If a cache read is sequential to the previous cache read, and the address is within the same cache line, only the data RAM set that was previously read is accessed. If an instruction loop fits in four BTAC entries, then instruction cache accesses are turned off in order to lower power consumption. The clock to the NEON Engine is dynamically controlled by the CPU and the engine gets clocked only when a NEON instruction is issued.
Note: Power to the APU or any of its sub-blocks cannot be turned off while the PS is powered on.
www.xilinx.com
112
www.xilinx.com
113
Chapter 4
System Addresses
4.1 Address Map
The comprehensive system level address map is shown in Table 4-1. The shaded entries indicate that the address range is reserved and should not be accessed. Table 4-2 identifies reserved address ranges. Table 4-1: System-Level Address Map CPUs and ACP
OCM DDR 0000_0000 to 0003_FFFF (2) DDR
Address Range
AXI_HP
OCM OCM
Notes
Address not filtered by SCU and OCM is mapped low Address filtered by SCU and OCM is mapped low Address filtered by SCU and OCM is not mapped low Address not filtered by SCU and OCM is not mapped low
0004_0000 to 0007_FFFF 0008_0000 to 000F_FFFF 0010_0000 to 3FFF_FFFF 4000_0000 to 7FFF_FFFF 8000_0000 to BFFF_FFFF E000_0000 to E02F_FFFF E100_0000 to E5FF_FFFF F800_0000 to F800_0BFF F800_1000 to F880_FFFF F890_0000 to F8F0_2FFF FC00_0000 to FDFF_FFFF(4) FFFC_0000 to FFFF_FFFF (2)
DDR DDR DDR PL PL IOP SMC SLCR PS CPU Quad-SPI OCM OCM Quad-SPI OCM DDR DDR DDR DDR DDR DDR PL PL IOP SMC SLCR PS
Address filtered by SCU Address not filtered by SCU Address filtered by SCU Address not filtered by SCU(3) Accessible to all interconnect masters General Purpose Port #0 to the PL, M_AXI_GP0 General Purpose Port #1 to the PL, M_AXI_GP1 I/O Peripheral registers, see Table 4-6 SMC Memories, see Table 4-5 SLCR registers, see Table 4-3 PS System registers, see Table 4-7 CPU Private registers, see Table 4-4 Quad-SPI linear address for linear mode OCM is mapped high OCM is not mapped high
www.xilinx.com
114
Notes:
1. The other bus masters include the S_AXI_GP interfaces, Device configuration interface (DevC), DAP controller, DMA controller and the various controllers with local DMA units (Ethernet, USB and SDIO). 2. The OCM is divided into four 64 KB sections. Each section is mapped independently to either the low or high addresses ranges, but not both at the same time. In addition, the SCU can filter addresses destined for the OCM low address range to the DDR DRAM controller instead. A detailed discussion of the OCM is explained in Chapter 29, On-Chip Memory (OCM). 3. For each 64 KB section mapped to the high OCM address range via slcr.OCM_CFG[RAM_HI] which is not also part of the SCU address filtering range will be aliased for CPU and ACP masters at a range of (0x000C_0000 to 0x000F_FFFF ). See Chapter 29, On-Chip Memory (OCM) for more information. 4. When a single device is used, it must be connected to QSPI 0. In this case, the address map starts at FC00_0000 and goes to a maximum of FCFF_FFFF (16 MBs). When two devices are used, both devices must be the same capacity. The address map for two devices depends on the size of the devices and their connection configuration. For the shared 4-bit parallel I/O bus, the QSPI 0 device starts at FC00_0000 and goes to a maximum of FCFF_FFFF (16 MBs). The QSPI 1 device starts at FD00_0000 and goes to a maximum of FDFF_FFFF (another 16 MBs). If the first device is less than 16 MBs in size, then there will be a memory space hole between the two devices. For the 8-bit dual stacked mode (8-bit bus), the memory map is continuous from FC00_0000 to a maximum of FDFF_FFFF (32 MBs).
Table 4-2:
System-Level Address Map (Reserved Addresses) CPUs and ACP AXI_HP Other Bus Masters(1)
Reserved Reserved Reserved Reserved Reserved Reserved Reserved
Address Range
C000_0000 to DFFF_FFFF E030_0000 to E0FF_FFFF E600_0000 to F7FF_FFFF F800_0C00 to F800_0FFF F801_0000 to F88F_FFFF F8F0_3000 to FBFF_FFFF FE00_0000 to FFFB_FFFF
Notes
www.xilinx.com
115
Reference
www.xilinx.com
116
www.xilinx.com
117
Register Set
ttc. dmac. dmac. swdt. ddrc. devcfg. afi. afi. afi. afi. ocm. reserved. cti.
www.xilinx.com
118
Chapter 5
Interconnect
5.1 Introduction
The interconnect, located within the PS, comprises multiple switches to connect system resources using AXI point-to-point channels for communicating addresses, data and response transactions between master and slave clients. This ARM AMBA 3.0 interconnect implements a full array of the interconnect communications capabilities and overlays for QoS, debug and test monitoring. The interconnect manages multiple outstanding transactions and is architected for low-latency paths for the ARM CPUs and, for the PL master controllers, a high-throughput and cache coherent data paths.
5.1.1 Features
The interconnect is the primary mechanism for data communications. The following summarizes the interconnect features: The interconnect is based on AXI high performance datapath switches:
Snoop control unit L2 cache controller Interconnect switches based on ARM NIC-301 Central interconnect Master interconnect Slave interconnect Memory interconnect OCM interconnect AHB and APB bridges
PS-PL Interfaces
AXI_ACP, one cache coherent master port for the PL AXI_HP, four high performance/bandwidth master ports for the PL AXI_GP, four general purpose ports (two master ports and two slave ports)
www.xilinx.com
119
Chapter 5: Interconnect
Interconnect Masters
The interconnect masters are shown at the top of Figure 5-1. The interconnect masters include: CPUs and accelerator coherency port (ACP) High performance PL Interfaces, AXI_HP{3:0} General purpose PL interfaces, AXI_GP{1:0} DMA controller AHB masters (I/O peripherals with local DMA units) Device configuration (DevC) and debug access port (DAP)
Central Interconnect
The central interconnect is the core of the ARM NIC301-based interconnect switches.
Master Interconnect
The master interconnect switches the low-to-medium speed traffic from AXI_GP ports, DevC and DAP to the central interconnect.
Slave Interconnect
The slave interconnect switches the low-to-medium speed traffic from the central interconnect to AXI_GP, I/O peripherals (IOP) and other blocks.
Memory Interconnect
The memory interconnect switches the high speed traffic from the AXI_HP ports to DDR DRAM and on-chip RAM (via another interconnect).
OCM Interconnect
The OCM interconnect switches the high speed traffic from the central interconnect and the memory interconnect.
www.xilinx.com
120
Chapter 5: Interconnect
X-Ref Target - Figure 5-1
Synchronous CPU clock domain Asynchronous to is asynchronous to all else. all else.
CPU, L1 Clock cpu_6x4x AHB/APB Clock cpu_1x OCM Clock cpu_2x DDR Clock ddr_3x
Read/Write Request Capability 8 7,3 (e.g. 1 number: 8 reads, 8 writes) (e.g. 2 numbers: 7 reads, 3 writes)
PL Fabric
PL Fabric
Cortex A9
NEON/FPU Jazelle, Thumb-2, MMUs, L1 i/dCaches CPU_6x4x
PL Logic
Masters Data
32-bit CPU_1x M
DMA Controller
64-bit CPU_2x M
M2
M3
ASYNC 7,3
DAP M 1
ASYNC
FIFO
FIFO
FIFO
FIFO
S0
S1
S2
S3 32-bit
Master Interconnect
CPU_2x
S0
S1
S2
Memory Interconnect
DDR_2x M0 M1
64-bit
64-bit
M2
S1 512 kB CPU_6x4x M1 8
S0
S2
L2 Cache Controller
8 ASYNC 8 ASYNC ASYNC M0 8
Central Interconnect
M0
64-bit M1
CPU_2x M2
64-bit S0 S0 S1 S1
OCM Interconnect
CPU_2x QoS 64-bit M 4 ASYNC S1 256 kB CPU_6x4x CPU_2x S0
32-bit M0 8 ASYNC M1 8
Slave Interconnect
M2 4 ASYNC 32-bit
CPU_2x
ASYNC
M3 1 32-bit
On-chip RAM
S1
PL Logic
64-bit
64-bit S1 DDR_3x
UG585_c5_01_050212
Figure 5-1:
www.xilinx.com
121
Chapter 5: Interconnect
L2 Cache Controller
The functionality of the L2 cache controller is described in Chapter 3, Application Processing Unit. The address filtering feature of the L2 cache controller makes the L2 cache controller function like a switch from the perspective of the traffic from its AXI slave ports to its AXI master ports.
Interconnect Slaves
The interconnect slaves are shown toward the bottom of Figure 5-1. The Interconnect slaves include: On-chip RAM (OCM) DDR DRAM General purpose PL interfaces, M_AXI_GP{1:0} AHB slaves (IOP with local DMA units) APB slaves (programmable registers in various blocks) GPV (programmable registers of the interconnect, not shown in the figure)
5.1.3 Datapaths
Table 5-1 lists the major datapaths used by the PS interconnect. Table 5-1: Source
CPU AXI_ACP AXI_HP S_AXI_GP DevC DAP AHB masters DMA Controller Master IC. FIFO SCU Memory IC. Central IC. L2 Cache Central IC.
Type
AXI AXI AXI AXI AXI AHB AXI AXI AXI AXI AXI AXI AXI AXI AXI
Clock at source
CPU_6x4x SAXIACPACLK SAXIHPnACLK SAXIGPnACLK CPU_1x CPU_1x CPU_1x CPU_2x CPU_2x DDR_2x CPU_6X4x DDR_2x CPU_2x CPU_6x4x CPU_2x
Clock at destination
CPU_6x4x CPU_6x4x DDR_2x CPU_2x CPU_2x CPU_2x CPU_2x CPU_2x CPU_2x DDR_2x CPU_6x4x CPU_2x CPU_2x CPU_2x CPU_2x
Sync or Async(1)
Sync Async Async Async Sync Sync Sync Sync Sync Sync Sync Async Sync Sync Sync
Data width
64 64 32/64 32 32 32 32 64 64 64 64 64 64 64 64
www.xilinx.com
122
Type
AXI AXI APB AXI AXI AXI AXI AXI - (3)
Clock at source
CPU_6x4x CPU_2x CPU_2x CPU_2x CPU_2x CPU_6x4x CPU_2x DDR_2x CPU_2x
Clock at destination
CPU_2x CPU_2x CPU_1x CPU_1x MAXIGPnACLK DDR_3x DDR_3x DDR_3x (multiple)
Sync or Async(1)
Sync Sync Sync Sync Async Async Async Async -
Data width
64 64 32 32 32 64 64 64 -
www.xilinx.com
123
Chapter 5: Interconnect
Except for CPU_6X4X, CPU_2X, and CPU_1X, which are synchronous clocks with a ratio of 6:2:1 or 4:2:1, all clocks in the above list are asynchronous to one another, as shown in Figure 5-2.
X-Ref Target - Figure 5-2
M_AXI_GP
Async
Async
DevC DAP
CPUs
CPU_6x4x
Master Interconnect
CPU_2x 6:2:1 or 4:2:1 Ratio
Masters
CPU_1x
DMA Controller
CPU_2x
CPU_6x4x CPU_2x
CPU_6x4x
On-chip RAM
L2 Cache
Central Interconnect
CPU_2x
Async
OCM Interconnect
CPU_2x
Slave Interconnect
CPU_2x
Slaves
CPU_1x
APB Slaves
CPU_1x
Async
Async
Async
DDR DRAM
DDR_3x
S_AXI_GP
UG585_c5_02_012813
Figure 5-2:
www.xilinx.com
124
Chapter 5: Interconnect
5.1.5 Connectivity
The interconnect is not a full cross-bar structure. Table 5-2 shows which master can access which slave. Table 5-2: Master - Slave Access Slave On-chip RAM
X X X X X X X X X X X X X X X X X X X X X X X X X
Master CPUs AXI_ACP AXI_HP{0,1} AXI_HP{2,3} S_AXI_GP{0,1} DMA Controller AHB Masters DevC, DAP
DDR Port 0
X X
DDR Port 1
DDR Port 2
DDR Port 3
M_AXI _GP
X X
AHB Slaves
X X
APB Slaves
X X
GPV
X X
5.1.6 AXI ID
The interconnect uses 13-bit AXI IDs, consisting of (from MSB to LSB): 3 bits that identify the interconnect (central, master, slave, etc.) 8 bits supplied by the master; width is determined by the largest AXI ID width among all masters 2 bits that identify the slave interface of the identified interconnect
Table 5-3 lists all possible AXI ID values that a slave can observe. Table 5-3: Slave Visible AXI ID Values Master
AXI_HP0 AXI_HP1 AXI_HP2 AXI_HP3 DMAC controller AHB masters DevC DAP
Master ID width
6 6 6 6 4 3 0 0
www.xilinx.com
125
Chapter 5: Interconnect
Table 5-3:
Master ID width
6 6 8 8
Advanced QoS
www.xilinx.com
126
Chapter 5: Interconnect
In the PS, advanced QoS modules exist on the following paths: Path from L2 cache to DDR Path from DMA controller to the central interconnect Path from AHB masters to the central interconnect
The QoS module is based on ARMs QoS-301, which is an extension to the NIC-301 network interconnect. They provide facilities to regulate transactions as follows: Maximum number of outstanding transactions Peak rates, Average rates Burstiness
For more information, refer to CoreLink QoS-301 Network Interconnect Advanced Quality of Service Technical Reference Manual. The usage of QoS arbitration for all slave interfaces should be used with careful deliberation, as fixed priority arbitration leads to starvation issues if not used properly. By default, all ports have equal priority so starvation is not an issue.
Rationale
The user is expected to create well behaved masters in the PL, which sufficiently throttle their rate of command issuance, or use the AXI_HP issuance capability settings. However, traffic from CPUs
www.xilinx.com
127
Chapter 5: Interconnect
(through L2 cache), the DMA controller, and the IOP masters can interfere with traffic from the PL. The QoS modules allow users to throttle these PS masters to ensure expected/consistent throughput and latency for the user design in the PL or specific PS masters. This is especially useful for video,
which requires guaranteed maximum latency. By regulating the irregular masters like CPUs, the DMA controller, and IOP masters, it is possible to guarantee max latency for PL-based video.
5.3.1 Features
The interfaces are designed to provide a high throughput data path between PL masters and PS memories including the DDR and on-chip RAM. The main features include: 32- or 64-bit data wide master interfaces (independently programmed per port) Efficient dynamic upsizing to 64-bits for aligned transfers in 32-bit interface mode, controllable via AxCACHE[1] Automatic expansion to 64-bits for unaligned 32-bit transfers in 32-bit interface mode Programmable release threshold of write commands Asynchronous clock frequency domain crossing for all AXI interfaces between the PL and PS Smoothing out of long-latency transfers using 1 KB (128 by 64 bit) data FIFOs for both reads and writes QoS signaling available from PL ports Command and Data FIFO fill-level counts available to the PL Standard AXI 3.0 interfaces supported Programmable command issuance to the interconnect, separately for read and write commands Large slave interface read acceptance capability in the range of 14 to 70 commands (burst length dependent)
www.xilinx.com
128
Chapter 5: Interconnect
Large slave interface write acceptance capability in the range of 8 to 32 commands (burst length dependent)
RdAddr
WrAddr
WrData
BResp
Read Channel
Write Channel
RdAddr Channel Q
WrAddr Channel Q
BResp Channel Q
Registers
FIFO Levels
FIFO Levels
RdAddr
RdData
WrData
BResp
UG585_c5_03_072412
Figure 5-3:
www.xilinx.com
129
Chapter 5: Interconnect
M1
FIFO
M2
FIFO
M3
FIFO
S0
S1
S2
S3
Memory Interconnect
M0 M1 M2
Central Interconnect
S0 M
S1
OCM Interconnect
SCU
S1 S0
L2-cache
On-chip RAM
S3
S2
S1
S0
Figure 5-4:
5.3.4 Performance
See Chapter 22, Programmable Logic Design Guide for more information.
www.xilinx.com
130
Chapter 5: Interconnect
Module
Overview
Select 64- or 32-bit interface width mode. Various bandwidth management control settings. Maximum outstanding read/write commands. Read/write register-based Quality of Service (QoS) priority value. Read/write data FIFO register occupancy. Change arbitration priority of HP (and central interconnect) accesses at OCM with respect to SCU writes. Various priority settings for arbitration at DDR controller for AXI_HP (AFI) ports 2 and 3. Various priority settings for arbitration at DDR controller for AXI_HP (AFI) ports 0 and 1. Level shifters. Must be enabled before using any of the PL AXI interfaces.
AXI_HP
OCM
DDRC
SLCR
www.xilinx.com
131
Chapter 5: Interconnect
Table 5-6:
Type
I/O
O O O O I I I
Description
Fill level of the RdData Channel FIFO Fill level of the WrData Channel FIFO Fill level of the RdAddr Channel FIFO Fill level of the WrAddr Channel FIFO WrAddr Channel QOS input. Qualified by SAXIHP{0-3}AWVALID RdAddr Channel QOS input. Qualified by SAXIHP{0-3}ARVALID When asserted (1), indicates that the Maximum Outstanding Read Commands (Issuing Capability) should be derived from the rdIssueCap1 register. When asserted (1), indicates that the Maximum Outstanding Write Commands (Issuing Capability) should be derived from the wrIssueCap1 register.
FIFO Occupancy
SAXIHP{0-3}WRISSUECAP1EN
QoS Priority
The AXI QoS input signals can be used to assign an arbitration priority to the read and write commands. Note that the PS interconnect allows either master control or programmable (register) control as a configuration option. For the AFI, it is desirable to have the ability for masters to dynamically change the QOS inputs. However, to provide flexibility, the register field AFI_RDCHAN_CTRL.FabricQosEn is provided. This allows a static QoS value to be programmed via the high performance AXI interface port, ignoring the PL AXI QoS inputs.
FIFO Occupancy
The level of the data and command FIFOs for both read and write are exported to the PL allowing the user to take advantage of the QOS feature supported by the top-level interconnect. Based on the relative levels of these FIFOs, a PL controller could dynamically change the priority of the individual read and write requests into the high performance AXI interface block(s). If, for instance, a particular PL master read data FIFO is getting too empty, the priority of the read requests could be increased. The filling of this FIFO now takes priority over the other three FIFOs. When the FIFO reaches an acceptable fill-level, the priority typically is reduced again. The exact scheme used to control the relative priorities is flexible as it must be performed in the programmable logic. Note that the FIFO Level should be used as a relative level as opposed to an exact level, because clock domain crossing is involved. Another possible application of the FIFO levels is using them to look-ahead at the data fill level to determine if data can be read or written without having to use the AXI RVALID/WREADY handshake signals. This could potentially simplify the AXI interface design logic, enabling higher speeds of operation.
www.xilinx.com
132
Chapter 5: Interconnect
The Mode register selects between a complete AXI burst store-and-forward, a partial AXI burst store-and-forward, or a pass through (no store at all). If absolute minimum latency for write commands is required, the pass-through mode could be selected. However, in cases where multiple masters are competing for the system slaves, better system performance can likely be achieved using at least the partial AXI burst store-and-forward mode. This is because once an AXI write is committed at each point throughout the PS, the entire burst must be processed before any other write data from other write commands can be processed. For example, using pass-through mode, if one HP port with a slow clock rate issues a long burst, a second port with a faster clock rate might need to wait until the entire slower write data burst has been transferred, even if all of the write data on the fast clock is available. This is different from the case of reads, where read data interleaving is permitted.
www.xilinx.com
133
Chapter 5: Interconnect
For the 32-bit mode, an expansion or upsizing must be performed to the 64-bit bus. These are defined as follows: Expansion. The AxSIZE[] and AxLEN[] fields remain unchanged on the 64-bit bus. The number of data beats in the 64-bit domain is therefore the same as the number of data beats in the 32-bit domain. This is the simplest option but also the most inefficient in terms of bandwidth utilization. Upsizing. This is an optimization that makes better use of the 64-bit bus available bandwidth. The AxSIZE[] field can be changed to `64-BIT (expansion case it is `32-BIT or less) and the AxLEN[] field can potentially be adjusted to make use of the 64-bit bus. For a full width transfer, the number of data beats in the 64-bit domain is now, at best, half the number of data beats in the 32-bit domain. For example, a burst of 16x32-bit is upsized to a burst of 864-bit.
Note: Upsizing only occurs if the AxCACHE[1] bit is set. If it is not, expansion of the command
occurs. This means that the user can dynamically control, on a per-command basis, whether to expand or upsize.
internal 64-bit PS transactions. Whatever appears at the PL port is passed as is to the PS port. In 64-bit mode no upsizing or expansion is performed. This also applies to narrow transactions in the 64-bit mode.
Note: In 64-bit mode, there is no translation between the programmable logic transactions and the
2.
The implication of the above is that for expanded commands, performance is very limited, as command pipelining is essentially disabled.
Note: All valid AXI command are still supported, just not optimized to take advantage of the 64-bit
bus bandwidth. In the case of write commands completing out-of-order, no performance penalty is incurred because the BRESP can be issued in any order directly back to the PL ports. To be symmetric across read and write operations, the high performance AXI interface also only upsizes 64-bit aligned burst multiples of 2, incremental burst write commands, in 32-bit mode. In the case of writes however, no blocking of expanded commands occur. Write performance for expanded commands in 32-bit mode is therefore much higher than read performance.
www.xilinx.com
134
Chapter 5: Interconnect
Command Type
64-bit Reads All Burst types Narrow Read 64-bit Write All Burst types Narrow Write 32-bit INCR Read Aligned to 64-bits Even burst multiples All other 32-bit Read Commands 32-bit INCR Write Aligned to 64-bits Even burst multiples All other 32-bit Write Commands
Translation
None None None None Upsized to 64-bits Expanded to 64-bits Upsized to 64-bits Expanded to 64-bits
Comments
Best optimization possible. Because no upsizing is performed, the narrower the width, the more inefficient the transaction. Best optimization possible. Because no upsizing is performed, the narrower the width, the more inefficient the transaction. Best 32-bit mode optimization possible. Each read command is blocked until all previous read commands are completed. Extremely inefficient. Best 32-bit mode optimization possible. Relatively inefficient because no upsizing is performed. No blocking occurs for writes.
www.xilinx.com
135
Chapter 5: Interconnect
In 64-bit AXI mode: FIFO not full (SAXIHP0WCOUNT << 128) always implies WREADY=1 . In 32-bit AXI mode: There is a dependency between the write address (AWVALID) and the write data (WVALID). If the write address is presented at least one cycle before the first beat of any given write data burst, then the FIFO not full (SAXIHP0WCOUNT << 128) implies WREADY= 1 . If not, then WREADY is de-asserted until the write address is produced. The reason for this back pressure is that in 32-bit mode, expansion/upsizing is performed on the data into the write data FIFO.
Write response (BVALID) latency is dependent on many factors, such as DDR latency, DDR transaction reordering, and other conflicting traffic (including higher-priority transactions). Write commands and data are sent the entire path to the slave (DDR or OCM) and the response is issued by the slave to return to the high performance AXI interface. Transactions issued after reception of the write response is guaranteed to be committed later at the slave than the responded write transaction.
www.xilinx.com
136
Chapter 5: Interconnect
APU
PL Logic
CPUs
Snoopable Data Buffers And Caches L1 Cache Read/Write Line Updates Requests
Cache Coherent Transactions S S Flush Cache Line to Memory Cache Tag RAM Update
SCU
M1
Tag RAM
System Interconnect
OCM
M0
Tag RAM
L2 Cache
Data RAM M1
DDR
System Interconnect
UG585_c5_05_101212
Figure 5-5:
www.xilinx.com
137
Chapter 5: Interconnect
5.5.2 Performance
These interfaces are connected directly to the ports of the master interconnect and the slave interconnect, without any additional FIFO buffering, unlike the AXI_HP interfaces which has elaborate FIFO buffering to increase performance and throughput. Therefore, the performance is constrained by the ports of the master interconnect and the slave interconnect. These interfaces are for general-purpose use only and are not intended to achieve high performance. The PL level shifters must be enabled via LVL_SHFTR_EN before PL logic communication can occur.
I/O
Clock, Reset
MAXIGP{0,1}ACLK I I
www.xilinx.com
138
Chapter 5: Interconnect
Table 5-8:
AXI Signals Summary (Contd) AXI PS Masters AXI PS Slaves I/O S_AXI_GP{0,1} S_AXI_HP{0:3} S_AXI_ACP
SAXIGP{0,1}ARESETN SAXIHP{0:3}ARESETN SAXIACPARESETN
AXI Channel
M_AXI_GP{0,1}
MAXIGP{0,1}ARESETN
I/O
Read Address
MAXIGP{0,1}ARADDR[31:0] O SAXIGP{0,1}ARADDR[31:0] SAXIHP{0:3}ARADDR[31:0] SAXIACPARADDR[31:0] SAXIGP{0,1}ARVALID SAXIHP{0:3}ARVALID SAXIACPARVALID SAXIGP{0,1}ARREADY SAXIHP{0:3}ARREADY SAXIACPARREADY SAXIGP{0,1}ARID[5:0] SAXIHP{0:3}ARID[5:0] SAXIACPARID[2:0] SAXIGP{0,1}ARLOCK[1:0] SAXIHP{0:3}ARLOCK[1:0] SAXIACPARLOCK[1:0] SAXIGP{0,1}ARCACHE[3:0] SAXIHP{0:3}ARCACHE[3:0] SAXIACPARCACHE[3:0] SAXIGP{0,1}ARPROT[2:0] SAXIHP{0:3}ARPROT[2:0] SAXIACPARPROT[2:0] SAXIGP{0,1}ARLEN[3:0] SAXIHP{0:3}ARLEN[3:0] SAXIACPARLEN[3:0] SAXIGP{0,1}ARSIZE[1:0] SAXIHP{0:3}ARSIZE[2:0] SAXIACPARSIZE[2:0] SAXIGP{0,1}ARBURST[1:0] SAXIHP{0:3}ARBURST[1:0] SAXIACPARBURST[1:0] SAXIGP{0,1}ARQOS[3:0] SAXIHP{0:3}ARQOS[3:0] SAXIACPARQOS[3:0] ~ ~ SAXIACPARUSER[4:0] I
MAXIGP{0,1}ARVALID
MAXIGP{0,1}ARREADY I MAXIGP{0,1}ARID[11:0]
Read Data
www.xilinx.com
139
Chapter 5: Interconnect
Table 5-8:
AXI Signals Summary (Contd) AXI PS Masters AXI PS Slaves I/O S_AXI_GP{0,1} S_AXI_HP{0:3} S_AXI_ACP
SAXIGP{0,1}RDATA[31:0] SAXIHP{0:3}RDATA[63:0] SAXIACPRDATA[63:0] SAXIGP{0,1}RVALID SAXIHP{0:3}RVALID SAXIACPRVALID SAXIGP{0,1}RREADY SAXIHP{0:3}RREADY SAXIACPRREADY SAXIGP{0,1}RID[5:0] SAXIHP{0:3}RID[5:0] SAXIACPRID[2:0] SAXIGP{0,1}RLAST SAXIHP{0:3}RLAST SAXIACPRLAST SAXIGP{0,1}RRESP[2:0] SAXIHP{0:3}RRESP[2:0] SAXIACPRRESP[2:0] ~ SAXIHP{0:3}RCOUNT[7:0] ~ ~ SAXIHP{0:3}RACOUNT[2:0] ~ ~ SAXIHP{0:3}RDISSUECAP1EN ~
AXI Channel
M_AXI_GP{0,1}
MAXIGP{0,1}RDATA[31:0]
I/O
Write Address
MAXIGP{0,1}AWADDR[31:0] O SAXIGP{0,1}AWADDR[31:0] SAXIHP{0:3}AWADDR[31:0] SAXIACPAWADDR[31:0] SAXIGP{0,1}AWVALID SAXIHP{0:3}AWVALID SAXIACPAWVALID SAXIGP{0,1}AWREADY SAXIHP{0:3}AWREADY SAXIACPAWREADY SAXIGP{0,1}AWID[5:0] SAXIHP{0:3}AWID[5:0] SAXIACPAWID[2:0] I
MAXIGP{0,1}AWVALID
MAXIGP{0,1}AWREADY I MAXIGP{0,1}AWID[11:0]
www.xilinx.com
140
Chapter 5: Interconnect
Table 5-8:
AXI Signals Summary (Contd) AXI PS Masters AXI PS Slaves I/O S_AXI_GP{0,1} S_AXI_HP{0:3} S_AXI_ACP
SAXIGP{0,1}AWLOCK[1:0] SAXIHP{0:3}AWLOCK[1:0] SAXIACPAWLOCK[1:0] SAXIGP{0,1}AWCACHE[3:0] SAXIHP{0:3}AWCACHE[3:0] SAXIACPAWCACHE[3:0] SAXIGP{0,1}AWPROT[2:0] SAXIHP{0:3}AWPROT[2:0] SAXIACPAWPROT[2:0] SAXIGP{0,1}AWLEN[3:0] SAXIHP{0:3}AWLEN[3:0] SAXIACPAWLEN[3:0] SAXIGP{0,1}AWSIZE[1:0] SAXIHP{0:3}AWSIZE[2:0] SAXIACPAWSIZE[2:0] SAXIGP{0,1}AWBURST[1:0] SAXIHP{0:3}AWBURST[1:0] SAXIACPAWBURST[1:0] SAXIGP{0,1}AWQOS[3:0] SAXIHP{0:3}AWQOS[3:0] SAXIACPAWQOS[3:0] ~ ~ SAXIACPAWUSER[4:0]
AXI Channel
M_AXI_GP{0,1}
MAXIGP{0,1}AWLOCK[1:0]
I/O
Write Data
MAXIGP{0,1}WDATA[31:0] O MAXIGP{0,1}WVALID O MAXIGP{0,1}WREADY I MAXIGP{0,1}WID[11:0] O MAXIGP{0,1}WLAST O SAXIGP{0,1}WDATA[31:0] SAXIHP{0:3}WDATA[63:0] SAXIACPWDATA[63:0] SAXIGP{0,1}WVALID SAXIHP{0:3}WVALID SAXIACPWVALID SAXIGP{0,1}WREADY SAXIHP{0:3}WREADY SAXIACPWREADY SAXIGP{0,1}WID[5:0] SAXIHP{0:3}WID[5:0] SAXIACPWID[2:0] SAXIGP{0,1}WLAST SAXIHP{0:3}WLAST SAXIACPWLAST I
www.xilinx.com
141
Chapter 5: Interconnect
Table 5-8:
AXI Signals Summary (Contd) AXI PS Masters AXI PS Slaves I/O S_AXI_GP{0,1} S_AXI_HP{0:3} S_AXI_ACP
SAXIGP{0,1}WSTRB[3:0] SAXIHP{0:3}WSTRB[7:0] SAXIACPWSTRB[7:0] ~ SAXIHP{0:3}WCOUNT[7:0] ~ ~ SAXIHP{0:3}WACOUNT[5:0] ~ ~ SAXIHP{0:3}WRISSUECAP1EN ~
AXI Channel
M_AXI_GP{0,1}
MAXIGP{0,1}WSTRB[3:0]
I/O
O ~
Write Response
MAXIGP{0,1}BVALID I MAXIGP{0,1}BREADY O MAXIGP{0,1}BID[11:0] I MAXIGP{0,1}BRESP[1:0] I SAXIGP{0,1}BVALID SAXIHP{0:3}BVALID SAXIACPBVALID SAXIGP{0,1}BREADY SAXIHP{0:3}BREADY SAXIACPBREADY SAXIGP{0,1}BID[5:0] SAXIHP{0:3}BID[5:0] SAXIACPBID[2:0] SAXIGP{0,1}BRESP[1:0] SAXIHP{0:3}BRESP[1:0] SAXIACPBRESP[1:0] O
www.xilinx.com
142
Chapter 6
Power, resets , boot mode pins , and clocks Hard-coded CPU instructions to configure the PS for the boot device PCAP/HMAC/AES
Boot ROM
The device configuration unit (DevC) includes all the methods and procedures for initializing and configuring the PL under software control.
www.xilinx.com
143
The DevC uses the Advanced Encryption Standard (AES) and Hash-based Message Authentication Code (HMAC) for decryption of the FSBL and PL bitstream. These are accessed via the DevC and the Processor Configuration Access Port (PCAP).
Stage 1
This is generally the FSBL, but it can be any user-controlled code. Please refer to UG821, Zynq-7000 Software Developer s Guide for details about the FSBL.
Stage 2
This is generally the user processing system design , but it could also be a second stage boot loader (SSBL) . This stage is completely within user control and is not described further in this chapter. Please refer UG821, Zynq-7000 Software Developer s Guide for details about FSBL and stage 2 images.
Secure
Yes
www.xilinx.com
144
Table 6-1:
Note: This signal cannot be asserted while the boot ROM is executing from a POR reset. If
PS_SRST_B is asserted while the boot ROM is running through a POR reset sequence it will trigger a lock-down event preventing the boot ROM from completing. To recover from lockdown the device either needs to be power cycled or PS_POR_B needs to be asserted.
Both of these external resets result in the following device flow: If power-on reset (POR) is issued, the BOOT_MODE register is updated If PLL is enabled (not bypass), device waits for the PLL to lock Debug reset (for CPU and DAP) is de-asserted Device enters same path as for a warm reset (see below)
There are also internal warm reset signals that result in the boot ROM executing again. When these reset sources are triggered the following steps occur in the device:
www.xilinx.com
145
The PS boot mode selections are shown in Table 6-2. The BOOT_MODE bits correspond to the associated register. Table 6-2: Boot_Mode Strapping MIO Pins VMODE[1] VMODE[0] MIO[8] Cascaded JTAG Independent JTAG Boot Devices JTAG NOR NAND
Reserved 0 0 0 0 1 1 1 1 0 0 1 1 0 0 1 1 0 1 0 1 0 1 0 1 0
BOOT_MODE BOOT_MODE BOOT_MODE BOOT_MODE BOOT_MODE [4] [0] [2] [1] [3] MIO[6] MIO[5] MIO[4] MIO[3] MIO[2]
0 1
MIO[7]
Quad-SPI
Reserved SD Card Reserved
PLL Mode
www.xilinx.com
146
Table 6-2:
Boot_Mode Strapping MIO Pins (Contd) VMODE[1] VMODE[0] BOOT_MODE BOOT_MODE BOOT_MODE BOOT_MODE BOOT_MODE [4] [0] [2] [1] [3] MIO[8] MIO[7] MIO[6] 0 1 MIO Bank 0 Voltage MIO[5] MIO[4] MIO[3] MIO[2]
0 1
Secure, encrypted image, master mode Non-secure master mode Non-secure slave mode via JTAG Quad-SPI flash NAND flash NOR flash SD card
PS secure configuration using AES-256 and HMAC (SHA-256) SoC debug security Execute-in-place from NOR and QSPI
PS configuration starts after power-on reset. The ARM CPU starts executing code from the on-chip boot ROM with JTAG disabled. The boot ROM contains code for base drivers for NAND, NOR, Quad-SPI, SD card, and PCAP. DDR and other peripheral initializations are not performed from the boot ROM and must be done in the stage 1 image or later. For security reasons, the CPU is always the first device out of reset among all master modules within the PS. While the boot ROM is running, JTAG is disabled to ensure security.
www.xilinx.com
147
The boot ROM code is also responsible for loading the stage 1 boot image. AP SoC hardware supports multi-stage user boot image loading; any further user boot image loading after stage 1 is the user's responsibility. When the boot ROM releases control to stage 1, user software assumes full control of entire system. The only way to execute the boot ROM again is by performing a reset. The PS boot source is selected via the BOOT_MODE signals (indicated by a weak pull-up or pull-down applied to specific pins), which are sampled once during power-on reset. The sampled value is stored in the slcr.BOOT_MODE register. The boot ROM supports encrypted and unencrypted images referred to as secure boot and non-secure boot , respectively. Additionally the boot ROM supports beginning execution of the stage 1 image directly from linear flash (NOR or QSPI) when using the execute-in-place (XIP) feature, only for non secure boot images. XIP is possible only for NOR and QSPI modes. In secure boot, the CPU, running from secure boot ROM code, decrypts and authenticates the incoming user PS image, stores it in the OCM RAM, and then branches into it. In non-secure boot, the CPU, running from boot ROM code, disables all secure boot features including the AES engine within the PL before branching to the user image in the OCM RAM or flash (if XIP is used). The PS boot image is limited to 192 KB unless booting with XIP. Any subsequent boot stages for either the PS or the PL are the user's responsibility and are under the user's control. The boot ROM code is not accessible to the user. Following a stage 1 secure boot, the user can proceed with either secure or non-secure subsequent boot stages. Following a non-secure first stage boot, only non-secure subsequent boots stages are possible. For decryption and authentication, the PS uses the hard-wired AES-256 and HMAC (SHA-256) modules within the PL. For this reason, the PL must be powered up during any secure boot, even if only the PS is configured. The device encryption key is user-selectable from either the on-chip eFUSE unit or the on-chip BBRAM. There are five possible boot sources: NAND, NOR, SD card, Quad-SPI, and JTAG. The first four boot sources are used in master boot methods in which the CPU loads the external boot image from non-volatile memory into the PS. JTAG can only be used in slave boot mode, and only supports a non-secure boot. An external host computer acts as the master to load the boot image into the OCM via a JTAG connection. The PS CPU remains in idle mode as the boot image is loaded. The high-level configuration flow for the boot ROM is shown in Figure 6-1.
www.xilinx.com
148
OUT-OF-POWER-ON-RESET-STATE 1. All JTAG Debug Modes are Disabled (SPIDEN, SPNIDEN, DBGEN, NIDEN) 2. ROM Code Access is Disabled 3. Boot Mode Pins are Latched in Power-on-Reset Only.
OUT-OF-SOFTWARE-RESET-STATE (Reset by WDT, SW, JTAG etc) 1. All JTAG Debug Modes are disabled (SPIDEN, SPNIDEN, DBGEN, NIDEN) 2. ROM Code Access is aDisabled Note: DAP Controller is Disabled in a Soft reset.
eFUSE Scan
PLL_BYPASS?
BIST Clear. ARM Out-Of-Reset and starts executing code from ROM.
A
PLL Initialization if SW RST If Time Out No Yes
A
No SEC_EN == 1 192K OCM Boot Secure Feature Disable
1. Set PCFG_AES_EN = 0 2. Set SEC_En = 0 3. Set USER_MODE = 1 4. Lock SEC_LOCK, AES_EN_LOCK, AES_FUSE_LOCK
ROM Default Register Initialization BootStrap Detection By ROM Code. Non Secure Setup Yes No BootStrap == JTAG? Secure Lockdown
Clean PS and PL. Force FORCE_RST Signal to Clean All Internal RAMs
Empty
1M
DDR
DAP-AP Enable
1GB
1. Set DAP_EN[2:0] = 111 2. Set all ARM DBGEN to 1 2. CPU enter idle mode 3. Enable JTAG_CHAIN_DIS = 0
Peripheral
No
Valid Header Found? Yes Load Boot image header from selected boot device.
Yes
Check if PL is Powered Up
If Time Out No
Yes
Yes XIP_Boot? No
CPU Load endrypted PSS Image Through PCAP Interface. PSS Image will be push into a special PCAP register within FPGA configuration logic. FPGA configuration will decrypt incoming image and loop back the decrypted image in parallel with encrypted image loading, Return decrypted image will be written into on-chip RAM within PSS.
Pass HMAC? Yes ROM Code access is disabled. DAP JTAG access is disabled. Branch to User Code.
No
Figure 6-1:
www.xilinx.com
149
Table 6-3:
Table 6-3 shows the layout of the flash boot ROM header with offsets relative from the beginning of the flash ROM. Each word is 32 bits in size. The header between 0 and 0x8C0 is always in clear non-encrypted form regardless of the state of the encryption status word. Default values, usage, and behavior are described in the following sections.
www.xilinx.com
150
manage the vector table location is to use the coprocessor VBAR register. For more information on setting this register refer to the ARM v7-AR Architecture Reference Manual (see Appendix A, Additional Resources).
A value of 0 (zero) indicates a non-encrypted boot image. Any other value causes the boot ROM to do a lockdown.
www.xilinx.com
151
This word must contain the start address relative to the OCM. For non-secure mode the address must be equal to or greater than 0x0 and less than 0x30000 . For secure mode the address must equal 0x0 . Execution attempts outside of the OCM memory space cause a security lockup. This word contains the start address within the Flash device (NOR or QSPI). The address must be within the first 32 MB of the NOR or QSPI linear address space.
If execute-in-place is used:
www.xilinx.com
152
A register initialization appears as two words, first a register address, then a register value. Register initializations can be in any order, and the same register can be initialized with different values as many times as needed. The register initialization is performed prior to copying the stage 1 image allowing modification of the default system setup for maximum configuration performance. The allowable address range depends on whether the image is secure or non-secure: Secure mode allows addresses from 0xF8000100 to 0xF80001AF For non-secure mode refer to 6.3.7 Accessible Addresses for Boot Image Address-Data Writes.
The boot ROM stops register initialization when either 0xFFFFFFFF register address is encountered or after the last register initialization pair ( 0x898 - 0x89F ). Register address values equal to 0xFFFFFFFF or out of the allowed address range cause the boot ROM to perform a security lockup.
The boot timeline is divided into five stages: 1. 2. 3. 4. 5. Power ramp time PLL lock time (TPSPLLLOCK) PL clear time (TPOR) Register initialization Stage 1 image copy/execution
Power supply ramp times can be long. For boot-time critical applications, the user should consider using a high-performance power supply to reduce power ramp time. PLL lock time could vary from 1,000 reference clock cycles to 10,000 reference clock cycles, but it is relatively small compared to the other boot stages. Additionally, register initialization takes a negligible amount of time, but can have a drastic effect on the stage 1 image copy when XIP is not used.
www.xilinx.com
153
The PL clear time is variable depending on whether the PL is powered while the boot ROM is running. Secure boot mode and JTAG boot mode require the PL to be powered while the boot ROM is running. If the PL is powered while the boot ROM is running the startup time is extended by TPOR. Given the high internal bandwidth of the DevC DMA module (100 MB/s secure, 400 MB/s non-secure) image load time is typically limited by the non-volatile RAM bus bandwidth. The stage 1 image copy and execute time varies greatly depending on the configuration interface. For specific numbers refer to the applicable Zynq 7000 data sheet. As this is the default stage 1 startup time these numbers can be significantly reduced using the register initialization table in the boot ROM header.
Additionally Zynq-7000 devices can be programmed via a JTAG. This section details features of each configuration interface. For details on the specific devices Xilinx recommends for each boot interface please refer to AR 50991 http://www.xilinx.com/support/answers/50991.htm.
Quad-SPI Flash
Quad-SPI booting has these features: x1, x2, and x4 single device configuration Dual x4 device configuration Execute-in-place
The boot ROM uses the width-detection word in the boot header to determine whether configuration is taking place from a single Quad-SPI device or dual parallel Quad-SPI devices. The boot ROM starts Quad-SPI configuration by enabling the single device pins and then attempts to read the width-detection word. If it sees the expected value it continues with the appropriate x4 , x2, or x1 setup . If the boot ROM reads the flash device and sees a value of 0xACCA50AF it sets the controller up for dual x4 Quad-SPI configuration. If the BootROM does not find a value of 0xAA995566 or 0xACCA50AF then it continues searching for an image header to allow for width-detection until the 32 MB address limit. The values loaded in to MIO_PIN registers during the Quad-SPI boot mode are shown in Table 6-4. Initially, the boot ROM enables 4-bit mode and then reads the width-detection word register in the device. If the width indicates an 8-bit data width, then additional MIO pins are enabled as shown in Table 6-4.
www.xilinx.com
154
Table 6-4:
Boot ROM Quad-SPI Boot MIO Register Settings MIO Pin Number MIO_PIN Register Setting Pin State I/O I/O Buffer Output, Pull-up
Enabled Enabled Enabled 3-state 3-state 3-state
External Connection
~ Pull up/down Pull up/down Pull up/down Pull up/down ~
Quad-SPI Boot
QSPI_CS0 QSPI_IO{0:3} QSPI_SCLK0 not Quad-SPI QSPI_SCLK_FB_OUT (not used for boot) not Quad-SPI MIO 1 MIO 2 to 5 MIO 6 MIO 7 MIO 8 MIO 14 to 53 0x0602 0x0602 0x0602 reset value reset value reset value O IO O I I I
The boot ROM uses the linear addressing feature of the Quad-SPI controller, so only the first 32 MB are accessible for storing the stage 1 image. Memory above the first 32 MB is available after the boot ROM passes execution to the stage 1 image. The boot ROM sets QSPI.LQSPI_CFG to use these settings: CLK_POL: 0 CLK_PH: 0 BAUD_RATE_DIV: 1 (by 4) INST_CODE is set as:
www.xilinx.com
155
NAND
NAND boot has these features: 8-bit or 16-bit NAND flash devices Supports ONFI 1.0 device protocol Bad block support 1-Bit hardware ECC support
The boot ROM reads the ONFI compliant parameter information in 8-bit mode to determine the device width. The boot image must be located within 4 GB address space of the NAND flash device. If the device is 16 bits wide, then the boot ROM enables the upper eight I/O signals for a 16-bit data bus. The MIO pin assignments for 8- and 16-bit boot modes are listed in Table 6-5.
Note: The 16-bit NAND interface is not available in the 7z010 CLG225 device.
Table 6-5: Boot ROM NAND Flash Boot MIO Register Settings MIO Pin Number MIO_PIN Register Setting NAND Boot
SMC_NAND_CS_B Addr25, CS1 or other SMC_NAND_ALE SMC_NAND_WE_B SMC_NAND_DATA2 SMC_NAND_DATA0 SMC_NAND_DATA1 SMC_NAND_CLE SMC_NAND_RD_B SMC_NAND_DATA{4:7} SMC_NAND_DATA3 SMC_NAND_WAIT not NAND not NAND MIO 0 MIO 1 MIO 2 MIO 3 MIO 4 MIO 5 MIO 6 MIO 7 MIO 8 MIO 9 to 12 MIO 13 MIO 14 MIO 15 MIO 24 to 53 0x0610 reset value 0x0610 0x0610 0x0610 0x0610 0x0610 0x0610 0x0610 0x1610 0x1610 0x0610 reset value reset value IO I O O IO IO IO O O IO IO I I I Enabled 3-state Enabled Enabled Enabled Enabled Enabled Enabled Enabled Enabled, Pull-up Enabled, Pull-up 3-state 3-state 3-state ~ Pull up/down Pull up/down Pull up/down Pull up/down Pull up/down Pull up/down Pull up/down ~ ~ ~ ~ ~
16-NAND Boot
SMC_NAND_DATA{8:15} MIO 16 to 23 0x1610 IO Enabled, Pull-up ~
www.xilinx.com
156
When working with NAND there are three primary considerations that must be made from the boot ROM standpoint: Bad Blocks: How to read and write RAW data reliably. ECC: Recovering from bit disturbances. Partitioning Memory: dividing flash memory into logical sections (partitions) with consideration for bad blocks.
The BootROM manages bad blocks in the following way: It looks for a bad block table (BBT) in the last four blocks of the NAND flash device. It supports a primary and secondary BBT with versioning allowing safe software updates. If a BBT is not present the boot ROM scans the flash reading the Out-Of-Band (OOB) information to determine the locations of bad blocks. The boot ROM only performs read operations it does not write to flash.
While reading from NAND the boot ROM skips blocks that are marked as bad in the BBT or in the OOB information if a BBT does not exist. For example: consider a flash device has bad blocks located at block 1, 3, and 5 (seeFigure 6-2): When writing the image to flash, blocks 1, 3, and 5 must be skipped. When reading, the boot ROM reads the full user data from the good blocks as they are encountered.
The Zynq NAND controller can manage 1-bit of ECC in hardware. For more details on the ECC capabilities of the controller please refer to chapter 11. The boot ROM is aware of on-die ECC devices and automatically setups the controller so that ECC is disabled on it allowing the NAND device to take care of ECC. The BootROM treats NAND flash as one continuous partition. From a user perspective, this only affects the Multiboot register. The Multiboot register value written is offset by the number of bad blocks leading up to the target address. Consider the following example: Image with two multiboot sections Image is 1 MB in size. Block size is 128 KB. Second multiboot section starts at 512 KB. Bad blocks are located at 128 KB and 256 KB offsets.
In this scenario, the image should be programed as one partition which results in the second multiboot section being offset by 256 KB total (2 blocks worth). When the multiboot register is written it can be set to 512 KB offset and the boot ROM take cares of calculating the new start address based on where the bad blocks reside.
www.xilinx.com
157
User Image
Key:
User Data Unused Bad Block
0x00000000 Block 0 Block 1 Block 2 Block 3 Block 4 Block 5 Block 6 Block 7 Block 8 Block 9 Block 10
UG585_c6_10_021213
Figure 6-2:
The boot ROM uses the following NAND timing values: t_rr = 0x02 t_ar = 0x02 t_clr = 0x01 t_wp = 0x03 t_rea = 0x02 t_wc = 0x05 t_rc = 0x05
NOR
NOR boot has these features: Execute-in-place Support for asynchronous flash Supports x8 flash devices
www.xilinx.com
158
Densities up to 256 Mb
The boot ROM does not try to perform any configuration detection of NOR flash devices. When NOR is selected for configuration the boot ROM enables the pins in Table 6-6.
Note: The NOR and SRAM interfaces are not available in the 7z010 CLG225 device.
Table 6-6: Boot ROM NOR/SRAM Flash Boot MIO Register Settings MIO Pin Number
MIO 0 MIO 1 MIO 2 MIO 3 to 6 MIO 7 MIO 8 MIO 9 to 10 MIO 11 MIO 12 MIO 13 MIO 14 MIO 15 to 39 MIO 40 to 53
External Connection
~ ~ Pull up/down Pull up/down Pull up/down Pull up/down ~ ~ ~ ~ ~ ~ ~
The shared memory controller is set up to operate with the following timing parameters in the boot ROM (Register SMC.SET_CYCLES): t_rc = 7 t_wc = 7 t_ceoe = 2 r_wp = 5 t_pc = 2 t_tr = 1 we_time = 0
SD Card
SD boot supports these features: Boot from standard SD or SDHC cards FAT 16/32 file system support for storing initial image
www.xilinx.com
159
Up to 32 GB densities
Note: The SD card boot mode is not supported in the 7z010 CLG225 device.
The boot ROM performs these steps while booting SD: 1. 2. 3. 4. 5. Initializes the MIO pins listed in Table 6-7 Configures SDIO_CLK_CTRL to a divisor of 32 and SD_CLK_CTL_R with a value of 1 (divide by 2) Sets the SD controller to operate in 4-bit mode Reads BOOT.BIN from the root of the SD file system and copies it into OCM after parsing the required boot ROM header Starts execution from the beginning of OCM Boot ROM SD Card Boot MIO Register Settings MIO Pin Number
MIO 0, 1 MIO 2 to 8 MIO 9 to 39 MIO 40 MIO 41 MIO 42:45
Table 6-7:
External Connection
~ Pull up/down ~ ~ ~ ~
For the boot ROM to read BOOT.BIN the SD card must be partitioned so that the first partition is a FAT file system. Additional non-FAT partitions are permitted, but the boot ROM does not use the partitions to boot.
JTAG
When the JTAG boot mode is selected, the CPU halts immediately after it disables access to all security-related items and enables the JTAG port. It is the user's responsibility to manage downloading the boot image into OCM RAM or DDR memory via JTAG before waking up the CPU and continuing the boot process.
www.xilinx.com
160
Table 6-8:
Boot ROM Error Lockdown, JTAG and System Reset MIO Register Settings MIO_PIN Register Setting Pin State PL JTAG Boot Mode
reset value reset value reset value reset value
MIO Pin
Error Lockdown
reset value reset value reset value reset value
I/O
I I O I
External Connection
~ Pull up/down Pull up/down ~
MIO pin {0:1} MIO pin {2:6} MIO pin {7:8} MIO pin {9:53}
www.xilinx.com
161
FSBL
MULTIBOOT
REBOOT_ADDR = REBOOT_OFFSET * 32 KB
Set REBOOT_OFFSET
Yes
MULTIBOOT?
No Warm Reset Read Header at REBOOT_ADDR REBOOT_ADDR += 32 KB HEADER CHECK PASSED? Yes Continue Execution
No
REBOOT_OFFSET = REBOOT_ADDR / 32 KB
Jump to FSBL
BootROM
Stage 1
Figure 6-3:
Figure 6-3 demonstrates the multiboot flow from the stage 1 Image. The mechanism used in stage 1 could be used in later device stages as well.
www.xilinx.com
162
To use multiboot, multiple images must be placed in flash. Each image requires a boot ROM header. These images can be placed in any order, but after POR the boot ROM uses the first image in flash as the initial image. The steps to use multiboot are as follows: 1. Calculate the REBOOT_OFFSET address: a. This offset is relative to the beginning of flash b. REBOOT_OFFSET can be calculated as: Image Byte Address in Flash / 0x8000 2. 3. Write REBOOT_OFFSET to MULTIBOOT_ADDR[12:0]. Perform a warm/soft reset.
For partition search to work, the golden images should be placed after the image intended for load in the absence of a failure. Figure 6-4 and Figure 6-5 demonstrate the flash layout required for boot partition search. Normally the device boots from the standard image but in the event of a failure the boot ROM searches, finds, and boots from the golden image.
X-Ref Target - Figure 6-4
Flash
Figure 6-4:
www.xilinx.com
163
Flash
Figure 6-5:
Corrupt Flash
The boot ROM partition search mechanism protects against these failures: An update was started on the standard image but the system was interrupted after erasing the section requiring an update. The write operation began but the write process only partially finished.
The boot ROM partition search mechanism does not protect against these failures: The section of memory where the standard image resides became corrupt by some unspecified means. A complete image was written but it is non-functional.
To provide a mechanism for fallback configuration, the boot ROM provides the following functionality: The boot ROM looks for a keyword in the header to identify a boot ROM image ("XLNX" at offset 0x24 in header). The boot ROM calculates a checksum to verify that the header is not corrupt. (Comparison value is located at 0x48 in header.)
If there is a failure in any of the checks, the boot ROM begins searching on 32 KB boundaries for another image that passes the keyword test and the CRC check. The boot ROM is only capable of handling one fallback image. Additionally, the boot ROM only searches a limited address space on the configuration device: SD card: single image in boot page, no searching NAND: first 128 MB NOR: first 32 MB Quad-SPI, signal/dual SS with 4-bit I/O: first 16 MB Quad-SPI, dual SS with 8-bit Parallel I/O: first 32 MB
www.xilinx.com
164
In non-secure mode INIT_B drives Low indicating a failure. In secure mode INIT_B pulses the 16-bit error code.
2.
In non-secure boot JTAG is enabled and the REBOOT_STATUS[15:0] register contains the error code.
In secure mode the INIT_B pulses are meant to be read with an LED on the pin. A long Low pulse on the pin indicates a 1 and a short pulse indicates a 0 . Non-secure boot failures result in the boot ROM disabling access to the AES engine, clearing the PL, and enabling JTAG. After JTAG is enabled, the REBOOT_STATUS register can be read to find the source of the boot failure. Table 6-9 defines some parameters that are used for error checking and the defined error output codes for the boot ROM are identified in Table 6-10. Table 6-9: Error Checking parameters Name
IMAGE_MIN_ADDRESS IMAGE_MAX_ADDRESS IMAGE_MAX_LENGTH
Value
0x00000000 0x00030000 0x00030000
Table 6-10:
Description
This value is written to the REBOOT_STATUS register when the boot ROM performs a successful handoff in JTAG boot mode. This error occurs for the following reasons: The boot ROM detected a Parallel configuration when reading the first device in x1 mode, but when it went on to read both devices in x4 mode it failed to read the expected sync word. The boot ROM was unable to find a sync word within the image search range. This error occurs if there was a problem detecting the ECC mode required for the NAND device. This error occurs in NOR boot mode if the boot ROM is unable to find a valid header within the image search range. This error occurs in QSPI boot mode if the boot ROM is unable to find a valid header within the image search range. This error occurs in NAND boot mode if the boot ROM is unable to find a valid header within the image search range. This error occurs if there is an error in the boot ROM Header register initialization section. This error is triggered by a destination address being out of range.
SUCCESSFUL_JTAG_SLAVE LQSPI_PERIPHERAL_INIT_ERROR
www.xilinx.com
165
Table 6-10:
Description
This error occurs if the start address does not equal 0 and the header indicates a secure image. This error occurs if the start address is equal to 0xFFFFFFFF in non-secure mode. This error occurs if the image header indicates an eXecute In Place image and the boot mode is NAND. XIP is unsupported on NAND. This error occurs if the image header indicates an eXecute In Place image and the boot mode is SD. XIP is unsupported on SD. This error occurs if the boot ROM Header does not contain XLNX. This error occurs if the image header does not have the right checksum. This error occurs if the image source address is less than the last address of the register initialization area of the boot ROM header unless the image is an XIP image. This error occurs if the image source address is not aligned to a 64 byte boundary. This error occurs if the image destination address is greater than IMAGE_MAX_ADDRESS. This error occurs if the image destination address is less than IMAGE_MIN_ADDRESS if the image length is not equal to 0. This error occurs if the image length is greater than IMAGE_MAX_LENGTH This error occurs if the image destination address plus the image length is greater than IMAGE_MAX_LENGTH This error occurs if the image length is not equal to 0 and the execution address is greater than IMAGE_MAX_LENGTH. This error occurs if the image destination address does not equal 0. This error occurs if the image header indicates an eXecute In Place image (length == 0) and the image is flagged as a secure image. XIP is unsupported in secure mode. This error occurs if the image length is not equal to 0 and the length is greater than IMAGE_MAX_LENGTH. This error occurs if the boot ROM detects an XIP image but the mode is setup to NAND or SD. This error occurs if the header checksum fails before performing a register initialization. This error occurs if the header does not contain XLNX. This error occurs if the register initialization contains addresses that are not within the allowed range. This error occurs if the image length is greater than IMAGE_MAX_LENGTH
www.xilinx.com
166
Address Destination
UART 1 Controller registers Quad-SPI Controller registers SDIO 0 Controller registers SMC Controller DDR Controller
SLCR registers
The mode pins impact which MIO are enabled and what I/O standard they are set to after exiting the boot ROM. Additionally, the mode setting impacts the boot peripheral settings. For example, if Quad-SPI is the selected boot source the needed MIO is enabled and the Quad-SPI controller is set with the necessary settings to read from flash. The modified values for each boot source are documented in the associated boot devices section. The general processor state upon boot ROM exit is as follows: MMU, Icache, Dcache, L2 cache are all disabled Both processors are in the supervisor state ROM code is masked and inaccessible 192 KB of OCM is accessible starting at address 0x0 while 64 KB is accessible starting at address 0xFFFF0000 CPU0 branches into the stage 1 image if no failure takes place CPU1 is in a WFE state while executing code located at address 0xFFFFFE00 to 0xFFFFFFF0
www.xilinx.com
167
The full list of registers modified by the boot ROM for JTAG boot mode is listed in Table 6-12. Boot modes that use other configuration interfaces have MIO registers and peripheral registers modified for the associated configuration interface. Table 6-12: Boot ROM Modified Registers Post Boot ROM Value
0x4e00e07f 0x0000001a 0x00000508 0xf8020006 0x40000f30 0xffffffff 0x757bdf0d 0x10800000 0x02060000 0x00000004 0x00100000 0xffe00000 0x00000002 0x9dfec6f5 0x00000002 0x00000001 0x00400002 0x03731093 0x00000018 0x00010101 0x01010101 0x00000020 0x00000114 0x00000020 0x00000208 0x00000056 0x000000fb 0x0000000a 0x00000004 0x0C301166 0x0C301100 0x0C301166 0x0C750077 devcfg.CTRL devcfg.LOCK devcfg.CFG devcfg.INT_STS devcfg.STATUS devcfg.ROM_SHADOW devcfg.UNLOCK devcfg.MCTRL l2cache.reg1_aux_control l2cache.reg15_debug_ctrl mpcore.Filtering_Start_Address_Register mpcore.Filtering_End_Address_Register mpcore.ICCBPR mpcore.Global_Timer_Counter_Register0 mpcore.Global_Timer_Counter_Register1 mpcore.Global_Timer_Control_Register slcr.REBOOT_STATUS slcr.PSS_IDCODE slcr.OCM_CFG slcr.L2C_RAM slcr.OCM_RAM slcr.DDRIOB_DCI_CTRL uart1.Control_reg0 uart1.mode_reg0 uart1.Chnl_int_sts_reg0 uart1.Baud_rate_gen_reg0 uart1.Modem_sts_reg0 uart1.Channel_sts_reg0 uart1.Baud_rate_divider_reg0 slcr.GIOB_CFG_CMOS18 slcr.GIOB_CFG_CMOS25 slcr.GIOB_CFG_CMOS33 slcr.GIOB_CFG_HSTL
Address
0xf8007000 0xf8007004 0xf8007008 0xf800700c 0xf8007014 0xf8007028 0xf8007034 0xf8007080 0xf8f02104 0xf8f02f40 0xf8f00040 0xf8f00044 0xf8f00108 0xf8f00200 0xf8f00204 0xf8f00208 0xf8000258 0xf8000530 0xf8000910 0xf8000a1c 0xf8000a90 0xf8000b70 0xe0001000 0xe0001004 0xe0001014 0xe0001018 0xe0001028 0xe000102c 0xe0001034 0xF8000B04 0xF8000B08 0xF8000B0C 0xF8000B14
Register Name
www.xilinx.com
168
Table 6-12:
Address
0xE000A214 0xE000A254 0xE000A294 0xE000A2D4
Register Name
Bit Position
Lock Status
1 1(1) 0 1 0
www.xilinx.com
169
CPU1 continues in the WFE state because 0xFFFFFFF0 has the address of the WFE instruction as a safety net. If the data that is written to address 0xFFFFFFF0 is invalid or points to uninitialized memory, results are unpredictable. Only ARM-32 ISA code is supported for the initial jump on CPU1. Thumb and Thumb-II code is not supported at the destination of the jump. This means that the destination address must be 32-bit aligned and must be a valid ARM-32 instruction. If these conditions are not met, results are unpredictable. The steps for CPU0 to start an application on CPU1 are as follows: 1. 2. Write the address of the application for CPU1 to 0xFFFFFFF0 Execute the SEV instruction to cause CPU1 to wake up and jump to the application.
The address range 0xFFFFFE00 to 0xFFFFFFF0 is reserved and not available for use until the stage 1 or above application is fully functional. Any access to these regions prior to the successful startup of the second CPU causes unpredictable results.
The device configuration interface also contains an APB interface used by the host to configure the three blocks, to access the overall status, and to communicate with the PL XADC.
www.xilinx.com
170
SOC ROM Security Top-level Switch cpu_1x clk pcap_2x clk Debug Control Reset (APB Master Port) (166.75 Mhz) (200 Mhz)
AXI Master
DMA Engine
AXI-PCAP Bridge
Security Policy
XADC Interface
PL Configuration
Figure 6-6:
6.4.2 Features
The device configuration interface manages basic device security and provides a simple DMA interface, PS setup, and PL configuration. The DevC: Enables PL configuration through the processor configuration access port (PCAP) in both secure and non-secure master boot, including support for compressed PL bitstreams Supports PL configuration readback Supports concurrent bitstream download/upload Enforces Zynq-7000 device system-level security including debug security Supports XADC serial interface Supports XADC alarm and over-temperature interrupt Secure boot ROM code protection
www.xilinx.com
171
moves data between the FIFOs and a memory device, typically the on-chip RAM, the DDR memory, or one of the peripheral memories. Non-secure data to the PCAP interface can be sent every clock cycle, encrypted data can be sent every four clock cycles. To transfer data across the PCAP interface, the PL must be powered on. The PCAP interface is enabled using the devcfg.CTRL [PCAP_MODE] and [PCAP_PR] bits. If encrypted data is being sent, then the devcfg.CTRL [QUARTER_PCAP_RATE_EN] bit should also be set. Data is transferred through the PCAP interface using the DevC's built in DMA engine. To start a transfer, the four DMA registers must be written in this order: 1. 2. 3. 4. DMA Source Address register DMA Destination Address register DMA Source Length register DMA Destination Length register
To transfer data to the PL via the PCAP interface, the destination address should be 0xFFFF_FFFF. Similarly, to read data from the PL via the PCAP interface, the source address should be 0xFFFF_FFFF. Encrypted PS images must also be sent across the PCAP interface because the AES and HMAC engines reside within the PL. In this case, the DMA source address should be an external memory interface and the destination address should be on-chip RAM. All DevC DMA transactions
must be 64-byte aligned to prevent accidently crossing a 4K byte boundary. The DMA status is tracked using the devcfg.INT_STS[DMA_DONE_INT], devcfg.INT_STS[D_P_DONE_INT] and can be monitored using either interrupts or a polling method.
www.xilinx.com
172
DMA Engine
download
Control
upload
TxFIFO
RxFIFO
APB
PCAP Interface
AXI-PCAP Bridge
pcap_mode
PL PCAP Interface
UG585_c6_06_072412
Figure 6-7:
AXI-PCAP Bridge
The DevC's DMA engine can also be used to load non-secure PS images. Before doing this, the INT_PCAP_LPBK bit should be set in the Miscellaneous Control register. This bit enables an internal loopback that bypasses the PCAP interface. This bit needs to be disabled again before using the PCAP interface. The DMA source address should be an external memory and the destination address should be on-chip RAM or a valid external interface like DDR. All DMA transactions must be 64-byte aligned to prevent a 4K byte boundary from being crossed. The PCAP interface can also be used to perform a PL configuration readback. To perform a readback, the PS must be running software capable of generating the correct PL readback commands. Two DMA accesses are required to complete a PL configuration readback. The first access is used to issue the readback command to the PL. The second access is needed to read the PL readback data from the PCAP. The smallest amount of data that can be read back from the PL is one configuration frame which contains 101 32-bit words. Caution should be taken when using the DevC's DMA in loopback mode. Talking to a slave port that prioritizes writes over reads could lead to a DevC DMA hang. Sample first DMA access for PL readback: 1. DMA Source Address location of PL readback command sequence
www.xilinx.com
173
2. 3. 4.
DMA Destination Address desired location to store readback data, note that the on-chip RAM is not large enough to hold a complete PL readback DMA Source Length number of commands in the PL readback command sequence DMA Destination Length number of readback words expected from the PL
There are three limitations when accessing the PL configuration systems: 1. 2. Readback of configuration registers or data cannot be performed until the PCFG_DONE is received (bit-2 of the INT_STS register). A single PCAP readback access cannot be split across multiple DMA accesses. If the readback command sent to the PL requests 505 words, the DevC's DMA must also be setup to process 505 words. Splitting the transaction into two DMA accesses results in data loss and unexpected DMA behavior. The DevC DMA must have sufficient bandwidth to process the PL readback data due to a lack of data flow control on the PL side of the PCAP. Overflow of the PCAP RxFIFO results in data loss and unrecoverable DMA behavior. If adequate bandwidth cannot be allocated to the DevC DMA, then the PCAP clock could be slowed down or the readback could be broken up into multiple smaller transactions. All DMA transactions must be 64-byte aligned to prevent accidently crossing a 4K byte boundary.
3.
4.
For more information regarding PL configuration readback, see UG470, 7 Series FPGAs Configuration User Guide.
XADC Interface
See Chapter 30, XADC Interface for information.
www.xilinx.com
174
bootstrap
CPU
PS Master
DAP MDDR Flash DDR Memory
AXI
FIFO
PCAP-Stream
PL
UG585_c6_07_022513
Figure 6-8: The configuration flow is: 1. 2. Device power-on reset Boot ROM execution a. 3. 4. 5.
b. Reads boot header to determine encryption status and image destination Boot ROM uses the DevC's DMA to load the first stage boot loader (FSBL) into on-chip RAM Boot ROM shuts down, releases CPU control to the FSBL (Optional) FSBL loads PL bitstream via PCAP
www.xilinx.com
175
the PL has power before attempting to decrypt the FSBL. After the PS has booted, the PL can be configured using an encrypted bitstream or it can be powered down to be configured later.
X-Ref Target - Figure 6-9
bootstrap
CPU
PS Master
DAP
AXI
FIFO
PCAP-Stream
PL
UG585_c6_08_022513
Device power-on reset, including power-on of PL Boot ROM execution a. c. Reads bootstrap to determine external memory interface Ensures PL is powered on to begin FSBL decryption b. Reads boot header to determine encryption status (secure)
3. 4. 5.
Boot ROM uses the DevCs DMA to send the encrypted FSBL to the AES and HMAC in the PL via PCAP The PL uses the PCAP to return the decrypted FSBL to the PS where it is loaded to the on-chip RAM Boot ROM shuts down, releases CPU control to the FSBL
www.xilinx.com
176
6.
bootstrap
ROM
CPU
PS Master
DAP
AXI
FIFO
PCAP-Stream
PL
UG585_c6_09_022513
Figure 6-10:
www.xilinx.com
177
The configuration flow is: 1. 2. Device power-on reset, including power-on of PL Boot ROM execution a. 3. 4. 5. 6. Reads bootstrap to determine boot mode, JTAG mode is set to cascade b. Performs CRC self-check Disables all security features, enables DAP controller and JTAG chain Boot ROM shuts down, releases CPU control to JTAG PL JTAG port is used to load PS image (Optional) PL JTAG or PS image is used to configure PL
www.xilinx.com
178
bootstrap
ROM
CPU
PS Master
DAP
AXI
FIFO
PCAP-Stream
PL
UG585_c6_11_022613
Device power-on reset, including power-on of PL Boot ROM execution a. Reads bootstrap to determine boot mode, JTAG mode is set to independent b. Performs CRC self-check
3. 4. 5. 6. 7.
Disables all security features, enables DAP controller and JTAG chain Stall until the PL is configured PL JTAG port is used to configure the PL a. The PL bitstream routes the PS DAP to the EMIO PJTAG port (see Figure 27-1, page 647) When PL is configured, Boot ROM shuts down and releases CPU control to JTAG EMIO PJTAG port is used to load PS image
www.xilinx.com
179
6.4.5 PL Configuration
With the exception of JTAG, the PL must always be configured using the PCAP. Users are free to configure the PL at any time, whether it is directly after PS boot using the FSBL, or at some later time using an image loaded into the PS. This section describes the requirements for configuring the PL.
www.xilinx.com
180
PL Reconfiguration
After the PL has been configured, it can be reconfigured using either the PCAP or ICAP. To use the ICAP, the PCAP_PR, bit 27 of the Control register, must be set Low. The initial configuration of the PL must also have connected the ICAP to an external interface or to some logic internal to the PL. To reconfigure the PL using PCAP, the PCAP_MODE and PCAP_PR bits must be set to 1 in the Control register. The internal loopback function must also be disabled. The reconfiguration bitstream is sent to the PL using the DevC DMA, the source and destination is the same as for the initial configuration. PL reconfiguration flow using PCAP: 1. 2. Set PCAP_MODE and PCAP_PR High. Clear the previous configuration from the PL (optional): a. c. 3. 4. 5. 6. Set PCFG_PROG_B High. Check for PCFG_INIT = 0 (STATUS-bit[4]). b. Set PCFG_PROG_B Low. d. Clear PCFG_DONE_INT by writing a 1 to INT_STS[2]. Check for PCFG_INIT = 1 (STATUS-bit[4]). Set INT_PCAP_LPBK Low (MCTRL-bit[4]). Clear D_P_DONE_INT by writing a 1 to INT_STS[12]. Initiate a DevC DMA transfer: a. c. 7. 8. Source Address: Location of new PL bitstream. Source Length: Total number of 32-bit words in the new PL bitstream. b. Destination Address: 0xFFFF_FFFF. d. Destination Length: Total number of 32-bit words in the new PL bitstream. Poll or wait for devcfg.INT_STS[D_P_DONE_INT] to trigger an interrupt. (Optional) Check for PCFG_DONE_INT on INT_STS if the previous configuration was cleared.
The PCFG_DONE flag will not be set if the previous PL configuration was not cleared using PCFG_PROG_B. In this case D_P_DONE_INT should be used to indicate that the new bitstream has been fully transmitted to the PL. It is important to note that the PCAP and ICAP interfaces are mutually exclusive. Only one interface can talk to the PL configuration controller at a time. Which interface is in use is controlled by the PCAP_PR bit in the DevC's Control register. It is possible to use both interfaces in the device, care should be taken to ensure that all outstanding transactions have completed before changing interfaces.
www.xilinx.com
181
for. Addition information regarding PL configuration via JTAG can be found in UG470, 7 Series FPGAs Configuration User Guide.
PL Secure Configuration
To perform a secure configuration of the PL, the PS must have booted securely. The AES and HMAC engines can only be enabled by the boot ROM. The procedure for loading a secure bitstream is the same as any other bitstream but the quarter PCAP rate enable bit must be set in the Control register. Because the AES engine only de-crypts one byte at a time, the PCAP can only send one 32-bit word to the PL every four clock cycles.
www.xilinx.com
182
Function
Hardware Register
CTRL LOCK CFG INT_STS INT_MASK STATUS DMA_SRC_ADDR DMA_DEST_ADDR DMA_SRC_LEN DMA_DEST_LEN MULTIBOOT_ADDR SW_ID MCTRL
Offset
0x000 0x004 0x008 0x00C 0x010 0x014 0x018 0x01C 0x020 0x024 0x02C 0x030 0x080 R/W
Type
R/Sticky Write R/W R + Clr or Wr R/W R + Clr or Wr R/W R/W R/W R/W R/W R/W R/W
www.xilinx.com
183
Chapter 7
Interrupts
7.1 Environment
This chapter describes the system-level interrupt environment and the functions of the interrupt controller (see Figure 7-1). The PS is based on ARM architecture, utilizing two Cortex-A9 processors (CPUs) and the GIC pl390 interrupt controller. The interrupt structure is closely associated with the CPUs and accepts interrupts from the I/O peripherals (IOP) and the programmable logic (PL). This chapter includes these key topics: Private, shared and software interrupts GIC functionality Interrupt prioritization and handling
CPU 0
Interrupt Interface
CPU 0
5
CPU 1
Private Peripheral Interrupts (PPI)
5
Shared Peripherals
Shared Peripheral Interrupts (SPI)
60 44 16 60
CPU 0 CPU 1
Programmable Logic
Figure 7-1:
www.xilinx.com
184
Chapter 7: Interrupts
www.xilinx.com
185
Chapter 7: Interrupts
CPU 0 Distributor
CPU 0
CPU 0 Interface
IOP
PL
SGI Distributor
CPU 1 Distributor
CPU 1 Interface
CPU 1
UG585_c7_02_012813
Figure 7-2:
www.xilinx.com
186
Chapter 7: Interrupts
SGI#
0 1 ~ 15
Type
Rising edge Rising edge ... Rising edge
Description
A set of 16 interrupt sources that are private to each CPU that can be routed to up to 16 common interrupt destinations where each destination can be one or more CPUs.
PPI#
~ 0 1 2 Rising edge
Type
~ Active Low level (active High at PS-PL interface) Rising edge Reserved Global timer
Description
Fast interrupt signal from the PL: CPU0: IRQF2P[18] CPU1: IRQF2P[19] Interrupt from private CPU timer
www.xilinx.com
187
Chapter 7: Interrupts
PPI#
3 4 Rising edge
Type
Active Low level (active High at PS-PL interface)
Description
Private watchdog timer for each CPU Interrupt signal from the PL: CPU0: IRQF2P[16] CPU1: IRQF2P[17]
IRQ ID#
33:32 34 35 36 38, 37 39 40 41 43:42 44 45 49:46 50 51 ~
I/O
~ ~ ~ ~ ~ ~ ~ ~ ~ ~ Output Output Output Output Output
www.xilinx.com
188
Chapter 7: Interrupts
IRQ ID#
52 53 54 55 56 57 58 59 60 63:61 68:64 71:69 75:72 76 77 78 79 80 81 82 83 91:84 92 95:93
I/O
Output Output Output Output Output Output Output Output Output Input Input ~ Output Output Output Output Output Output Output Output Output Input ~ ~
IOP
SDIO 0 I2C 0 SPI 0 UART 0 CAN 0 FPGA [2:0] FPGA [7:3] TTC 1 DMAC[7:4] USB 1 Ethernet 1 Ethernet 1 Wakeup SDIO 1 I2C 1 SPI 1 UART 1 CAN 1
PL Timer DMAC
IOP
PL SCU Reserved
www.xilinx.com
189
Chapter 7: Interrupts
SPI_STATUS [2:1]
www.xilinx.com
190
Chapter 7: Interrupts
Table 7-4:
Name
www.xilinx.com
191
Chapter 7: Interrupts
www.xilinx.com
192
Chapter 8
Timers
8.1 Introduction
Each Cortex-A9 processor has its own private 32-bit timer and 32-bit watchdog timer. Both processors share a global 64-bit timer. These timers are always clocked at 1/2 of the CPU frequency (CPU_3x2x). On the system-level, there is a 24-bit watchdog timer and two 16-bit triple timer/counters. The system watchdog timer is clocked at 1/4 or 1/6 of the CPU frequency (CPU_1x), or can be clocked by an external signal from an MIO pin or from the PL. The two triple timers/counters are always clocked at 1/4 or 1/6 of the CPU frequency (CPU_1x), and are used to count the widths of signal pulses from an MIO pin or from the PL.
www.xilinx.com
193
Chapter 8: Timers
MIO Pins
CPU WatchDog
CPU_3x2x
CPU
CPU 1
EMIO
SWDT TTC 0, 1
TTC 1
UG585_c8_01_072512
Figure 8-1:
System View
8.1.2 Notices
7z010 CLG225 Device
The 7z010 CLG225 device supports 32 MIO pins (not 54). This is shown in the MIO table in section 2.5.4 MIO-at-a-Glance Table. The 7z010 CLG225 device restricts the available MIO pins so connections through the EMIO might need to be considered. All of the 7z010 CLKG225 device restrictions are listed in section 1.1.3 Notices.
www.xilinx.com
194
Chapter 8: Timers
8.2.1 Clocking
All private timers and watchdog timers are always clocked at 1/2 of the CPU frequency (CPU_3x2x).
8.2.3 Resets
The time and watchdog resets are sent to the PS reset subsystem, see section 26.3 Reset Effects.
Name
Overview
www.xilinx.com
195
Chapter 8: Timers
Table 8-1:
Overview
Reset status as a result of watchdog reaching 0. Cleared with POR only, so SW can tell if the reset was caused by watchdog. Disable watchdog via a sequence of writes of two specific words.
Reset status
Disable
Watchdog Disable
8.3.1 Clocking
The GTC is always clocked at 1/2 of the CPU frequency (CPU_3x2x).
Name
Overview
www.xilinx.com
196
Chapter 8: Timers
can run off the clock from an external device or the PL, and provides a reset output to an external device or the PL.
8.4.1 Features
Key features of the available timers/counters are as follows: An internal 24-bit counter Selectable clock input from:
Internal PS bus clock (CPU_1x) Internal clock (from PL) External clock (from MIO) System interrupt (PS) System reset (PS, PL, MIO) Time out range 32,760 to 68,719,476,736 clock cycles (330 s to 687.2s at 100 MHz) System interrupt pulse 4 to 32 clock cycles (40 ns to 320 ns at 100 MHz) System reset pulse 2 to 256 clock cycles (20 ns to 2.6 s at 100 MHz)
www.xilinx.com
197
Chapter 8: Timers
SLCR
WDT_CLK_SEL[0]
INTERCONNECT
APB Interrupt Controller ID41 SWDT Reset (to PS reset system) MIO Pin, EMIOWDTRSTO
Control Logic
Zero CLKSEL CRV Restart CPU_1x MIO Pins, EMIOWDTCLKI Halt (during CPU debug)
Prescaler
24-bit Counter
UG585_c8_02_012813
SLCR programmable registers (WDT_CLK_SEL, MIO control) select the clock input. SWDT programmable registers set the values for CLKSEL and CRV. Signal restart causes the 24-bit counter to reload the CRV values, and restart counting. Signal halt causes the counter to halt during CPU debug (same behavior as AWDT).
www.xilinx.com
198
Chapter 8: Timers
The Status register shows whether the 24-bit counter reaches zero. Regardless of the WDEN bit in the Zero Mode register, the 24-bit counter always keeps counting down to zero if it is not zero and the selected clock source is present. Once it reaches zero, the WDZ bit of the Status register is set and remains set until the 24-bit counter is restarted. The prescaler block divides down the selected clock input. The CLKSEL signal is sampled at every rising clock edge. The internal 24-bit counter counts down to zero and stays at zero until it is restarted. While the counter is at zero, the zero output signal is High.
Reset
The watchdog reset is sent to the PS reset subsystem, see section 26.3 Reset Effects.
Function
Zero mode Reload values Restart Status
Overview
Enable SWDT, enable interrupt and reset outputs on time out, set output pulse lengths. Set the reload values for prescaler and 24-bit counter on time out. Cause the prescaler and the 24-bit counter to reload and restart. Indicates watchdog reaching zero.
www.xilinx.com
199
Chapter 8: Timers
3.
Enable the counter; enable output pulses; set up output pulse lengths (Zero Mode register): The swdt.MODE[ZKEY] field must be 0xABC in order to be able to write this register. Ensure that IRQLN and RSTLN meet the specified minimum values.
4.
To run the SWDT with a different setting, disable the timer first (swdt.MODE[ZKEY] bit). Then repeat the above steps.
8.5.1 Features
Each of the triple timer counters has: Three independent 16-bit prescalers and 16-bit up/down counters Selectable clock input from:
Internal PS bus clock (CPU_1x) Internal clock (from PL) External clock (from MIO)
Three interrupts, one for each counter Interrupt on overflow, at regular interval, or counter matching programmable values Generates waveform output (e.g., PWM) through the MIO and to the PL
www.xilinx.com
200
Chapter 8: Timers
slcr.PIN_MUX_xx
Timer/Clock 0
Pre-scaler
Wave-Out
MIO EMIO
Event Timer
Timer/Clock 1
slcr.PIN_MUX_xx Pre-scaler 16-bit Counter
Clock-In (EMIO)
Event Timer
Timer/Clock 2
Pre-scaler 16-bit Counter Interrupt
Clock-In (EMIO)
APB
TTC 0 TTC 1
UG585_c8_08_032212
Figure 8-3:
Modes of Operation
Each counter module can be independently programmed to operate in either of the following two modes: Interval mode: The counter increments or decrements continuously between 0 and the value of the Interval register, with the direction of counting determined by the DEC bit of the Counter Control register. An Interval interrupt is generated when the counter passes through zero. The corresponding Match interrupt is generated when the counter value equals one of the Match registers.
www.xilinx.com
201
Chapter 8: Timers
Overflow mode: The counter increments or decrements continuously between 0 and 0xFFFF, with the direction of counting determined by the DEC bit of the Counter Control register. An Overflow interrupt is generated when the counter passes through zero. The corresponding Match interrupt is generated when the counter value equals one of the Match registers.
The Event Control Timer register controls the behavior of the internal counter: E_En bit: When 0 , immediately resets the internal counter to 0, and stops incrementing E_Lo bit: Specifies the counting phase of the external pulse E_Ov bit: Specifies how to handle overflow at the internal counter (during the counting phase of the external pulse)
When 0 : Overflow causes E_En to be 0 (see E_En bit description) When 1 : Overflow causes the internal counter to wrap around and continues incrementing An interrupt is always generated (subject to further enabling through another register) when an overflow occurs
The Event register is updated with the non-zero value of the internal counter at the end of the counting-phase of the external pulse; therefore, it shows the widths of the external pulse, measured in number of cycles of CPU_1x. If the internal counter is reset to 0, due to overflow, during the counting phase of the external pulse, the Event register will not be updated and maintains the old value from the last non-overflowing counting operation.
Function
Clock Control
Overview
Controls prescaler, selects clock input, edge Enables counter, sets mode of operation, sets up/down counting, enables matching, enables waveform output Returns current counter value
Status
www.xilinx.com
202
Chapter 8: Timers
Table 8-4:
Function
Counter Control
Overview
Interrupt
Event
2. 3. 4. 5.
www.xilinx.com
203
Chapter 8: Timers
2.
Set overflow handling, select external pulse level, enable the event timer (Event Control Timer register): This step starts measuring the width of the selected level (High or Low) of the external pulse. Enable interrupt (Interrupt Enable register): This step is optional, if interrupt is to be enabled. Read the measured width (Event register): Note that the returned value is not correct when overflow happened. See the description for the E_Ov bit of the Event Control Timer register in section 8.5.3 Functional Description.
3. 4.
I/O
I O I O I O I O I O I O
MIO Pins
19, 31, 43 18, 30, 42 N/A N/A N/A N/A 17, 29, 41 16, 28, 40 N/A N/A N/A N/A
EMIO Signals
EMIOTTC0CLKI0 EMIOTTC0WAVEO0 EMIOTTC0CLKI1 EMIOTTC0WAVEO1 EMIOTTC0CLKI2 EMIOTTC0WAVEO2 EMIOTTC1CLKI0 EMIOTTC1WAVEO0 EMIOTTC1CLKI1 EMIOTTC1WAVEO1 EMIOTTC1CLKI2 EMIOTTC1WAVEO2
www.xilinx.com
204
Chapter 8: Timers
Table 8-6:
SWDT Signal
Clock In Reset Out
MIO Pins
14, 26, 38, 50, 52 15, 27, 39, 51, 53
EMIO Signals
EMIOWDTCLKI EMIOWDTRSTO
www.xilinx.com
205
Chapter 9
DMA Controller
9.1 Introduction
The DMA controller (DMAC) uses a 64-bit AXI master interface operating at the CPU_2x clock rate to perform DMA data transfers to/from system memories and PL peripherals. The transfers are controlled by the DMA instruction execution engine. The DMA engine runs on a small instruction set that provides a flexible method of specifying DMA transfers. This method provides greater flexibility than the capabilities of DMA controller methods. The program code for the DMA engine is written by software in to a region of system memory that is accessed by the controller using its AXI master interface. The DMA engine instruction set includes instructions for DMA transfers and management instructions to control the system. The controller can be configured with up to eight DMA channels. Each channel corresponds to a thread running on the DMA engines processor. When a DMA thread executes a load or store instruction, the DMA Engine pushes the memory request to the relevant read or write queue. The DMA controller uses these queues to buffer AXI read/write transactions. The controller contains a multi-channel FIFO (MFIFO) to store data during the DMA transfers. The program code running on the DMA engine processor views the MFIFO as containing a set of variable-depth parallel FIFOs for DMA read and write transactions. The program code must manage the MFIFO so that the total depth of all of the DMA FIFOs does not exceed the 1,024-byte MFIFO. The DMAC is able to move large amounts of data without processor intervention. The source and destination memory can be anywhere in the system (PS or PL). The memory map for the DMAC includes DDR, OCM, linear addressed Quad-SPI read memory, SMC memory and PL peripherals or memory attached to an M_GP_AXI interface. The flow control method for transfers with PS memories use the AXI interconnect. Accesses with PL peripherals can use the AXI flow control or the DMACs PL Peripheral Request Interface. There are no peripheral request interfaces directed to the PS I/O Peripherals (IOPs). For the PL peripheral AXI transactions, software running on a CPU is used in a programmed IO method using interrupts or status polling. The controller has two sets of control and status registers. One set is accessible in secure mode and the other in non-secure mode. Software accesses these registers via the controllers 32-bit APB slave interface. The entire controller is either operated in secure or non-secure mode; there is no mixing of modes on a channel basis. Security configuration changes are controlled by slcr registers and require a controller reset to take effect.
www.xilinx.com
206
9.1.1 Features
The DMA Controller provides: DMA Engine processor with a flexible instruction set for DMA transfers:
Flexible scatter-gather memory transfers Full control over addressing for source and destination Define AXI transaction attributes Manage byte streams
Eight cache lines and each cache line is four words wide Eight concurrent DMA channels threads
Allows multiple threads to execute in parallel Issue commands for up to eight read and up to eight write AXI transactions
Eight interrupts to the PS interrupt controller and the PL Eight events within DMA Engine program code 128 (64-bit) word MFIFO to buffer the data that the controller writes or reads during a transfer Security
Dedicated APB slave interface for secure register accessing Entire controller is configured as either secure or non-secure
Memory-to-memory DMA transfers Four PL peripheral request interfaces to manage flow control to and from the PL logic
www.xilinx.com
207
DMA Controller
Execution Engine
QoS
Channels 0~7
Central Interconnect
Data and Controller Instructions AXI 64-bit Master
R/W 8
Peripheral Request Interfaces 0 ~ 3 DMA{0:3}_DAVALID DMA{0:3}_DATYPE{0,1} DMA{0:3}_DAREADY DMA{0:3}_DRVALID DMA{0:3}_DRTYPE{0,1} DMA{0:3}_DRLAST DMA{0:3}_DRREADY
PL
Security Control
CPU_1X clock
Figure 9-1:
System Functions
The following system functions are described in section 9.6 System Functions: Clocks Resets and Reset Configuration
www.xilinx.com
208
DMA Controller
DMA Instruction Execution Engine Instruction Cache Register Access For the Non-secure State Non-secure APB Slave Interface 0xF800_4000 Secure APB Slave Interface 0xF800_3000 Read Instruction Instruction Queue Write Instruction Instruction Queue MFIFO Data Buffer
Data
Central Interconnect
Channel Data
Tie-offs
2 3
IRQs
Interrupt Interface
PL Fabric
UG_585_c9_02_030712
Figure 9-2:
Note: Refer to ARM PrimeCell DMA Controller (PL330) Technical Reference Manual: AXI
characteristics for a DMA transfer and AXI master for more information.
Round-robin scheme to service the active DMA channels Services the DMA manager prior of servicing the next DMA channel Changes to the arbitration process are not supported Responds to all active DMA channels with equal priority Changes to the priority of a DMA channel over any other DMA channels are not supported
Channel prioritization
www.xilinx.com
209
Instruction Cache
The controller stores instructions temporarily in a cache. When a thread requests an instruction from an address, the cache performs a look-up. If a cache hit occurs then the cache immediately provides the data, otherwise the thread is stalled while the controller uses the AXI interface to perform a cache line fill from system memory. If an instruction is greater than four bytes, or spans the end of a cache line, then it performs multiple cache accesses to fetch the instruction.
Note: When a cache line fill is in progress, the controller enables other threads to access the cache,
but if another cache miss occurs the pipeline is stalled until the first line fill is complete.
Note: Instruction cache latency for fill operations is dependent on the read latency of the system
memory where the DMA engine instructions are written. The performance of the DMAC is highly dependent on the bandwidth of the 64-bit AXI master interface (CPU_2x clock).
Interrupt Interface
The interrupt interface enables efficient communications of events to the interrupt controller.
www.xilinx.com
210
9.1.4 Notices
ARM IP Core
The DMAC is an Advanced Microcontroller Bus Architecture (AMBA) PrimeCell peripheral that is developed, tested, and licensed by ARM. A list of the ARM Reference Documents for the DMA controller are summarized in Appendix A, Additional Resources. Technical Reference Manual: ARM PrimeCell DMA Controller (PL330) Technical Reference Manual. Example Application Notes: ARM Application Note 239: Example programs for the CoreLink DMA Controller DMA-330 and refer to 9.4 Programming Guide for DMA Engine.
Secure/Non-Secure Modes
The DMAC includes features to enable it to co-exist with ARMs TrustZone hardware to accelerate the performance of secure systems. The hardware is not required to ensure a secure environment. This chapter includes many references to secure and non-secure modes. It may not be complete. Please contact your Xilinx Sales Representative for more complete details.
www.xilinx.com
211
IP core Configuration
Based on the ARM PrimeCell DMA Controller (PL330) refer to 9.2.13 IP Configuration Options
www.xilinx.com
212
www.xilinx.com
213
S0
S2
S1
Central Interconnect
M0 M1 64-bit M2
OCM Interconnect
64-bit M
S1
S0
S1
32-bit M0 M1
Slave Interconnect
M2 M3
SCU
S0
64-bit -bit
256 KB
On-chip RAM
PL
L2 Cache
64-bit
S0 S1
S3
S2
Figure 9-3:
www.xilinx.com
214
Performs data accesses up to the 64-bit width of the AXI data bus Signals a precise abort if the user programs the src_burst_size or dst_burst_size fields to be larger than 64 bits Maximum burst length is 16 data beats The AXI specification does not permit AXI bursts to cross 4 KB address boundaries If the controller is programmed with a combination of burst start address, size, and length that would cause a single burst to cross a 4 KB address boundary, then the controller instead generates a pair of bursts with a combined length equal to that specified. This operation is transparent to the DMAC channel thread program so that, for example, the DMAC responds to a single DMALD instruction by generating the appropriate pair of AXI read bursts. Can be programmed to generate only fixed-address or incrementing-address burst types for data accesses. Wrapping-address bursts are not generated for data accesses or for instruction fetches. Can issue multiple outstanding write addresses up to eight (write issuing capability) The DMAC does not issue a write address until it has read in all of the data bytes required to fulfill that write transaction. Does not generate interleaved write data. All write data beats for one write transaction are output before any write data beat for the next write transaction. Does not support locked or exclusive accesses
AXI characteristics
www.xilinx.com
215
The appropriate APB interface must be used depending on the security state in which the SLCR register TZ_DMA_NS initializes the DMA manager to operate. For example, if the DMA manager is in the secure state, the instruction using the secure APB interface must be used or the DMAC ignores the instruction. The non-secure APB interface is the suggested port to use to start or restart a DMA channel when the DMA manager is in the non-secure state, however, the secure APB interface can be used in non-secure mode. (Refer to section 9.2.12 Security for more details.) Before issuing instructions using the Debug Instruction registers or the DBGCMD register, the DBGSTATUS register must be read to ensure that debug is idle, otherwise, the DMA manager ignores the instructions. Refer to the Debug Command register and Debug Status register in Appendix B, Register Details. When the DMA manager receives an instruction from an APB slave interface, it can take several clock cycles before it can process the instruction for example, if the pipeline is busy processing another instruction. Prior to issuing DMAGO, the system memory must contain a suitable program for the DMA channel thread to execute, starting at the address that the DMAGO specifies.
Use one of the APB interfaces on the DMAC to program a DMAGO instruction as follows: 3. 4. Poll the dmac.DBGSTATUS register to ensure that debug is idle, that is, the dbgstatus bit is 0 . Refer to the Debug Status register in Appendix B, Register Details. Write to the dmac.DBGINST0 register and enter the: a. c. 5. Instruction byte 0 encoding for DMAGO. Debug thread bit to 0 . This selects the DMA manager. Refer to the Debug Instruction-0 register in Appendix B, Register Details. b. Instruction byte 1 encoding for DMAGO.
Write to the dmac.DBGINST1 register with the DMAGO instruction byte [5:2] data, refer to the Debug Instruction-1 register in Appendix B, Register Details. These four bytes must be set to the address of the first instruction in the program that was written to system memory in Step 2.
Instruct the DMAC to execute the instruction that the debug instruction registers contain: 6. Write a 0 to the dmac.DBGCMD register. The DMAC starts the DMA channel thread and sets the dbgstatus bit to 1 . Refer to the Debug Command register in Appendix B, Register Details. After the DMAC completes execution of the instruction, it clears the dbgstatus bit to 0 .
www.xilinx.com
216
The DMALD and DMAST instructions each specify that an AXI bus transaction is to be performed. The amount of data transferred by an AXI bus transaction depends on the values programmed in to the CCRn register and the address of the transaction. Refer to the AMBA AXI Protocol Specification for information about unaligned transfers. Refer to section 9.3 Programming Guide for DMA Controller for considerations about MFIFO utilization.
Through the same AXI central interconnect, the controller can potentially access the majority of the peripheral subsystems. If a target peripheral can be seen as a memory-mapped region (or memory port location) without a FIFO or need for flow control, then the DMAC can be used to read and write to it. Typical examples include: QSPI in Linear addressing mode NOR flash NAND flash
www.xilinx.com
217
The memory map for the DMA controller is shown in Chapter 4, System Addresses. For more information on the AXI Interfaces, refer to . Examples of memory-to-memory transfer are provided in section 9.4.2 Memory-to-Memory Transfers.
Note: There are no peripheral request interfaces directed to the I/O peripherals (IOP) in the PS.
Processor intervention is needed to avoid underflow or overflow of the FIFOs in the targeted PS peripheral. This section discusses the AXI transactions to/from PL peripherals.
There are two different way to handle the quantity of data flowing between the DMAC and the PL peripheral: PL Peripheral length management: DMAC length management: The PL peripheral controls the quantity of data that is contained in a DMA cycle. The DMAC is controlling the quantity of data in a DMA cycle.
Programming Examples
Refer to section 9.4.3 PL Peripheral DMA Transfer Length Management.
www.xilinx.com
218
DMA{3:0}_DRVALID
DMA{3:0}_DRTYPE[1:0]
DMA{3:0}_DRLAST DMA{3:0}_DRREADY
Peripheral {3:0}
DMAC
DMA{3:0}_ACLK
UG585_c9_05_030312
Figure 9-4:
Both buses use the valid-ready handshake that the AXI protocol describes. For more information on the handshake process, refer to the AMBA AXI Protocol v1.0 Specification . The PL peripheral uses the DMA{3:0}_DRTYPE[1:0] registers to: Request a single AXI transaction Request a AXI burst transaction Acknowledge a flush request
The DMAC uses the DMA{3:0}_DATYPE[1:0] registers to: Signal when it completes the requested single AXI transaction Signal when it completes the requested AXI burst transaction Issue a flush request
The PL peripheral uses DMA{3:0}_DRLAST to: Signal to the DMAC when the last data cycle of the AXI transaction commences
Handshake Rules
The DMAC uses the DMA handshake rules that Table 9-1 shows, when a DMA channel thread is active, that is, not in the stopped state. Refer to the Figure 9-5, page 220 for more information. Table 9-1: Rule
1
www.xilinx.com
219
5 Notes:
T0
T1
T2
T3
T4
T5
T6
T7
T8
T9
DMA{3:0}_ACLK DMA{3:0}_DRVALID DMA{3:0}_DRTYPE[1:0] DMA{3:0}_DRREADY DMA{3:0}_DAVALID DMA{3:0}_DATYPE[1:0] DMA{3:0}_DAREADY DMA Activity on the AXI Data Bus AXI Data Burst
UG585_c9_06_030712
Burst
Ack
Figure 9-5:
State transitions in Figure 9-5: T1 Between T2 and T7 The DMAC detects a request for an AXI burst transaction. The DMAC performs the AXI burst transaction.
www.xilinx.com
220
T7
The DMAC sets DMA{3:0}_DAVALID High and sets DMA{3:0}_DATYPE[1:0] to indicate that the transaction is complete.
For more timing diagrams refer to ARM PrimeCell DMA Controller (PL330) Technical Reference Manual: Peripheral Request Interface Timing Diagrams, keeping in mind that each PL peripheral request interface is asynchronous to one another and asynchronous to the DMA itself.
When the DMAC executes a DMAWFP instruction, it halts execution of the thread and waits for the PL peripheral to send a request. When the PL peripheral sends the request, the DMAC sets the state of the request flags depending on the state of the following signals: DMA{3:0}_DRTYPE[1:0] 00: 01: DMA{3:0}_DRLAST 0: 1: The DMAC sets the state of the request_type flag: request_type = Single request_type = Burst The DMAC sets the state of the request_last flag: request_last = 0 request_last = 1
If the DMAC executes a DMAWFP single or DMAWFP burst instruction then the DMAC sets: The request_type{3:0} flag to Single or Burst, respectively The request_last{3:0} flag to 0
DMALPFE is an assembler directive which forces the associated DMALPEND instruction to have its nf bit set to 0 . This creates a program loop that does not use a loop counter to terminate the loop. The DMAC exits the loop when the request_last flag is set to 1 . The DMAC conditionally executes the following instructions, depending on the state of the request_type and request_last flags: DMALD, DMAST, DMALPEND When these instructions use the optional B|S suffix then the DMAC executes a DMANOP if the request_type flag does not match.
www.xilinx.com
221
DMALDP<B|S>, DMASTP<B|S> The DMAC executes a DMANOP if the request_type flag does not match the B|S suffix. DMALPEND When the nf bit is 0 , the DMAC executes a DMANOP if the request_last flag is set. The DMALDB, DMALDPB, DMASTB and DMASTPB instructions should be used if the DMAC is required to issue an AXI burst transaction when the DMAC receives a burst request, that is, when DMA{3:0}_DRTYPE[1:0] = b01 . The values in the CCRn register control the amount of data in the DMA transfer. Refer to the Channel Control registers in Appendix B, Register Details. The DMALDS, DMALDPS, DMASTS, and DMASTPS instructions should be used if the DMAC is required to issue a single AXI transaction when the DMAC receives a single request, that is, when DMA{3:0}_DRTYPE[1:0] = b00 . The DMAC ignores the value of the src_burst_len and dst_burst_len fields in the CCRn register and sets the arlen[3:0] or awlen[3:0] buses to 0x0 . Refer to the Programming Guide for DMA Controller for an example of microcode for PL peripheral length management.
The DMAWFP single instruction should be used when the program thread is required to halt execution until the PL peripheral request interface receives any request type. If the head entry request type in the request FIFO is: Single: Burst: The DMAC pops the entry from the FIFO and continues program execution. The DMAC leaves the entry in the FIFO and continues program execution.
Note: The burst request entry remains in the request FIFO until the DMAC executes a DMAWFP
burst instruction or a DMAFLUSHP instruction.
www.xilinx.com
222
The DMAWFP burst instruction should be used when the program thread is required to halt execution until the PL peripheral request interface receives a burst request. If the head entry request type in the request FIFO is: Single: Burst: The DMAC removes the entry from the FIFO and program execution remains halted. The DMAC pops the entry from the FIFO and continues program execution.
The DMALDP instruction should be used when the DMAC is required to send an acknowledgement to the PL peripheral when it completes the AXI read transaction. Similarly, the DMASTP instruction should be used when the DMAC is required to send an acknowledgement to the PL peripheral when it completes the AXI write transaction. The DMAC uses the DMA{3:0}_DATYPE[1:0] bus to acknowledge the transaction to the PL peripheral {3:0}. The DMAC sends an acknowledgement for a read transaction when rvalid and rlast are High and for a write transaction when bvalid is High. If the system is able to buffer AXI write transactions, it might be possible for the DMAC to send an acknowledgement to the PL peripheral, but the transaction of write data to the end destination is still in progress. The DMAFLUSHP instruction should be used to reset the request FIFO for the PL peripheral request interface. After the DMAC executes DMAFLUSHP, it ignores PL peripheral requests until the PL peripheral acknowledges the flush request. This enables the DMAC and PL peripheral to synchronize with each other. Refer to section 9.3 Programming Guide for DMA Controller for an example of microcode for DMA length management.
DMAC Event/IRQ #
0~3 4~7 8 ~ 15
When the DMA engine executes a DMASEV instruction it modifies the event/interrupt that the user specifies. If the INTEN register sets the event/interrupt resource to function as an event, the DMAC generates an event for the specified event/interrupt resource. When the DMAC executes a DMAWFE instruction for the same event-interrupt resource then it clears the event.
www.xilinx.com
223
If the INTEN register sets the event/interrupt resource to function as an interrupt, the DMAC sets irq<event_num> High, where event_num is the number of the specified event-resource. To clear the interrupt, the user must write to the INTCLR register. Refer to the Interrupt Clear register in Appendix B, Register Details.
Refer to section 9.3 Programming Guide for DMA Controller for more information and Chapter 7, Interrupts for more details about the System IRQs.
9.2.11 Aborts
An abort is sent to the CPUs via IRQ ID #45 and the PL peripheral via the IRQP2F[28] signal. Table 9-3 summarizes all of the possible causes for an abort. Table 9-3 explains the actions that the DMAC takes after an abort condition. After an abort occurs the action the DMAC takes depends on the thread type. Table 9-5 describes the actions that the processors or the PL peripheral must take after the Abort signal is received. Refer to the ARM PrimeCell DMA Controller (PL330) Technical Reference Manual: Aborts for details. Table 9-3: DMAC Abort Types and Conditions Abort Types Condition
A DMA channel thread in a non-secure state attempts to program the Channel Control registers and generates a secure AXI bus transaction. A DMA channel thread in a non-secure state executes DMAWFE or DMASEV for an event that is set as secure. The SLCR register TZ_DMA_IRQ_NS controls the security state for an event.
The DMAC updates the PC Security Violation on PL Peripheral Request Interfaces register with the address of the A DMA channel thread in a non-secure state executes DMAWFP, DMALDP, DMASTP, or instruction that created the DMAFLUSHP for a PL peripheral request interface that is set as secure. The SLCR abort. register TZ_DMA_PERIPH_NS controls the security state for a PL peripheral request interface. Note: When the DMAC signals a precise abort, the instruction Security Violation on DMAGO that triggers the abort is not The DMA manager in a non-secure state executes DMAGO to attempt to start a secure executed; the DMAC executes a DMA channel thread. DMANOP instead. The DMAC receives an ERROR response on the AXI master interface when it performs an instruction fetch. For example; trying to access reserved memory. A thread executes an undefined instruction or executes an instruction with an operand that is invalid for the configuration of the DMAC.
Precise
www.xilinx.com
224
Table 9-3:
Error on MFIFO
The PC register might contain The DMAC can lock up if one or more DMA channel programs are running and the the address of an instruction that MFIFO is too small to satisfy the storage requirements of the DMA programs. did not cause the abort occur. The DMAC contains logic to prevent it from remaining in a state where it is unable to complete a DMA transfer. The DMAC detects a lock up when all of the following conditions occur: Load queue is empty Store queue is empty All of the running channels are prevented from executing a DMALD instruction either because the MFIFO does not have sufficient free space or another channel owns the load-lock When the DMAC detects a lock up it signals an interrupt and can also abort the contributing channels. The DMAC behavior depends on the state of the wd_irq_only bit in the WD register. For more information, refer to the subsection Resource Sharing Between DMA Channels, page 242.
Imprecise
Watchdog Abort
Table 9-4:
Thread Type
Channel thread
DMA manager
Table 9-5:
Reads the status of Fault Status DMA Manager register to determine if the DMA manager is faulting and to determine the cause of the abort Reads the status of Fault Status DMA Channel register to determine if a DMA channel is faulting and to determine the cause of the abort
www.xilinx.com
225
Table 9-5:
Programs the Debug Instruction-0 register with the encoding for the DMAKILL instruction Writes to the Debug Command register.
9.2.12 Security
When the DMAC exits from reset, the status of the reset initialization interface signals configures the security for the: DMA manager (SLCR register TZ_DMA_NS) Event/Interrupt resources (SLCR register TZ_DMA_IRQ_NS) PL peripheral request interfaces (SLCR register TZ_DMA_PERIPH_NS)
Refer to the section 9.6.3 Reset Configuration of Controller for more details. When the DMA manager executes a DMAGO instruction for a DMA, it sets the security state of the channel setting the ns bit. The status of the channel is provided by the dynamic non-secure bit, CNS in the Channel Status register.
Note: For more information refer to ARM PrimeCell DMA Controller (PL330) Technical Reference
Manual: Security Usage .
Nomenclature
Table 9-6 describes how the nomenclature used in this chapter corresponds to ARM nomenclature. Table 9-6: DMAC Security Nomenclature XILINX Name
DMAC_NS in TZ_DMA_NS
ARM Name
Description
When the DMAC exits from reset, this signal controls the security state of the DMA manager: 0 : DMA manager operates in the secure state 1 : DMA manager operates in the non-secure state When the DMAC exits from reset, this signal controls the security state of an event/interrupt: 0 : DMAC interrupt/event bit is in the secure state 1 : DMAC interrupt/event bit is in the non-secure state When the DMAC exits from reset, this signal controls the security state of a PL peripheral request interface: 0 : DMAC PL peripheral request interface is in the secure state 1 : DMAC PL peripheral request interface is in the non-secure state
DMA Non-secure
DNS
Interrupt Non-secure
INS
DMAC_IRQ_NS<x> in TZ_DMA_IRQ_NS
PL Peripheral Non-secure
PNS
DMAC_PERIPH_NS<x> in TZ_DMA_PERIPH_NS
www.xilinx.com
226
Table 9-6:
ARM Name
ns
Description
Bit 1 of the DMAGO instruction: 0 : DMA channel thread starts in the secure state 1 : DMA channel thread starts in the secure state The security state of each DMA channel is provided by bit CNS in the Channel Status register: 0 : DMA channel thread operates in the secure state 1 : DMA channel thread operates in the secure state
DMAGO Non-secure
CHANNEL Non-secure
CNS
CNS in CSR<x>
INS
-
Description
The instruction must be issued using the secure APB interface. The DMA channel thread starts in secure state (CNS= 0). The instruction must be issued using the secure APB interface. The DMA channel thread starts in non-secure state (CNS=1). The instruction must be issued using the secure APB interface. It signals the appropriate event irrespective of the INS bit. The instruction must be issued using the non-secure APB interface. Abort (see section 9.2.11 Aborts). The instruction must be issued using the non-secure APB interface. The DMA channel thread starts in non-secure state (CNS=1). The instruction must be issued using the non-secure APB interface. Abort (see section 9.2.11 Aborts). The instruction must be issued using the non-secure APB interface. It signals the appropriate event.
X -
1 1 DMASEV -
0 1
www.xilinx.com
227
Description
On event, execution continues, irrespective of the INS bit Signals the appropriate event, irrespective of the INS bit On peripheral request, execution continues, irrespective of the PNS bit Sends a message to the PL peripheral to communicate that the last AXI transaction of the DMA transfer is complete, irrespective of the PNS bit Clears the state of the peripheral and sends a message to the peripheral to resend its level status, irrespective of the PNS bit Abort On event, execution continues Abort It signals the appropriate event Abort On peripheral request, execution continues Abort Sends a message to the peripheral to communicate that the last AXI transaction of the DMA transfer is complete Abort It only clears the state of the peripheral and sends a message to the peripheral to resend its level status
IP Configuration Option
Data width (bits) Number of channels Number of interrupts Number of peripherals Number of cache lines Cache line width (words) Buffer depth (MIFIFO depth) Read queue depth
www.xilinx.com
228
Table 9-9:
IP Configuration Option
Write queue depth Read issuing capability Write issuing capability Peripheral request capabilities Secure APB base address Non-secure APB base address
4. Create Interrupt Service Routine. Refer to section 9.3.3 Interrupt Service Routine 5. Execute DMA Transfers. Refer to section 9.3.2 Execute a DMA Transfer
Eight DMAC IRQs [75:72] and [49:46] One DMAC ABOART IRQ [45]
An interrupt service routine (ISR) can be use for each type of interrupt. The two ISRs are described below. For more information on interrupts, refer to section 9.2.10 Events and Interrupts.
www.xilinx.com
229
b. For the DMA Channel Thread write the dmac.DBGINST0 register and enter the:
d. Write 0x0 to the dmac.DBGCMD register to execute the instruction that the DBGINSTx registers contain.
Function
DMAC Control Interrupts and Events
Overview
Provides the security state and the program counter. Enables/disables the interrupt detection, mask interrupt sent to the interrupt controller, and reads raw interrupt status.
www.xilinx.com
230
Table 9-10:
Function
Fault Status and Type
Overview
Provides the fault status and type for the manager and the channels.
Debug
These registers enable the user to send instructions to a channel thread. These registers enable system firmware to discover the hardwired configuration of the DMAC Controls how the DMAC responds when it detects a lock-up condition. Control reset, clock, and security state.
Note: Table 9-14 and Table 9-15, page 240 summarize the DMAC instructions and commands. Note: For more programming information, refer to the ARM Application Note 239: Example
programs for the CoreLink DMA Controller DMA-330 for more programming examples.
www.xilinx.com
231
www.xilinx.com
232
Table 9-11:
MFIFO Usage
Each DMALD requires four entries and each DMAST removes four entries. This example has a static requirement of zero MFIFO entries and a dynamic requirement of four MFIFO entries.
Simple Aligned Program In this program the source address and destination address are aligned with the AXI data bus width.
Aligned asymmetric program with multiple loads The following program performs four loads for each store and the source address and destination address are aligned with the AXI data bus width.
DMAMOV CCR, SB1 SS64 DB4 DS64 DMAMOV SAR, 0x1000 DMAMOV DAR, 0x4000 DMALP 16 DMALD DMALD DMALD DMALD DMAST DMALPEND DMAMOV CCR, SB4 SS64 DB1 DS64 DMAMOV SAR, 0x1000 DMAMOV DAR, 0x4000 DMALP 16 DMALD DMAST DMAST DMAST DMAST DMALPEND DMAEND
Each DMALD requires one entry and each DMAST removes four entries. This example has a static requirement of zero MFIFO entries and a dynamic requirement of four MFIFO entries.
Aligned asymmetric program with multiple stores The following program performs four stores for each load and the source address and destination address are aligned with the AXI data bus width.
Each DMALD requires four entries and each DMAST removes one entry. This example has a static requirement of zero MFIFO entries and a dynamic requirement of four MFIFO entries.
www.xilinx.com
233
Table 9-12:
MFIFO Usage
The first DMALD instruction loads four double words but because the destination address is unaligned, the DMAC shifts them by four bytes and therefore it uses five entries in the MFIFO. Each DMAST requires only four entries of data and therefore the extra entry remains in use for the duration of the program until it is emptied by the last DMAST. This example has a static requirement of one MFIFO entry and a dynamic requirement of four MFIFO entries.
Aligned source address to unaligned destination address In this program, the source address is aligned with the AXI data bus width but the destination address is unaligned. The destination address is not aligned to the destination burst size so the first DMAST instruction removes less data than the first DMALD instruction reads. Therefore, a final DMAST of a single word is required to clear the data from the MFIFO.
Unaligned source address to aligned destination address In this program the source address is unaligned with the AXI data bus width but the destination address is aligned. The source address is not aligned to the source burst size so the first DMALD instruction reads in less data than the DMAST requires. Therefore, an extra DMALD is required to satisfy the first DMAST.
DMAMOV CCR, SB4 SS64 DB4 DS64 DMAMOV SAR, 0x1004 DMAMOV DAR, 0x4000 DMALD DMALP 15 DMALD DMAST DMALPEND DMAMOV CCR, SB1 SS32 DB4 DS64 DMALD DMAST DMAEND
The first DMALD instruction does not load sufficient data to enable the DMAC to execute a DMAST and therefore the program includes an additional DMALD, prior to the start of the loop. After the first DMALD, the subsequent DMALDs align with the source burst size. This optimizes the performance but it requires a larger number of MFIFO entries. This example has a static requirement of four MFIFO entries and a dynamic requirement of four MFIFO entries.
www.xilinx.com
234
Table 9-12:
MFIFO Usage
The first DMALD instruction loads five beats of data to enable the DMAC to execute the first DMAST. After the first DMALD, the subsequent DMALDs are not aligned to the source burst size, for example the second DMALD reads from address 0x1028. After the loop, the final two DMALDs read the data required to satisfy the final DMAST. This example has a static requirement of one MFIFO entry and a dynamic requirement of four MFIFO entries.
Unaligned source address to aligned destination address, with excess initial load This program is an alternative to that described in unaligned source address to aligned destination address. The program uses a different sequence of source bursts which might be less efficient but requires fewer MFIFO entries.
Aligned burst size, unaligned MFIFO In this program the destination address, which is narrower than the MFIFO width, aligns with the burst size but does not align with the MFIFO width.
DMAMOV CCR, SB4 SS32 DB4 DS32 DMAMOV SAR, 0x1000 DMAMOV DAR, 0x4004 DMALP 16 DMALD DMAST DMALPEND DMAEND
If the DMAC configuration has a 32-bit AXI data bus width then this program requires four MFIFO entries. However, in this example the DMAC has a 64-bit AXI data bus width and, because the destination address is not 64-bit aligned, it requires three rather than the expected two MFIFO entries. This example has a static requirement of zero MFIFO entries and a dynamic requirement of three MFIFO entries.
Table 9-13:
MFIFO Usage
Each DMALD in the program loads two 64-bit data transfers into the MFIFO. Because the destination address is a 32-bit fixed address then the DMAC splits each 64-bit data item across two entries in the MFIFO. This example has a static requirement of zero MFIFO entries and a dynamic requirement of four MFIFO entries.
Fixed destination with aligned address In this program the source address and destination address are aligned with the AXI data bus width, and the destination address is fixed.
www.xilinx.com
235
www.xilinx.com
236
DMALDS DMASTPS P0 # Exit loop if DMAC receives the last request, that is, drlast_0 = 1 DMALPEND DMAEND
www.xilinx.com
237
DMASTPS P0 # Finish single loop DMALPEND # Flush the peripheral, in case the single transfers were in response # to a burst request DMAFLUSHP 0 DMAEND
Multiple channels can be programmed to wait for the same event. For example, if four DMA channels have all executed DMAWFE for event 12, then when another DMA channel executes DMASEV for event 12, the four DMA channels all restart at the same time. The DMAC clears the event one clock cycle after it executes DMASEV.
www.xilinx.com
238
4.
The DMAC halts execution of the channel 3 thread and the thread stalls while it waits for the next occurrence of event 6.
Instruction
Add Halfword Add Negative Halfword End Flush and Notify Peripheral Go
www.xilinx.com
239
Table 9-14:
Instruction
Kill Load Load and Notify Peripheral Loop Loop End Loop Forever Move No operation Read memory Barrier Send Event Store Store and Notify Peripheral Store Zero Wait For Event Wait For Peripheral Write memory Barrier
DMASTZ
DMAWFE DMAWFP DMAWMB
Table 9-15:
Place a 32-bit immediate Place a 8-bit immediate Loop Loop Forever Loop End Move CCR
DMAMOV CCR
www.xilinx.com
240
Updating channel control registers during a DMA cycle (section, below) Full MFIFO causes DMAC watchdog to abort a DMA channel (section, below, titled Resource sharing between DMA channels)
When a discontinuity in the destination datastream occurs, the DMAC: 1. 2. 3. 4. Halts execution of the DMA channel thread. Completes all outstanding read and write operations for the channel (just as if the DMAC was executing DMARMB and DMAWMB instructions). Discards any residual MFIFO data for the channel. Resumes execution of the DMA channel thread.
www.xilinx.com
241
SARn register so that it modifies the source byte lane alignment. For example, when the bus width is 32 bits and bits [1:0] in the SARn register are changed.
When a discontinuity in the source datastream occurs, the DMAC: 1. 2. 3. Halts execution of the DMA channel thread. Completes all outstanding read operations for the channel (just as if the DMAC was executing DMARMB instruction). Resumes execution of the DMA channel thread. No data is discarded from the MFIFO.
A channel releases ownership of the load-lock when any of the following controller actions occur: Executes a DMAST, DMASTP, or DMASTZ. Reaches a barrier, that is, it executes DMARMB or DMAWMB. Waits, that is, it executes DMAWFP or DMAWFE. Terminates normally, that is, it executes DMAEND. Aborts for any reason, including DMAKILL.
The MFIFO resource usage of a DMA channel program is measured in MFIFO entries, and rises and falls as the program proceeds. The MFIFO resource requirement of a DMA channel program is described using a static requirement and a dynamic requirement which are affected by the load-lock mechanism. ARM defines the static requirement to be the maximum number of MFIFO entries that a channel is currently using before that channel does one of the following: Executes a WFP or WFE instruction. Claims ownership of the load-lock.
ARM defines the dynamic requirement to be the difference between the static requirement and the maximum number of MFIFO entries that a channel program uses at any time during its execution. To calculate the total MFIFO requirement, add the largest dynamic requirement to the sum of all the static requirements.
www.xilinx.com
242
To avoid DMAC lock-up, the total MFIFO requirement of the set of channel programs must be equal to or less than the maximum MFIFO depth. The DMAC maximum MFIFO depth is 1 words, 64 bits each.
9.6.2 Resets
Controller Reset
The controller is reset using the slcr.DMAC_RST_CLTR[DMAC_RST] register bit. This bit is used in the controller startup example shown in section Example: Start-up Controller.
PL Peripheral Reset
Use a general purpose I/O or other signal to the PL to reset PL peripherals.
Note: When set, each security state remains constant until the DMAC resets. Note: After reset, the controller waits for software to begin executing, refer to section 9.2.3 DMA
Manager.
www.xilinx.com
243
Table 9-16:
Name
boot_manager_ns
Source
SLCR register TZ_DMA_NS
Description
Controls the security state of the DMA manager, when the DMAC exits from reset: 0: Assigns DMA manager to the secure state 1: Assigns DMA manager to the non-secure state Controls the security state of an event-interrupt resource, when the DMAC exits from reset: boot_irq_ns[x] is Low: Assigns event<x> or irq[x] to the secure state boot_irq_ns[x] is High: Assigns event<x> or irq[x] to the non-secure state Controls the security state of a peripheral request interface, when the DMAC exits from reset: boot_periph_ns[x] is Low: Assigns peripheral request interface x to the secure state boot_periph_ns[x] is High: Assigns peripheral request interface x to the non-secure state Configures the address location that contains the first instruction that the DMAC executes, when the DMAC exits from reset. Note: The DMAC only uses this address when boot_from_pc is High. Controls the location of where the DMAC executes its initial instruction, after the DMAC exits from reset: 0: DMAC waits for an instruction from either APB interface 1: DMA manager executes the instruction that is located at the address provided by boot_addr[31:0]
boot_irq_ns[15:0]
Input
boot_periph_ns[3:0]
Input
boot_addr[31:0]
Input
Hard-wired 32'h0
boot_from_pc
Input
Hard-wired 1'b0
www.xilinx.com
244
Name
DMA{3:0}_ACLK DMA{3:0}_DRVALID
Description
Clock for DMA request transfers Indicates when the peripheral provides valid control information: 0 : No control information is available 1 : DMA{3:0}_DRTYPE[1:0] and DMA{3:0}_DRLAST contain valid information for the DMAC Indicates that the peripheral is sending the last AXI data transaction for the current DMA transfer: 0 : Last data request is not in progress 1 : Last data request is in progress Note: The DMAC only uses this signal when DMA{3:0}_DRTYPE[1:0] is b00 or b01 . Indicates the type of acknowledgement, or request, that the peripheral signals: 00: Single level request 01: Burst level request 10: Acknowledging a flush request that the DMAC requested 11: Reserved Indicates if the DMAC can accept the information that the peripheral provides on DMA{3:0}_DRTYPE[1:0]: 0 : DMAC not ready 1 : DMAC ready Indicates when the DMAC provides valid control information: 0 : No control information is available 1 : DMA{3:0}_DATYPE[1:0] contains valid information for the peripheral Indicates if the peripheral can accept the information that the DMAC provides on DMA{3:0}_DATYPE[1:0]: 0 : Peripheral not ready 1 : Peripheral ready Indicates the type of acknowledgement, or request, that the DMAC signals: 00: DMAC has completed the single AXI transaction 01: DMAC has completed the AXI burst transaction 10: DMAC requesting the peripheral to perform a flush request 11: Reserved
DMA{3:0}_DRLAST
DMA Request
DMA{3:0}_DRTYPE[1:0]
DMA{3:0}_DRREADY
DMA{3:0}_DAVALID
I DMA Acknowledge I
DMA{3:0}_DAREADY
DMA{3:0}_DATYPE[1:0]
www.xilinx.com
245
Chapter 10
www.xilinx.com
246
10.1.1 Features
DDR Controller System Interface (DDRI)
The DDR controller system interface has these features: Four identical 64-bit AXI ports support INCR and WRAP burst types Four 64-bit AXI interfaces with separate read/write ports and 32-bit addressing Write data byte enable support for each data beat Sophisticated arbitration schemes to prevent data starvation Low latency path using urgent bit to bypass arbitration logic Deep read and write command acceptance capability TrustZone extension with 64 MB resolution Out-of-order read data returned for requests with different master ID Nine-bit AXI ID signals on all ports Burst length support from 1 to 16 data beats Burst sizes of 1, 2, 4, 8 (bytes per beat) Does not support locked accesses from any AXI port Low latency read mechanism using HPR queue Special urgent signaling to each port TrustZone regions programmable on 64 MB boundaries Exclusive accesses for two different IDs per port (locked transactions are not supported, cannot do exclusive access across different ports)
Selectable 16-bit and 32-bit data bus widths Optional ECC in 16-bit data width configuration Self-refresh entry on software command and automatic exit on command arrival Autonomous DDR power down entry and exit based on programmable idle periods Data read strobe auto-calibration
www.xilinx.com
247
AXI_ HP{2,3}
64-bit
AXI_ HP{1,0}
64-bit
APB
32-bit
S0
S1
S2
S3
DDR Interface
Configuration Registers
DDR Core
DDR PHY
Device Boundary
16 or 32-bit
Figure 10-1:
The controller core and transaction scheduler contains two 32-entry CAMs to perform DDR data service re-ordering to maximize DDR memory access efficiency. It also contains a fly-by channel for low latency access to DDR memory without going through the CAM. The PHY processes read/write requests from the controller and translates them into specific signals within the timing constraints of the target DDR memory. Signals from the controller are used by the
www.xilinx.com
248
PHY to produce internal signals that connect to the pads of the PS using the PHY. The pads connect directly, via the PCB signal traces, to the external memory devices. The arbiter arbitrates across the four AXI ports for access to the DDR core. The arbitration is priority based and also allows promotion of priorities via an urgent mechanism.
10.1.3 Notices
7z010 CLG225 Device Note
All devices support the 32- and 16-bit data bus width options except the 7z010 CLG225 device. The 7z010 CLG225 supports only the 16-bit data bus width, not the 32-bit bus.
10.1.4 Interconnect
The four AXI_HP interfaces are multiplexed down, in pairs, and are connected to ports 2 and 3 as shown in Figure 10-2. These ports are commonly configured for high bandwidth traffic. The path from these four interfaces to the DDR include two ports on the DDR memory port arbiter. The interconnect switch arbitrates back-and-forth between each of the two ports. Read and write channels operate separately. The arbitration in the bridge can be affected by the QoS signals from each PL interface. A requestor with a higher QoS value is given preferential treatment by the interconnect bridge. Arbitration is priority based using QoS as priority. In the event of a tie, an LRG scheme is used to break the tie. The L2-cache is connected to port 0 and is used to serve the CPUs and the ACP interface to the PL. This port is commonly configured for low-latency. The other masters on the AXI interconnect are connected to port 1.
www.xilinx.com
249
PL
M0
FIFO
FIFO
FIFO
FIFO
S0
S1
S2
S3
From L2 Cache
to OCM
S3 S2 S1 S0
Figure 10-2:
Value
1 GB 16, 32 8, 16, 32 1 15 3
Notes
1 GB of address map is allocated to DRAM ECC can only use a 32-bit configuration: 16 data bits, 10 check bits 4-bit devices are not supported
www.xilinx.com
250
Table 10-2:
Technology
DDR3/DDR3L DDR2 LPDDR2 LPDDR2 LPDDR2
Number of Components
2 4 1 2 1
Component Density
4 Gb 2 Gb 2 Gb 2 Gb 2 Gb
Total Width
32 32 32 32 16
Total Density
1 GB 1 GB 256 MB 512 MB 256 MB
The output characteristics are controlled by the following registers and are reserved to specific values produced by Xilinx tools: slcr.DDRIOB_DRIVE_SLEW_ADDR slcr.DDRIOB_DRIVE_SLEW_DATA slcr.DDRIOB_DRIVE_SLEW_DIFF slcr.DDRIOB_DRIVE_SLEW_CLOCK
The input Vref settings are controlled by slcr.DDRIOB_DDR_CTRL. The DDR DCI settings are controlled by slcr.DDRIOB_DCI_CTRL.
Note: The 7z010 CLG225 device supports only a 16-bit data bus width, not a 32-bit bus width.
Table 10-3: DDR I/O Signal Pin List Connections Device Pin Name
DDR_CK_{P,N} DDR_CKE DDR_CS_B DDR_RAS_B DDR_CAS_B
I/O
O O O O O
Description
Differential clock outputs
www.xilinx.com
251
Table 10-3:
DDR2 LPDDR2
X X X X X
DDR3/ DDR3L
X X X X X X X X X X Write enable Bank address
Description
DDR2/DDR3: Row/Column Address LPDDR2: CA[9:0] = DDR_A[9:0] Output dynamic termination signal Reset 32-bit Data bus: [31:0] 16-bit Data bus: [15:0] 16-bit Data with ECC Data byte masks Differential data strobes DCI voltage reference. Used to calibrate input termination. and DDR I/O drive strength. Connect DDR_VRP to a resistor to GND. Connect DDR_VRN to a resister to VCC_DDR. Voltage reference
www.xilinx.com
252
When a write command is accepted by the DDR controller, it sends the write data pointer back to the arbiter. The write data from all ports is multiplexed using the port ID contained in the write data pointer. When the read data comes back from the core, an associated ID is used to direct the data to the appropriate read port. According to AXI specifications, the read data with the same ID is required to be given back to the AXI read master in the same order in which read commands were received by the port.
www.xilinx.com
253
URGENT PL Signals
PL Fabric
AXI_HP 0, 1
PL Fabric
AXI_HP 2, 3
PL Fabric
Other Masters
(Via Central Interconnect)
CPUs/ACP
(Via L2 Cache)
Interconnect
Write Request Read Request Write Request
Urgent Read/Write 0 Urgent Read/Write 1 Urgent Read/Write 2 Urgent Read/Write 3 Page Match Read 3 Aging Read 3
Read 3
Urgent R
Write 3
Urgent W
Read 2
Write 2
Read 1
Write 1
Read 0
Write 0
Priority Level
Priority Level
Priority Level
Priority Level
Priority Level
Priority Level
Priority Level
Priority Level
DDR Interface
DDR Core
DDR PHY
UG585_c10_03_012113
Figure 10-3:
www.xilinx.com
254
10.2.4 TrustZone
The DDR memory can be configured in 64 MB sections. Each section can be configured to be either secure or non-secure. This configuration is provided via a system level control register. A 0 on a particular bit indicates a secure memory region for that particular memory segment. A 1 on a particular bit indicates a non-secure memory region for that particular memory segment.
In the case of a non-secure access to a secure region, a DECERR response is returned back to the master. For writes, the write data is masked out before being sent to the controller which results in no actual writes occurring in the DRAM. On reads, the read data is all zeros on a TZ violation.
DDR Interface
AXI Port Arbiter
Read Arbiter
Transaction Scheduler
Sequencer
Stage 3
Stage 2
Write Arbiter
Write Request
UG585_c10_04_032012
Figure 10-4:
www.xilinx.com
255
Note: Many combinations of address remapping are not available, notably a complete
bank-row-column mapping. The address mapper associates linear request addresses to DRAM addresses by selecting the AXI bit that maps to each and every applicable DRAM address bit. The full available address space is only accessible to the user when no two DRAM address bits are determined by the same AXI address bit. Each DRAM row, bank, and column address bit has an associated register vector to determine its associated AXI source in the DDRC DRAM_addr_map_bank, DRAM_addr_map_row, and DRAM_addr_map_col registers. The associated AXI address bit is determined by adding the internal base of a given register to the programmed value for that register, as described in the following equation: [internal base] + [register value] = [AXI address bit number] For example, from the description for reg_ddrc_addrmap_col_b3, it can be seen that this register determines the mapping for DRAM column bit 4 and its internal base is 3. When the full data bus is in use, DRAM column bit 4 is determined by the following: [internal base] + [register value]. If reg_ddrc_addrmap_col_b3 register is programmed to 2, then the AXI address bit is: 3 + 2 = 5. In other words, the column address bit 4 sent to DRAM is mapped to AXI address bit *_ADDR[5]. All the column bits left-shift one bit in half bus width mode (including ECC). In this case, reg_ddrc_addrmap_col_b2 determines the mapping of DRAM column address bit 4. In the full bus width case, reg_ddrc_addrmap_col_b3 determines DRAM column address 4.
Each of these stages has their own arbitration steps that will be discussed in more detail.
www.xilinx.com
256
Stage 1 Read
Stage 1 Write
Figure 10-5:
DDRC Arbitration
While the priority value is static in nature, the urgent bit and QoS signal can be manipulated dynamically.
10.4.2 Page-Match
To improve DDR utilization, the address of each new request is compared with the address of the previous request. The DDRC has a preference for taking new requests that are to the same page as the previous request. The memory port compares the addresses to determine if there is a page match. A port that has been selected by the arbiter continues to get preference (priority 0) as long as there continues to be page hits. They will compete against other ports with a priority of 0.
www.xilinx.com
257
The page size is defined by PAGE_MASK (32 bit register that all bits are the mask) and is always address aligned. For proper operation, the software must program the page size in the PAGE_MASK to match the size of the DDR memory. Setting this register to 0 disables the page-match step of the arbitration.
www.xilinx.com
258
Aging Counter 0
Aging Counter 1
Aging Counter 2
Aging Counter 3
Is 0?
F
Winner
Page Match?
F
Winner
Lowest Priority
Tie
Winner
0 3 2 1
Round Robin
Winner
UG585_c10_06_050212
Figure 10-6:
www.xilinx.com
259
Winner
Winner
Winner
UG585_c10_07_032012
Figure 10-7:
This stage of arbitration starts with the aging counter as shown in Figure 10-7. If there is a same type of transaction with a priority 0, it wins. For example if a read won the last round of arbitration and there is a read with priority 0, it wins. If there is not a same type of transaction with priority 0, and another type of transaction with a priority 0 is present, it wins. If there is no Priority 0 in the queue then it stays with the same type of transaction. An appropriate credit availability check is done before selecting any request in all the above cases.
www.xilinx.com
260
Transaction Scheduler
Sequencer
DDR Interface
AXI Port Arbiter
Stage 3
HPR
LPR
Stage 2
Write Arbiter
Write Request
UG585_c10_08_032012
Figure 10-8:
Read Queue
This can be changed by setting the reg_arb_set_hpr_rd_port<n> bit to 1'b1 for AXI ports (this is in the axi_priority_<rd/wr>_port<n> register). The DDRC is configured by default to serve only LPR. The read CAM can service only LPR by default. The total CAM depth is 32 for Read. (However, one slot is always allocated for ECC purposes.) The reg_ddrc_lpr_num_entries register field in the DDRC ctrl_reg1 register specifies the number of entries reserved for LPR. Taking 31 and subtracting the reg_ddrc_lpr_num_entries gives the number of entries reserved for HPR. It is necessary to change the REG_DDRC_LPR_NUM_ENTRIES field if a port is configured as an HPR port to avoid deadlock in the credit mechanism
www.xilinx.com
261
Read Mode
Write Mode
Figure 10-9:
The transaction state stays the same until the other type of transaction is critical or there is no more of that type of transaction. The state machine defaults to the read state. Table 10-4 shows how a transaction in the queue can go from a normal state to critical. Table 10-4:
Normal
* Can be WR, LPR or HPR. Example is wr_max_starve_x32 which is a field of the WR_Reg.
Taking the low priority read transaction store as an example, it is expected that the transaction store generally functions independently based on the following signals: lpr_max_starve_x32 lpr_xact_run_length lpr_min_non_critical
The reg_arb_go2critical_en field in the DDRC ctrl_reg2 register enables the arbiter to drive co_gs_go2critical_* signals to the DDRC. There are sideband signals on AXI (awurgent and arurgent) that drive the co_gs_go2critical_* signals. If any port asserts their urgent sideband signal, and if this feature is enabled, the arbiter asserts the corresponding co_gs_go2critical_* signal to the controller.
www.xilinx.com
262
Inside the controller, assertion of this signal causes the state machine to switch from one state to another. For example, if the DDRC is currently servicing reads and co_gs_go2critical_wr goes High, the controller ignores the normal state switching methods (starvation counter etc), and jumps to servicing writes. There is a register in the controller to control how long to keep servicing the current command type before switching to the other (reg_ddrc_go2critical_hysteresis field in the DDRC ctrl_reg2). In summary, this go2critical feature is used in the controller and ensures fast switching between reads and writes for transactions with super high priority.
Note:
1. The normal programming condition is expected to be reg_ddrc_prefer_Write=0. (this is a bit field in the DRAM_param_reg4 register) This means that the read requests are always serviced immediately when received by an idle controller. Also, it is often desirable to set the reg_ddrc_rdwr_idle_gap (this field is in the ddrc_ctrl register) to a very low number (such as 0, 1, or 2) to ensure that writes do not go un-serviced in an otherwise-idle controller for any length of time, wasting bandwidth. (The trade-off here is that by servicing writes more quickly, the likelihood increases that reads issued to the controller immediately following writes incurs additional latency to allow writes to be serviced and turn the bus around.) Because the ordering is guaranteed on all requests issued to the controller, write latency must not be a concern to system design. (In the event that write data is required by a subsequent read, the controller automatically forces the write data out to DRAM before servicing the read.)
2.
Holds the new write transaction in a temporary buffer Applies flow control back to the core to prevent more transactions from arriving Flushes the internal queue holding the colliding transaction until that transaction has been serviced Accepts the new transaction and removes flow control
www.xilinx.com
263
Credits are counted for each command type independently according to the following rules: Initially the interface has zero credits. Following the de-assertion of reset to the DRAM controller, credits are issued to the interface for each command type. A given credit count increments every time a credit is issued by the DRAM controller, indicated by the assertion of the appropriate *_credit signal on the rising edge of the clock. When the credit count is greater than zero, the interface can issue requests of that type to the controller. Each time a request is issued to the controller, the associated credit count is decremented.
www.xilinx.com
264
This section is intended for reference and debug purposes only. Generally, programming for steps 17 are provided via the appropriate Xilinx design suite, such as EDK XPS. Unless otherwise specified, all DDR3 settings and procedures also apply to DDR3L.
ddr_3xclk Frequency
525.00 400.00
ddr_2xclk Divider
3 6
www.xilinx.com
265
Programming the DDR clock involves the DDR_PLL_CTRL and DDR_CLK_CTRL registers in the SLCR. The programming sequence is as follows. 1. 2. 3. 4. 5. 6. 7. Put the PLL in bypass mode Assert the PLL reset Set the PLL feedback divider value Set the ddr_2xclk and ddr_3xclk divisor values Deassert the PLL reset Wait for PLL lock Remove PLL bypass mode
In addition to the main DDR clock, a 10 MHz clock is used by the digitally controlled impedance (DCI) function built into the DDR IOB. This clock is configured via the SLCR DCI_CLK_CTRL register.
DDR standard
DDR3 DDR2 LPDDR2
Drive Impedance
When enabled, the DCI state machine will automatically match drive and termination impedance to the external resistors. This background calibration takes 1-2 ms to lock and then runs continuously.
Calibration
1. 2. Configure the clock module to configure a 10 MHz clock on dci_clk Enable the DDR DCI calibration system using the SLCR registers DDRIOB_DCI_CTRL and DDRIOB_DCI_STATUS a. c. e. Toggle DDRIOB_DCI_CTRL.RESET_B to 0 and set to 1 Set DDRIOB_DCI_CTRL. UPDATE_CONTROL to 0 Poll on the DDRIOB_DCI_STATUS.DONE bit until it is 1 b. Set DDRIOB_DCI_CTRL.PREF_OPT, and NREF_OPT fields according to Table 10-7 d. Set DDRIOB_DCI_CTRL.ENABLE to 1
www.xilinx.com
266
Table 10-7:
Calibration Reset
0 000 00 000 000 00
Field Name
UPDATE_CONTROL PREF_OPT2[2:0] PREF_OPT1[1:0] NREF_OPT4[2:0] NREF_OPT2[2:0] NREF_OPT1[1:0]
Power Down
0 000 00 000 000 00
DCI Disabled
1 000 00 000 000 00
Configuration
The DDR system supports DDR3/DDR2/LPDDR2 in 16 and 32 bit modes and power down modes. The registers identified in Table 10-8 control groups of I/Os and must be configured depending on the particular mode. Table 10-8: DDR IOB Configuration Registers Affected I/O Blocks
VREF, VRN, VRP, DRST DCI controller DCI controller DDR_A[14:0], DDR_CKE, DDR_BA[2:0], DDR_ODT, DDR_WE_B, DDR_CAS_B, DDR_RAS_B DDR_CS_B DDR_CK_P, DDR_CK_P DDR_DQ[15:0], DDR_DM[1:0], DDR_FIFO_IN[0], DDR_FIFO_OUT[0] DDR_DQ[31:16], DDR_DM[3:2], DDR_FIFO_IN[1], DDR_FIFO_OUT[1] DDR_DQS_P[1:0], DDR_DQS_N[1:0] DDR_DQS_P[3:2], DDR_DQS_N[3:2] DDR_A[14:0], DDR_CKE, DDR_BA[2:0], DDR_ODT, DDR_WE_B, DDR_CAS_B, DDR_RAS_B, DDR_CS_B DDR_CK_P, DDR_CK_P
Register
DDRIOB_DDR_CTRL DDRIOB_DCI_CTRL DDRIOB_DCI_STATUS DDRIOB_ADDR0 DDRIOB_ADDR1 DDRIOB_CLOCK DDRIOB_DATA0 DDRIOB_DATA1 DDRIOB_DIFF0 DDRIOB_DIFF1 DDRIOB_DRIVE_SLEW _ADDR DDRIOB_DRIVE_SLEW _CLOCK
Description
Controls special I/O modes for internal and external VREF and DCI reference pins VRN and VRP Enables the DCI controller Status for the DCI controller Configuration settings for address and control outputs used by LPDDR2, DDR2 and DDR3 Configuration settings for the differential clock outputs. Controls DDR_CK_P, DDR_CK_P Configuration settings for data and mask bits for lower 16-bits Configuration settings for data and mask bits for upper16-bits Configuration settings for dqs bits for lower 16-bits Configuration settings for dqs bits for upper 16-bits Drive strength and slew rate settings for address and control output Drive strength and slew rate settings for the clock outputs
www.xilinx.com
267
Table 10-8:
Register
DDRIOB_DRIVE_SLEW _DATA DDRIOB_DRIVE_SLEW _DIFF
Description
Drive strength and slew rate settings for data I/Os Drive strength and slew rate settings for data strobe I/Os
Set the IOB configuration as follows: 1. 2. 3. 4. Set DCI_TYPE to DCI Drive for all LPDDR2 I/Os. Set DCI_TYPE to DCI Termination for DDR2/DDR3 bidirectional I/Os. Set OUTPUT_EN = obuf to enable outputs. Set TERM_DISABLE_MODE and IBUF_DISABLE_MODE to enable power saving input modes. The TERM_DISABLE_MODE and IBUF_DISABLE_MODE fields should not be set before DDR training has completed. Set INP_TYPE to VREF based differential receiver for SSTL, HSTL for single ended inputs. Set INP_TYPE to Differential input receiver for differential inputs. Set TERM_EN to enabled for DDR3 and DDR2 bidirectional I/Os (Outputs and LPRDDR2 IOs are un terminated). Set DDRIOB_DATA1 and DDRIOB_DIFF1 registers to power down if only 16 bits of DQ DDR are used (including ECC bits). For DDR2 and DDR3 DCI only affects termination strength, so address and clock outputs do not use DCI.
5. 6. 7. 8. 9.
10. For LPDDR2 DCI affects drive strength, so all I/Os use DCI.
VREF Configuration
DDR I/Os use a differential input receiver. One input to this receiver is connected to the data input, and the other is connected to a voltage reference called VREF. For DDR2/3 and LPDDR2 DRAM interfaces, the V REF voltage is set to half of the I/O VCCO voltage. The VREF can be supplied either externally over dedicated VREF pads, or from an internal voltage source. External VREF is recommended for all designs to provide additional timing margin, but requires external board components. To configure the V REF reference supply, set the DDRIOB_DDR_CTRL register as follows: To enable internal V REF
Set DDRIOB_DDR_CTRL.VREF_EXT_EN to 00 (disconnect I/Os from external signal) Set DDRIOB_DDR_CTRL.VREF_SEL to the appropriate voltage setting depending on the DDR standard (V REF=VCCO_DDR/2) Set DDRIOB_DDR_CTRL.VREF_INT_EN to 1 to enable the internal VREF generator Set DDRIOB_DDR_CTRL.VREF_INT_EN to 0 to disable the internal V REF generator Set DDRIOB_DDR_CTRL.VREF_SEL to 0000 Set DDRIOB_DDR_CTRL.VREF_EXT_EN to 11 to connect the IOBs VREF input to the external pad for a 32-bit interface
www.xilinx.com
268
Set DDRIOB_DDR_CTRL.VREF_EXT_EN to 01 to connect the IOBs VREF input to the external pad for a 16-bit interface
Calibration
DDR3 devices provide ODT calibration via the ZQCL and ZQCS commands. The ZQCL (ZQ calibration long) command is issued as part of the DRAM initialization procedure and is used for initial calibration, which takes about 512 DDR_3x clock cycles. The ZQCS (ZQ calibration short) is subsequently issued automatically by the DDRC for minor calibration adjustments. A typical ZQCS interval is 100 ms. DDR2 (and LPDDR2) devices do not provide ODT calibration.
www.xilinx.com
269
Calibration
In DDR3 and LPDDR2 devices, the output impedance is calibrated by the same ZQCL/ZQCS commands discussed above. In DDR2 devices, the DDR2 external calibration procedure (OCD for off-chip driver calibration) is not supported by the DDRC.
Not all DRAM types support all three steps, as detailed below. Each step can be enabled or disabled independently. If a training step is enabled, the user must provide an initial delay value as a starting point of the automatic training procedure. The value is a rough estimate of the expected delay or skew (see details below) on the system board, minus some margin. If a training step is disabled, the user must provide a delay value to be used to compensate for the board delay or skew. There are several possible reasons why the user might choose to disable a training step. The step is not supported by the particular DRAM type. For example, write leveling is not supported by DDR2 and LPDDR2. Board delays are well-known and operating conditions are such that timing variance is minimal, and training is not required. Delay settings are known from previous training events.
www.xilinx.com
270
Write Leveling
Goal Desired Nominal Final Ratio Initial Ratio Applies To Adjust WR DQS relative to CLK DQS aligned with clock (0 phase offset) Equal to the DQS to CLK board delay at the DRAM Final value minus 0.5 cycle. If < 0 set to 0. If skew is too small, invert clock. DDR3 only
Write leveling is part of the DDR3 specification. Due to the fly-by topology recommended for DDR3 systems, the clock (CLK) tends to lag relative to write DQS at the DRAM input. In order to align CLK and DQS as required by the DRAM specification, the PHY delays the DQS signal to match the board skew. The write leveling procedure is used to find the required delay. When write leveling is enabled (via MR1), the DRAM asynchronously feeds back CLK, sampled with the rising edge of DQS, through the DQ bus. The controller repeatedly delays DQS until a transition from 0 to 1 is detected. Write leveling is performed independently for each byte lane. The DDRC supports write leveling as part of the initialization procedure. Optionally, write leveling can be disabled and pre-determined delay values can be programmed via registers (required for DDR2 and LPDDR2 where write leveling is not supported). It should be noted that successful training depends on providing an approximate minimum DQS to CLK delay value. This value should be estimated based on system board layout. This value should be estimated based on system board layout as well as package delay information.
The read DQS gate training is used by the PHY to identify the valid interval of read DQS and capture the read data. It is necessary to align the valid read window to the read data burst and exclude the preamble period and any period during which the DQS signal is tri-stated or driven by the PHY itself. The DDRC supports read DQS gate training as part of the initialization procedure. Optionally, training can be disabled and pre-determined delay values can be programmed via registers (required for DDR2, where read training is not supported). Note that when using LPDDR2, with read gate training, automatic training is not recommended. Instead, the following procedure is recommended (Xilinx tools implement this flow): 1. The even byte lanes are trained and the results are recorded by software.
www.xilinx.com
271
2. 3.
The odd byte lanes are trained and the results are recorded by software. The results from 1 and 2 are then applied during DRAM controller initialization, with automatic training disabled.
It should be noted that successful training depends on providing an approximate minimum Zynq to DRAM board delay value. This value should be estimated based on system board layout.
Enabled by the MPR bit-field in MR3, DDR3 Read data eye training is done to compensate for possible imbalanced loading on the read path. In this mode, the DRAM outputs a stream of 01010101 in a burst length of 8 bits with a regular memory read command. Given the known data pattern, the memory controller adjusts the internal DQS delay so that DQS edges occur in the middle of the data eye. The DDRC supports read data eye training as part of the initialization procedure. Optionally, training can be disabled and pre-determined delay values can be programmed via registers (required for DDR2 where read training is not supported).
www.xilinx.com
272
independently. In the event of training failure, two possible solutions are proposed here: a semi-automatic and a manual training method. As the method gets more manual, the training time increases. It is therefore recommended to follow this sequence: 1. 2. 3. Try automatic training, verify board measurement-driven initial values If failed, try semi-automatic training If failed, use manual training
Automatic Training
The standard training procedure is described above. The estimated time for initialization and training is 1-2 ms.
Semi-Automatic Training
This method is useful when system/board delays are known, but PVT timing uncertainty causes the automatic training to fail. Note that only two initial timing parameters are needed to enable successful automatic training: Write DQS to CLK skew The one-way board delay from Zynq to DRAM
These values are known in this case, but the PHY PVT variations modify these values in an additive fashion. Therefore, given a nominal delay value T, the actual value might be in the range (T-delta, T+delta), where delta is the maximum PVT variation. The semi-automatic training method is performed as follows: 1. 2. Divide the range (T-delta, T+delta) into n parts, and thus create (n+1) possible values for each of the two delay parameters. Perform (n+1) 2 automatic training procedures and follow each one with a memory test.
For example, for n=2, the three data points for each parameter are T-delta, T, and T+delta. Perform nine automatic training procedures and observe the results. For n=4, perform 25 tests, etc. As final parameters, pick the values that are in the center of the successful tests region. Note that each data byte lane (aka data slice) has its own independent parameters, and should be tested independently in the memory tests. The estimated time for a training iteration is 1-2 ms plus the duration of the memory test. Assuming a simple 1,000 word read-write test and an average access time of 30 cycles, test duration is on the order of 60,000 cycles or about 0.12 ms at 500 MHz. Thus, a 25-iteration semi-automatic training might last 25-50 ms.
www.xilinx.com
273
The DDR PHY contains five adjustable delay elements, four of which are per byte lane (so the actual number of unique adjustable delay elements is 17). Of these five elements, only three are adjusted by the automatic training. These three elements are the write DQS delay, read DQS delay, and read data delay. The remaining two elements are the write data delay, and the control path delay, which take their value from a programmable register, and the value is not adjusted by the automatic training. The automatic training process varies the delay of those three elements over a wide range, and the semi-automatic procedure increases that range. If both automatic and semi-automatic procedures fail, it is highly likely that one or both of the remaining two delay elements require adjustment. Therefore, multiple sets of semi-automatic training procedures can be run, each set using different values of the two remaining delay values. Thus we still take advantage of the efficiency of the automatic training, and reduce the total number of experiments compared to all-manual training.
Manual Training
This method is useful when nothing is known, or if the semi-automatic method has failed. In its simplest form, this method consists of: Disabling the automatic training Performing a manual sweep of all delay parameters over their entire range. For each setting:
Keeping a scoreboard of results Locating the mid-point of all delay parameters (which might be different for each data lane)
The recommended delay increment value per iteration is 1/32 of a clock cycle, thus requiring 32 iterations to cover a one-cycle delay range per parameter. The estimated time for a manual training iteration is 700 us (500 us are required as part of the DRAM reset/initialization procedure for DDR3) plus the duration of the memory test, or about 0.8 ms. Simplifying assumptions can be used to reduce the search range, but even then the number of iterations might be on the order of 1,000, bringing the manual training time to about one second. Table 10-9 provides summary of register values involved in manual training. All values are in units of 1/256 of a clock cycles (256 units = 1 clock cycle, 8 units = 1/32 of a clock cycle). Table 10-9: Manual Training Register Summary Parameter
1 2 3 4 Write DQS delay/write leveling Write data delay/write data eye adjustment Read DQS gate delay/read DQS gate training Read data to DQS delay/read data eye training
Register
reg_phy_wr_dqs_slave_ratio[9:0] reg_phy_wr_data_slave_ratio[9:0] reg_phy_fifo_we_slave_ratio[10:0] reg_phy_rd_dqs_slave_ratio[9:0]
Nominal Value
DQS to DCLK delay DQS to DCLK delay + 64 2 * board delay 53, placing the DQS edges in the middle of the data eye
www.xilinx.com
274
Table 10-9:
Nominal Value
128 (64 for LPDDR2)
Control
Notes:
1. Parameter 4 is an offset value relative to parameter 3.
10.7.1 DDRI
Table 10-10 shows an overview of DDRI registers. There are no dynamic bit fields in the DDRI registers. Table 10-10: Function
Arbitration PAGE_MASK AXI_PRIORITY_{WR,RD}_PORT{0:3} Misc AXI_ID
10.7.2 DDRC
Table 10-11 shows an overview of DDRC registers.
www.xilinx.com
275
Transaction Scheduler
DDR Protocol DRAM_PARAM_REG0 DRAM_PARAM_REG1 DRAM_PARAM_REG2 DRAM_PARAM_REG3 DRAM_PARAM_REG4 DRAM_ODT_REG ODT_DELAY_HOLD CTRL_REG1 CTRL_REG2 CTRL_REG3 CTRL_REG4 MODE_REG_READ LPDDR_CTRL{0:3} DFI_TIMING DDR Refresh CHE_REFRESH_TIMER01 CHE_T_ZQ CHE_T_ZQ_SHORT_INTERVAL DDR Init DRAM_INIT_PARAM DRAM_EMR_REG DRAM_EMR_MR_REG DRAM_BURST8_RDWR DRAM_DISABLE_DQ Address Mapping [1]: dis_dq ~ [16]: dis_auto_refresh ~ [13:6]: t_rfc_min ~ ~ [20:16]: refresh_to_x32 ~ ~ ~ [12]: selfref_en [8]: refresh_update_level ~ ~ ~ ~
www.xilinx.com
276
DEEP_PWRDWN_REG ECC CHE_ECC_CONTROL CHE_{CORR,UNCORR}_ECC: _LOG _ADDR _DATA_31_0 _DATA_63_32 _ECC_DATA_71_64 CHE_ECC_STATS ECC_SCRUB CHE_ECC_CORR_BIT_MASK: _31_0 _63_32
[0]: deeppowerdown_en ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
10.7.3 DDRP
Table 10-12 shows an overview of DDRP registers. Table 10-12: Function
DDR Control DDRC_CTRL TWO_RANK_CFG PHY_CONFIG{0:3} PHY_CMD_TIMEOUT_RDDATA_CPT Training PHY_{WR,RD,GATE}_LVL_FSM PHY_INIT_RATIO{0:3} REG_{64,65} REG_{2C,2D} REG69_6C{0:3} REG6E_71{0:3} ~ ~ ~ ~ ~ ~ [ ]: soft_rstb [ ]: powerdown_en [ ]: t_rfc_nom_x32 ~ ~
www.xilinx.com
277
Function
www.xilinx.com
278
only that byte initialized (second byte of 16-bit location is uninitialized) does not result in an ECC error. The controller only checks ECC on the byte that has been read. Note that while only two data byte lanes are used for actual data, all four lanes are used in ECC mode, and therefore DDR training must be performed on all lanes.
When the controller detects an uncorrectable error, it does the following: Sends the uncorrectable data with an error response to the core. This results in an AXI SLVERR response on the AXI interface along with the corrupted data. Sends the ECC error information to the register module for logging.
www.xilinx.com
279
3. 4. 5.
Program reg_ddrc_dis_scrub to 1'b0 Program reg_ddrc_data_bus_width to 2'b0 Program reg_ddrc_soft_rstb to 1 (takes the controller out of reset)
Note that re-initialization of the whole DDR space before reading any data from it is recommended to prevent ECC error generation as a result of accessing uninitialized areas of memory.
Disabling the ECC Operation (Switching from ECC Mode to Non-ECC Mode)
1. 2. 3. 4. 5. Program the reg_ddrc_soft_rstb to 0 (resets the controller) Program the ECC mode by programming the reg_ddrc_ecc_mode to 3'b000 Program the reg_ddrc_dis_scrub to 1'b1 Program the reg_ddrc_data_bus_width to 2'b00 Program the reg_ddrc_soft_rstb to 1 (takes the controller out of reset)
B[7:0] -> gives the number of uncorrectable errors B[15:8] -> gives the number of correctable errors
www.xilinx.com
280
5.
6.
Note: This sequence can be followed in general for changing DDRC settings, in addition to just clock
frequencies.
Note: DRAM content preservation is not guaranteed when the controller is reset.
www.xilinx.com
281
Note that any command that comes in while the DRAM is in deep power down mode is stored in the CAM and is processed after deep power down exit and DRAM re-initialization.
www.xilinx.com
282
Chapter 11
System bus masters can access the SMC controller as shown in Figure 11-1. The operational registers of the SMC are configured through an APB interface. The memory mapping for the SMC is described in Chapter 4, System Addresses. The SMC handles all commands, addresses, data, and the memory device protocols. It allows the users to access the controller by reading or writing into the operational registers. The SMC is based on ARM's PL353 static memory controller.
X-Ref Target - Figure 11-1
Device Boundary
Interconnect
APB
Slave port
UG585_c11_01_031812
Figure 11-1:
www.xilinx.com
283
11.1.1 Features
Features of the SMC are listed for each type of memory. The controller is configured to operate in one of two interface modes.
www.xilinx.com
284
SMC
NAND Flash Controller IRQ ID# 50
Read Data Slave port Write Data Read Data FIFO Write Data FIFO Command FIFO ECC Memory Interface Controller
Interconnect AXI
Format
SRAM/NOR Controller
Slave port
IO Buffer Control
Interconnect APB
Memory Manager
UG585_c11_02_031812
Figure 11-2:
Interconnect Interfaces
For the NOR/SRAM controller mode, the AXI interface is memory mapped so software can read and write to/from memory. For the NAND flash controller mode, software writes commands to the NAND controller via the AXI interface. Details can be found in the ARM specification. The APB bus interface provides a memory mapped area for the software to read and write the control and status registers.
Memory Manager
The memory manager tracks and controls the current state of the CPU_1x clock domain state machine. This block is responsible for updating register values that are used in the memory clock domain and controlling direct commands issued to memory and controlling entry-to and exit-from low-power mode through the APB interface.
Format
The format block arbitrates between memory accesses from the AXI slave interface and the memory manager. Requests from the manager have the highest priority. Requests from AR and AW channels are arbitrated on a round-robin basis. The format block also maps AXI transfers onto appropriate memory transfers and passes these to the memory interface through the command FIFO.
www.xilinx.com
285
11.1.3 Notices
7z010 CLG225 Device
The 7z010 CLG225 device does not support the NOR/SRAM interface. The NAND interface is supported in the 8-bit interface, but not the 16-bit interface.
11.2.2 Clocks
The SMC has two clock domains that are driven by the CPU_1x and SMC_Ref clocks, see Table 11-1. These clocks are controlled by the clock generator, refer to Chapter 25, Clocks. The two clock domains are asynchronous to each other. The main benefit of asynchronous clocking is to maximize the memory performance while running the interconnect interface at a fixed system frequency. Table 11-1: Clock
CPU_1x SMC_Ref
Clock Domain
Interconnect domain SMC domain
Description
This clock runs at 1/6th or 1/4th the CPU clock rate depending on the CPU clock mode. To stop this clock, first put the SMC is in low-power mode. This clock is used to control the I/O memory interfaces.
11.2.3 Resets
The controller has two reset inputs that are controlled by the reset subsystem; refer to Chapter 26, Reset System. This SMC CPU_1x reset is used for the AXI and APB interfaces. The SMC_Ref reset is for the FIFOs and the rest of the controller including the control and status registers.
11.2.4 Interrupts
A single interrupt is generated by the controller, IRQ ID # 50. The interrupt is triggered on the rising edge of the busy input for the NAND memory interface. The SRAM/NOR interface does not generate an interrupt. The cause of the SMC reset is determined by reading the relevant status registers.
www.xilinx.com
286
Parameter
Chip Selects (Interface 0) Chip Select (Interface 1) NAND flash mode data width SRAM mode data width System interface bus width System interface clock rate Command FIFO depth Read data word FIFO depth Write data word FIFO depth ECC support ECC Extra Block
Design Notes
SRAM/NOR interface chip selects operate independently. NAND flash interface chip select Data width can be 8 or 16 bits Data width is 8 bits. AXI CPU_1x (1/6th or 1/4th the CPU clock frequency) Maximum supported depth on both interfaces Maximum supported depth on both interfaces Maximum supported depth on both interfaces 1-bit ECC hardware with assistance from software Supported
Base Address
0xE000_E000 0xE100_0000 0xE200_0000 0xE400_0000
Description
Configuration registers base address SMC NAND memory base address SMC SRAM Chip Select 0 base address SMC SRAM Chip Select 1 base address
Type
Registers Memory Memory Memory
www.xilinx.com
287
Description
MIO Pin
Description
www.xilinx.com
288
Optional Pins
For either SRAM or NOR, the upper address bits are optional. When not used, they can be assigned to other functions.
NOR Device
SRAM_CE_B0 SRAM_CE_B1 SRAM_OE_B MIO Multiplexer SMC Controller SRAM_BLS_B NOR or SRAM Device CEn
OEn WEn
SRAM_A[25:0] SRAM_DQ[7:0]
A[25:0] (upper bits are optional and A[25] is available only if CE1 is not used) DQ[7:0]
System Reset#
RESETn
UG585_c11_03_020513
Figure 11-3:
X-Ref Target - Figure 11-4
SRAM_CE_B0 SRAM_CE_B1 SRAM_OE_B MIO Multiplexer SMC Controller SRAM_BLS_B NOR or SRAM Device
CEn
OEn WEn
SRAM_A[25:0] SRAM_DQ[7:0]
A[25:0] (upper bits are optional and A[25] is available only if CE1 is not used) DQ[7:0]
System Reset#
RESETn
UG585_c11_04_020513
Figure 11-4:
www.xilinx.com
289
NAND Flash
NAND_CE_B0 NAND_CLE NAND_ALE MIO Multiplexer NAND_RE_B NAND_WE_B NAND_BUSY NAND_IO[7:0] NAND_IO[15:0] (for 16-bit data) GPIO Zynq Device Boundary System Reset# CEn CLE ALE RE# WE# R/B# IO[7:0] IO[15:8] WPn RESETn
SMC Controller
UG585_c11_05_020613
Figure 11-5:
Description
Operating and interrupt status, read-only SMC configuration information, read-only Enable/disable/clear interrupts and control low power state Issue a set command, write-only Stage a cycles or opmode operation to the SRAM/NOR and NAND flash registers Insert idle cycles between SRAM/NOR burst cycles Timing cycles Operating mode Timing cycles Operating mode ECC status and configuration Commands used for ECC reads and writes Address generated by controller Value generated by controller
Both
SRAM/NOR CS 0, 1
REFRESH_PERIOD_{0,1} SRAM_CYCLES0_{0,1} OPMODE0_{0,1} NAND_CYCLES1_0 OPMODE1_0 ECC_{STATUS, MEMCFG}_1 ECC_MEMCOMMAND{2:1}_1 ECC_ADDR{1:0}_1 ECC_VALUE{3:0}_1
NAND Flash
www.xilinx.com
290
www.xilinx.com
291
Chapter 12
12.1.1 Features
32-bit AXI interface for Linear Addressing mode transfers 32-bit APB interface for I/O mode transfers Programmable bus protocol for flash memories from Micron and Spansion Legacy SPI and scalable performance: 1x, 2x, 4x, 8x I/O widths Flexible I/O
Single SS 4-bit I/O flash interface mode Dual SS 8-bit parallel I/O flash interface mode Dual SS 4-bit stacked I/O flash interface mode Single SS, legacy SPI interface
16 MB addressing per device (32 MB for two devices) Device densities up to 128 Mb
www.xilinx.com
292
Software issues instructions and manages flash operations Interrupts for FIFO control 63-word RxFIFO, 63-word TxFIFO Memory reads and writes are interpreted by the controller AXI port buffers up to four read requests AXI incrementing and wrapping address functions
Quad-SPI Device
OR
4-bit I/O
IRQ ID# 51
Interconnect
Quad-SPI Ref Clock Quad-SPI Ref Reset
AXI
Slave Port
Quad-SPI Controller
MIO
QSPI 0 SS
MIO Pins
QSPI 1 SS
8-bit I/O
Interconnect
CPU 1x Clock
APB
Slave Port
QSPI 0 SS
4-bit I/O
QSPI 1 SS
UG585_c12_01_101912
Figure 12-1:
www.xilinx.com
293
For the 4-bit Stacked I/O configuration, the devices can have difference capacities, but must have the same protocol. If using two different size devices, Xilinx recommends using a 128 Mb device at the lower address. In this mode, the QSPI 0 device starts at FC00_0000 and goes to a maximum of FCFF_FFFF (16 MB). The QSPI 1 device starts at FD00_0000 and goes to a maximum of FDFF_FFFF (another 16 MB). If the first device is less than 16 MB in size, then there will be a memory space hole between the two devices.
Linear Addressing Mode Command FIFO AXI Interface SPI-to-AXI Data Formatter
AXI-to-SPI
Command Converter
I/O Mode
Mux
Tx FIFO
Serializer
APB Interface
Figure 12-2:
12.1.4 Notices
Operating Restrictions
When a single device is used, it must be connected to QSPI 0. When two devices are used, both devices must be identical (same vendor and same protocol sequencing). The MIO pins for the Quad-SPI controller conflict with both the NOR and NAND interfaces of the SMC controller. The NOR/SRAM and NAND interfaces cannot be used when Quad-SPI is used. More information about the MIO pins is provided in section 2.5 PS-PL MIO-EMIO Signals and Interfaces.
www.xilinx.com
294
Software Reset:
slcr.QSPI_RST_CTRL[QSPIx_REF_RST, LQSPIx_CPU1x_RST]
Quad-SPI
Boot Mode
Reset
Software Reset
I/O Mode
UG585_c12_10_072612
Figure 12-3:
In I/O mode, software can choose varying degrees of control over different aspects of read data management by setting appropriate register bits. In linear mode, the controller carries out all necessary read data management and the memory reads like a ROM to software.
www.xilinx.com
295
of the transmit logic. Data shifted into the RxFIFO reflects the switch resulting in valid data in the RxFIFO at the corresponding FIFO entry Software needs to filter the raw data from the RxFIFO to obtain the relevant data content. The controller does not modify either the instruction written by software or the captured data put into the RxFIFO. The controller supports little endian mode and the most significant bit of the least significant byte of a 4-byte word of an instruction is sent first.
Flow Control
I/O mode has different modes of flow control during data transfer. The user can select between automatic and manual mode, controlled by config_reg.MANSTARTEN (Man_start_com). In Manual mode, the user can further select manual or automatic chip select with Config_reg.SSFORCE (Manaual_CS). Asserting chip select signals the beginning of a command sequence on MIO. Immediately following the CS assertion, serial data on D0 is interpreted as command by the flash memory. In automatic mode, the entire transmission sequence, including control of chip select is done in hardware. No software intervention is required. The transmission starts as soon as data is pushed into the TxFIFO via writing to TXD, chip select automatically becomes active. Data transmission ends when the TxFIFO is empty and chip select automatically becomes inactive. In this mode, to carry out continuous data transfer, software must be able to keep up with supplying data to the TxFIFO at a rate equal or higher than the rate of data movement on the MIO. This can be difficult since reading from RXD and writing to TXD occurs at the APB clock rate. In Manual mode, the user controls the start of data transmission. In this case, software either writes the entire transmission sequence to the TxFIFO or until the TxFIFO is full. Upon writing of the Man_start_en bit, the controller takes over, asserts CS, shifts data out of the TxFIFO and into the RxFIFO, controls the input/ouput state of the MIO as appropriate, and terminates the sequence when the TxFIFO is empty by de-asserting CS. The maximum number of bytes per command sequence in this mode is limited by the depth of the TxFIFO of 252 bytes. In manual mode, the user can further choose to control the chip select in addition to controlling the start of transmission. Software again writes the transmission sequence to the TxFIFO starting with the command until the TxFIFO is full. Software then asserts CS, followed by manual start. The hardware takes over. However, CS is not de-asserted when the TxFIFO becomes empty. Software can fill the TxFIFO again with the appropriate data to continue the previous command. This method removes the limit on the number of bytes per command sequence and can be used effectively for large data transfers. On completion of the command sequence, the software de-asserts CS by writing to the Manual_CS bit.
www.xilinx.com
296
and assumes that the rest of the FIFO have the same type (TXDx) of CMD. Because of this the user must empty the TxFIFO between consecutive accesses to TXD0, TXD1, TXD2, and TXD3 Table 12-1: Register
TXD 1 TXD 2 TXD 3 TXD 0
23:16
Reserved Reserved Data 1 Data 2
15:8
Reserved Data 0 Data 0 Data 1
7:0
Command only Command only Command only Data or Command
Example Usage
Set write enable Write status with data Read status with two dummy bytes Write data to transmit or dummy data for reads
www.xilinx.com
297
accessing the linear Quad-SPI memory subsystem and that of other ROMs, except for a potentially longer latency. A simplified block diagram of the controller showing the linear and I/O portions is shown in Figure 12-2.
The AXI slave interface provides a read acceptance capability of 4 so that it can accept up to four outstanding AXI read commands.
Operating Mode
Read (serial bit) Fast Read (serial bit)
Micron 1 Device
0x80000003 0x8000010B
2 Devices
0xE0000003 0xE000010B
2 Devices
0xE0000003 0xE000010B
www.xilinx.com
298
Table 12-3:
Operating Mode
Dual Output Fast Read Quad Output Fast Read Dual I/O Fast Read Quad I/O Fast Read
Micron 1 Device
0x8000013B 0x8000016B 0x82FF01BB 0x82FF04EB
2 Devices
0xE000013B 0xE000016B 0xE2FF00BB 0xE2FF02EB
2 Devices
0xE000013B 0xE000016B 0xE2FF01BB 0xE2FF06EB
Performance Modes
To get the highest performance, the user should use the Quad-SPI controller in the Quad I/O mode. The user can improve read performance by using the Quad-SPI device in continuous read mode. This eliminates read instruction overhead for successive commands. Please refer to the LQSPI_CFG register for more details (see Appendix B, Register Details). Refer to the applicable Zynq-7000 AP SoC data sheet for operating frequencies.
Address Offset
AXI read addr Flash mem addr = AXI read addr - x Where x depends on the instr type and is either 0, 1, 2 or 3 Flash mem addr
UG585_c12_05_022712
Figure 12-4:
www.xilinx.com
299
Read Latency
In linear mode, the default read mode is fast Quad I/O. The following is an example to calculate latency at the memory in the Quad I/O mode at 100 MHz with 2 dummy bytes. For a single device, the number of clock cycles from the time an 8-bit instruction code and a 24-bit address is available to the time when the first 32-bit data becomes available is: Total latency = instruction latency + address latency + overhead (mode + dummy bites + offset) + latency = 8 cycles + 6 cycles + 8 (2+4+2) cycles + 8 cycles =30 cycles With the SPI clock of 100 MHz, the latency at the memory interface is 320 ns. Other read modes have higher latency and can be calculated in a similar manner.
Now, either configure the controller for linear addressing mode (section 12.2.5 Linear Addressing Mode) or configure the controller for I/O mode (section 12.3.3 Configure I/O Mode and section 12.3.4 I/O Mode Interrupts).
www.xilinx.com
300
12.3.1 Configuration
Example: Configure Controller
This example applies to both linear addressing and I/O modes. It prepares the controller baud rate, FIFO, flash mode, clock phase/polarity, and programs the loopback delay. The values to program into the qspi.Config_reg register are shown in Table 12-3, page 298. 1. Configure the controller. Write to the qspi.Config_reg register. a. c. e. f. 2. Set baud rate, [BAUD_RATE_DIV]. Select flash mode (not Legacy SPI), [LEG_FLSH] = 1. Set FIFO width to 32 bits, [FIFO_WIDTH]. Set clock phase, [CLK_PH] and Polarity, [CLK_POL]. b. Select master mode, [MODE_SEL] = 1. d. Select Little Endian, [endian] = 0 .
If baud rate divider is 2, then change default setting . If the qspi.Config_reg[BAUD_RATE_DIV] is set to 0b00 , configure the qspi.LPBK_DLY_ADJ (loopback delay adjustment) register with the following settings: a. c. Set to select internal clock . qspi.LPBK_DLY_ADJ[USE_LPBK] = 1 . Set the clock delay 1. qspi.LPBK_DLY_ADJ[DLY1] = 0b00 . b. Set the clock delay 0. qspi.LPBK_DLY_ADJ[DLY0] = 0b00 .
www.xilinx.com
301
3. 4. 5. 6.
7. 8. 9.
10. If read operations are carried out : re-arrange the READ data to eliminate the data read due to dummy cycles. 11. Disable controller. Set qspi.En_REG[SPI_EN] = 0 . 12. De-assert chip select . Set QSPI.Config_reg[PCS] = 1 .
www.xilinx.com
302
Note that the TxFIFO width must be programmed to 32 bits: qspi.Config_reg[FIFO_WIDTH] = 0b11 . Software needs to take care of consecutive non word aligned transfers.
b. Read data from the RxFIFO and poll the interrupt status until the RxFIFO is empty. The RxFIFO is empty when qspi.Intr_status_REG[RX_FIFO_not_empty] = 0 . 4. Fill the TxFIFO. Check if the TxFIFO Not Full status is asserted. If qspi.Intr_status_REG[TX_FIFO_not_Full] = 1, then there is data to be sent to the flash device (program and/or read operations): a. c. 5. 6. Write data to the qspi.TXD0 register. Follow steps a and b until all the data is written to the TxFIFO or until qspi.Intr_status_REG[TX_FIFO_full] = 1 . b. Poll for qspi.Intr_status_REG[TX_FIFO_full] = 1 , which indicates TX FIFO is full.
Enable the interrupts . Set qspi.Intrpt_en_REG[TX_FIFO_not_full, RX_FIFO_full] both = 1 . Start the data transfer. Set qspi.Config_reg[MANSTRTEN] = 1 .
www.xilinx.com
303
In these examples, YY can have any value. Each YY pair could have a different value. To receive data in serial legacy mode, the value is sampled from MISO/DQ1 line into RxFIFO synchronous to clock, while the command and address transactions occur on MOSI/DQ0.
b. Software remembers that one byte resulted from the Write Enable command and returns 0xYY to the calling function. The content in the RxFIFO after sending the WREN command follows. (Previous means that the value has not changed from the register's previous value.) RxFIFO Entry 1 0 MSB
Invalid 00 Invalid Previous Invalid Previous
LSB
Invalid Previous
www.xilinx.com
304
TxFIFO Entry 1 0
MSB
Invalid 0x3 Invalid 0x00 Invalid Previous
LSB
Invalid Previous
The content of the TxFIFO for this example follows. The byte sequence from controller to the device is: 0x03 , Y0, Y1, Y2, D0, D1, D2 and D3. TxFIFO Entry 1 0 3. 4. MSB
D3 A2 D2 A1 D1 A0
LSB
D0 0x03
Read past the instruction word . Read the qspi.RXD register and receive 0xYYYY_YYYY : a. a. c. YY = 0 . For the second read, software remembers that four bytes are valid. Overall, software reads these bytes: 0x00, 0x00, 0x00, 0x00, 0x24, 0x68, 0xAC, 0xEF and returns the four bytes of data to the calling function. Read flash memory data . Read the RXD register again and receives 0xD3D2_D1D0 . b. Example data: 0x2468ACEF.
The content of the RxFIFO for this example follows. The byte sequence from the device to controller is: YY, YY, YY, YY, 0xEF, 0xAC, 0x68 and 0x24 . RxFIFO Entry 1 0 MSB
0x24 YY 0x68 YY 0xAC YY
LSB
0xEF YY
www.xilinx.com
305
Description
0x20 0x24 0x28 0x2C 0x30 0x38 0x80 0x84 0x88 0xA0 0xA4 0xFC
www.xilinx.com
306
CPU_1x Clock
Refer to section 25.2 CPU Clock, for general clock programming information. The CPU_1x clock runs asynchronous to the Quad-SPI reference clock.
Reference Clock
The QSPI_REF_CLK is the main controller clock and is divided down to generate the SCLK clock for the flash memory interface. The QSPI_REF_CLK is sourced from the PS Clock Subsystem. The clock enable, PLL select, and divisor setting are programmed using the slcr.LQSPI_CLK_CTRL register. Refer to section 25.6.3 SDIO, SMC, SPI, Quad-SPI and UART Clocks for Quad-SPI clock programming information. For power management, the clock enable in the slcr register can be used to turn off the clock. The operating frequency for the reference clock is defined in the data sheet.
www.xilinx.com
307
12.4.2 Resets
The controller has two reset domains: the APB interface and the controller itself. They can be controlled together or independently. The effects for each reset type are summarized in Table 12-5. Table 12-5: Quad-SPI Reset Effects Name
ABP Interface Reset slcr.LQSPI_RST_CTRL[LQSPI_CPU1X_RST] PS Reset Subsystem slcr.LQSPI_RST_CTRL[QSPI_REF_RST]
APB Interface
Yes No
Protocol Engine
No Yes
Registers
Yes No
QSPI 0 should always be present if the QSPI memory subsystem is to be used. QSPI 1 is optional and is only required for the two-memory arrangement. Therefore, QSPI_1 cannot be used alone.
www.xilinx.com
308
Zynq Device
QSPI0_SCLK
CLK
QSPI0_IO[3:0]
IO[3:0]
QSPI0_SS_B
UG585_c12_06_022712
Figure 12-5:
Zynq Device
QSPI1_SCLK QSPI1_IO[3:0]
CLK
IO[3:0]
QSPI1_SS_B
QSPI0_SCLK QSPI0_IO[3:0]
CLK
IO[3:0]
QSPI0_SS_B
UG585_c12_07_022712
Figure 12-6:
For 8 bit parallel configuration, even bits of the data words are located in lower memory and odd bits of data are located in upper memory. The controller takes care of data management in both I/O and linear mode. The Quad-SPI controller does a read from the two Quad-SPI devices and ORs (or operation) both devices status information before writing the status data in the RXFIFO. Table 12-6 shows the data bit arrangement of a 32-bit data word for 8 bit parallel configuration .
www.xilinx.com
309
Table 12-6:
7 6 5 4
byte 0
byte 1
byte 2
byte 3
byte 0
byte 1
byte 2
byte 3
In 8 bit parallel configuration, total addressable memory size is 32 MB. This requires a 25-bit address. All accesses to memory must be word aligned and have double-byte resolution. In linear mode, the Quad-SPI controller divides the AXI address by 2 and sends the divided address to the Quad-SPI device. In IO mode, software is responsible for doing the address translation to comply with SPI 24-bit address support.
www.xilinx.com
310
Zynq Device
CLK
IO[3:0]
QSPI1_SS_B
QSPI0_SCLK QSPI0_IO[3:0]
CLK
IO[3:0]
QSPI0_SS_B
UG585_c12_08_022712
Figure 12-7:
QSPI0_IO[0]
MOSI
QSPI0_IO[1]
MISO
QSPI0_SS_N
SPI Slave
SS
QSPI0_IO[2]
WP
QSPI0_IO[3]
HOLD
UG585_c12_09_022912
Figure 12-8:
www.xilinx.com
311
Configure MIO pins 2 through 5 for I/O. Write 0x0000_0302 to each of the slcr.MIO_PIN_{02:05} registers: a. c. e. f. Route Quad-SPI 0 I/O pins to pin 2 through 5. LVCMOS18 (refer to the register definition for other voltage options). Disable internal pull-up resistor. Disable HSTL receiver. b. 3-state controlled by Quad-SPI (TRI_ENABLE = 0 ). d. Slow CMOS drive edge.
3.
Configure MIO pin 6 for serial clock 0 output. Write 0x0000_0302 to the slcr.MIO_PIN_06 register: a. c. e. f. Route Quad-SPI 0 serial clock to pin 6. LVCMOS18 (refer to the register definition for other voltage options). Disable internal pull-up resistor. Disable HSTL receiver. b. 3-state controlled by Quad-SPI (TRI_ENABLE = 0 ). d. Slow CMOS edge (benign setting).
www.xilinx.com
312
4.
Dual selects, separate 4-bit data memory interface. Configure MIO pin 0 for chip select 1 output. Write 0x0000_1302 to the slcr.MIO_PIN_00 register: a. c. e. f. Route Quad-SPI 1 chip select to pin 0. LVCMOS18 (refer to the register definition for other voltage options). Enable internal pull-up resistor. Disable HSTL receiver. b. 3-state controlled by Quad-SPI (TRI_ENABLE = 0 ). d. Slow CMOS edge (benign setting).
www.xilinx.com
313
a. c. e. f.
Route Quad-SPI feedback clock output to pin 8. LVCMOS18 (refer to the register definition for other voltage options). Disable internal pull-up resistor. Diable HSTL receiver.
1-Bit Data
2-Bit Data
~ ~ ~ I/O 0 I/O 1 Write Protect Hold
Name
QSPI{1,0}_SS_B QSPI{1,0}_SCLK QSPI_SCLK_FB_OUT QSPI{1,0}_IO_0 QSPI{1,0}_IO_1 QSPI{1,0}_IO_2 QSPI{1,0}_IO_3
www.xilinx.com
314
Chapter 13
SD/SDIO Controller
13.1 Introduction
The SD/SDIO controller communicates with SDIO devices and SD memory cards. The SDIO interface can be routed through the MIO multiplexer to the MIO pins or through the EMIO to SelectIO pin in the PL. The controller can support SD and SDIO applications in a wide range of portable low-power applications such as 802.11 devices, GPS, WiMAX, UWB, and others. The SD/SDIO controller block diagram is shown in Figure 13-1. The SD/SDIO controller is compatible with the standard SD Host Controller Specification Version 2.0 Part A2 with SDMA (single operation DMA), ADMA1 (4 KB boundary limited DMA), and ADMA2 (ADMA2 allows data of any location and any size to be transferred in a 32-bit system memory scatter-gather DMA) support. The core also supports up to seven functions in SD1, SD4, but does not support SPI mode. It does support SD high-speed (SDHS) and SD High Capacity (SDHC) card standards. The user should be familiar with the SD2.0/SDIO 2.0 specifications. These are listed in Appendix A, Additional Resources. The SD/SDIO controller is accessed by the ARM processor via the AHB bus. The controller also includes a DMA unit with an internal FIFO to meet throughput requirements.
www.xilinx.com
315
Command Decoder
Response Generator AHB SD/SDIO Host Controller Transmitter/ Receiver AHB Interface Interrupts SD/SDIO Bus
CPRM
Interrupt
FIFO
UG585_c13_01_020613
Figure 13-1:
Four I/O signals (MIO or EMIO) Command, Clock, CD, WP, Pwr Ctrl (MIO or EMIO) LED control, bus voltage (EMIO) Interrupt or polling driven
Slave mode for register accesses Low-speed, 1 KHz to 400 KHz Full-speed, 1 MHz to 50 MHz (25 MB/sec) High-speed and high-capacity memory cards
www.xilinx.com
316
Device Boundary
MIO Pins
CPU_1x clock SDIO{0, 1} CPU_1x reset AHB Slave port Control Registers EMIO Signals
Interconnect
PL
Figure 13-2:
www.xilinx.com
317
The host-AHB controller acts as bridge between the AHB bus and the host controller. The SD/SDIO controller registers are programmed by the processor through the AHB interface. Interrupts are generated based on the values set in the Interrupt Status and Interrupt Enable registers. The bus monitor checks for violations occurring on the SD bus and timeout conditions. The clock generation block generates the SD clock depending on the value programmed in the Clock Control register. The CRC7 and CRC16 generators calculate the CRC for command and data transfers to the SD/SDIO card. The CRC7 and CRC16 checker checks for any CRC errors in the response and data received from the SD/SDIO card. To detect data defects on the card, the host can include error correction codes in the payload data. ECC code is used to store data on the card. This ECC code is used by the application to decode the user data.
www.xilinx.com
318
13.2.7 Clocks
The SDIO clock is derived from SDIO reference clock based on the Clock Control register value programmed by the driver and is available only when the SD clock enable is set by the driver. The maximum frequency is 50 MHz for SD. The host controller supports both full speed and high speed cards. For the high speed card, the host controller should clock out the data at the rising edge of the SDIO clock. For the full speed card, the host controller should clock out the data at the falling edge of the SDIO clock.
Write
During the write transaction, the host controller transmits data to the card only when a block of data is ready to transmit and the card is not busy. Therefore an under-run condition cannot occur in the SD side. In DMA mode, the host controller initiates a DMA READ from the ARM processor only if space is available to accept a block of data. In non-DMA mode, the host controller asserts a buffer write ready interrupt only if space is available to accept a block of data.
www.xilinx.com
319
Read
During the read transaction when the FIFO is full (the FIFO does not have enough space to accept a block of data from the card) the host controller stops the clk_sd to the card. Therefore an over-run condition cannot occur in SD side. In DMA mode the host controller initiates a DMA WRITE to the ARM processor only on reception of a block of data from card. In non-DMA mode, the host controller asserts a buffer read ready interrupt only on reception of a block of data from card.
www.xilinx.com
320
Start
(1) (5)
Write
(9)
Write or Read
Read
(10-W)
(10-R)
(13-W)
(13-R)
More Blocks?
Yes No Yes
More Blocks?
No
(14)
Abort Transaction
End
UG585_c13_03_031812
Figure 13-3:
www.xilinx.com
321
The sequence for data transfers without using DMA is as follows: 1. 2. 3. 4. 5. 6. 7. 8. 9. Set the value corresponding to the executed data byte length of one block to the Block Size register. Set the value corresponding to the executed data block count to the Block Count register. Set the value corresponding to the issued command to the Argument register. Set the value to Multi/Single Block Select and Block Count Enable. Set the value corresponding to the issued command to Data Transfer Direction, Auto CMD12 Enable, and DMA Enable. Set the value corresponding to the issued command to the Command register.
Note: When writing the upper byte of the command register, the SD command is issued.
Wait for the command complete interrupt. Write a 1 to the Command Complete bit in the Normal Interrupt Status register to clear this bit. Read the Response register and get the necessary information in accordance with the issued command. In the case where this sequence is for writing to a card, go to Step (10-W). In case of read from a card, go to Step (10-R).
Non-DMA Write Transfer On receiving the buffer write ready interrupt the ARM processor acts as a master and starts transferring the data via the Buffer Data Port register (FIFO_1). The transmitter starts sending the data on the SD bus when a block of data is ready in FIFO_1. While transmitting the data on the SD bus the buffer write ready interrupt is sent to the ARM processor for the second block of data. The ARM processor acts as a master and starts sending the second block of data via the buffer data port register to FIFO_2. The buffer write ready interrupt is asserted only when a FIFO is empty and available to receive a block of data.
(11-W). Write a 1 to the Buffer Write Ready bit in the Normal Interrupt Status register to clear this bit. (12-W). Write a block of data (according to the number of bytes specified in Step (1)) to the Buffer Data Port register. (13-W). Repeat until all blocks are sent and then go to Step (14).
Non-DMA Read Transfer A buffer read ready interrupt is asserted whenever a block of data is ready in one of the FIFOs. On receiving the buffer read ready interrupt, the ARM processor acts as a master and starts reading the data via the Buffer Data Port register (FIFO_1). The receiver starts reading the data from the SD bus only when a FIFO is empty and available to receive a block of data. When both of the FIFOs are full the host controller stops the data coming from the card by means of a read wait mechanism (if the card supports read wait) or through clock stopping.
(10-R). Wait for a buffer read ready interrupt (11-R). Write a 1 to the Buffer Read Ready bit in the Normal Interrupt Status register to clear this bit.
www.xilinx.com
322
(12-R). Read a block of data (according to the number of bytes specified in Step (1)) from the Buffer Data Port register. (13-R). Repeat until all blocks are received and then go to Step (14). 14. 10. 11. 12. If this sequence is for a single or multiple block transfer, go to Step (15). In case of an infinite block transfer, go to Step (17). Wait for a transfer complete interrupt. Write a 1 to the Transfer Complete bit in the Normal Interrupt Status register to clear this bit. Perform the sequence for abort transaction.
Note: Step (1) and Step (2) can be executed at same time. Step (4) and Step (5) can be executed at
same time.
Start
(1)
(10)
(14)
Command Complete Int Occur Clr Command Complete Status Clr Transfer Complete Status Clr DMA Interrupt Status
(9)
End
UG585_c13_04_031812
Figure 13-4:
www.xilinx.com
323
Burst types such as an 8-beat incrementing burst or a 4-beat incrementing burst, or a single transfer is used to transfer or receive the data from the system memory mainly to avoid the hold of the AHB bus by the master for a longer time. The sequence for using DMA is as follows: 1. 2. 3. 4. 5. 6. 7. 8. 9. Set the system address for DMA in the System Address register. Set the value corresponding to the executed data byte length of one block in the Block Size register. Set the value corresponding to the executed data block count in the Block Count register. Set the value corresponding to the issued command to the Argument register. Set the value to Multi/Single Block Select and Block Count Enable. Set the value corresponding to the issued command to Data Transfer Direction, Auto CMD12 Enable, and DMA Enable. Set the value corresponding to the issued command to the Command register.
Note: When writing to the upper byte of the Command register, the SD command is issued.
Wait for the command complete interrupt. Write a 1 to the Command Complete in the Normal Interrupt Status register for clearing this bit. Read the Response register and get the necessary information in accordance with the issued command.
DMA Read Transfer On receiving the Response End Bit from the card for the write command (data is flowing from the host to the card) the SD host controller acts as the master and requests the AHB bus. After receiving the grant the host controller starts reading a block of data from system memory and fills the first half of the FIFO. Whenever a block of data is ready the transmitter starts sending the data on the SD bus. While transmitting the data on the SD bus the host controller requests the bus to fill the second block in the second half of the FIFO. Ping Pong FIFOs are used to increase the throughput. Similarly, the host controller reads a block of data from system memory whenever a FIFO is empty. This continues until all of the blocks are read from system memory. A transfer complete interrupt is set only after transferring all of the blocks of data to the card.
DMA Write Transfer The block of data received from the card (data is flowing from the card to the host) is stored in the first half of the FIFO. Whenever a block of data is ready the SD host controller acts as the master and request the AHB bus. After receiving the grant the host controller starts writing a block of data into system memory from the first half of the FIFO. While transmitting data into system memory the host controller receives the second block of data and stores it in the second half of the FIFO. Similarly the host controller writes a block of data into system memory whenever data is ready. This continues until all of the blocks are transferred to system memory. A transfer complete interrupt is set only after transferring all of the blocks of data into system memory.
Note: The host controller receives a block of data from the card only when it has room to
store a block of data in the FIFO. When both FIFOs are full the host controller stops the data coming from the card through a read wait mechanism (if the card supports read wait) or through clock stopping.
www.xilinx.com
324
10. Wait for the transfer complete interrupt and DMA interrupt. 11. If Transfer Complete is set to 1 , go to Step (14). If DMA Interrupt is set to 1 go to Step (12). Transfer Complete has a higher priority than DMA Interrupt. 12. Write a 1 to the DMA Interrupt bit in the Normal Interrupt Status register to clear this bit. 13. Set the next system address of the next data position to the System Address register and go to Step (10). 14. Write a 1 to the Transfer Complete and DMA Interrupt in the Normal Interrupt Status register to clear this bit.
Note: Step (2) and Step (3) can be executed at same time. Step (5) and Step (6) can also be executed
at same time. For example, if the host wants to transfer 4 KB of data to the card and assuming the maximum block size is 256 bytes, the host driver programs the Block Size register as 256 and Block Count register with the value 16. The AHB master and transmitter residing inside the SD2.0/SDIO2.0 host controller get the information (how much data to transfer) from these registers. Using the above information, the AHB master acts as a master and initiates a data read transaction (to read a block of data 256 bytes from the system memory). The following types of burst are used mainly to avoid hold of the AHB bus by the master for a longer time. Single transfer 4-beat incrementing burst 8-beat incrementing burst
The first block of data is received in the first half of the FIFO and the second block in the second half of the FIFO. Similarly, the remaining blocks are received in alternate FIFOs. Whenever a block of data is ready in FIFO, the transmitter starts transmitting the block of data (256 bytes) onto the SD bus. After transmitting the entire block of data to the card, the transmitter waits for a status response from the card. Transmitter sends the next block of data only when it receives a good status response from the card for the previous block of data, otherwise the transaction is aborted and the host goes for a fresh transaction.
www.xilinx.com
325
Start
(1)
(13)
Transfer Complete Int. Occurs (14) Clr Transfer Complete Interrupt Status
(15)
(10)
UG585_c13_05_031812
Figure 13-5:
The sequence for using ADMA is as follows 1. 2. 3. 4. Create a descriptor table for ADMA in system memory. Set the descriptor address for ADMA in the ADMA System Address register. Set the value corresponding to the executed data byte length of one block in the Block Size register. Set the value corresponding to the executed data block count in the Block Count register in accordance with SDIO register map.
www.xilinx.com
326
If the Block Count Enable bit in the Transfer Mode register is set to 1 , the total data length can be designated by the Block Count register and the descriptor table. These two parameters shall indicate same data length. However, transfer length is limited by the 16-bit Block Count register. If the Block Count Enable bit in the Transfer Mode register is set to 0 , the total data length is designated not by Block Count register, but the descriptor table. In this case, if the ADMA reads more data than the length programmed in the descriptor from the SD card, the operation is aborted asynchronously and the extra read data is discarded when the ADMA is completed. 5. 6. Set the argument value to the Argument register. Set the value to the Transfer Mode register. The host driver determines Multi/Single Block Select, Block Count Enable, Data Transfer Direction, Auto CMD12 Enable and DMA Enable. Multi/Single Block Select and Block Count Enable are determined according to SDIO register map. Set the value to the Command register.
7.
Note: When writing to the upper byte [3] of the Command register, the SD command is issued
and DMA is started. 8. 9. Wait for the command complete interrupt. Write a 1 to the Command Complete bit in the Normal Interrupt Status register to clear this bit.
10. Read the Response register and get the necessary information from the issued command. 11. Wait for the transfer complete interrupt and ADMA error interrupt. 12. If the Transfer Complete is set to 1 , go to Step (13). If the ADMA Error Interrupt is set to 1 , go to Step (14). 13. Write a 1 to the Transfer Complete Status bit in the Normal Interrupt Status register to clear this bit. 14. Write a 1 to the ADMA Error Interrupt Status bit in the Error Interrupt Status register to clear this bit. 15. Abort ADMA operation. SD card operation should be stopped by issuing an abort command. If necessary, the host driver checks the ADMA Error Status register to detect why the ADMA error is generated.
Note: Step (3) and Step (4) can be executed simultaneously. Step (6) and Step (7) can also be executed simultaneously. Note: During ADMA2 operation, the controller will not generate a DMA interrupt if the INT attribute
is set along with NOP, RSVD, or LINK attribute.
There are two ways to issue an abort command. The first is an asynchronous abort. The second is a synchronous abort. In an asynchronous abort sequence, the HD can issue an abort command at anytime unless the Command Inhibit (CMD) bit in the Present State register is set to 1 . In a synchronous abort, the HD issues an abort command after the data transfer stopped via the Stop At Block Gap Request bit in the Block Gap Control register.
www.xilinx.com
327
Synchronous Abort
The following sequence performs a synchronous abort. 1. 2.
X-Ref Target - Figure 13-6
Set the Stop At Block Gap Request bit in the Block Gap Control register to 1 to stop SD transactions. Wait for a transfer complete interrupt.
Start
(1)
(5)
Wait For Transfer Complete Int Transfer Complete Int Occur Clr Transfer Complete Status
Set Software Reset For DAT Line (DR) and CMD Line (CR)
(6)
(3)
(4)
End
UG585_c13_06_031812
Figure 13-6: 3. 4. 5. 6.
Set the Transfer Complete bit to 1 in the Normal Interrupt Status register to clear this bit. Issue an abort command. Set both the Software Reset for DAT Line and Software Reset for CMD Line bits to 1 in the Software Reset register to do a software reset. Check the Software Reset for DAT Line and Software Reset for CMD Line in the Software Reset register. If both Software Reset for DAT Line and Software Reset for CMD Line are 0 , go to END. If either the Software Reset for DAT Line or the Software Reset for CMD Line is 1 , repeat Step (6).
www.xilinx.com
328
SDx_CLK
SD/SDIO Controller
SDx_CMD SDx_DAT[3:0]
Figure 13-7:
Some SD card slots provide two additional pins: card detect (CDn) to signal the insertion or presence of a card and write protect (WPn) to report the position of the write protect switch on memory cards. These pins are usually pulled to GND when a card is detected or the card is write-protected. They need to be pulled up to the MIO I/O voltage with a 50 K resistor (see Figure 13-8).
X-Ref Target - Figure 13-8
VIO
SD Memory Card
SD/SDIO Controller
SDx_CDn SDx_WPn
Zynq Device
SD Card Slot
UG595_c13_08_020613
Figure 13-8:
www.xilinx.com
329
SDIO Interface
Name
EMIOSDIO0CLKFB EMIOSDIO0CLK EMIOSDIO0CMDI EMIOSDIO0CMDO EMIOSDIO0CMDTN EMIOSDIO0DATAI0 EMIOSDIO0DATAO0 EMIOSDIO0DATATN0 EMIOSDIO0DATAI1 EMIOSDIO0DATAO1 EMIOSDIO0DATATN1 EMIOSDIO0DATAI2 EMIOSDIO0DATAO2 EMIOSDIO0DATATN2 EMIOSDIO0DATAI3 EMIOSDIO0DATAO3 EMIOSDIO0DATATN3 EMIOSDIO0CDN EMIOSDIO0WP EMIOSDIO0BUSPOW EMIOSDIO0LED EMIOSDIO0BUSVOLT[2:0]
I/O
I O I O O I O O I O O I O O I O O I I O O O
SDIO 0 Clock
www.xilinx.com
330
Table 13-1:
SDIO Interface
Name
EMIOSDIO1CLKFB EMIOSDIO1CLK EMIOSDIO1CMDI EMIOSDIO1CMDO EMIOSDIO1CMDTN EMIOSDIO1DATAI0
I/O
I O I O O I O O I O O I O O I O O I I O O O
SDIO 1 Clock
SDIO 1 Command
IO
SDIO 1 Data 0
~ ~ 0
IO
SDIO 1 Data 1
~ ~ 0
IO
SDIO 1 Data 2
~ ~ 0
IO
SDIO 1 Data 3 SDIO 1 Card Detect SDIO 1 Write Protect SDIO 1 Power Control SDIO 1 LED Control SDIO 1 Bus Voltage
~ ~
15, 27, 39, 51 Any pin except 7 and 8 Any pin except 7 and 8
IO I I O ~ ~
~ ~ ~
www.xilinx.com
331
Chapter 14
14.1.1 Features
Key features of the GPIO peripheral are summarized as follows: 54 GPIO signals for device pins (routed through the MIO multiplexer)
Outputs are 3-state capable 64 Inputs, 128 outputs (64 true outputs and 64 output enables)
192 GPIO signals between the PS and PL via the EMIO interface
The function of each GPIO can be dynamically programmed on an individual or group basis Enable, bit or bank data write, output enable and direction controls Programmable interrupts on individual GPIO basis
Status read of raw and masked interrupt Selectable sensitivity: Level-sensitive (High or Low) or edge-sensitive (positive, negative, or both)
www.xilinx.com
332
GPIO Bank 0
32b
x 54
GPIO Bank 2
32b
GPIO Bank 3
32b
UG585_c14_01_022212
Figure 14-1:
As shown in Figure 14-1, the GPIO module is divided into four banks: Bank0: 32-bit bank controlling MIO pins[31:0] Bank1: 22-bit bank controlling MIO pins[53:32]
Note: Bank1 is limited to 22 bits because the MIO has a total of 54 pins.
Bank2: 32-bit bank controlling EMIO signals[31:0] Bank3: 32-bit bank controlling EMIO signals[63:32]
The GPIO is controlled by software through a series of memory-mapped registers. The control for each bank is the same, although there are minor differences between the MIO and EMIO banks due to their differing functionality.
14.1.3 Notices
7z010 CLG225 Device
The 7z 01 0 CLG225 device reduces the available MIO pins to 32 as shown in the MIO table in section 2.5.4 MIO-at-a-Glance Table. Thus, in this device, the only GPIO pins that are available for MIO are 15:0, 39:28, 48, 49, 52, and 53. The other MIO pins are unconnected and should not be used. All EMIO signals are available.
www.xilinx.com
333
MIO Considerations
Banks 0 and 1 of the GPIO peripheral module are routed to device pins through the MIO module. Refer to section 2.5 PS-PL MIO-EMIO Signals and Interfaces for a complete description of MIO operation. Primary control of the MIO is achieved through the slcr.MIO_PIN_xx registers. Please note the following: The user must choose the proper Type of I/O using the IO_Type, PULLUP, DisableRcvr, and Speed fields according to the users system. The user must select the GPIO module through the multiplexor control fields L0_SEL, L1_SEL, L2_SEL, and L3_SEL. Note that each I/O pin can be individually selected. TRI_ENABLE should be set to 0 . This enables the GPIO to control the 3-state mode of the I/O. If TRI_ENABLE is set to 1 in the MIO, then the output driver will be 3-stated regardless of GPIO settings.
www.xilinx.com
334
INT_STAT
Write-1-to-clear
Clr D Q
INT State
DATA_RO
Input
(Banks 0 & 1)
or
(Banks 2 & 3)
UG585_c14_02_022712
Figure 14-2:
GPIO Channel
Software configures the GPIO as either an output or input. The DATA_RO register always returns the state of the GPIO pin regardless of whether the GPIO is set to input (OE signal false) or output (OE signal true). To generate an output waveform, software repeatedly writes to one or more GPIOs (usually using the MASK_DATA register). Applications might need to switch more than one GPIO at the same time (less a small amount of inherent skew time between two I/O buffers). In this case, all of the GPIOs that need to be switched simultaneously must be from the same 16-bit half-bank (i.e., either the most-significant 16 bits or the least-significant 16 bits) of GPIOs to enable the MASK_DATA register to write to them in one store instruction.
www.xilinx.com
335
GPIO bank control (for Bank0 and Bank1) is summarized as follows: DATA_RO: This register enables software to observe the value on the device pin. If the GPIO signal is configured as an output, then this would normally reflect the value being driven on the output. Writes to this register are ignored.
Note: If the MIO is not configured to enable this pin as a GPIO pin, then DATA_RO is
unpredictable because software cannot observe values on non-GPIO pins through the GPIO registers. DATA: This register controls the value to be output when the GPIO signal is configured as an output. All 32 bits of this register are written at one time. Reading from this register returns the previous value written to either DATA or MASK_DATA_{LSW,MSW}; it does not return the current value on the device pin. MASK_DATA_LSW: This register enables more selective changes to the desired output value. Any combination of up to 16 bits can be written. Those bits that are not written are unchanged and hold their previous value. Reading from this register returns the previous value written to either DATA or MASK_DATA_{LSW,MSW}; it does not return the current value on the device pin. This register avoids the need for a read-modify-write sequence for unchanged bits. MASK_DATA_MSW: This register is the same as MASK_DATA_LSW, except it controls the upper16 bits of the bank.
DIRM: Direction Mode. This controls whether the I/O pin is acting as an input or an output. Since the input logic is always enabled, this effectively enables/disables the output driver. When DIRM[x]== 0 , the output driver is disabled. OEN: Output Enable. When the I/O is configured as an output, this controls whether the output is enabled or not. When the output is disabled, the pin is 3-stated. When OEN[x]==0 , the output driver is disabled.
Note: If MIO TRI_ENABLE is set to 1, enabling 3-state and disabling the driver, then OEN is ignored and the output is 3-stated.
The EMIO I/Os are not connected to the MIO I/Os in any way. The EMIO inputs cannot be connected to the MIO outputs and the MIO inputs cannot be connected to the EMIO outputs. Each bank is independent and can only be used as software observable/controllable signals.
www.xilinx.com
336
www.xilinx.com
337
INT_POLARITY: This register controls whether the interrupt is active-Low or active High (or falling-edge sensitive or rising-edge sensitive). INT_ON_ANY: If INT_TYPE is set to edge sensitive, then this register enables an interrupt event on both rising and falling edges. This register is ignored if INT_TYPE is set to level sensitive. Interrupt Trigger Settings Type
Rising edge-sensitive Falling edge-sensitive Both rising- and falling edge-sensitive Level sensitive, asserted High Level sensitive, asserted Low
Table 14-1:
gpio.INT_TYPE_0
1 1 1 0 0
gpio.INT_POLARITY_0
1 0 X 1 0
gpio.INT_ANY_0
0 0 1 X X
Note: The output enable has significance only when the GPIO pin is configured as an output.
www.xilinx.com
338
Option 2: Use the MASK_DATA_x_MSW/LSW registers to update one or more GPIO pins. Example: Set output pins 20, 25, and 30 to 1 using the MASK_DATA_0_MSW register. 1. 2. 3. Generate the mask value for pins 20, 25, and 30: To drive pins 20, 25 and 30, 0xBDEF is the mask value for gpio.MASK_DATA_0_MSW [MASK_0_MSW]. Generate the data value for pins 20, 25, 30: To drive 1 on pins 20, 25, and 30, 0x4210 is the data value for gpio.MASK_DATA_0_MSW [DATA_0_MSW]. Write the mask and data to the MASK_DATA_x_MSW register: Write 0xBDEF_4210 to the gpio.MASK_DATA_0_MSW register.
Option 2: Use interrupt logic on input pins (refer to section 14.2.4 Interrupt Function). Example: Configure MIO pin 12 to be triggered as rising edge. 1. 2. 3. 4. Set the trigger as a rising edge: Write 1 to gpio.INT_TYPE_0 [12]. Write 1 to gpio.INT_POLARITY_0 [12]. Write 0 to gpio.INT_ANY_0 [12]. Enable interrupt: Write 1 to gpio.INT_EN_0 [12]. Status of Input pin: gpio.INT_STAT_0 [12] =1 implies that an interrupt event occurred. Disable interrupt: Write 1 to gpio.INT_DIS_0 [12].
www.xilinx.com
339
Register Name
gpio.MASK_DATA_{3:0}_{MSW,LSW} gpio.DATA_{3:0} gpio.DATA_{3:0}_RO gpio.DIRM_{3:0} gpio.OEN_{3:0} gpio.INT_MASK_{3:0} gpio.INT_EN_{3:0} gpio.INT_DIS_{3:0}
Overview
Bit masked data output writes. 32-bit data output write 32-bit data read of inputs Direction Output Enable Interrupt Mask Interrupt Enable Interrupt Disable Interrupt Status Interrupt Type Interrupt Polarity Interrupt Any
Type
Mixed R/W RO R/W R/W RO WO WO WTC RW RW RW
Interrupt Controls
14.4.1 Clocks
The controller is clocked by the CPU_1x clock from the APB interface. All outputs and input sampling is done using the CPU_1x clock.
14.4.2 Resets
The controller is reset by the slcr.GPIO_RST_CTRL [GPIO_CPU1X_RST] bit. Refer to chapter 26, Reset System, for more information. This reset only affects the bus interface, not the controller logic itself.
14.4.3 Interrupts
The controller interrupts are explained in section 14.2.4 Interrupt Function. The controller asserts IRQ # 52 to the GIC. A programming example is described in section 14.3.4 Reading Data from GPIO Input Pins .
www.xilinx.com
340
Note: If TRI_ENABLE=1, then the output is 3-stated regardless of any GPIO settings. If TRI_ENABLE= 0 , then 3-state is controlled by the gpio.OEN_x register.
www.xilinx.com
341
Chapter 15
www.xilinx.com
342
15.1.1 Features
The USB controller has the following key features: USB 2.0 High Speed Host controller (480 Mb/s).
Intel EHCI software programming model. Up to 12 Endpoint: Control Endpoint plus 11 configurable Endpoints Embedded Transaction Translator to support FS/LS in Host mode. Host Negotiation Protocol (HNP). Session Request Protocol (SRP). Control, Bulk, Interrupt, Isochronous AHB Bus Master. Transfers data between system memory and controller FIFOs. Processes transfer descriptors for Device Endpoints and Host Schedules. Interprets USB packets Responds in real-time based on controller status 8-bit parallel data pass-thru bus Translates Rx and Tx transfers between ULPI I/O interface and a UTMI-like interface. Bridge between the protocol engine and the ULPI interface. Rx and Tx commands 8-bit SDR data plus clock, direction, next, stop signals. 12 ULPI PHY signals via MIO pins. Clocked by PHY in Clock-out mode. Viewport access to ULPI PHY registers 4 signals per controller via EMIO.
Protocol Engine
Port/Transceiver Controller
Host port indicator, power select and power fail indicator signals.
www.xilinx.com
343
Host Mode
Zynq PHY
Device or Downstream Hub
OTG
Zynq HNP SRP PHY
Device Mode
Zynq
HS, FS
PHY
UG585_c15_30_030712
Figure 15-1:
Host mode. In host mode, the software includes driver-layer programming to discover and enumerate the bus, manage PHY operations, and setup the periodic and asynchronous schedules of transfer descriptors.
Device mode. In device mode, the controller responds to host commands. Software can include driver-layer programming to respond, as a single- or multi-function device, to the upstream commands. On-the-Go. The OTG software switches between Host and Device modes based on the Host Negotiated Protocol (HNP) and the Session Request Protocol (SRP). Once the controller is in device or host mode, it has all the functionality of the selected mode.
www.xilinx.com
344
MIO
IRQ ID# {53, 76}
Master port ULPI Data, flow control
Interconnect
AHB
USB Controllers
EMIO
Control Registers
Port Indicator, Power Control
Interconnect
APB
UG585_c15_31_030713
Figure 15-2:
The two independent USB controllers have individual control and status registers. Each ULPI interface is independently enabled through the MIO. There are separate port indicator and power signals for each controller that are routed through the EMIO. The system functions are further described in section 15.15 System Functions.
System Interfaces
Each controller is an AHB bus master to the PS interconnect for DMA transfers. The control and status registers are accessed via the controllers APB slave interface. Each controller has its own reset input from the PS reset module and interrupt output to the interrupt controller, GIC. There is a ULPI clock input for each controller and a CPU_1x clock for the AMBA AHB and APB interfaces. Details are in section 15.15 System Functions.
I/O Wiring
The ULPI interface on the MIO pins is an 8-bit SDR data bus that is augmented with port indicators and power control signals routed through the EMIO interface to the PL. The PS GPIO module, Chapter 14, General Purpose I/O (GPIO), can provide a PHY reset signal to the PHY. An I/O wiring diagram is shown in Figure 15-19 USB I/O Signal and PHY Wiring Diagram, page 427. Here is a summary of the I/O signals: ULPI via MIO. The controller interfaces to the external ULPI PHY via 12 MIO pins: 8 data I/Os, direction input, control input, clock input and a stop output. GPIO. A PS GPIO signal can be used to reset the external PHY.
www.xilinx.com
Device Boundary
ULPI Pins
PL
345
Port Indicator and Power Pins via EMIO. The USB port indicator outputs, power select output, and power fault input signals are routed through the EMIO to the SelectIO pins in the PL and external board logic.
AHB
DMA Engine
Rx & Tx FIFOs Dual-port RAM
Protocol Engine
Context Dual-port RAM
Similar to UTMI+
UG585_c15_32_030713
Figure 15-3:
System Memory
The PS system memory is accessible to the DMA engine that holds transfer descriptors and data buffers. The system memory can be DDR, OCM and memory that is mapped in the PL. The system memory map is shown in section 4.1 Address Map. In this table, the USB controller is one of the Other Bus Masters, refer to the table footnotes.
www.xilinx.com
346
Programmable Timers
There are two independent general-purpose timers that can be used to generate a timeout or to measure time related activities. The programmable timers should not be confused with the controllers interval timers which are used by the controller to generate frame and microframe intervals and to generate strobes for the host controller scheduler. The programmable timers are described in section 15.2.6 General Purpose Timers.
www.xilinx.com
347
Clocks
The ULPI interface and Protocol engine are clocked by the 60 MHz input on the ULPI interface (PHY clock output). The AHB interface is clocked by the CPU_1x clock. The clock domain crossing between the CPU_1x clock and the 60 MHz ULPI PHY clock for the Protocol engine is at the dual-port RAM.
Resets
There are several different types of resets associated with the USB controller, these are further discussed in section 15.15.2 Reset Types. Controller Resets
PS Reset System (full controller reset), usb.USBCMD [RST] bit (partial controller reset useful for OTG).
www.xilinx.com
348
Frame 3 Elements EndPoint 1 OUT Frame 2 Elements EndPoint 0 IN Frame 1 Elements EndPoint 0 OUT Frame 0 Elements FRINDEX pointer is advanced for every USB Frame
Figure 15-4:
Device Mode
As requested by the host, the Device Controller Driver (DCD) sets up descriptors for endpoints and manages the real-time needs of the endpoints. The high-speed data transfers between memory and ULPI are managed by the controller using queue heads and transfer descriptors. The results of each transfer is reviewed by DCD to take appropriate action. Device Endpoints. The device controller includes a simple descriptor model to enable the controller to quickly respond to host requests. Each of the 12 endpoints has two device Queue Heads (dQH); one for IN and the other for OUT transfer types. There are a total of 24 device dQHs. An endpoint data transfer in defined with one dQH and one or more linked list of device Transfer Descriptors (dTD). An example is shown in Figure 15-13.
Host Mode
Host Schedules. The Host Controller Driver (HCD) maintains two types of transaction schedules to generate USB traffic: periodic (isochronous/interrupt) and asynchronous (bulk/control). The Periodic schedule is a list of high to low priority-order periodic transfers. An element in the periodic frame list is executed at the start of every frame (SOF). The list includes elements that indicate when to execute (periodic interval) and what to execute. An example is shown in Figure 15-15. The asynchronous schedule is a circular loop of Queue Heads that point to transfer descriptors that are processed in a round-robin priority. Within each microframe, the asynchronous schedule is executed after the periodic schedule is finished. An example is shown in Figure 15-16.
Link-list Concept
The host and device controllers use link-list descriptors to manage transfers to and from memory buffers. The concept is shown in Figure 15-5. The first Transfer Descriptors (TD) is pointed to by a
www.xilinx.com
349
Queue Head (QH). Each dTD can point to another dTD (using next dTD pointer) or terminate the linked list by setting its (T) bit = 1. The controller maintains a local, working copy of the dQH that it overlays with the one or more dTDs as the transaction request is processed. After each dTD transfer is complete, the dTD overlay is written back to the system memory with transfer results (status). While a transfer is in progress, the overlay area of the dQH in controller memory is used as a staging area for the dTDs.
X-Ref Target - Figure 15-5
QH
First TD
Read TD
T=1
Completed TDs
Current TD
Figure 15-5:
15.1.8 Documentation
Scope of TRM
The Zynq-7000 Technical Reference Manual (TRM) describes hardware functionality and register-level software programming for Host controller mode drivers (HCD) and Device controller mode drivers (DCD). Guidance for the upper software layers, including device classes and applications, are beyond the scope of the TRM.
www.xilinx.com
350
TRM for all Zynq-7000 series; UG585 . Architecture and register-level programming. Data Sheet for 7z010 and 7z020 devices; DS187 . Electrical specifications. Data Sheet for 7z030, 7z045 and 7z100 devices; DS191 . Electrical specifications. Errata Sheets for all devices; ENxxx (multiple). Related AR list, AR47916 .
USB Specifications
USB 2.0 Specification UTMI+ Low Pin Interface (ULPI) Specification Enhanced Host Controller Interface (EHCI) Specification for Universal Serial Bus
Chapter Nomenclature
Refer to the USB 2.0 Specification, Chapter 2 Terms and Abbreviations. Xilinx Corporate glossary includes general terms. Chapter-specific terms:
DCD means device controller driver. This is the device driver software used in device mode. HCD means host controller driver. This is the device driver software used in host mode. The term Frame applies to FS/LS mode. Microframe applies to HS mode. (Micro)frame applies to FS/LS and HS modes. In the USB Controller chapter, DWord means 32 bits. In the rest of the PS, a word is defined to mean 32 bits. There are two dual-purpose registers (for host and device mode) listed in Table 15-1. The usb.ASYNCLISTADDR_ENDPOINTLISTADDR register is referred to as usb.ASYNCLISTADDR_ when discussing Host mode and usb._ENDPOINTLISTADDR when discussing Device mode. The usb.PERIODICLISTBASE_DEVICEADDR register is similar.
www.xilinx.com
351
15.1.9 Notices
7z010 CLG225 Device
The 7z010 CLG225 device supports 32 MIO pins as shown in the MIO table in section MIO-at-a-Glance Table in . Only one USB interface is available in the 7z010 CLG225 device. If USB and GigE are required, the GigE I/O signals must interface through the EMIO.
15.1 Introduction 15.2 Functional Description 15.3 Programming Overview and Reference 15.15 System Functions 15.16 I/O Interfaces 15.4 Device Mode Control 15.5 Device Endpoint Data Structures 15.6 Device Endpoint Packet Operational Model 15.7 Device Endpoint Descriptor Reference 15.8 Programming Guide for Device Controller 15.10 Host Mode Data Structures 15.11 EHCI Implementation 15.12 Host Data Structures Reference 15.13 Programming Guide for Host Controller 15.14 OTG Description and Reference
www.xilinx.com
352
System Memory
DMA Engine
AHB Master
* Bus Interface * Data Movement * Host: Periodic and Async Schedules * Device: Endpoint Queue Head
Microprocessor(s)
DMA
DMA
IRQ to GIC
Interrupts
Protocol Engine
* Interval Timers * Error Handling * CRC Handling * Bus Handshake Generation
APB Slave
Port Controller
* Port Status and Control * Transceiver Interface Logic
ULPI Master
ULPI Interface
UG585_c15_35_030713
Figure 15-6:
www.xilinx.com
353
The DMA engine is a 32-bit bus master on the AHB interface to access the PS system interconnect.
PS Interconnect
APB
Slave
DMA Control
Host Mode: * EHCI * Scheduler Device Mode: * Prime/Unprime Control * Endpoint Manager
DMA Context
* Context Storage Dual-port RAM * Byte Count ALU * Update Logic * Address Incrementing Dual-port RAM
Tx FIFO Rx FIFO
Protocol Engine
Port Controller
ULPI
UG585_c15_36_030713
Figure 15-7:
APB
Slave
Interval Timers
* Bus Timeout * Inter-Packet Delay
Tx FIFO Rx FIFO
Port Controller
DMA Controller
ULPI
I/O Interface
UG585_c15_37_030713
Figure 15-8:
www.xilinx.com
354
The protocol engine is responsible for all error checking, check field generation, formatting all the handshake, Ping and data response packets on the bus, and for generating signals that are needed based on a USB based time frame.
www.xilinx.com
355
APB
Slave
ULPI
I/O Interface
UG585_c15_38_030713
Figure 15-9:
www.xilinx.com
356
USB Host
Application Software
Data pipes
USB Device
Function Interface
Function Layer
System Software
Control pipe
Device Layer
Host Controller
Bus Interface
Endpoints
USB Cabling and Hubs
Figure 15-10:
www.xilinx.com
357
Reset * PS_POR_B reset (all USB registers) * slcr.USB_RST_CTRL [USB_CPU1X_RST] (all USB registers) * usb.USBCMD [RST] (USB registers except those for OTG functionality)
Idle
Device Mode
reset
Host Mode
UG585_c15_40_030713
Figure 15-11:
www.xilinx.com
358
Dev register is used by the device controller driver software (DCD). Host register is used by the host controller driver software (HCD). EHCI register includes content from the specification. x means partial. ex means exclusive. USB Controller Register Overview
Register Name
Bit Acronym
OTG/ Mode
Dev
Host
EHCI
Type
AXI Interconnect Capability: Controller and EHCI Capabilities Constants (IP Configuration Constants).
Operational: Misc.
Operational: Endpoint Control (Device mode), refer to Figure 15-4 for details.
www.xilinx.com
359
Register Name
Bit Acronym ENDPTNAK ENDPTNAKEN CONFIGFLAG PORTSC1 [WKDS] [WKCN] [WKOC] [PIC] [PR] others
OTG/ Mode
Dev x x
Host ~ ~ x x
EHCI ~ ~ x x
Type
R/WTC RW RO RW, RO, R/W1C
Endpoint Configuration and Control (Device mode), refer to Figure 15-4 for details.
www.xilinx.com
360
Description
Dev Host x x ~ ~ x ~ ~ ~ x x x x ~ x x x
Cross Reference
Periodic qTD complete. Async qTD complete. Device generated NAK. Async Schedule state. Periodic Schedule state. Host Reclamation status. Halt status of Run/Stop. ULPI Viewport transfer complete. Device enters Suspend state. Start of Frame (SOF) received. Reset received. Async schedule advance. System Error response on AHB. Periodic Frame List rollover. Port Change Detect. USB Transaction Error. TD complete
x x x x ~ x ~ x
www.xilinx.com
361
Active State
Suspend State
Powered
When the host resets the device returns to the default state.
Reset Bus Inactive Default FS/HS Bus Activity Address Assigned Bus Inactive Address FS/HS Bus Activity Device Device Deconfigured Configured Bus Inactive Configured FS/HS Bus Activity Suspend FS/HS Suspend FS/HS Suspend FS/HS
Figure 15-12:
It is the responsibility of software to maintain a state variable to differentiate between the default FS/HS state and the address/configured states. Change of state from default to address and the configured states is part of the enumeration process described in the device framework section of the USB 2.0 Specification.
www.xilinx.com
362
Table 15-3:
Interrupt
Suspend Mode USB Reset Received Port Change Detect High-Speed Port
As a result of entering the address state, the device address register (usb._DEVICEADDR) must be programmed by the DCD. Entry into the configured state indicates that all endpoints to be used in the operation of the device have been properly initialized by programming the usb.ENDPTCTRLx registers and initializing the associated queue heads.
DCD Actions
1. Clear all setup token semaphores by reading the usb.ENDPTSETUPSTAT register and writing the same value back to the usb.ENDPTSETUPSTAT register. Clear all the endpoint complete status bits by reading the usb.ENDPTCOMPLETE register and writing the same value back to the usb.ENDPTCOMPLETE register. Cancel all primed status by waiting until all bits in the usb.ENDPTPRIME register are 0 and then writing FFFF_FFFFh to usb.ENDPTFLUSH register. Read the reset bit in the PORTSC1 register and make sure that it is still active. A USB reset occurs for a minimum of 3 ms and software must reach this point in the reset cleanup before end of the reset occurs, otherwise a hardware reset of the device controller is recommended (rare).
2. 3.
5.
At this time, the DCD might release control back to the OS because no further changes to the device controller are permitted until a port change detect is indicated.
www.xilinx.com
363
Note: Before resume signaling can be used, the host must be enabled using the Set Feature
command defined in device framework of the USB 2.0 Specification .
Note: To conserve memory, the reserved fields at the end of the dQH can be used to store the Head
and Tail pointers but it still remains the responsibility of the DCD to maintain the pointers.
www.xilinx.com
364
0x600
dTD
dTD
0x5C0 4KB Memory Buffer ffer Bu ter in Po dTD Pointer T=0 4KB Memory Buffer
0x0B0
Endpoint 1 OUT
0x080
dTD Pointer
dTD
dTD
ffer Bu ter in Po
T=1
Endpoint 0 IN
0x040
ffer Bu ter in Po
dTD Pointer
dTD
T=1
Endpoint 0 OUT
ffer Bu ter in Po
dTD Pointer
dTD
After a dTD is processed, the controller will generate an interrupt if its IOC bit is set = 1.
T=1
Transfer Buffers
usb.ENDPOINTLISTADDR
UG585_c15_41_030713
Figure 15-13:
The device controller API software incorporates and abstracts for the application developer all of the information contained in the device operational model. Each Endpoint can be configured for bi-directional transfers (contain both IN and OUT endpoints). Queue Head and Linked Transfer Descriptors: 15.7.1 Endpoint Queue Head Descriptor (dQH) 15.7.2 Endpoint Transfer Descriptor (dTD) 15.7.3 Endpoint Transfer Overlay Area
www.xilinx.com
365
System Memory
0x600 0x5C0
USB Controller
dQH Endpoint 11 IN
dQH Read/Write
dQH
dTD
EndPoint 0 IN
0x040
EndPoint 0 OUT
0x000
usb.ENDPOINTLISTADDR [31:11]
Transfer Descriptors
EndPoint dTD Next dTD Pointers
dTD Read/Write
DMA Engine
DMA
Protocol Engine
Dual-port RAM
ULPI
UG585_c15_42_030713
Figure 15-14:
www.xilinx.com
366
controller. The operation of an endpoint and use of queue heads are described later in this document.
Endpoint Registers
Table 15-4: USB Device Endpoint Register Summary Description and Register Bit Field Tx Endpoint (11:0)
[EPTN], 27:16 (IN token) [EPTNE], 27:16 ~
Rx Endpoint (11:0)
[EPRN], 11:0 (OUT or Ping token) [EPRNE], 11:0 [ENDPTSETUPSTAT], 11:0
Type
Read and Write-one-to-clear. Read/Write. Read and Write-one-to-clear. Read and Write-one-to-set.
Interrupt enable bits for ENDPTNAK bits. Bit is set when an endpoint receives a Setup transaction. Software sets a bit to instruct the controller to prepare for a packet transfer. The QH, dTDs, and endpoint registers are ready. [PETB], 27:16 (IN or Interrupt) [PERB], 11:0 (OUT)
ENDPTPRIME
ENDPTFLUSH
Software sets a bit to instruct the controller to flush an endpoint. [FETB], 27:16 [FERB], 11:0 Indicates that the controller hardware has primed the endpoint as requested by the ENDPTPRIME register. [ETBR], 27:16 [ERBR], 11:0 Indicates that the controller has completed the transfer that was primed. [ETCE], 27:16 [ERCE], 11:0
ENDPTSTAT
ENDPTCOMPLETE
www.xilinx.com
367
Register Name
Type
(see below) Read-write. Read-only.
ENDPTCTRL0
ENDPTCTRL {11:0}
Field
Data Toggle Reset, usb.ENDPTCTRLx [TXR]
Meaning
Restart transfers with DATA0 PID.
www.xilinx.com
368
Table 15-6:
Stall
There are two occasions where the device controller might need to return a STALL to the host: Functional Stall: software initiated (non-control endpoints only). Protocol Stall: hardware initiates (control endpoint).
The functional stall, which is a condition set by the DCD as described in the USB 2.0 device framework. A functional stall is only used on non-control endpoints and can be enabled in the device controller by setting the usb.ENDPTCTRLx [TXS] stall bit associated with the given endpoint and the given direction. In a functional stall condition, the device controller will continue to return STALL responses to all transactions occurring on the respective endpoint and direction until the endpoint stall bit is cleared by the DCD. A protocol stall, unlike a function stall, is used on control endpoints and automatically cleared by the device controller at the start of a new control transaction (setup phase). When enabling a protocol stall, the DCD should enable the stall bits (both directions) as a pair. A single write to the usb.ENDPTCTRLx register can ensure that both stall bits are set at the same instant.
Note: Any write to the usb.ENDPTCTRLx register during operational mode must preserve the
Table 15-7: USB Device Packet Mismatch Response Endpoint Type
Control Non-Control All All
endpoint type field (i.e. perform a read-modify-write of this register and preserve the [TXT] field).
Bus Response
ACK STALL ACK/NAK/NYET STALL
Setup IN/OUT/Ping
Data Toggle
Data toggle is a mechanism to maintain data ordering between the host and device for a given data pipe. For more information on data toggle, refer to the USB 2.0 specification. The DCD can reset the data toggle state bit and cause the data toggle sequence to reset in the device controller by writing a 1 to the data toggle reset bit in the usb.ENDPTCTRLx [TXR] register bit. This
www.xilinx.com
369
should only be necessary when configuring/initializing an endpoint or returning from a STALL condition.
www.xilinx.com
370
allows the device controller to fetch the operating context needed to handle a request from the host without the need to follow the linked list, starting at the dQH when the host request is received. After the device has loaded the dTD, the leading data in the packet is stored in a FIFO in the device controller. This FIFO is split into virtual channels so that the leading data can be stored for any endpoint up to the maximum number of endpoints configured at device synthesis time. After a priming request is complete, an endpoint state of primed is indicated in the ENDPTSTATUS register. For a primed transmit endpoint, the device controller can respond to an IN request from the host and meet the stringent bus turnaround time of High Speed USB. Since only the leading data is stored in the device controller FIFO, it is necessary for the device controller to begin filling in behind leading data after the transaction starts. The FIFO must be sized to account for the maximum latency that can be incurred by the system memory bus. More information about FIFO sizing is presented in section Bandwidth and Latency Issues.
www.xilinx.com
371
USB Device Variable Length Transfer Protocol Examples Max. Packet Length dQH
256 256 512
dTD.ZLT = 0
N
2 3 2
dTD.ZLT = 1
P3 N
2 0 2 1
P1
256 256 512
P2
256 256 0
P1
256 256 512
P2
256 256
P3
Note: The dQH.Mult field must be set to 00 for Bulk, Interrupt, and Control endpoints.
The dQH.ZLT bit operates as follows on Bulk and Control transfers:
After this the dTD will be retired. When the device is receiving, if the last packet length received equal maximum packet length and the total bytes is 0, it will wait for a zero length packet from the host to retire the current dTD.
dQH.ZLT = 1
The zero length termination is inactive. With the dQH.ZLT option disabled, when the device is transmitting, the hardware will not append any zero length packet. When receiving, it will not require a zero length packet to retire a dTD whose last packet was equal to the maximum packet length packet. The dTD is retired as soon as total bytes field goes to 0, or a short packet is received. Each transfer is defined by one dTD, so the zero length termination is for each dTD. In some software application cases, the logic transfer does not fit into just one dTD, so it does not make sense to add a zero length termination packet each time a dTD is consumed. On those cases we recommend to turn off this dQH.ZLT feature and use the DCD to generate the zero length termination.
Tx dTD Completes
All packets described in the dTD were successfully transmitted. Total bytes in dTD equals 0 when this occurs.
www.xilinx.com
372
Rx dTD Completes
All packets described in dTD were successfully received. Total bytes in dTD equals 0 when this occurs. A short packet (number of bytes < maximum packet length) was received. This is a successful transfer completion; the DCD must check Total Bytes in dTD to determine the number of bytes that are remaining. From the total bytes remaining in the dTD, the DCD can compute the actual bytes received. A long packet was received (number of bytes > maximum packet size) OR (total bytes received > total bytes specified). This is an error condition. The device controller will discard the remaining packet, and set the Buffer Error bit in the dTD. In addition, the endpoint will be flushed and the USBERR interrupt will become active.
On the successful completion of the packet(s) described by the dTD, the active bit in the dTD will be cleared and the next pointer will be followed when the Terminate bit is clear. When the Terminate bit is set, the device controller will flush the endpoint/direction and cease operations for that endpoint/direction. On the unsuccessful completion of a packet (see long packet above), the dQH is left pointing to the dTD that was in error. In order to recover from this error condition, the DCD must properly reinitialize the dQH by clearing the active bit and update the next dTD pointer before attempting to re-prime the endpoint.
Note: All packet level errors such as a missing handshake or CRC error are retried automatically by
the device controller. There is no required interaction with the DCD for handling such errors.
USB Device Interrupt and Bulk Endpoint Bus Response Stall Bit [TXS]
Ignore STALL STALL
Endpoint Primed
Ignore Transmit Receive and then NYET/ACK
Buffer Underflow
N/A BS Error N/A
Buffer Overflow
N/A N/A NAK
www.xilinx.com
373
Table 15-9:
Ping Invalid Notes:
1. BS Error Force Bit Stuff Error. 2. NYET/ACK NYET unless the Transfer Descriptor has packets remaining according to the USB variable length protocol then ACK. 3. SYSERR System error should never occur when the latency FIFOs are correctly sized and the DCD is responsive. 4. BTO Bus Time Out.
Note: If the MULT field is set to more packets than present in the dTD to be transmitted, the
controller sends zero length packets to all extra incoming IN tokens and report fulfillment error (transaction error) in current dTD. If more dTDs exist in memory, the controller moves to the next dTD to be transmitted in the next (micro)frame. Because of this behavior it is recommended to always use the correct MULT matching the number of packets to be processed for a given dTD. An EHCI compatible host controller uses the periodic frame list to schedule data exchanges to Isochronous endpoints. The operational model for the device controller does not use such a data structure. Instead, the same dTD used for Control/Bulk/Interrupt endpoints is also used for isochronous endpoints. The difference is in the handling of the dTD. The first difference between bulk and iso endpoints is that priming an iso endpoint is a delayed operation such that an endpoint will become primed only after a SOF is received. After the DCD writes the prime bit, the prime bit will be cleared as usual to indicate to the DCD that the device controller completed a priming the dTD for transfer. Internal to the design, the device controller hardware masks that prime start until the next frame boundary. This behavior is hidden from the DCD but occurs so that the device controller can match the dTD to a specific (micro)frame. Another difference with isochronous endpoints is that the transaction must wholly complete in a (micro)frame. Once an isochronous transaction is started in a (micro)frame it will retire the corresponding dTD when MULT transactions occur or the device controller finds a fulfillment condition.
www.xilinx.com
374
The transaction error bit set in the status field indicates a fulfillment error condition. When a fulfillment error occurs, the frame after the transfer failed to complete wholly, the device controller will force retire the iso dTD and move to the next iso dTD. It is important to note that fulfillment errors are only caused due to partially completed packets. If no activity occurs to a primed iso endpoint, the transaction will stay primed indefinitely. This means it is up to the DCD to discard transmit iso dTDs that pile up from a failure of the host to move the data. Finally, the last difference with iso packets is in the data level error handling. When a CRC error occurs on a received packet, the packet is not retried similar to bulk and control endpoints. Instead, the CRC is noted by setting the Transaction Error bit and the data is stored as usual for the application software to sort out.
Note: For Tx isochronous endpoint, the MULT Counter can be loaded with a lesser value in the dTD
Multiplier Override field. If the Multiplier Override is 0, the MULT Counter is initialized to the dQH.Mult field.
Note: For isochronous transfers, when a dTD is retired, the next dTD is primed for the next frame.
For continuous (micro)frame to (micro)frame operation the DCD should ensure that the dTD linked-list is out ahead of the device controller by at least two (micro)frames.
www.xilinx.com
375
(micro)frame number [N], the DCD should interrupt on SOF during frame N - 1. When the FRINDEX = N - 1, the DCD must write the prime bit. The device controller primes the isochronous endpoint in (micro)frame N - 1 so that the device controller executes delivery during (micro)frame N. Caution: Priming an endpoint towards the end of (micro)frame N - 1 does not guarantee delivery in (micro)frame N. The delivery might actually occur in (micro)frame N+1 if device controller does not have enough time to complete the prime before the SOF for packet N is received.
Endpoint Primed
STALL Transmit Receive Ignore Ignore
Buffer Underflow
N/A BS Error N/A Ignore Ignore
Buffer Overflow
N/A N/A Drop Packet Ignore Ignore
www.xilinx.com
376
Note: After receiving a new setup packet, the status and/or handshake phases might still be
pending from a previous control sequence. These should be flushed and deallocated before linking a new status and/or handshake dTD for the most recent setup packet.
Data Phase
Following the setup phase, the DCD must create a device transfer descriptor for the data phase and prime the transfer. After priming the packet, the DCD must verify a new setup packet has not been received by reading the usb.ENDPTSETUPSTAT register immediately verifying that the prime had completed. A prime completes when the associated bit in the usb.ENDPTPRIME register is 0 and the associated bit in the usb.ENDPTSTATUS register is a 1. If a prime fails, i.e., the usb.ENDPTPRIME bit goes to 0 and the usb.ENDPTSTATUS bit is not set, then the prime has failed. This can only be due to improper setup of the dQH, dTD or a setup arriving during the prime operation. If a new setup packet is indicated after the endpoint prime bit is cleared, then the transfer descriptor can be freed and the DCD must reinterpret the setup packet.
www.xilinx.com
377
Should a setup arrive after the data stage is primed, the device controller automatically clears the prime status (usb.ENDPTSTATUS) to enforce data ordering with the setup packet.
Note: The dQH.Mult field must be set to 00 for bulk, interrupt, and control endpoints. Error
handling of data phase packets is the same as bulk packets described previously.
Status Phase
Similar to the data phase, the DCD must create a transfer descriptor (with byte length equal 0) and prime the endpoint for the status phase. The DCD must also perform the same checks of the usb.ENDPTSETUPSTAT as described above in the data phase.
Note: The dQH.Mult bit field must be set to 00 for bulk, interrupt, and control endpoints. Error
handling of data phase packets is the same as bulk packets described previously.
Endpoint Primed
ACK Transmit Receive and then NYET/ACK ACK Ignore
Buffer Underflow
N/A BS Error N/A N/A Ignore
Buffer Overflow
SYSERR N/A NAK N/A Ignore
Setup Lockout
N/A N/A N/A Ignore
www.xilinx.com
378
DWord 0 1
Current Pointer
Current dTD Pointer 0 Total Bytes Buffer Pointer (Page 0) Buffer Pointer (Page 1) Buffer Pointer (Page 2) Buffer Pointer (Page 3) Buffer Pointer (Page 4) reserved C_Page MultO 0 reserved reserved reserved reserved Setup Buffer Bytes 3..0 Setup Buffer Bytes 7..4 Device Controller Read/Write Device Controller Read-only Status Current Offset
2 3 4 5 6 7 8 9 10 11
Table 15-15
Table 15-13
29
28:27 26:16
www.xilinx.com
379
Table 15-13:
15 14:0
Interrupt On Setup, IOS. This bit is used on control type endpoints to indicate if USBINT is set in response to a setup being received. Reserved. Field reserved and should be set to 0.
4:0
DWords 2 to 8: Overlay Area, refer to Table 15-15 USB Device Transfer Overlay. DWord 9: reserved. DWord 10: Setup Buffer Bytes 3:0
31:24 24:16 15:8 7:0 Byte Byte Byte Byte 3 2 1 0
Table 15-15
www.xilinx.com
380
the associated transfer descriptor. When the transfer is complete, the device controller will write the dTD back to system memory (with transfer status results added) and advance the queue pointer. If the link list continues, then another dTD is fetched from memory and written into the transfer overlay area of the dQH. After the link list is processed, the dQH is written back to system memory and the endpoint servicing is completed. The Overlay Transaction dQH DWords 2 through 8 are nearly identical to the dTD DWords 0 through 6 as shown in Table 15-15.
www.xilinx.com
381
USB Device Transfer Overlay (Contd) Description dTD DWord dQH DWord
4 to 6
6 to 8
www.xilinx.com
382
The maximum value that the DCD may store in the field is 5 times 4 KB (5000h). This is the maximum number of bytes that 5 page pointers can reference. Although it is possible to create a transfer up to 20 KB this assumes the 1st offset into the first page is 0. When the offset cannot be predetermined, crossing past the 5th page can be guaranteed by limiting the total bytes to 16 KB. Therefore, the maximum recommended transfer is 16 KB (4000h).
www.xilinx.com
383
Writing a 1 to the [RST] bit will reset the internal pipelines, timers, counters, and state machines to their initial value. Writing a 1 when the device is in the attached state is not recommended since the effects on an attached host are undefined. In order to ensure that the device is not in an attached state, all primed endpoints should be flushed and the usb.USBCMD [RS] bit should be set to 0.
Transitioning from host mode to device mode requires a device controller reset before modifying USBMODE. Set usb.OTGSC [OT] bit = 1. Minimum: Initialize dQHs for endpoint 0 for Tx and Rx. All control endpoint queue heads must be initialized before the control endpoint is enabled. Non-control queue heads must be initialized before the endpoint is used and not necessarily before the endpoint is enabled. For information on device queue heads, refer to section 15.7.1 Endpoint Queue Head Descriptor (dQH).
2.
3. 4.
Configure the Endpoint List Address. Write the memory address for the Queue Head endpoint list into the usb._ENDPOINTLISTADDR [31:11] bit field. Enable the software interrupt.
Enable IRQ interrupt signal in GIC (ID#53 for USB 0 and ID#76 for USB 1). Enable device interrupts in the usb.USBINTR register: USB interrupt [UI] USB Error Interrupt [UEI]
www.xilinx.com
384
Port change detect [PCI] USB Reset received [URI] DCSuspend [SLI]
For a list of available interrupts refer to Table 15-2 USB Interrupt and Status Register Bits. After the run bit is set, a device USB reset occurs. The DCD must monitor the reset event and adjust the DCD state as described in the Bus Reset section of the following Port State and Control section below. Endpoint 0 is designed as a control endpoint only and does not need to be configured using ENDPTCTRL0 register. It is also not necessary to initially prime Endpoint 0 because the first packet received will always be a setup packet. The contents of the first setup packet will require a response in accordance with USB device framework (Chapter 9) command set.
5.
www.xilinx.com
385
3. 4. 5.
To terminate the Transfer: Set T = 1 in the Terminate bit of the next dTD. Write the Active bit in the status field to 0 . Write the Halt bit in the status field to 0 .
Note: The DCD must only modify dQH if the associated endpoint is not primed and there are no
outstanding dTD's.
1.
Decode setup packet and prepare data phase (optional) and status phase transfer as required by the USB Chapter 9 or application specific protocol.
www.xilinx.com
386
Case 2: Link list is not empty 1. 2. 3. 4. 5. Add dTD to end of linked list. Read correct prime bit in usb.ENDPTPRIME - if 1 DONE. Set the usb.USBCMD [ATDTW] bit = 1 . Read correct status bit in usb.ENDPTPRIME. (store in tmp. variable for later) Read usb.USBCMD [ATDTW] bit. If 0 go to step 3. If 1 continue to step 6. 6. 7. 8. Write usb.USBCMD [ATDTW] bit = 0 . If status bit read in (4) is 1 DONE. If status bit read in (4) is 0 then Goto Case 1: step 1.
Transfer Completion
After a dTD has been initialized and the associated endpoint primed the device controller will execute the transfer upon the host-initiated request. The DCD will be notified with a USB interrupt if the interrupt on complete bit was set or alternately, the DCD can poll the endpoint complete register to find when the dTD had been executed. After a dTD has been executed, the DCD can check the status bits to determine success or failure. Caution: Multiple dTD can be completed in a single endpoint complete notification. After clearing the notification, the DCD must search the dTD linked list and retire all dTDs that have finished (Active bit cleared). By reading the status fields of the completed dTDs, the DCD can determine if the transfers completed successfully. Success is determined with the following combination of status bits: Active = 0 Halted = 0 Transaction Error = 0 Data Buffer Error = 0
www.xilinx.com
387
Should any combination other than the one shown above exist, the DCD must take proper action. Transfer failure mechanisms are indicated in the device error matrix. In addition to checking the status bit, the DCD must read the Transfer Bytes field to determine the actual bytes transferred. When a transfer is complete, the Total Bytes transferred is decremented by the actual bytes transferred. For Transmit packets, a packet is only complete after the actual bytes reach 0, but for receive packets, the host might send fewer bytes in the transfer according the USB variable length packet protocol.
Device Errors
Table 15-16 summarizes packet errors that are not automatically handled by the device controller.
www.xilinx.com
388
USB Device Errors Direction Data Buffer Transaction Packet Error Bit Error Bit Type (dTD.Status (dTD.Status bit 5) bit 3)
Any
Description
Number of bytes received exceeded max. packet size or total buffer length. This error will also set the Halt bit in the dQH and if there are dTDs remaining in the linked list for the endpoint, then those will not be executed. CRC Error on received isochronous packet. Contents not guaranteed to be correct. Host failed to complete the number of packets defined in the dQH.Mult field within the given (micro)frame. For scheduled data delivery the DCD might need to readjust the data queue because a fulfillment error will cause Device Controller to cease data transfers on the pipe for one (micro)frame. During the dead (micro)frame, the Device Controller reports error on the pipe and primes for the following frame.
Overflow
Rx
Isochronous Packet
Rx
Iso
Isochronous Fulfillment
Both
Iso
Notice that the device controller handles all errors on Bulk/Control/Interrupt Endpoints except for a data buffer overflow. However, for IsoUSB endpoints, errors packets are not retried and errors are tagged as indicated.
The interrupt handling strategy is up to the user. The ISR can poll the high-frequency and then low-frequency interrupts before exiting. If another interrupt is detected and processed, then the ISR would perform another last scan of the interrupts before exiting.
High-Frequency Interrupts
High frequency interrupts , in particular, should be handed in the order shown in Table 15-17. The most important of these are the first two, 1a and 1b. They have equal priority because the software must acknowledge a setup token in the timeliest manner possible to have the control endpoint and buffer always available for another Setup token. The SOF interrupt is next important.
www.xilinx.com
389
usb.USBSTS
Action
Copy contents of setup buffer and acknowledge setup packet. Process setup packet according to USB 2.0 Chapter 9 or application specific protocol.
[UI]
1b 2
[UI] [SRI]
Handle completion of dTD. Action as deemed necessary by application. This interrupt might not have a use in all applications.
Low-Frequency Interrupts
The low frequency events include the following interrupts. These interrupt can be handled in any order since they do not occur often in comparison to the high-frequency interrupts. Table 15-18: USB Device Low Frequency Interrupt usb.USBSTS
[PCI] [SLI] [URI]
Interrupt
Port Change Suspend Reset Received
Action
Change the software state information. Change the software state information. Change the software state information. Abort pending transfers.
Error Interrupts
Error interrupts will be least frequent and should be placed last in the interrupt service routine. Table 15-19: USB Device Error Interrupt usb.USBSTS
[UEI]
Interrupt
USB Error
Action
This error is redundant because it combines USB Interrupt and an error status in the dTD. The DCD will more aptly handle packet-level errors by checking dTD status field upon receipt of USB Interrupt (with ENDPTCOMPLETE). Unrecoverable error. Immediate Reset of controller, free transfers buffers in progress and restart the software.
System Error
[SEI]
www.xilinx.com
390
Transfer Schedules
The structures of the Transfer Schedules are defined in the EHCI specification.
www.xilinx.com
391
Isochronous split transaction data streams are managed with split-transaction isochronous transfer descriptors (siTD). Interrupt, Control, and Bulk data streams are managed via queue heads (QH) and queue element transfer descriptors (qTD). These data structures are optimized to reduce the total memory footprint of the schedule and to reduce (on average) the number of memory accesses needed to execute a USB transaction.
Programmable number of elements: 8, 16, 32, 1024. Programmed by usb.USBCMD [FS2] [FS0]
Example
000 usb.FRINDEX
advanced for every USB Frame.
usb.PERIODLISTBASE_ [31:12]
UG585_c15_43_030713
Figure 15-15:
Note: The periodic frame list is a 4 KB page-aligned array for pointers to Isochronous and interrupt
transfer descriptors. The length of the frame list is programmable: 8, 16, 32, 64, 128, 256, 512, or 1024 elements using the usb.USBCMD [FS2] and [FS0] bit fields. When [FS2] is set = 0, then the EHCI programming model: 256, 512 and 1024 elements can be used in [FS0]. The length of the frame list affects the amount of system memory to allocate and the number of periodic transactions that can be queued. The HCD writes the memory address of the first element in the periodic frame list in the usb.PERIODICLISTBASE_ [PERBASE_] bit field. The controller beings processing the periodic frame list when the (micro)frame time stamp occurs.
www.xilinx.com
392
USB Host Periodic Frame List Element Bit Fields Bit Field
Description
Frame List Link Pointer (system memory pointer, 32-byte aligned): The referenced object might be: an isochronous transfer descriptor (iTD for HS devices), a split-transaction isochronous transfer descriptor (siTD for FS isochronous endpoints), or a queue head (QH for FS/LS/HS interrupts). Set = 00. Transaction Descriptor Type, TYP. Refer to section 15.12.2 Transfer Descriptor Type (TYP) Field. Terminate Linking, T: 0: Continue linking using Frame List Link Pointer. 1: Terminate transaction (done), host controller ignores the link pointer.
31:5
Pointer
4:3 2:1
reserved TYP
Note: The HCD should write only periodic schedule items (QH, iTD, siTD, FSTN) into the periodic
schedule. When using QH, it is an interrupt endpoint.
www.xilinx.com
393
Start of List
Queue Head n
End of List
UG585_c15_44_030713
Figure 15-16:
The asynchronous list is a simple circular list of queue heads that are aligned on 32-byte address boundaries. The usb.ASYNCLISTADDR_ [31:5] bit field is a pointer to the next queue head. This bit field is initialized by software. Hardware uses this field to traverse the Asynchronous schedule. Hardware does not modify this field. The Asynchronous schedule implements a pure round-robin service for the queue heads. Each queue head has one or more transfer descriptors (qTDs). The number of queue heads in the circular can be added to and reduced. The number of QHs is not limited by the EHCI specification.
15.11.1 Overview
The host controller operational mode is nearly compatible with the EHCI 1.0 specification. There are a few differences and enhancements to handle an FS/LS link: Embedded Transaction Translator EHCI Reserved Bits No PCI registers SOF Interrupt
www.xilinx.com
394
Discovery Mechanism, refer to section 15.11.3 EHCI Functional Changes for the TT FS/LS Data Structures, refer to section 15.11.6 FS/LS Data Structures Operational Model of the TT, refer to section 15.11.7 Operational Model of the TT Capability and Operational registers/bits, refer to section 15.11.3 EHCI Functional Changes for the TT PHY Rx Commands, refer to section 15.11.3 EHCI Functional Changes for the TT
The embedded transaction translator is described in section 15.11.2 Embedded Transaction Translator.
SOF Interrupt
This SOF Interrupt a free running 125-microsecond interrupt for the host controller. EHCI does not specify this interrupt but it has been added for convenience and as a potential an HCD time base. The interrupt is indicated and enabled in the USBSTS and USBINTR registers.
www.xilinx.com
395
For any signal that must be generated based on a USB based time in the host controller, the protocol engine also generates all of the token packets required by the USB protocol. There is no separate transaction translator hardware to handle FS/LS protocols. The transaction translator function implemented within the DMA and the protocol engine blocks to support direct connection to LS and FS devices.
www.xilinx.com
396
HS USB 2.0
High-speed Handler
(16) Iso/Int State & Context B/C State & Context B/C State & Context
TT Traffic Management
Latency FIFOs
Port Controller
FS/LS USB
UG585_c15_11_030413
Figure 15-17:
On the left side of Figure 15-17 is a typical hub implementation with a companion transaction translator controller. It shows two ongoing asynchronous transactions capable of ping-pong access from each end. Periodic traffic is aggregated into a single data stream for each direction while a table of state and context for each pipe is stored within the transaction translator. The right side of Figure 15-17 shows how the same functions have been integrated into the host controller. The advantage of integrating those functions into the host controller is that the changes to the EHCI host controller driver (HCD) are minimal while allowing direct connection of FS and LS devices without the need for a companion controller or external USB 2.0 hub. In addition, the host controller with the transaction translator requires less local data storage than a hub-based transaction translator because the data storage is provided by main memory instead of hardware-based RAM. The host controller supports 16 periodic contexts and 2 asynchronous contexts.
www.xilinx.com
397
In a standard EHCI controller design, the Host controller driver (HCD) detects a full-speed or low-speed device by noting if the port enable bit is set after the port reset operation. The port enable is set after the port reset operation when the host and device negotiate a High-Speed connection (i.e., chirp completes successfully). Because the controller emulates a transaction translator (TT), the port enable is always set after the port reset operation regardless of the result of the host device chirp result. The resulting port speed is indicated by the usb.PORTSC1 [PSPD] bit field. Therefore, a standard EHCI HCD requires alteration to handle direct connection to Full and Low speed devices or hubs. The changes are fundamental and summarized in Table 15-21. Table 15-21: Function
Hub Speed
USB EHCI Functional Changes for the Embedded Transaction Translator Standard EHCI
After port enable bit is set following a connection and reset sequence, the device/hub is assumed to be HS. FS and LS devices are assumed to be downstream from a HS hub thus, all port-level control is performed through the Hub Class to the nearest Hub.
FS/LS devices
Split Target
FS and LS devices are assumed to be downstream from a HS hub with HubAddr=X; where HubAddr > 0 and HubAddr is the address of the Hub where the bus transitions from HS to FS/LS (i.e. Split target hub).
www.xilinx.com
398
1. 2. 3.
Wait for device to attach. Receive a port connect change [Port Change Interrupt]. Reset the device. Writes a 1 to the usb.PORTSC1 [PR] bit. assumes the Optional Step to de-assert Reset. The HCD normally writes a 0 to the [PR] bit to de-assert the reset after 10 ms. This step, which is necessary in a standard EHCI design, can be omitted. Should the EHCI HCD attempt to write a 0 to the reset bit while a reset is in progress, the write is ignored and the reset continues until completion. Wait for device to be operational. Receive the [PCI] interrupt to indicate the Port Enable Change. The device is now operational and at this point the port speed has been determined.
4.
Hub Address = TTHA (default TTHA = 0 ) Transactions to directly attached device or hub. QH.EPS = Port Speed (for both FS and LS) QH.EPS = Downstream Device Speed Transactions to a device downstream from direct attached HS hub. Maximum Packet Size must be less than or equal 64 or undefined behavior might result. When QH.EPS = 01 (LS) and usb.PORTSC1 [PSPD] = 00 (FS), a LS-pre-PID will be sent before the transmitting LS traffic. All FS IsoUSB transactions: Hub Address = (default TTHA = 0 ) siTD.EPS = 00 (full speed)
Maximum Packet Size must less than or equal to 1023 or undefined behavior might result.
www.xilinx.com
399
Note: FSTN data structures are used for FS and LS devices that are downstream of a high speed hub
(not when FS or LS device is connected directly to the host controller.)
Microframe Pipeline
The EHCI operational model uses the concept of H-frames and B-frames to describe the pipeline between the Host (H) and the Bus (B). The embedded transaction translator shall use the same pipeline algorithms specified in the USB 2.0 specification for a Hub-based Transaction Translator. All periodic transfers always begin at B-frame 0 (after SOF) and continue until the stored periodic transfers are complete. As an example of the microframe pipeline implemented in the embedded transaction translator, all periodic transfers that are tagged in EHCI to execute in H-frame 0 will be ready to execute on the bus in B-frame 0. It is important to note that when programming the S-mask and C-masks in the EHCI data structures to schedule periodic transfers for the embedded transaction translator, the EHCI HCD must follow the same rules specified in EHCI for programming the S-mask and C-mask for downstream hub-based transaction translators. Once periodic transfers are exhausted, any stored asynchronous transfer will be moved. Asynchronous transfers are opportunistic in that they shall execute whenever possible and their operation is not tied to Hframe and B-frame boundaries with the exception that an asynchronous transfer cannot babble through the SOF (start of B-frame 0.)
www.xilinx.com
400
Table 15-22:
Start-Split: All asynchronous buffers full. Start-Split: All periodic buffers full. Start-Split: Success for start of async. transaction. Start-Split: Start periodic transaction. Complete-Split: Failed to find transaction in queue. Complete-Split: Transaction in queue is busy. Complete-Split: Transaction in queue is complete.
EOF (and not started in microframes 6) Idle for more than 4 microframes (Abort of pending complete-splits) EOF Idle for more than 4 microframes Transaction tracking for up to 16 data pipes.
Caution: L imiting the number of tracking pipes in the embedded -TT to four (4) will impose the restriction that no more than four periodic transactions (INTERRUPT/ISOCHRONOUS) can be scheduled through the TT per frame. the number 16 was chosen in the USB specification because it is sufficient to ensure that the high-speed to full-speed periodic pipeline can remain full. keeping the pipeline full puts no constraint on the number of periodic transactions that can be scheduled in a frame and the only limit becomes the flight time of the packets on the bus.
Note: There is no data schedule mechanism for these transactions other than the microframe
pipeline. The emulated TT assumes the number of packets scheduled in a frame does not exceed the frame duration (1 ms) or else undefined behavior might result.
www.xilinx.com
401
Section Content
15.12.1 Descriptor Usage 15.12.2 Transfer Descriptor Type (TYP) Field 15.12.3 Isochronous (High Speed) Transfer Descriptor (iTD) 15.12.4 Split Transaction Isochronous Transfer Descriptor (siTD) 15.12.5 Queue Element Transfer Descriptor (qTD) 15.12.6 Queue Head (QH) 15.12.7 Transfer Overlay Area 15.12.8 Periodic Frame Span Traversal Node (FSTN)
Descriptors
iTD, siTD QH, qTD FSTN (Low-, Full-speed)
Interrupt
Control
no yes
www.xilinx.com
402
Table 15-24:
Data Structure
Periodic Frame List iTD siTD QH FSTN
QH 01
X ~ X ~ ~
siTD 10
X ~ ~ X ~
FSTN Description 11
X ~ ~ ~ X Figure 15-15 USB Host Periodic Schedule with Example Table 15-25 USB Host Isochronous Transfer Descriptor (iTD) Format Table 15-29 USB Host Split-Transaction Isochronous Descriptor (siTD) Format Table 15-40 USB Host Queue Head (QH) Descriptor Format Table 15-45 USB Host Frame Span Traversal Node Descriptor (FSTN) Format
3 00
0 T
DWord 0 1 2 3 4 5 6 7 8 9 10
TYP
PG * PG * PG * PG * PG * PG * PG * PG * EndPt IO
Transaction 0 Offset * Transaction 1 Offset * Transaction 2 Offset * Transaction 3 Offset * Transaction 4 Offset * Transaction 5Offset * Transaction 6 Offset * Transaction 7 Offset * R Device Address Maximum Packet Size reserved reserved reserved reserved reserved Host Controller Read-only Mult
Table 15-27
11 12 13 14 15
Table 15-28
* means these fields may be modified by the Host controller if the IO field indicates an OUT (DWords 1 to 8).
www.xilinx.com
403
Next Link Pointer. These bits correspond to memory address signals [31:5], respectively. This field points to another isochronous transaction descriptor (iTD/siTD) or a QH. Reserved. Field reserved and should be set to 0. Transaction Descriptor Type, TYP. Set to 00 (iTD type). Refer to section 15.12.2 Transfer Descriptor Type (TYP) Field for general information. Terminate transfer, T. 0 : link to the Next iTD Pointer field; the address is valid. 1 : end the transaction, the Next iTD Pointer field is not valid.
www.xilinx.com
404
The host controller uses the information in each transaction description plus the endpoint information contained in the first three DWords of the Buffer Page Pointer list, to execute a transaction on the USB. Table 15-27: Bits
31:28
USB Host iTD Dwords 1 to 8: Transaction Status and Control List Description
Status: Active Status [31]. Set to 1 by the HCD to enable the execution of an isochronous transaction. When the transaction associated with this descriptor is completed, the host controller sets this bit to 0 indicating that a transaction for this element should not be executed when it is next encountered in the schedule. Data Buffer Error Status [30]. Set to a 1 by the host controller during status update to indicate that the host controller is unable to keep up with the reception of incoming data (overrun) or is unable to supply data fast enough during transmission (under run). If an overrun condition occurs, no action is necessary. Babble Detected Status [29]. Set to 1 by the host controller during status update when 'babble' is detected during the transaction generated by this descriptor. Transaction Error Status [28]. Set to 1 by the host controller during status update in the case where the host did not receive a valid response from the device (Timeout, CRC, Bad PID, etc.). This bit can only be set for isochronous IN transactions. Transaction {7:0} Length. For an OUT transaction, this field is the number of data bytes the host controller will send during the transaction. The host controller is not required to update this field to reflect the actual number of bytes transferred during the transfer. For an IN transaction, the initial value of the field is the number of bytes the host expects the endpoint to deliver. During the status update, the host controller writes back the field the number of bytes successfully received. 000h: zero length data. 001h: one byte. 002h: two bytes. ... C00h: 3072 bytes (maximum). Interrupt On Complete, IOC. If this bit is set to 1, it specifies that when this transaction completes, the host controller should issue an interrupt at the next interrupt threshold. Page Select, PG. These bits are set by the HCD to indicate which of the buffer page pointers the offset field in this slot should be concatenated to produce the starting memory address for this transaction. The valid range of values for this field is 0 to 6. Transaction {7:0} Offset. This field is a value that is an offset, expressed in bytes, from the beginning of a buffer. This field is concatenated onto the buffer page pointer indicated in the adjacent PG field to produce the starting buffer address for this transaction.
27:16
15 14:12
11:0
www.xilinx.com
405
Since each pointer is a 4KB aligned page pointer, the least significant 12 bits in several of the page pointers are used for other purposes. Table 15-28: Bits USB Host iTD DWords 9 to 15: Buffer Page Pointer List Description
DWord 9
31:12 11:8 7 6:0 Buffer Pointer (Page 0). 4KB-aligned pointer to system memory address bits [31:12]. Endpoint Number (EndPt). Select the endpoint for the device serving as the data source or sink. Reserved. Bit reserved for future use and should be initialized by the HCD to 0. Device Address. Select the specific device serving as the data source or sink.
DWord 10
31:12 11 Buffer Pointer (Page 1). 4KB-aligned pointer to system memory address bits [31:12]. Direction (IO). Select the high-speed transaction for an IN or OUT PID. 0 : OUT 1 : IN Maximum Packet Size. This directly corresponds to the maximum packet size of the associated endpoint (wMaxPacketSize). This field is used for high-bandwidth endpoints where more than one transaction is issued per transaction description (e.g., per microframe). This field is used with the Multi field to support high-bandwidth pipes. This field is also used for all IN transfers to detect packet babble. The HCD should not set a value larger than 1,024 ( 400h ). Any value larger yields undefined results.
10:0
DWord 11
31:12 11:2 1:0 Buffer Pointer (Page 2). 4KB-aligned pointer to system memory address bits [31:12]. Reserved. This bit reserved for future use and should be set to 0. Mult. Selects the number of transactions to execute per transaction description (e.g. per microframe). 00: Reserved. A 0 in this field yields undefined results 01: One transaction to be issued for this endpoint per microframe 10: Two transactions to be issued for this endpoint per microframe 11: Three transactions to be issued for this endpoint per microframe
DWords 12 to 15
31:12 11:0 Buffer Pointer (Pages 3 to 6). 4KB-aligned pointer to memory address bits [31:12]. Reserved. This bit reserved for future use and should be set to 0.
www.xilinx.com
406
7 R
3 00
0 T
DWord 0 1 2 3 4
Next Ptr Endpt Cap/Char xfer State Buffer Page Ptrs Back Link
TYP
reserved
EndPt
Buffer Pointer (Page 0) Buffer Pointer (Page 1) Back Pointer Host Controller Read/Write
5 6
Next Link Pointer. This field contains the address of the next data object to be processed in the periodic list and corresponds to memory address signals [31:5], respectively. Transaction Descriptor Type, TYP. Set to 10 (siTD type). Refer to section 15.12.2 Transfer Descriptor Type (TYP) Field for general information. Terminate transfer, T. 0 : link to the Next Link Pointer field; the address is valid. 1 : end the transaction, the Next Link Pointer field is not valid.
2:1 0
30:24
www.xilinx.com
407
Table 15-31:
23 22:16 15:12 11:8 7 6:0
Reserved. Bit reserved and should be set to 0. Hub Address, Hub Addr. Device address of the Companion Controllers hub. Reserved. Field reserved and should be set to 0. Endpoint Number, EndPt. 4-bit field selects the endpoint on the device serving as the data source or sink. Reserved. Bit reserved and should be set to 0. Device Address. Select the specific device serving as the data source or sink.
7:0
Microframe C-mask
The split completion mask field, siTD.Microframe C-mask, along with the Active and SplitXstate fields in the Status byte, is used to determine during which microframes the host controller should execute complete-split transactions. This field is a straight bit position field, so if bit [0] is set then the complete-split transaction should occur in the first microframe, if bit [1] is set = 1 then it should occur in the second microframe, and so on. When the criteria for using this field is met, a 0 value has undefined behavior. The host controller uses the value of the three low-order bits of the FRINDEX register to index into this bit field. If the FRINDEX register value indexes to a position where the microframe C-Mask field is a 1, then this siTD is a candidate for transaction execution. There can be more than one bit in this mask set. The C-Mask can be set for multiple micro frames, as it is not known in which microframe the transaction will complete. So the C-Mask can be set for the micro frame after the S-Mask and all subsequent micro fames thereafter. The C-Mask field should not have a bit set to the same microframe as the S-Mask is set to.
Microframe S-mask
The split start mask field, siTD.Micro S-mask, along with the Active and SplitX-state fields in the Status byte, is used to determine during which microframes the host controller should execute start-split transactions. The host controller uses the value of the three low-order bits of the FRINDEX register to index into this bit field. If the FRINDEX register value indexes to a position where the microframe S-mask field is a 1, then this siTD is a candidate for transaction execution. A 0 value in this field, in combination with existing periodic frame list, has undefined results. This field should have only one bit set to 1 at any given time. Having more than one bit set will result in undefined results.
www.xilinx.com
408
Interrupt On Complete, IOC. 0 : Do not interrupt when transaction is complete 1 : Do interrupt when transaction is complete When the host controller determines that the split transaction has completed it will assert a hardware interrupt at the next interrupt threshold. Page Select, P. Used to indicate which data page pointer should be concatenated with the Current Offset field to construct a data buffer pointer (0 selects Page 0 pointer and 1 selects Page 1). The host controller is not required to write this field back when the siTD is retired (Active bit transitioned from a 1 to a 0). Reserved. Field reserved and should be set to 0. Total Bytes To Transfer, Total Bytes. This field is initialized by the HCD to the total number of bytes expected in this transfer. Maximum value is 1,023 (3FFh ). Microframe Complete-split Progress Mask, uFrame C prog-mask . This field is used by the host controller to record which split-completes has been executed. Status [7:0]. Refer to text.
30
Reserved [0]. Bit reserved for future use and should be set to 0.
www.xilinx.com
409
DWord 4
31:12 11:0 Buffer Pointer (Page 0). 4KB aligned pointer to system memory address bits [31:12]. Current Offset. The 12 least significant bits of the Page 0 pointer is the current byte offset for the current page pointer (as selected with the page select bit (P field)). The host controller is not required to write this field back when the siTD is retired (Active bit transitioned from a 1 to a 0).
DWord 5
31:12 11:5 4:3 Buffer Pointer (Page 1). 4KB aligned pointer to system memory address bits [31:12]. Reserved. Bit reserved for future use and should be set to 0. Transition position, TP. This field is used with T-count to determine whether to send all, first, middle, or last with each outbound transaction payload. The HCD must initialize this field with the appropriate starting value. The host controller must correctly manage this state during the lifetime of the transfer. The bit encodings are: 00: All. Entire FS transaction data payload is in this transaction (the payload is less than or equal to 188 bytes.) 01: Begin. First data payload for a FS transaction that is greater than 188 bytes. 10: Mid . Middle payload for a FS OUT transaction that is greater than 188 bytes. 11: End. Last payload for a FS OUT transaction that was greater than 188 bytes. Transaction count, T-Count . The HCD initializes this field with the number of OUT start-splits this transfer requires. Any value larger than 6 is undefined.
2:0
Back Pointer. Physical memory pointer to a siTD. Reserved. Field reserved and should be set to 0. Terminate transfer, T. 0 : link to the Back Pointer field; the address is valid. 1 : end the transaction, the Back Pointer field is not valid.
www.xilinx.com
410
0 T T
DWord 0 1 2 3 4 5 6 7
0000 0000 C_Page Cerr PID reserved reserved reserved reserved Host Controller Read-only Status Current Offset
Table 15-39
Next Transfer Element Pointer, Next qTD Pointer. This field contains the physical memory address of the next qTD to be processed. The field corresponds to memory address bits [31:5], respectively. Reserved. Field reserved and should be set to 0. Terminate transfer, T. 0 : link to the Next qTD Pointer field; the address is valid. 1 : end the transaction, the Next qTD Pointer field is not valid.
4:1 0
www.xilinx.com
411
Alternate Next Transfer Element Pointer, Alternate Next qTD Pointer. This field contains the physical memory address of the next qTD to be processed in the event that the current qTD execution encounters a short packet (for an IN transaction). The field corresponds to memory address signals [31:5], respectively. Reserved. Field reserved and should be set to 0. Terminate transfer, T. 0 : link to the Alternate Next dTD Pointer field; the address is valid. 1 : end the transaction, the Alternate Next dTD Pointer field is not valid.
4:1 0
Note: The field descriptions forward reference fields defined in the queue head. Where necessary,
these forward references are preceded with a QH notation. USB Host qTD DWord 2: DT, Total Bytes Description
Data Toggle, DT. This is the data toggle sequence bit. The use of this bit depends on the setting of the Data Toggle Control bit in the queue head. Total Bytes to Transfer, Total Bytes . This field specifies the total number of bytes to be moved with this transfer descriptor. Refer to section Total Bytes to Transfer Parameter for more info. Interrupt On Complete, IOC. If this bit is set to a 1, it specifies that when this qTD is completed, the host controller should issue an interrupt at the next interrupt threshold. Current Page, C_Page. This field is used as an index into the qTD buffer pointer list. Valid values are in the range 0 to 4. The host controller is not required to write this field back when the qTD is retired.
15 14:12
www.xilinx.com
412
Table 15-38:
11:10
Error Counter, Cerr. This field is a 2-bit down counter that keeps track of the number of consecutive Errors detected while executing this qTD. HCD write: 00: the controller will not count errors for this qTD and there will be no limit on the retries of this qTD. 01 to 11: the controller decrements this field for each consecutive USB transaction error [UEI] that occurs while processing this qTD. If the counter counts from 01 to 00, the controller marks the qTD inactive, sets the Halted bit = 1, and sets the usb.USBINTR [CERR] error status bit. Transaction Error Stall Babble Detected No Error Data Buffer Error Notes:
1. Detection of Babble or Stall automatically halts the queue head. Thus, count is not decremented 2. If the QH.EPS field indicates a HS device or the queue head is in the Asynchronous Schedule (and PID code indicates an IN or OUT) and a bus transaction completes and the host controller does not detect a transaction error, then the host controller should reset Cerr to extend the total number of errors for this transaction. For example, Cerr should be reset with maximum value (3) on each successful completion of a transaction. The host controller must never reset this field if the value at the start of the transaction is 00b. 3. Data buffer errors are host problems. They don't count against the device's retries.
1 1 2 3
Note: The HCD must not program Cerr to a value of 0 when the QH.EPS field is programmed with a value indicating a FS or LS device. This combination could result in undefined behavior. 9:8 PID Code, PID. This field is an encoding of the token, which should be used for transactions associated with this transfer descriptor. Encodings are: 00: DUT. Token generates token (E1h) 01: IN. Token generates token (69h) 10: Setup. Token generates token (2Dh) (undefined if end-point is an Interrupt transfer type, e.g. microFrame S-mask field in the queue head is non-zero.) 11: Reserved. Active Status. Set to 1 by the HCD to enable the execution of transactions by the host controller. Halted Status. Set to a 1 by the host controller during status updates to indicate that a serious error has occurred at the device/endpoint addressed by this qTD. This can be caused by babble, the error counter counting down to 0, or reception of the STALL handshake from the device during a transaction. Any time that a transaction results in the Halted bit being set to a 1, the Active bit is also set to 0. Data Buffer Error Status. Set to a 1 by the Host Controller during status update to indicate that the Host Controller is unable to keep up with the reception of incoming data (overrun) or is unable to supply data fast enough during transmission (under run). If an overrun condition occurs, the Host Controller will force a timeout condition on the USB, invalidating the transaction at the source. If the host controller sets this bit to a 1, then it remains a 1 for the duration of the transfer.
www.xilinx.com
413
Table 15-38:
4
Babble Detected Status. Set to a 1 by the host controller during status update when babble is detected during the transaction. In addition to setting this bit, the host controller also sets the Halted bit to a 1. Since babble is considered a fatal error for the transfer, setting the Halted bit to a 1 insures that no more transactions occur because of this descriptor. Transaction Error Status. Set to a 1 by the host controller during status update in the case where the host did not receive a valid response from the device (Timeout, CRC, Bad PID, etc.). If the controller sets this bit to a 1, then it remains a 1 for the duration of the transfer. Missed Microframe Status. This bit is ignored unless the QH.EPS field indicates a full- or low-speed endpoint and the queue head is in the periodic list. This bit is set when the host controller detected that a host-induced hold-off caused the controller to miss a required complete-split transaction. If the controller sets this bit to a 1, then it remains a 1 for the duration of the transfer. Split Transaction State Status. This bit is ignored by the host controller unless the QH.EPS field indicates a FS or LS endpoint. When a Full- or Low speed device, the host controller uses this bit to track the state of the split transaction. The functional requirements of the controller for managing this state bit and the split transaction protocol depends on whether the endpoint is in the periodic or asynchronous schedule. 0 : Do Start Split. This value directs the host controller to issue a Start split transaction to the endpoint. 1 : Do Complete Split. This value directs the host controller to issue a Complete split transaction to the endpoint. Ping State/ERR Status. If the QH.EPS field indicates a HS device and the PID indicates an OUT endpoint, then this is the state bit for the Ping protocol. 0: Do OUT. This value directs the controller to issue an OUT PID to the endpoint. 1: Do Ping. This value directs the controller to issue a Ping PID to the endpoint. If the QH.EPS field does not indicate a HS device, then this field is used as an error indicator bit. It is set to a 1 by the controller whenever a periodic split-transaction receives an ERR handshake.
www.xilinx.com
414
DWords 3 to 7: Buffer Pointer. 4KB page-aligned memory address. DWord 3: Current Offset. Byte offset into the active page (as selected by C_Page). The host controller is not required to write this field back when the qTD is retired. DWords 4 to 7: Reserved. Field reserved and should be set to 0.
0 T
DWord 0 1 2 3
00 EPS EndPt I
TYP
H DTC
Port Number *
uFrame C-mask *
4 5 6 7 8 9 10 11
Table 15-44
C_Page
Cerr
PID
Table 15-45
* means these fields are used exclusively to support Split Transactions to USB 2.0 Hubs.
Queue Head Horizontal Link Pointer. System memory address of the next data object in the periodic list.
www.xilinx.com
415
Table 15-41:
4:3 2:1 0
Reserved. Field reserved and should be set to 0. Transaction Descriptor Type, TYP. Set to 01 (QH type). Refer to section 15.12.2 Transfer Descriptor Type (TYP) Field for general information. Termination Bit, T. Periodic List Schedule response: 0: link to the next QH; the Queue Head Horizontal Link Pointer field is valid. 1: end of the periodic list processing; the pointer field is invalid. Asynchronous Schedule response: Ignored.
26:16 15 14
13:12
11:8
www.xilinx.com
416
Table 15-42:
7
Inactivate on Next Transaction, I. The HCD requests that the host controller set the Active status bit to 0. This field is only valid when the QH is in the Periodic Schedule and the QH.EPS field indicates an FS or LS endpoint. Setting this bit to a 1 when the queue head is in the Asynchronous Schedule or the QH.EPS field indicates a high-speed device yields undefined results. Device Address. Select the specific device serving as the data source or sink.
6:0
29:23
22:16
15:8 7:0
uFrame C-Mask
The split completion mask field, QH.uFRAME C-Mask, is ignored by the host controller unless the QH.EPS field indicates this device is LS or FS and this QH is in the periodic list. This field (along with the Active and SplitX-state fields) is used to determine which microframes the host controller should execute a complete-split transaction. This field is a straight bit position field, so if bit [0] is set then the complete-split transaction should occur in the first microframe, if bit 1 is set then it should occur in the second microframe, and so on. When the criteria for using this field are met, a 0 value in this field has undefined behavior. This field is used by the host controller to match against the three low-order bits of the FRINDEX register. If the FRINDEX register bits decode to a position where the QH.uFrame C-Mask field is a 1, then this queue head is a candidate for transaction execution. There can be more than one bit in this mask set. The C-Mask can be set for multiple micro frames, as it is not known in which microframe the transaction will complete. So the C-Mask can be set for the micro frame after the S-Mask and all subsequent micro fames thereafter. The C-Mask field should not have a bit set to the same microframe as the S-Mask is set to.
www.xilinx.com
417
uFrame S-mask
The interrupt schedule mask field, QH.uFrame S-mask, is used for all endpoint speeds. The HCD should set this field = 0 when the QH is on the asynchronous schedule. A non-zero value in this field indicates an interrupt endpoint. The host controller uses the value of the three low-order bits of the FRINDEX register as an index into a bit position in this bit vector. If the QH.uFrame S-mask field has a 1 at the indexed bit position then this queue head is a candidate for transaction execution. If the QH.EPS field indicates the endpoint is a high-speed endpoint, then the transaction executed is determined by the PID field contained in the execution area. This field is also used to support split transaction types: Interrupt (IN/OUT). This condition is true when this field is non-zero and the QH.EPS field indicates this is either a full- or low-speed device. A 0 value in this field, in combination with existing in the periodic frame list has undefined results. This field should have only one bit set to 1 at any given time. Having more than one bit set will result in undefined results.
Current Element Transaction Descriptor Link Pointer. Current qTD Pointer. This field contains the address Of the current transaction being processed in this queue and corresponds to memory address signals [31:5]. Reserved. Write 0.
4:0
www.xilinx.com
418
4:1 0
Total Bytes
31 30:16 15 14:12 11:10 9:8 7:0 0 Data toggle, DT. The Data Toggle Control controls whether the host controller preserves this bit when an overlay operation is performed. Total Bytes. Refer to section Total Bytes to Transfer Parameter for more info. Interrupt On Complete, IOC. The IOC control bit is always inherited from the source qTD when the overlay operation is performed. C_Page. Error Counter, Cerr. This two-bit field is copied from the qTD during the overlay and written back during queue advancement. Port ID, PID. Reserved. Write 0. Ping State, /PERR. If the QH.EPS field indicates a high-speed endpoint, then this field should be preserved during the overlay operation. 2 6
www.xilinx.com
419
Table 15-44:
4:0
Normal Path Link Pointer. Address of the next data object to be processed in the periodic list and corresponds to memory address bits [31:5], respectively.
www.xilinx.com
420
Table 15-46:
4:3 2:1 0
Reserved. Field reserved and should be set to 0. Transaction Descriptor Type, TYP. Set to 11 (FSTN type). Refer to section 15.12.2 Transfer Descriptor Type (TYP) Field for general information. Terminate bit, T. 0: Link Pointer field points to a valid system memory offset from CTRLDSSEGMENT and the FSTN is a Save-Place indicator. 1: Link Pointer field is invalid and the FSTN is a Restore indicator.
Back Path Link Pointer. This field contains the address of a Queue Head. This field corresponds to memory address signals [31:5], respectively. Reserved. Field reserved and should be set to 0. Transaction Descriptor Type, TYP. Set to 11 (FSTN type). Refer to section 15.12.2 Transfer Descriptor Type (TYP) Field for general information. Terminate bit, T.
1: Link Pointer field is invalid and the FSTN is a Restore indicator. 0: Link Pointer field points to a valid system memory offset from CTRLDSSEGMENT and the FSTN is a Save-Place indicator.
www.xilinx.com
421
15.13.2 Run/Stop
When the HCD sets the usb.USBCMD [RS] bit = 1, the controller proceeds to the execute the periodic and asynchronous schedules. The controller continues execution as long as this bit is set to a 1. When this bit is set to 0, the host controller completes the current transaction on the USB and then halts. When the controller is finished with the transaction and has entered the stopped state, it writes a 1 to the usb.USBSTS [HCH] bit. Software should not write a 1 to the [RS] bit to enable the controller unless the controller is in the Halted state, usb.USBSTS [HCH] bit = 1.
Auto-Reset Option
When the usb.OTGSC [HAAR] bit is set to 1, the host controller will automatically start a reset after a connect event. This shortcuts the normal process where the software is notified of the connect event and starts the reset. The software will still receive notification of the connect event but should not write the reset bit when the [HAAR] bit is set = 1. The software will be notified again after the reset is complete via the enable change bit in the PORTSC1 register which cause a port change interrupt. This hardware assistance feature will ensure the OTG parameter TB_ACON_BSE0_MAX = 1 ms is met.
Data-Pulse
Writing a 1 to usb.OTGSC [HADP] bit will start a data pulse of approximately 7 ms in duration and then automatically cease the data pulsing. During the data pulse, the DP signal will be set and then cleared. This automation relieves the software from accurately controlling the data-pulse duration. During the data pulse, the HCD can poll to see that the [HADP] and [DP] bits have returned low to recognize the completion or simply launch the data pulse and wait to see if a VBUS Valid interrupt occurs when the A-side supplies bus power. This hardware assistance feature will ensure data pulsing meets the OTG requirement of > 5 ms and < 10 ms.
www.xilinx.com
422
B-Disconnect to A-Connect
During HNP, the B-Disconnect occurs from the OTG A_suspend state and within 3 ms, the A-device must enable the pull-up on the DP signal in the A-peripheral state. When usb.OTGSC [HABA] is set = 1, the Host Controller port is in suspend mode, and the device disconnects, then this hardware assist begins. 1. 2. 3. 4. 5. 6. Reset the OTG controller. Set the OTG controller into device mode. Write the device run bit to a 1 and enable necessary interrupts including: USB Reset Enable [URE]; enables interrupt on USB bus reset to device Sleep Enable [SLE]; enables interrupt on device suspend Port Change Detect Enable [PCE]; enables interrupt on device connect
When the HCD has enabled this hardware assist, it must not interfere during the transition and should not write any control registers until it gets an interrupt from the device controller signifying that a reset interrupt has occurred or at least first verify that the controller has entered device mode. The HCD must not activate the soft reset at any time since this action is performed by hardware. During the transition, the HCD might see an interrupt from the disconnect and/or other spurious interrupts (i.e., SOF/etc.) that might or might not cascade and can be cleared by the soft reset depending on the HCD response time. After the controller has entered device mode by the hardware assist, the HCD must ensure that the usb.ENDPTLISTADDR is programmed properly before the host sends a setup packet. Since the end of the reset duration, which can be initiated quickly (a few microseconds) after connect, will require at a minimum 50 ms, this is the time for which the HCD must be ready to accept setup packets after having received notification that the reset has been detected or simply that the OTG is in device mode whichever occurs first. In the case where the A-peripheral fails to see a reset after the controller enters device mode and engages the DP-pull-up, the interrupt software signifying that a suspend has occurred. This assist will ensure the parameter TA_BDIS_ACON_MAX = 3 ms is met.
www.xilinx.com
423
Table 15-48:
USB OTG Status/Interrupt and Control Bits in the OTGSC register Interrupts Control Bits
7 6 5 4 3 2 1 HABA HADP IDPU DP OT HAAR VC 0: VD: Vbus Discharge enable (rw) 1: VC: VBus Charge enable (rw) 2: HAAR: Hardware Auto-Reset enable (rw) 3: OT: OTG Device mode DP M pull-down enable (rw) 4: DP: Assert DP pull-up during SRP (rw) 5: IDPU: ID Pull-up enable (rw) 6: HADP: Hardware Assist Data-pulse generator (rw) 7: HABA: Hardware Assist B-disconnect to A-connect (rw) 0 VD
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 r Enable (R/W) r Latched Event (W1C) r Status (read-only) A Session Valid B Session Valid B Session End
Data Pulse
Interrupts:
A VBus
Zynq-7000
CPU_1x Clock 60 MHz ULPI Clock 8-bit ULPI 60 MHz Single Data Rate 12 MIO Pins Protocol Engine Port Controller and ULPI Link Wrapper 8-bit Data
DIR (direction) NXT (control) STP CLK
USB ID
1 ms
AHB
32-bit Master Interface
CPU_1x
DMA Engine
DMA Control
Programmable Timers
MIO or EMIO
reset
Clock Domains
60 MHz ULPI
GPIO Clock
PL PS
4 EMIO Signals
Port Indicator x2 Power Control Power Fault
APB
32-bit Slave Interface
CPU_1x
UG585_c15_45_030413
Figure 15-18:
15.15.1 Clocks
The vast majority of the controller logic is driven by the 60 MHz clock from the ULPI PHY. The controller's interconnect is driven by the AHB/APB interface CPU_1x clock which is generated by the PS clock subsystem.
www.xilinx.com
424
CPU_1x Clock
Refer to section 25.3 System-wide Clock Frequency Examples, for general clock programming information. The CPU_1x clock runs asynchronous to the CAN reference clock.
Controller Resets
PS Reset System (full controller reset), usb.USBCMD [RST] bit (partial controller reset useful for OTG). OTG Mode Auto-Reset
Summary of Resets
The controller has multiple reset sources and multiple reset domains. These are summarized in Table 15-49 USB Resets Summary List.
www.xilinx.com
425
Table 15-49:
fs
Registers
Yes
IRQ
no
Reference
Chapter 26, Reset System. Reset values: Appendix B, Register Details. Device and Host Modes Section 15.14.1 Hardware Assistance Features Chapter 15, USB Host, Device, and OTG Controllers Software Example. Software Example.
PS System Reset AMBA (APB/AHB) Interface Reset slcr.USB_RST_CTRL [USBx_CPU1X_RST] usb.USBCMD [RST] (partial controller reset) OTG mode Auto-Reset Hardware Assistance usb.USBOTG [HAAR] PHY reset Output from PS GPIO controller Send USB Reset (Host Mode) Receive USB Reset (Device Mode)
Partial
no no
no no [URI]
Unused Signals
All of the AHB interface signals are used except: PROT[3:0] are tied to 0001 (non-cacheable transactions).
www.xilinx.com
426
programmed. The routing of the signals through the EMIO is always available to logic in the PL that can route these signals to the SelectIO pins.
UTMI PHY
UTMI Data In UTMI Data Out UTMI Clock UTMI Reset DP DM VBUS ID
PS GPIO
GPIO
Board Components
UG585_c15_46_030413
Figure 15-19:
www.xilinx.com
427
1.
Configure MIO pins 40, 44 - 47 and 49 -51 for data I/O. Write to the associated slcr registers, MIO_PIN_{40, 44-47}: a. c. e. f. Route USB ULPI data signal to I/O buffer. LVCMOS18 (refer to the register definition for other voltage options). Disable internal pull-up resistor. Disable HSTL receiver. b. 3-state controlled by USB controller (TRI_ENABLE = 0 ). d. Slow CMOS edge.
2.
Configure MIO pins 41, 43, and 48 for input . Write to each of the slcr.MIO_PIN_{48, 43, 41} registers: a. c. e. f. Route USB ULPI input signals DIR to pin 41, STP to pin 43 and CLK to pin 48. LVCMOS18 (refer to the register definition for other voltage options). Disable internal pull-up resistor. Disable HSTL receiver. Route USB ULPI output signal STP to pin 42. LVCMOS18 (refer to the register definition for other voltage options). Disable internal pull-up resistor. Disable HSTL receiver. b. Disable output (TRI_ENABLE = 1 ). d. Slow CMOS drive edge (benign setting).
3.
Configure MIO pin 42 for output. Write to the slcr.MIO_PIN_42 register: a. c. e. f. b. 3-state controlled by USB Controller (TRI_ENABLE = 0 ). d. Slow CMOS edge.
USB 0 USB 1
28 29 30 31 40 41 42 43
I/O
IO I O I
Name
USB{0,1}_ULPI_DATA4 USB{0,1}_ULPI_DIR USB{0,1}_ULPI_STP USB{0,1}_ULPI_NXT
www.xilinx.com
428
Table 15-50:
USB ULPI Signals on MIO MIO Pins Default Input Value to Controller
~ ~ ~ ~ 0 ~ ~ ~
USB 0 USB 1
32 33 34 35 36 37 38 39 44 45 46 47 48 49 50 51
I/O
IO IO IO IO I IO IO IO
Name
USB{0,1}_ULPI_DATA0 USB{0,1}_ULPI_DATA1 USB{0,1}_ULPI_DATA2 USB{0,1}_ULPI_DATA3 USB{0,1}_ULPI_CLK USB{0,1}_ULPI_DATA5 USB{0,1}_ULPI_DATA6 USB{0,1}_ULPI_DATA7
Table 15-51:
USB Port Indicator and Power Signals on EMIO EMIO Signals Default Input I/O Value to Controller
O I O ~ 0 ~
Name
EMIOUSB{0,1}PORTINDCTL{0,1} EMIOUSB{0,1}VBUSPWRFAULT EMIOUSB{0,1}VBUSPWRSELECT
www.xilinx.com
429
Chapter 16
Registers are used to configure the features of the MAC, select different modes of operation, and enable and monitor network management statistics. The DMA controller connects to memory through an AHB bus interface. It is attached to the controllers FIFO interface of the MAC to provide a scatter-gather type capability for packet data storage in an embedded processing system. The controllers provide MDIO interfaces for PHY management. The PHYs can be controlled from either of the MDIO interfaces.
www.xilinx.com
430
Device Boundry
MAC Transmitter MAC Receiver EMIO Status and Statistics Registers PL
GMII/MII
AHB Master
DMA Controller
RGMII
MIO Pins
User Defined
PL Signals
APB Slave
Frame Filtering
MDC, MDIO
EMIO
Register Interface
Control Registers
MIO Pins
UG585_c16_01_042512
Figure 16-1:
Ethernet Controller
16.1.2 Features
Each Gigabit Ethernet MAC controller has the following features: IEEE Standard 802.3-2008 compatible, supporting 10/100/1000 Mb/s transfer rates Full and half duplex operation RGMII interface with external PHY when using MIO pins GMII/MII interface to the PL to allow connection of interfaces such as TBI, SGMII, 1000 Base-X and RGMII v2.0 support using soft cores (Note: SGMII and 1000 Base-X interfaces require a gigabit transceiver, MGT) MDIO interface for physical layer management 32-bit AHB DMA master, 32-bit APB bus for control registers access Scatter-gather DMA capability Interrupt generation to signal receive and transmit completion, or errors and wakeup Automatic pad and cyclic redundancy check (CRC) generation on transmitted frames Automatic discard of frames received with errors Programmable IPG stretch Full duplex flow control with recognition of incoming pause frames and hardware generation of transmitted pause frames
www.xilinx.com
431
Address checking logic for four specific 48-bit addresses, four type ID values, promiscuous mode, external address checking, hash matching of unicast and multicast destination addresses and Wake-on-LAN 802.1Q VLAN tagging with recognition of incoming VLAN and priority tagged frames Supports Ethernet loopback mode IPv4 and IPv6 transmit and receive IP, TCP and UDP checksum offload Recognition of 1588 rev. 2 PTP frames Statistics counter registers for RMON/MIB
Device Boundry
IRQ ID# {54, 77} IRQ ID# {55, 78}
AHB Ethernet Wakeup Master Port
Interconnect
RGMII Tx, Rx
GigE {0, 1} CPU 1x Clock GigE {0, 1} CPU 1x Reset Slave Port
MIO Pins
Interconnect
APB
Control Registers
PTP
EMIO
Management Interface
MDC, MDIO
PL
Tx Clock
GigE {0, 1} Ref Clock Internal Clock Source
Rx Clock
MIO Clock Source EMIO Clock Sources
Rx Clock
Tx, Rx Clocks
UG585_c16_02_071112
Figure 16-2:
System Viewpoint
www.xilinx.com
432
16.1.4 Notices
7z010 CLG225 Device
This device supports 32 MIO pins and at most one Ethernet interface through the MIO pins. This is shown in the MIO table in section 2.5.4 MIO-at-a-Glance Table. One or both of the Ethernet controllers can interface to logic in the PL. All of the 7z010 CLKG225 device restrictions are listed in section 1.1.3 Notices.
Jumbo Frames
Jumbo frames are not supported.
Half Duplex
Gigabit Half Duplex is not supported.
10/100/1000 Operation
The gigabit enable bit in the Network Configuration register selects between 10/100 Mb/s Ethernet operation and 1000 Mb/s mode. The 10/100 Mb/s speed bit in the network configuration register is used to select between 10 Mb/s and 100 Mb/s.
MDIO Interface
Both controllers provide MDIO interfaces, however, only one interface is needed to control both of the external PHYs due to the difference in PHY address.
www.xilinx.com
433
www.xilinx.com
434
consist of 16 nibbles of 1011 or in bit rate mode 64 1 s, whenever it sees an incoming frame to force a collision. This provides a way of implementing flow control in half duplex mode.
www.xilinx.com
435
If bit [25] of the Network Configuration register is not set, a frame is not copied to memory if the Gigabit Ethernet controller is transmitting in half duplex mode at the time a destination address is received. Ethernet frames are transmitted a byte at a time, least significant bit first. The first six bytes (48 bits) of an Ethernet frame make up the destination address. The first bit of the destination address, which is the LSB of the first byte of the frame, is the group or individual bit. This is one for multicast addresses and zero for unicast. The all-ones address is the broadcast address and a special case of multicast. The Gigabit Ethernet controller supports recognition of four specific addresses. Each specific address requires two registers, Specific Address register bottom and Specific Address register top. Specific address register bottom stores the first four bytes of the destination address and Specific Address register top contains the last two bytes. The addresses stored can be specific, group, local or universal. The destination address of received frames is compared against the data stored in the Specific Address registers once they have been activated. The addresses are deactivated at reset or when their corresponding Specific Address register bottom is written. They are activated when Specific Address register top is written. If a receive frame address matches an active address, the frame is written to the FIFO and on to DMA controller, if used. Frames can be filtered using the type ID field for matching. Four type ID registers exist in the register address space and each can be enabled for matching by writing a one to the MSB (bit [31]) of the respective register. When a frame is received, the matching is implemented as an OR function of the various types of match. The contents of each type ID registers (when enabled) are compared against the length/type ID of the frame being received (e.g., bytes 13 and 14 in non-VLAN and non-SNAP encapsulated frames) and copied to memory if a match is found. The encoded type ID match bits (Word 0, bit [22] and bit [23]) in the receive buffer descriptor status are set indicating which type ID register generated the match, if the receive checksum offload is disabled. The reset state of the type ID registers is zero, hence each is initially disabled. The following example illustrates the use of the address and type ID match registers for a MAC address of 21:43:65:87:A9:CB
Preamble SFD DA (Octet 0 - LSB) DA (Octet 1) DA (Octet 2) DA (Octet 3) DA (Octet 4) DA (Octet 5 - MSB) SA (LSB) SA SA SA SA SA (MSB) Type ID (MSB) Type ID (LSB) 55 D5 21 43 65 87 A9 CB 00* 00* 00* 00* 00* 00* 43 21
www.xilinx.com
436
Note:
The sequence above shows the beginning of an Ethernet frame. Byte order of transmission is from top to bottom as shown. For a successful match to specific address 1, the following address matching registers must be set up: Specific address 1 bottom (Address 0x088 ) Specific address 1 top (Address 0x08C ) 0x87654321 0x0000CBA9
And for a successful match to the type ID, the following type ID match 1 register must be set up: Type ID Match 1 (Address 0x0A8 ) 0x80004321
Broadcast Address
Frames with the broadcast address of 0xFFFFFFFFFFFF are stored to memory only if the 'no broadcast' bit in the Network Configuration register is set to zero.
Hash Addressing
The Hash Address register is 64 bits long and takes up two locations in the memory map. The least significant bits are stored in Hash register bottom and the most significant bits in Hash register top. The unicast hash enable and the multicast hash enable bits in the Network Configuration register enable the reception of hash matched frames. The destination address is reduced to a 6 bit index into the 64 bit hash register using the following hash function. The hash function is an XOR of every sixth bit of the destination address.
hash_index[05] = da[05]^da[11]^da[17]^da[23]^da[29]^da[35]^da[41]^da[47] hash_index[04] = da[04]^da[10]^da[16]^da[22]^da[28]^da[34]^da[40]^da[46] hash_index[03] = da[03]^da[09]^da[15]^da[21]^da[27]^da[33]^da[39]^da[45] hash_index[02] = da[02]^da[08]^da[14]^da[20]^da[26]^da[32]^da[38]^da[44] hash_index[01] = da[01]^da[07]^da[13]^da[19]^da[25]^da[31]^da[37]^da[43] hash_index[00] = da[00]^da[06]^da[12]^da[18]^da[24]^da[30]^da[36]^da[42]
da[0] represents the least significant bit of the first byte received, that is, the multicast/unicast indicator, and da[47] represents the most significant bit of the last byte received. If the hash index points to a bit that is set in the Hash register then the frame is matched according to whether the frame is multicast or unicast. A multicast match is signaled if the multicast hash enable bit is set, da[0] is logic 1 and the hash index points to a bit set in the Hash register. A unicast match is signaled if the unicast hash enable bit is set, da[0] is logic 0 and the hash index points to a bit set in the Hash register. To receive all multicast frames, the Hash register should be set with all ones and the multicast hash enable bit should be set in the Network Configuration register.
www.xilinx.com
437
VLAN Support
An Ethernet encoded 802.1Q VLAN tag is shown in Table 16-1 Table 16-1: VLAN Tag Control Information TCI (Tag Control Information) 16 Bits
First 3 bits priority, then CFI bit, last 12 bits VID
The VLAN tag is inserted at the 13th byte of the frame adding an extra four bytes to the frame. To support these extra four bytes, the Gigabit Ethernet controller can accept frame lengths up to 1,536 bytes by setting bit [8] in the Network Configuration register. If the VID (VLAN identifier) is null ( 0x000 ) a priority-tagged frame is indicated. The following bits in the receive buffer descriptor status word provide information about VLAN tagged frames: Bit [21] set if receive frame is VLAN tagged (i.e. type id of 0x8100 ). Bit [20] set if receive frame is priority tagged (i.e. type id of 0x8100 and null VID). (If bit [20] is set bit [21] is also set). Bits [19], [18] and [17] set to priority if bit [21] is set. Bit [16] set to CFI if bit [21] is set.
The controller can be configured to reject all frames except VLAN tagged frames by setting the discard non-VLAN frames bit in the Network Configuration register.
www.xilinx.com
438
If one of these events occurs, Wake on LAN detection is indicated by asserting the wakeup interrupt. These events can be individually enabled through bits[19:16] of the Wake on LAN register. Also, for Wake on LAN detection to occur receive enable must be set in the Network Control register, however a receive buffer does not have to be available. wakeup interrupt assertion due to ARP request, specific address 1, or multicast filter events occur even if the frame is in error. For magic packet events, the frame must be correctly formed and error free. A magic packet event is detected if all of the following are true: Magic packet events are enabled through bit [16] of the Wake on LAN register The frame's destination address matches specific address 1 The frame is correctly formed with no errors The frame contains at least 6 bytes of 0xFF for synchronization There are 16 repetitions of the contents of Specific Address 1 register immediately following the synchronization
An ARP request event is detected if all of the following are true: ARP request events are enabled through bit [17] of the Wake on LAN register Broadcasts are allowed by bit 5 in the Network Configuration register The frame has a broadcast destination address (bytes 1 to 6) The frame has a typeID field of 0x0806 (bytes 13 and 14) The frame has an ARP operation field of 0x0001 (bytes 21 and 22) The least significant 16 bits of the frame's ARP target protocol address (bytes 41 and 42) match the value programmed in bits[15:0] of the Wake on LAN register
The decoding of the ARP fields adjusts automatically if a VLAN tag is detected within the frame. The reserved value of 0x0000 for the Wake on LAN target address value does not cause an ARP request event, even if matched by the frame. A specific address 1 filter match event occurs if all of the following are true: Specific address 1 events are enabled through bit [18] of the Wake on LAN register The frame's destination address matches the value programmed in the Specific Address 1 registers
A multicast filter match event occurs if all of the following are true: Multicast hash events are enabled through bit [19] of the Wake on LAN register Multicast hash filtering is enabled through bit [6] of the Network Configuration register The frame destination address matches against the multicast hash filter The frame destination address is not a broadcast
www.xilinx.com
439
DMA Controller
The DMA uses separate transmit and receive lists of buffer descriptors, with each descriptor describing a buffer area in memory. This allows Ethernet packets to be broken up and scattered around the AHB memory space. The DMA controller performs four types of operation on the AHB bus. In order of priority these are: Receive buffer manager write/read Transmit buffer manager write/read Receive data DMA write Transmit data DMA read
Transfer size is set to 32-bit words using the AHB bus width select bits in the Network Configuration register, and burst size may be programmed to single access or bursts of 4, 8, or 16 words using the DMA Configuration register.
Rx Buffers
Received frames, optionally including FCS, are written to receive AHB buffers stored in memory. The start location for each receive AHB buffer is stored in memory in a list of receive buffer descriptors
www.xilinx.com
440
at an address location pointed to by the receive-buffer queue pointer. The base address for the receive-buffer queue pointer is configured in software using the Receive Buffer Queue Base Address register. Each list entry consists of two words. The first is the address of the receive AHB buffer and the second the receive status. If the length of a receive frame exceeds the AHB buffer length, the status word for the used buffer is written with zeroes except for the start of frame bit, which is always set for the first buffer in a frame. Bit zero of the address field is written to 1 to show that the buffer has been used. The receive-buffer manager then reads the location of the next receive AHB buffer and fills that with the next part of the received frame data. AHB buffers are filled until the frame is complete and the final buffer descriptor status word contains the complete frame status. Refer to Table 16-2 for details of the receive buffer descriptor list. Each receive AHB buffer start location is a word address. The start of the first AHB buffer in a frame can be offset by up to three bytes depending on the value written to bits [14] and [15] of the Network Configuration register. If the start location of the AHB buffer is offset the available length of the first AHB buffer is reduced by the corresponding number of bytes. Table 16-2: Bit
31:2 1 0 Address of beginning of buffer. Wrap - marks last descriptor in receive buffer descriptor list. Ownership - needs to be zero for the controller to write data to the receive buffer. The controller sets this to 1 once it has successfully written a frame to memory. Software must clear this bit before the buffer can be used again.
Word 1
31 30 29 28 27 26:25 Global all ones broadcast address detected. Multicast hash match. Unicast hash match. External address match. Reserved. Specific address register match. Encoded as follows: 00b : Specific address register 1 match 01b : Specific address register 2 match 10b : Specific address register 3 match 11b : Specific address register 4 match If more than one specific address is matched only one is indicated with priority 4 down to 1. This bit has a different meaning depending on whether RX checksum offloading is enabled. With RX checksum offloading disabled: (bit [24] clear in Network Configuration) Type ID register match found, bit [22] and bit [23] indicate which type ID register causes the match. With RX checksum offloading enabled: (bit [24] set in Network Configuration) 0b: The frame was not SNAP encoded and/or had a VLAN tag with the CFI bit set. 1b: The frame was SNAP encoded and had either no VLAN tag or a VLAN tag with the CFI bit not set.
24
www.xilinx.com
441
This bit has a different meaning depending on whether RX checksum offloading is enabled. With RX checksum offloading disabled: (bit [24] clear in Network Configuration) Type ID register match. Encoded as follows: 00b : Type ID register 1 match 01b : Type ID register 2 match 10b : Type ID register 3 match 11b : Type ID register 4 match If more than one Type ID is matched only one is indicated with priority 4 down to 1. With RX checksum offloading enabled: (bit [24] set in Network Configuration) 00b : Neither the IP header checksum nor the TCP/UDP checksum was checked. 01b : The IP header checksum was checked and was correct. Neither the TCP or UDP checksum was checked. 10b : Both the IP header and TCP checksum were checked and were correct. 11b : Both the IP header and UDP checksum were checked and were correct. VLAN tag detected type ID of 0x8100 . For packets incorporating the stacked VLAN processing feature, this bit is set if the second VLAN tag has a type ID of 0x8100 . Priority tag detected type ID of 0x8100 and null VLAN identifier. For packets incorporating the stacked VLAN processing feature, this bit is set if the second VLAN tag has a type ID of 0x8100 and a null VLAN identifier. VLAN priority only valid if bit [21] is set. Canonical format indicator (CFI) bit only valid if bit 21 is set. End of frame when set the buffer contains the end of a frame. If end of frame is not set, then the only valid status bit is start of frame (bit 14). Start of frame when set the buffer contains the start of a frame. If both bits 15 and 14 are set, the buffer contains a whole frame. This bit has a different meaning depending on whether ignore FCS mode are enabled. This bit is zero if ignore FCS mode is disabled. With ignore FCS mode enabled: (bit [26] set in Network Configuration Register). This indicates per frame FCS status as follows: 0b: Frame had good FCS. 1b: Frame had bad FCS, but was copied to memory as ignore FCS enabled. These bits represent the length of the received frame which might or might not include FCS depending on whether FCS discard mode is enabled. With FCS discard mode disabled: (bit [17] clear in Network Configuration Register) Least significant 12-bits for length of frame including FCS. With FCS discard mode enabled: (bit [17] set in Network Configuration Register) Least significant 12-bits for length of frame excluding FCS.
21 20
19:17 16 15 14 13
12:0
The start location of the receive-buffer descriptor list must be written with the receive-buffer queue base address before reception is enabled (receive enable in the Network Control register). Once reception is enabled, any writes to the Receive-buffer Queue Base Address register are ignored. When read, it returns the current pointer position in the descriptor list, though this is only valid and stable when receive is disabled. If the filter block indicates that a frame should be copied to memory, the receive data DMA operation starts writing data into the receive buffer. If an error occurs, the buffer is recovered.
www.xilinx.com
442
An internal counter represents the receive-buffer queue pointer and it is not visible through the CPU interface. The receive-buffer queue pointer increments by two words after each buffer has been used. It re-initializes to the receive-buffer queue base address if any descriptor has its wrap bit set. As receive AHB buffers are used, the receive AHB buffer manager sets bit zero of the first word of the descriptor to logic one indicating the AHB buffer has been used. Software should search through the used bits in the AHB buffer descriptors to find out how many frames have been received, checking the start of frame and end of frame bits. Received frames are written out to the AHB buffers as soon as enough frame data exists in the packet buffer. This might mean that several full AHB buffers are used before some error conditions can be detected. If a receive error is detected the receive buffer currently being written is recovered. Previous buffers are not recovered. For example, when receiving frames with CRC errors or excessive length, it is possible that a frame fragment might be stored in a sequence of AHB receive buffers. Software can detect this by looking for the start of frame bit set in a buffer following a buffer with no end of frame bit set. For a properly working 10/100/1000 Ethernet system there should be no excessive length frames or frames greater than 128 bytes with CRC errors. Collision fragments are less than 128 bytes long, therefore it is a rare occurrence to find a frame fragment in a receive AHB buffer, when using the default value of 128 bytes for the receive buffers size. Only good received frames are written out of the DMA, so no fragments exist in the AHB buffers due to MAC receiver errors. There is still the possibility of fragments due to DMA errors, for example used bit read on the second buffer of a multi-buffer frame. If bit zero of the receive buffer descriptor is already set when the receive buffer manager reads the location of the receive AHB buffer, then the buffer has been already used and cannot be used again until software has processed the frame and cleared bit zero. In this case, the buffer not available bit in the Receive Status register is set and an interrupt is triggered. The receive resource error statistics register is also incremented. The user can optionally select whether received frames should be automatically discarded when no AHB buffer resource is available. This feature is selected via bit [24] of the DMA Configuration register (by default, the received frames are not automatically discarded). If this feature is off, then received packets remain stored in the packet buffer until an AHB buffer resource next becomes available. This can lead to an eventual packet buffer overflow if packets continue to be received when bit zero (used bit) of the receive-buffer descriptor remains set. Note that after a used bit has been read, the receive-buffer manager re-reads the location of the receive buffer descriptor every time a new packet is received. A receive overrun condition occurs when the receive packet buffer is full, or because hresp was not okay. In all other modes, a receive overrun condition occurs when either the AHB bus was not granted quickly enough, or because hresp was not okay, or because a new frame has been detected by the receive block, but the status update or write back for the previous frame has not yet finished. For a receive overrun condition, the receive overrun interrupt is asserted and the buffer currently being written is recovered. The next frame that is received whose address is recognized reuses the buffer.
www.xilinx.com
443
A write to bit [18] of the Network Control register forces a packet from the receive packet buffer to be flushed. This feature is only acted upon when the RX DMA is not currently writing packet data out to AHB i.e., it is in an IDLE state. If the RX DMA is active, a write to this bit is ignored.
Tx Buffers
Frames to transmit are stored in one or more transmit AHB buffers. It should be noted that zero length AHB buffers are allowed and that the maximum number of buffers permitted for each transmit frame is 128. The start location for each transmit AHB buffer is stored in memory in a list of transmit buffer descriptors at a location pointed to by the transmit-buffer queue pointer. The base address for this queue pointer is set in software using the Transmit-buffer Queue Base Address register. Each list entry consists of two words. The first is the byte address of the transmit buffer and the second containing the transmit control and status. For the packet buffer DMA, the start location for each AHB buffer is a byte address, the bottom bits of the address being used to offset the start of the data from the data-word boundary For the FIFO based DMA, the address of the buffer is also a byte address. Frames can be transmitted with or without automatic CRC generation. If CRC is automatically generated, pad will also be automatically generated to take frames to a minimum length of 64 bytes. When CRC is not automatically generated (as defined in word 1 of the transmit buffer descriptor or through the control bus of the FIFO), the frame is assumed to be at least 64 bytes long and pad is not generated. To transmit frames, the buffer descriptors must be initialized by writing an appropriate byte address to bits [31:0] in the first word of each descriptor list entry. The second word of the transmit-buffer descriptor is initialized with control information that indicates the length of the frame, whether or not the MAC is to append CRC, and whether the buffer is the last buffer in the frame. After transmission the status bits are written back to the second word of the first buffer along with the used bit. Bit [31] is the used bit which must be zero when the control word is read if transmission is to take place. It is written to one when the frame has been transmitted. Bits[29:20] indicate various transmit error conditions. Bit [30] is the wrap-bit which can be set for any buffer within a frame. If no wrap bit is encountered the queue pointer continues to increment. The Transmit-buffer Queue Base Address register can only be updated while transmission is disabled or halted; otherwise any attempted write is ignored. When transmission is halted the transmit-buffer queue pointer maintains its value. Therefore, when transmission is restarted the next descriptor read from the queue is from immediately after the last successfully transmitted frame. While transmit is disabled (bit [3] of the network control is set Low), the transmit-buffer queue pointer resets to point to the address indicated by the Transmit-buffer Queue Base Address register. Note that disabling receive does not have the same effect on the receive-buffer queue pointer. When the transmit queue is initialized, transmit is activated by writing to the transmit start bit (bit [9]) of the Network Control register. Transmit is halted when a buffer descriptor with its used bit set is read, a transmit error occurs, or by writing to the transmit halt bit of the Network Control register. Transmission is suspended if a pause frame is received while the pause enable bit is set in the network configuration register. Rewriting the start bit while transmission is active is allowed. This is implemented with a tx_go variable which is readable in the Transmit Status register at bit location 3.
www.xilinx.com
444
The tx_go variable is reset when: Transmit is disabled A buffer descriptor with its ownership bit set is read Bit [10], tx_halt, of the Network Control register is written There is a transmit error such as too many retries, late collision (gigabit mode only) or a transmit under-run
To set tx_go, write to bit [9], tx_start, of the Network Control register. Transmit halt does not take effect until any ongoing transmit finishes. The entire contents of the frame are read into the transmit packet buffer memory, so the retry attempt is replayed directly from the packet buffer memory rather than having to re-fetch through the AHB. If a used bit is read mid way through transmission of a multi buffer frame this is treated as a transmit error. Transmission stops, tx_er is asserted and the FCS is bad. If transmission stops due to a transmit error or a used bit being read, transmission is restarted from the first buffer descriptor of the frame being transmitted when the transmit start bit is rewritten. Refer to Table 16-3 for details of the transmit buffer descriptor list. Table 16-3:
Bit
Word 0
31:0 Byte address of buffer.
Word 1
31 Used must be zero for the controller to read data to the transmit buffer. The controller sets this to one for the first buffer of a frame once it has been successfully transmitted. Software must clear this bit before the buffer can be used again. Wrap marks last descriptor in transmit buffer descriptor list. This can be set for any buffer within the frame. Retry limit exceeded, transmit error detected. Always set to 0 . Transmit frame corruption due to AHB error set if an error occurs whilst midway through reading transmit frame from the AHB, including HRESP errors and buffers exhausted mid frame (if the buffers run out during transmission of a frame then transmission stops, FCS shall be bad and tx_er asserted). Late collision, transmit error detected. Late collisions only force this status bit to be set in gigabit mode. Reserved.
30 29 28 27
26 25:23
www.xilinx.com
445
Table 16-3:
Bit
22:20
Transmit IP/TCP/UDP checksum generation offload errors: 000b: No Error. 001b: The Packet was identified as a VLAN type, but the header was not fully complete, or had an error in it. 010b: The Packet was identified as a SNAP type, but the header was not fully complete, or had an error in it. 011b: The Packet was not of an IP type, or the IP packet was invalidly short, or the IP was not of type IPv4/IPv6. 100b: The Packet was not identified as VLAN, SNAP or IP. 101b: Non supported packet fragmentation occurred. For IPv4 packets, the IP checksum was generated and inserted. 110b: Packet type detected was not TCP or UDP. TCP/UDP checksum was therefore not generated. For IPv4 packets, the IP checksum was generated and inserted. 111b: A premature end of packet was detected and the TCP/UDP checksum could not be generated.
19:17 16
Reserved.
No CRC to be appended by MAC. When set this implies that the data in the buffers already contains a valid CRC and hence no CRC or padding is to be appended to the current frame by the MAC. This control bit must be set for the first buffer in a frame and is ignored for the subsequent buffers of a frame. Note that this bit must be clear when using the transmit IP/TCP/UDP checksum generation offload, otherwise checksum generation and substitution does not occur. Last buffer, when set this bit indicates that the last buffer in the current frame has been reached. Reserved. Length of buffer.
15 14 13:0
www.xilinx.com
446
Discard packets with error on the receive path before they are partially written out of the DMA thus saving AHB bus bandwidth and driver processing overhead Retry collided transmit frames from the buffer, thus saving AHB bus bandwidth, Implement transmit IP/TCP/UDP checksum generation offload.
With the packet buffers included, the structure of the controller data paths is as shown in Table 16-3.
X-Ref Target - Figure 16-3
MIO or EMIO
MAC Transmitter TX Packet Buffer DPSRAM TX DMA AHB DMA RX DMA RX Packet Buffer DPSRAM
TX GMII
Interconnect
APB
Register Interface
Interconnect
AHB
MIO or EMIO
MDIO
Control Registers
RX Packet Buffer
MIO or EMIO
MAC Receive
RX GMII
Frame Filtering
UG585_c16_03_101812
Figure 16-3:
www.xilinx.com
447
In the transmit direction, the DMA continues to fetch packet data up to a limit of 256 packets, or until the buffer is full. The size of the buffer has a maximum usable size of 4 KB. In the receive direction, if the buffer becomes full, then an overflow occur.s An overflow also occurs if the limit of 256 packets is breached. The size of the external buffer has a maximum usable size of 4 KB.
Tx Packet Buffer
The transmitter packet buffer continues to attempt to fetch frame data from the AHB system memory until the packet buffer itself is full, at which point it attempts to maintain its full level. To accommodate the status and statistics associated with each frame, three words per packet are reserved at the end of the packet data. If the packet was bad and requires to be dropped, the status and statistics are the only information held on that packet. Storing the status in the DPRAM is required to decouple the DMA interface of the buffer from the MAC interface, to update the MAC status/stats, and to generate interrupts in the order in which the packets that they represent were fetched from the AHB memory. If any errors occur on the AHB while reading the transmit frame, the fetching of packet data from AHB memory is halted. The MAC transmitter continues to fetch packet data, thereby emptying the packet buffer and allowing any good non-errored frames to be transmitted successfully. When these have been fully transmitted, the status/stats for the errored frame is updated and software is informed via an interrupt that an AHB error occurred. This way, the error is reported in the correct packet order. The transmit packet buffer only attempts to read more frame data from the AHB when space is available in the packet buffer memory. If space is not available it must wait until the packet fetched by the MAC completes transmission and is subsequently removed from the packet buffer memory. Note that if full store and forward mode is active, and if a single frame is fetched that is too large for the packet buffer memory, the frame is flushed and the DMA is halted with an error status. This is because a complete frame must be written into the packet buffer before transmission can begin, and therefore the minimum packet buffer memory size should be chosen to satisfy the maximum frame to be transmitted in the application. When the complete transmit frame is written into the packet buffer memory, a trigger is sent across to the MAC transmitter, which then begins reading the frame from the packet buffer memory. Because the whole frame is present and stable in the packet buffer memory, an underflow of the transmitter is not possible. The frame is kept in the packet buffer until notification is received from the MAC that the frame data has either been successfully transmitted or can no longer be re-transmitted (too many retries in half duplex mode). When this notification is received the frame is flushed from memory to make room for a new frame to be fetched from AHB system memory. In half duplex mode, the frame is kept in the packet buffer until notification is received from the MAC that the frame data has either been successfully transmitted or can no longer be re-transmitted (too many retries in half duplex mode). When this notification is received the frame is flushed from memory to make room for a new frame to be fetched from AHB system memory. In full duplex mode, the frame is removed from the packet buffer on-the-fly.
www.xilinx.com
448
Other than underflow, the only MAC related errors that can occur are due to collisions during half duplex transmissions. When a collision occurs the frame still exists in the packet buffer memory so it can be retried directly from there. Only when the MAC transmitter has failed to transmit after sixteen attempts is the frame finally flushed from the packet buffer.
Rx Packet Buffer
The receive packet buffer stores frames from the MAC receiver along with their status and statistics. Frames with errors are flushed from the packet buffer memory, good frames are pushed onto the DMA AHB interface. The receiver packet buffer monitors the FIFO writes from the MAC receiver and translates the FIFO pushes into packet buffer writes. At the end of the received frame the status and statistics are buffered so that the information can be used when the frame is read out. When programmed in full store and forward mode, if the frame has an error the frame data is immediately flushed from the packet buffer memory allowing subsequent frames to utilize the freed up space. The status and statistics for bad frames are still used to update the controllers registers.
Note: To accommodate the status and statistics associated with each frame, three words per packet
are reserved at the end of the packet data. If the packet was bad and requires to be dropped, the status and statistics are the only information held on that packet. The receiver packet buffer also detects a full condition such that an overflow condition can be detected. If this occurs, subsequent packets are dropped and an RX overflow interrupt is raised. The DMA only begins packet fetches when the status and statistics for a frame are available. If the frame has a bad status due to a frame error, the status and statistics are passed onto the controllers registers. If the frame has a good status, the information is used to read the frame from the packet buffer memory and burst onto the AHB using the DMA buffer management protocol. After the last frame data has been transferred to the FIFO, the status and statistics are updated to the controllers registers.
www.xilinx.com
449
Rx Checksum Offload
When receive checksum offloading is enabled, the IPv4 header checksum is checked per RFC 791, where the packet meets the following criteria: If present, the VLAN header must be four octets long and the CFI bit must not be set Encapsulation must be RFC 894 Ethernet Type encoding or RFC 1042 SNAP encoding IPv4 packet IP header is of a valid length
The controller also checks the TCP checksum per RFC 793, or the UDP checksum per RFC 768, if the following criteria are met: IPv4 or IPv6 packet Good IP header checksum (if IPv4) No IP fragmentation TCP or UDP packet
When an IP, TCP, or UDP frame is received, the receive buffer descriptor provides an indication if the controller was able to verify the checksums. There is also an indication if the frame had LLC SNAP encapsulation. These indication bits replace the type ID match indication bits when receive checksum offload is enabled. If any of the checksums are verified to be incorrect by the controller, the packet is discarded and the appropriate statistics counter is incremented.
Tx Checksum Offload
The transmitter checksum offload is only available when the full store and forward mode is enabled. This is because the complete frame to be transmitted must be read into the packet buffer memory before the checksum can be calculated and written back into the headers at the beginning of the frame. Transmitter checksum offload is enabled by setting bit [11] in the DMA Configuration register. When enabled, it monitors the frame as it is written into the transmitter packet buffer memory to automatically detect the protocol of the frame. Protocol support is identical to the receiver checksum offload. For transmit checksum generation and substitution to occur, the protocol of the frame must be recognized and the frame must be provided without the FCS field, by ensuring that bit [16] of the transmit descriptor word 1 is clear. If the frame data already had the FCS field, this would be corrupted by the substitution of the new checksum fields. If these conditions are met, the transmit checksum offload engine calculates the IP, TCP, and UDP checksums as appropriate. When the full packet is completely written into packet buffer memory, the checksums are valid and the relevant DPRAM locations are updated for the new checksum fields as per standard IP/TCP and UDP packet structures.
www.xilinx.com
450
If the transmitter checksum engine is prevented from generating the relevant checksums, bits [22:20] of the transmitter DMA writeback status are updated to identify the reason for the error. Note that the frame is still transmitted but without the checksum substitution, as typically the reason that the substitution did not occur was that the protocol was not recognized.
For hardware assist it is necessary to timestamp when sync and delay_req messages are sent and received. The timestamp is taken when the message timestamp point passes the clock timestamp point. The message timestamp point is the SFD and the clock timestamp point is the MII interface. (The 1588 spec refers to sync and delay_req messages as event messages as these require timestamping. Follow up, delay response and management messages do not require timestamping and are referred to as general messages.) 1588 version 2 defines two additional PTP event messages. These are the peer delay request (Pdelay_Req) and peer delay response (Pdelay_Resp) messages. These messages are used to calculate the delay on a link. Nodes at both ends of a link send both types of frames (regardless of whether they contain a master or slave clock). The Pdelay_Resp message contains the time at which a Pdelay_Req was received and is itself an event message. The time at which a Pdelay_Resp message is received is returned in a Pdelay_Resp_Follow_Up message. The controller recognizes four different encapsulations for PTP event messages: 1588 version 1 (UDP/IPv4 multicast) 1588 version 2 (UDP/IPv4 multicast) 1588 version 2 (UDP/IPv6 multicast)
www.xilinx.com
451
www.xilinx.com
452
Event Scheduling
The MAC does not provide event scheduling capability such as generating an interrupt upon the counter reaching a specific value.
FIFO Depth
The timestamp registers are 1-deep, so new events overwrite old values. This requires the software to have a fast enough response time to avoid event overrun.
www.xilinx.com
453
memory address it was read from or written to. It is also possible to capture the entire packet along with its timestamp (for both transmit and receive), and make it available to software, for example via FIFOs or via circular buffers in main memory. Such a function can be implemented in the PL along with the timestamp unit as described above. However, implementation requires access to the packet data stream itself. In order to have access to the packet data stream, the controller needs to be pinned-out through the EMIO using GMII, instead of MIO. By selecting this option, the GMII signals are exposed to the PL and can be used to detect and capture the PTP packets. Note that it is still possible to use the PTP frame recognition in the MAC, or it is possible to design this function in the PL as well (e.g., if support for unicast packets is required).
Destination Address
0x0180C2000001
Type
(MAC Control Frame)
Pause Opcode
0x0001
Pause Time
2 bytes
0x8808
The controller supports both hardware controlled pause of the transmitter upon reception of a pause frame and hardware generated pause frame transmission.
www.xilinx.com
454
Pause frames that have FCS or other errors are treated as invalid and are discarded. 802.3 Pause frames that are received after priority based flow control (PFC) has been negotiated are also discarded. Valid pause frames received increment the Pause Frames Received Statistic register. The Pause Time register decrements every 512 bit times once transmission has stopped. For test purposes, the retry test bit can be set (bit [12] in the Network Configuration register) which causes the Pause Time register to decrement every tx_clk cycle when transmission has stopped. The interrupt (bit [13] in the Interrupt Status register) is asserted whenever the pause time register decrements to zero (assuming it has been enabled by bit [13] in the Interrupt Mask register). This interrupt is also set when a zero quantum pause frame is received.
The pause quantum used in the generated frame depends on the trigger source for the frame as follows: If bit [11] is written with a one, the pause quantum is taken from the Transmit Pause Quantum register. The Transmit Pause Quantum register resets to a value of 0xFFFF giving maximum pause quantum as the default. If bit [12] is written with a one, the pause quantum is zero. If the tx_pause input is toggled, tx_pfc_sel is Low and the tx_pause_zero input is held Low until the next toggle, the pause quantum is taken from the Transmit Pause Quantum register. If the tx_pause input is toggled, tx_pfc_sel is Low and the tx_pause_zero input is held High until the next toggle, the pause quantum is zero.
After transmission, a pause frame transmitted interrupt is generated (bit [14] of the Interrupt Status register) and the only statistics register that is incremented is the Pause Frames Transmitted register.
www.xilinx.com
455
Pause frames can also be transmitted by the MAC using normal frame transmission methods.
Type
(MAC Control Frame)
Pause Times
8 * 2 bytes
0x8808
www.xilinx.com
456
register) which causes the Pause Time register to decrement every rx_clk cycle once transmission has stopped. The interrupt (bit [13] in the Interrupt Status register) is asserted whenever the Pause Time register decrements to zero (assuming it has been enabled by bit [13] in the Interrupt Mask register). This interrupt is also set when a zero quantum pause frame is received.
The Pause Quantum registers used in the generated frame depend on the trigger source for the frame as follows: If bit [17] of the Network Control register is written with a one then the priority enable vector of the priority based pause frame is set equal to the value stored in the Transmit PFC Pause register [7:0]. For each entry equal to zero in the Transmit PFC Pause register[15:8], the pause quantum field of the pause frame associated with that entry is taken from the Transmit Pause Quantum register. For each entry equal to one in the Transmit PFC Pause register[15:8], the pause quantum associated with that entry is zero. The Transmit Pause Quantum register resets to a value of 0xFFFF giving maximum pause quantum as default. If the tx_pause input is toggled and tx_pfc_sel is High then the priority enable vector of the priority based pause frame is set equal to the value in tx_pfc_pause [7:0]. For each entry equal to zero in tx_pfc_pause_zero[7:0], the pause quantum field of the pause frame associated with that entry is taken from the Transmit Pause Quantum register. For each entry equal to one in tx_pfc_pause_zero [7:0], the pause quantum associated with that entry is zero.
www.xilinx.com
457
After transmission, a pause frame transmitted interrupt is generated (bit 14 of the Interrupt Status register) and the only statistics register that is incremented is the Pause Frames Transmitted register. PFC Pause frames can also be transmitted by the MAC using normal frame transmission methods.
www.xilinx.com
458
Note: The speed bit might have to be re-written after PHY auto-negotiation.
d. Enable reception of broadcast or multicast frames . Write a 0 to the gem.net_cfg[no_broadcast] register to enable broadcast frames and write a 1 to the gem.net_cfg[multi_hash_en] register to enable multicast frames. e. f. Enable promiscuous mode . Write a 1 to the gem.net_cfg[copy_all] register. Enable TCP/IP checksum offload feature on receive . Write a 1 to the gem.net_cfg[rx_chksum_offld_en] register. (Refer to section 16.2.6 Checksum Offloading.)
g. Enable Pause frames. Write a 1 to gem.net_cfg[pause_en] register. h. Set the MDC clock divisor. Write the appropriate MDC clock divisor to the gem.net_cfg[mdc_clk_div] register. (Refer to section 16.3.4 Configure the PHY.) 2. Set the MAC address . Write to the gem.spec1_addr1_bot and gem.spec1_addr1_top registers. The least significant 32 bits of the MAC address go to gem.spec1_addr1_bot and the most significant 16 bits go to gem.spec1_addr1_top. Program the DMA Configuration register (gem.dma_cfg). a. Set the receive buffer size to 1,600 bytes . Write a value of 0x19 to the gem.dma_cfg[ahb_mem_rx_buf_size] register.
3.
b. Set the receiver packet buffer memory size to the full configured addressable space of 8 KB . Write 0x3 to the gem.dma_cfg[rx_pktbuf_memsz_sel] register. c. Set the transmitter packet buffer memory size to the full configured addressable space of 4 KB . Write 0x1 to the gem.dma_cfg[tx_pktbuf_memsz_sel] register.
d. Enable TCP/IP checksum generation offload on the transmitter. Write 0x1 to the gem.dma_cfg[csum_gen_offload_en] register. e. f. 4. Configure for Little Endian system . Write 0x0 to the gem.dma_cfg[ahb_endian_swp_pkt_en] register. Configure AHB fixed burst length . Write 0x10 to the gem.dma_cfg[ahb_fixed_burst_len] register to use INCR16 AHB burst for higher performance. Enable MDIO. Write a 1 to the gem.net_ctrl[mgmt_port_en] register. Enable the Receiver. Write a 1 to the gem.net_ctrl[rx_en] register.
Program the Network Control Register (gem.net_ctrl) . a. c. b. Enable the Transmitter. Write a 1 to the gem.net_ctrl[tx_en] register.
www.xilinx.com
459
www.xilinx.com
460
Configure Clocks
The Gigabit Ethernet Controller clocks are controlled through four registers in the SLCR module.
Similar steps must be followed for Controller 1 by writing to the appropriate registers.
Note: MDC is active only during MDIO read or write operations during which the PHY registers are
read or written.
www.xilinx.com
461
The MDC must not exceed 2.5 MHz as defined by the IEEE802.3 standard. The gem.net_cfg[mdc_clk_div] bits are used to set the divisor for the CPU_1x clock. Example : Consider a case with the CPU clock set to 666.667 MHz clock and the available CPU_1x clock is 111.11 MHz. The clock divisor, in this case should be set to 48 ( 0b011 ) in gem.net_cfg[mdc_clk_div] to set the maximum possible frequency of 2.314 MHz for the MDC. PHY configuration and initialization is unique for every system. Refer to the vendor data sheet for more information and PHY register details.
3. 4.
4. 5.
Note: The SLCR register must be updated for clock updates (refer to Configure Clocks, page 461).
www.xilinx.com
462
Rx Buffers
Allocate a number (N) of buffers of X bytes in system memory, where X is the DMA buffer length programmed in the DMA Configuration register. Example : This controller assumes that the maximum size of an Ethernet packet without jumbo frame support can reach up to 1,536 bytes. So allocate N number of buffers each with a size of 1,536 bytes in system memory. The buffers typically need to be aligned to cache-line boundaries to improve performance. Typical values of N can be 64 or 128.
2.
Each buffer descriptor is of 8 bytes length. Hence allocate an area of 8N bytes for the receive buffer descriptor list in system memory. This creates N entries in this list.
Note: A single cache line for the Zynq-7000 AP SoC is 32 bytes and can contain 4 buffer
descriptors. This means flushing or invalidating a single buffer descriptor entry in the cache memory results in flushing or invalidation of a cache line which in turn affects the adjacent buffer descriptors. This can result in undesirable behavior. It is typical to allocate the buffer descriptor list in an un-cached memory region.
3. 4. 5. 6. 7.
Mark all entries in this list as owned by controller. Set bit 0 of word 0 of each buffer descriptor to 0. Mark the last descriptor in the buffer descriptor list with the wrap bit (bit 1 in word 0) set. Write the base address of receive buffer descriptor list to controller register gem.rx_qbar. Fill the addresses of the allocated buffers in the buffer descriptors (bits 31-2, Word 0). Write the base address of this buffer descriptor list to the gem.rx_qbar register.
www.xilinx.com
463
The Transmit Buffer Queue Pointer register (gem.tx_qbar) register points to this data structure. To create this list of buffer descriptors with N entries: 1. Each buffer descriptor is 8 bytes in length. Hence allocate an area of 8N bytes for the transmit buffer descriptor list in system memory which creates N entries in this list. It is advisable to use un-cached memory for allocating the complete buffer descriptor list for the reasons already described for the Receive Buffer Descriptor List. Mark all entries in this list as owned by the controller. Set bit[31] of word 1 to 0 . Mark the last descriptor in the list with the wrap bit. Set bit[30] in word 1 to 1 . Write the base address of transmit buffer descriptor list to Controller register gem.tx_qbar.
2. 3. 4.
Note: In a typical case, a single handler is used for both transmission and reception of packets. Once the control reaches the handler, the software should read the gem.intr_status register to determine the source and perform the relevant function.
2. Enable the necessary interrupt conditions . The relevant bits in the gem.intr_en register must be set. The interrupt conditions necessary are determined by the system architecture.
Note: Read the read-only register gem.intr_mask for current the mask state of each interrupt.
www.xilinx.com
464
2.
Notes:
The FCS field is added by the MAC in most cases. However if there is a need to append a custom FCS, bit 16 in word 1 of the corresponding buffer descriptor must be set. The buffer that contains the Ethernet frame data should be flushed from cache if cached memory is being used.
3.
Allocate buffer descriptor(s) for the Ethernet frame buffers . This involves setting bits 0-31 in the buffer descriptor word 0 with the address of the buffer and setting bits 0-13 in word 1 with the length of the buffer to be transmitted.
Notes:
For single buffer Ethernet frames, bit 15 (Last buffer bit) of the word 1 must also be set. For Ethernet frames scattered across multiple buffers the buffer descriptors must be allocated serially and the buffer descriptor containing the last buffer should have the bit 15 of word 1 set.
Example : For an Ethernet frame of 1,000 bytes split across two buffers with the first buffer containing the Ethernet header (14 bytes) and the next buffer containing the remaining 986 bytes, the buffer descriptor with index N should be allocated for the first buffer and the buffer descriptor with index N+1 should be allocated for the second buffer. Bit 15 of word 1 of the N+1 buffer descriptor must also be set to mark it as the last buffer in the scattered list of Ethernet frames. 4. 5. 6. Clear the used bit (bit 31) in the word 1 of the allocated buffer descriptors . Enable transmission . Write a 1 to gem.net_ctrl[start_tx]. Wait until the transmission is complete . An interrupt is generated by the controller upon successful completion of the transmission. Read and clear the gem.intr_status[tx_complete] bit by writing a 1 to the bit In the interrupt handler. Also read and clear the gem.tx_status register by writing a 1 to gem.tx_status[tx_complete] bit. Clear all bits in the BD except the used and wrap bits.
www.xilinx.com
465
The received frame's type/length field matches one of the four type ID registers. The available type id registers are gem.type_id_match{1:4}. This is applicable for cases where Ethernet type/length field based filtering is required. Unicast or Multicast hash is enabled through gem.net_cfg[uni_hash_en] or gem.net_cfg[multi_hash_en] register bits, then the received frame is accepted only if the hash is matched. The destination address is a broadcast address ( 0xFFFFFFFFFFFF ) and broadcasts are allowed. This option is set using the gem.net_cfg[no_broadcast] register bit. The controller is configured for promiscuous mode with the gem.net_cfg[copy_all] register bit set. A match is found in the external address filtering interface.
The register gem.rx_qbar points to the next entry in the receive buffer descriptor list and the controller uses this as the address in system memory to write the frame. When the frame has been completely received and written to system memory, the controller then updates the receive buffer descriptor entry with the reason for the address match, marks the area as being owned by software, and sets the receive complete interrupt (gem.intr_status[rx_complete] = 1 ). Software is then responsible for copying the data to the application area and releasing the buffer. If the controller is unable to write the data at a rate to match the incoming frame, then the receiver overrun interrupt is set (gem.intr_status[rx_overrun] = 1 ). If there is no receive buffer available, i.e., the next buffer is still owned by software, a receive-buffer not available interrupt is set. If the frame is not successfully received, a Statistic register is incremented and the frame is discarded without informing software.
3.
www.xilinx.com
466
Table 16-6:
Error Condition
Hresp not OK
Receive overrun
Table 16-7:
Error Condition
Hresp not OK
Transmit underrun
Collisions
www.xilinx.com
467
For more information on different types of PTP clocks refer to the IEEE1588-2008 standard specification. Synchronization and management of a PTP system is achieved through the exchange of messages across the network. PTP uses the following message types: Sync, Delay_Req, Follow_up, and Delay_Resp messages are used by ordinary and boundary clocks. They are used to communicate timing information for clock synchronization. Pdelay_Req, Pdelay_Resp, and Pdelay_Resp_Follow_Up are used to measure path delays across the communication medium so that they can be compensated for by the system. These are extensively used by transparent clocks and are available only in PTPv2. Announce messages are used by best master clock algorithm (BMCA) to build a clock hierarchy and select the grandmaster clock. Management messages are used for network monitoring and management. Signaling frames are used for non -time critical communication across clocks.
Refer to IEEE1588-2008 Clause 13 for more information on message types and formats.
www.xilinx.com
468
Each PTP message is identified with a message Type which is a 4 bit field in the PTP message header. Message Types are identified in Table 16-8 Message Types Message Type
0x0 0x1 0x2 0x3 0x8 0x9 0xA 0xB 0xC 0xD
Table 16-8:
Sync Delay_Req PDelay_Req
PTP Frames
The versionPTP field signifies which PTP version is being used PTPv1 or PTPv2. The messageLength field signifies the total length of the PTP message. It is different for different PTP messages. The flag field is used for various purposes and can carry different values for different types of frames. An example of use for this field as a twoStepFlag in Sync and PDelay_Req frames is to distinguish one-step and two-step time stamping. If the sending master clock can perform one-step time stamping, the twoStepFlag carries a value of 0 .
Note: The Zynq-7000 AP SoC supports two-step timestamping the twoStepFlag should always
be 1 . The correctionField is generally significant for transparent clocks. The transparent clocks update the correctionField to specify the slave regarding the exact time the PTP frames took to traverse through the transparent clocks. If transparent clocks are not present in the path of a PTP message, the correctionField can have a zero value. The sequenceId field is extensively used in the PTP messages. The originator of certain PTP frames message Types assigns a sequence ID to the corresponding message through the sequenceId field. The controlField is provided to maintain backward compatibility with PTPv1 based hardware designs. It contains different values for different types of PTP frames. The logMessageInterval field is provided to represent the mean time interval between successive PTP messages.
The steps to develop a simple and typical non-OS standalone example which can be used to synchronize PTP clocks between two Zynq-7000 AP SoC systems are described in the following sections. This information should be used for reference purpose only and is not meant to provide the best possible implementation for accuracy. Please refer to the IEEE1588 standard specification for more information. The IEEE1588 implementation involves the following. 1. Controller initialization
www.xilinx.com
469
2. 3. 4. 1. 2. 3.
Best master clock algorithm (BMCA) PTP packet handling at the master port PTP packet handling at the slave port The following sections do not describe the handling of management and signaling frames because they are not integral to the implementation of the core PTP functionality. The illustrations in these sections do not describe an implementation-specific mechanism to change clock attributes dynamically. The PTP packets processed here are simple Ethernet multicast packets. The scope of the following sections do not include UDP based multicast packets. The explanation refers to non-OS based standalone implementation which does not implement a TCP/IP stack.
Notes:
4.
The following steps are specifically for the PTP functionality: 1. 2. Initialize the seconds and nanoseconds timers . Write appropriate values to the gem.timer_s and gem.timer_ns registers, respectively. Program the timer increment value in the gem.timer_incr register. Example : For a CPU clock that runs at 666.67 MHz and PTP clocked with CPU_1x clock of 111.11 MHz, 1 PTP clock cycle corresponds to 9 ns. The gem.timer_incr[ns_delta] register bit in this case should be set to 9. As another example, consider a CPU_1x clock of 120 MHz, 1 PTP clock cycle corresponds to 8.33 ns. In this case, the counter should increment by 8 ns for 2 clock cycles and 9 ns for 1 clock cycle to average 8.33 ns in 3 clock cycles. For such a setting, register bit gem.timer_incr[ns_delta] is set to 8, gem.timer_incr[alt_ct_ns_delta] is set to 9, and gem.timer_incr[incr_b4_alt] is set to 2. 3. Initialize the common fields of data structures used for various PTP packets . All PTP packets have a common message header.
www.xilinx.com
470
If a PDelay_Req frame is not received for a predefined period of time, or no Pdelay_resp and PDelay_resp_Follow_Up were received for a PDelay_Req packet, then there is a grave error. As part of error handling, the whole PTP state machine can be stopped (for both PTP master and slave) and no clock synchronization done (if it is a slave port). The intervals as mandated by the protocol range from 2-128 to 2127 seconds. The interval is decided by the system specification. Since the same timer is used for Sync, Announce and PDelay_Req frames, the timer expiry duration is decided by the minimum time interval for all these frames. In a typical use case, the Sync frames can be sent out every 125 milliseconds, Announce frames and PDelay_Req frames every 1 second. Similarly, typical Announce frame timeouts can be 2-3 seconds and PDelay_Req, PDelay_Resp , PDelay_Resp_Follow_up timeouts can be 3-5 seconds.
Refer to the IEEE 1588 Standard Specification for more information on clock attributes and BMCA. In a typical implementation, each clock port can be identified with a structure which has fields for the above clock properties. Other than these properties, the BMCA clock port can also be identified with the steps removed field. For more information regarding this field refer to the IEEE1588 specifications. When a slave receives Announce frames from multiple master hosts, the steps removed field can become significant in deciding the master clock. The implementation should maintain an identical structure to identify the current grandmaster clock properties. The BMCA is invoked when an Announce frame is received by the slave.
www.xilinx.com
471
Example: BMCA
1. 2. Compare the fields of the Announce frame received with that of the current grandmaster starting with Priority1, progressing to the next field in the event of a tie. The one with a higher priority becomes the new grandmaster.
2.
3.
Note: The clock time stamp point for the AP SoCs GigE is the MII interface. Since the Sync frame
travels through the external PHY after this time stamp point, the hardware observed time stamp does not take care of the delay introduced by the external PHY. Users should determine the typical external PHY latencies for their systems and add the same to the preciseOriginTimestamp field.
4.
Form and send Announce frames at regular intervals . The Announce frame should be set with the clock attributes for the PTP master clock. The Announce frame is transmitted and since it is not an event message, it is not time stamped by the hardware. Send PDelay_Req frames at regular intervals . The master, acting as a peer for the PDelay measurement state machine must send PDelay_Req frames at regular intervals. The sequenceId field is assigned with a value of 1 greater than the last sent PDelay_Req frame. The field originTimestamp can typically be filled up with a zero value along with the reserved field. Read and store the exact time stamp for the transmitted PDelay_Req frame . The controller generates an interrupt on successful transmission of the PDelay_Req frame. The registers gem.ptp_peer_tx_s and gem.ptp_peer_tx_ns are read and stored to represent the time stamp of the transmitted PDelay_Req frame in the interrupt handler. Let this time stamp be t1.
5.
6.
Note: Since the clock time stamp point is the MII interface and the PDelay_Req frame travels
through the external PHY after this point, the exact time stamp should be created by adding the introduced delays by the external PHY. Store the time stamp for the received PDelay_Resp frame . The Master receives a PDelay_Resp frame from the peer clock. The controller generates a PDelay_Resp received interrupt. The master reads the registers gem.ptp_peer_rx_s and gem.ptp_peer_rx_ns registers and stores them as the received timestamp for the PDelay_Resp frame. Let this timestamp be t4.
7.
www.xilinx.com
472
Note: Since the PTP message first travels through the external PHY before being time stamped
at the MII interface by the hardware, for calculating the exact time stamp for the received packet, the delay introduced by the external PHY must be subtracted from the hardware reported time stamp to reach at the exact time stamp.
8.
Read the time stamp for the PDelay_Req frame received at the slave (peer). The master validates the received PDelay_Resp for correct sequenceId which should be the same as that for the PDelay_Req frame sent by the master. Similarly the master validates the PTP message body field requestingPortIdentity for the correct value which should be same as the sourcePortIdentity of the master. The master reads the PTP message body field requestReceiptTimestamp and stores it. This is the timestamp when the slave (peer) received the PDelay_Req packet. Let this time stamp be t2. Process the received PDelay_Resp_Follow_Up frame. The Master receives a PDelay_Resp_Follow_Up frame from the slave (peer) clock port. This is a general PTP message and hence no PTP event interrupt is generated. The master validates for sequenceId and requestingPortIdentity fields as described above. The master reads the PTP message body field responseOriginTimestamp to get the exact timestamp when the last received PDelay_Resp message was transmitted from the slave (peer). Let the time stamp be t3.
9.
10. Calculate the peer delay. The master calculates the peer delay as (t4-t1) - (t3-t2). The calculated peer delay is not used by the master; however every node on a PTP network should maintain peer delays with other PTP peers on the network.
X-Ref Target - Figure 16-5
Port-1 Time
Port-2 Time
t1 tms
Pdelay_Req
t2
tsm T4
Pdelay_Resp
t3
Pdelay_Resp_Follow_Up
UG585_c16_08_100512
Figure 16-5:
www.xilinx.com
473
Note: When the slave sends timestamps, the delays introduced by the external PHY at the slave
clock port should be taken care of. 2. Read and store timestamp for the received Sync frame . The controller generates an interrupt for PTP Sync frame received. The slave reads the gem.ptp_rx_s and gem.ptp_rx_ns registers and stores them. Let this time stamp be t5. Process the Follow_Up frame received . The controller does not generate a PTP event interrupt for a received Follow_Up frame. The Slave does a validation for the sequenceId field which should match with that for the previously received Sync frame. The slave extracts the preciseOriginTimestamp field from the Follow_up frame and stores it. This is the time at which the Sync frame left the master. The slave then adds the peer delay calculated in step (1) with this time to take care of the path delay of the PTP frame from master to slave. Let this time be t6. Calculate the final clock offset . This is the difference between t6 and t5 and is typically represented in nanoseconds. Adjust the PTP clock . The slave adjusts the PTP clock by writing to the gem.ptp_adjust register. If t6 is greater than t5, the gem.ptp_adjust[add_subn] is written as 0 , otherwise it is written as 1 . The actual nanosecond difference is written in the gem.ptp_adjust[ns_delta] register bits. Become the master in the event of a Sync or Announce timeout .
3.
4. 5.
6.
www.xilinx.com
474
Table 16-9:
Function
Description
Network control, configuration and status. Rx, Tx Pause clocks. IPG stretch.
MAC Configuration
DMA Unit
Control. Receive, Transmit Status. Receive, Transmit Queue Base Address Control.
Interrupts
phy_maint hash_{top,bot} spec_addr{1:4}_{bot,top} spec_addr1_mask_{bot,top} type_id_match{1:4} timer_{s,ns} timer_{adjust,incr} timer_strobe_{s,ns} ptp_tx_{s,ns} ptp_peer_tx_{s,ns} ptp_rx_{s,ns} ptp_peer_rx_{s,ns} slcr.GEM{1,0}_CLK_CTRL slcr.GEM{1,0}_RCLK_CTRL slcr.GEM{1,0}_CPU_1XCLKACT slcr.GEM_RST_CTRL slcr.MIO_PIN_{xxx}
PHY maintenance Hash address, Specific {4:1} addresses High/Low. Match Type.
IEEE 1588 second, nanosecond counter and adjustment, increment. IEEE 1588 Tx normal/peer second, nanosecond counter. IEEE 1588 Rx normal/peer second, nanosecond counter. Refer to Chapter 25, Clocks and Chapter 26, Reset System for more information. Refer to IOP Interface Connections, page 47 for MIO pin programming information.
www.xilinx.com
475
software to generate network management statistics compatible with IEEE 802.3. (See Table 16-10). Table 16-10: Ethernet Status and Statistics Register Overview Hardware Register Name
frames_tx broadcast_frames_tx multi_frames_tx frames_64b_tx frames_65to127b_tx frames_128to255b_tx frames_256to511b_tx frames_512to1023b_tx frames_1024to1518b_tx octets_tx_{top,bot} deferred_tx_frames pause_frames_tx tx_under_runs Frame Tx Statistics for Half Duplex Transmission {multi,single}_collisn_frames excessive_collisns late_collisns carrier_sense_errs frames_rx bdcast_fames_rx multi_frames_rx frames_64b_rx frames_65to127b_rx frames_128to255b_rx frames_256to511b_rx frames_512to1023b_rx frames_1024to1518b_rx Frame Rx Statistics {undersz,oversz,jab}_rx fcs_errors length_field_errors octets_rx_{top,bot} rx_symbol_errors align_errors rx_resource_errors rx_overrun_errors Frame Rx Checksum Error Statistics ip_hdr_csum_errors tcp_csum_errors udp_csum_errors Octets received High/Low, Under-run error count.
Function
Description
Error-free Tx frame, pause frame counts and bytes counts.
Frame Tx Statistics
Octets transmitted.
Single/multiple frame, excessive/late collisions, deferred Tx frames, Tx carrier sense error counters.
Undersize, oversize and jabber frames. Frame sequence, length, symbol, alignment error counters.
www.xilinx.com
476
RGMII
GMII Tx
(MIO)
MAC
GMII / MII
GMII Rx (EMIO)
Ethernet Controller
slcr.GEM{1:0}_RCLK_CTRL[SRC_SEL]
UG585_c16_05_013013
Figure 16-6:
www.xilinx.com
477
Ethernet Controller
MD
MIO Multiplexer
ENET_RGMII_RXD[3:0] ENET_RGMII_RX_CTL
MDI 2 P/N
RJ-45 Conn.
Figure 16-7:
All Ethernet I/O pins routed through the MIO are on MIO Bank 1 (see Table 16-11).The MIO pins and restrictions based on device version are shown in the MIO table in section 2.5.4 MIO-at-a-Glance Table. Table 16-11: Ethernet RGMII Interface Signals via MIO Pins Controller Signal Signal Description
Tx clock to PHY Tx control to PHY Tx data 0 to PHY Tx data 1 to PHY Tx data 2 to PHY Tx data 3 to PHY Rx clock from PHY Rx control from PHY Rx data 0 from PHY Rx data 1 from PHY
GigE 1
28 33 29 30 31 32 34 39 35 36
Name
RGMII_TX_CLK RGMII_TX_CTL RGMII_TX_D0 RGMII_TX_D1 RGMII_TX_D2 RGMII_TX_D3 RGMII_RX_CLK RGMII_RX_CTL RGMII_RX_D0 RGMII_RX_D1
I/O
O O O O O O I I I I
0 0 0 0
www.xilinx.com
478
Table 16-11:
Ethernet RGMII Interface Signals via MIO Pins (Contd) Controller Signal MIO Pins GigE 0
25 26
Signal Description
Rx data 2 from PHY Rx data 3 from PHY
GigE 1
37 38
Name
RGMII_RX_D2 RGMII_RX_D3
I/O
I I
PS
PL
GMII: Tx Signals GMII: Rx Signals
2.5 or 25 MHz Clock 125 MHz Clock
Without Tx Clock
MAC
TX clock
EMIOENETxGMIITXCLK
0
Tx Clock
Ethernet
PHY
Auto-negotiated Speed Detection Logic
MDIO MDC
EMIOENETxMDIO{I, O, TN}
MDIO
EMIOENETxMDIOMDC
MDIO
GIC
IRQF2Px
INTERRUPT
UG585_c16_07_100212
Interface Signal
Carrier sense Collision detect Controller Interrupt input
I/O
I I I
Tx Signals
Tx Clock Tx Data (7:0) ~ Tx Clk ~ EMIOENET[1,0]GMIITXCLK EMIOENET[1,0]GMIITXD[7:0] I O
www.xilinx.com
479
Table 16-12:
Ethernet GMII/MII Interface Signals via EMIO Interface (Contd) Reference Clock
Tx Clk Tx Clk
Interface Signal
Tx Enable Tx Error
I/O
O O
Tx Timestamp Signals
Tx Start-of-Frame Tx PTP delay req frame detected Tx PTP peer delay frame detect Tx PTP pear delay response frame detected Tx PTP sync frame detected Tx Clk Tx Clk Tx Clk Tx Clk Tx Clk ~ ~ ~ ~ ~ EMIOENET[1,0]SOFTX EMIOENET[1,0]PTPDELAYREQTX EMIOENET[1,0]PTPPDELAYREQTX EMIOENET[1,0]PTPPDELAYRESPTX EMIOENET[1,0]PTPSYNCFRAMETX O O O O O
Rx Signals
Rx Clock Rx Data (7:0) Rx Data valid Rx Error ~ Rx Clk Rx Clk Rx Clk EMIOENET[1,0]GMIIRXCLK EMIOENET[1,0]GMIIRXD[7:0] EMIOENET[1,0]GMIIRXDV EMIOENET[1,0]GMIIRXER I I I I
Rx Timestamp Signals
Rx Start of Frame Rx PTP delay req frame detected Rx PTP peer delay frame detected Rx PTP peer delay response frame detected Rx PTP sync frame detected Notes:
1. If using MII connect the RX[7:4] bits to logic zero.
~ ~ ~ ~ ~
O O O O O
MDIO Interface
MD clock output MD data output MD data 3-state MD data input
I/O
O O O I
www.xilinx.com
480
www.xilinx.com
481
Chapter 17
SPI Controller
17.1 Introduction
The SPI bus controller enables communications with a variety of peripherals such as memories, temperature sensors, pressure sensors, analog converters, real-time clocks, displays, and any SD card with serial mode support. The SPI controller can function in master mode, slave mode or multi-master mode. The Zynq-7000 devices include two SPI controllers. The controller is based on the Cadence SPI core. In master mode, the controller drives the serial clock and slave selects with an option to support SPIs multi-master mode. The serial clock is derived from the PS clock subsystem. The controller initiates messages using up to 3 individual slave select (SS) output signals that can be externally expanded. The controller reads and writes to slave devices by writing bytes to the 32-bit read/write data port register. In multi-master mode, the controller three-states its output signals when the controller is not active and can detect contention errors when enabled. The outputs are three-stated immediately by resetting the SPI enable bit. An Interrupt Status register indicates a mode fault. In slave mode, the controller receives the serial clock from the external device and uses the SPI_Ref_Clk to synchronize data capture. The slave mode includes a programmable start detection mechanism when the controller is enabled while the SS is asserted. The read and write FIFOs provide buffering between the SPI I/O interface and the software servicing the controller via the APB slave interface. The FIFO are used for both slave and master I/O modes. This chapter is organized into the following sections: 17.1 Introduction 17.2 Functional Description 17.3 Programming Guide 17.4 System Functions 17.5 I/O Interfaces
www.xilinx.com
482
17.1.1 Features
Each SPI controller is configured and controlled independently, They include the following features: Four wire bus MOSI, MISO, SCLK, and SS
Full-duplex operation offers simultaneous receive and transmit 32-bit register programming via APB slave interface Memory mapped read/write data ports for Rx/Tx FIFOs (byte-wide)
128-byte read and 128-byte write FIFOs Programmable FIFO thresholds status and interrupts Manual and auto start transmission of data Manual and auto slave select (SS) mode Slave select signals can be connected directly to slave devices or expanded externally Programmable SS and MOSI delays Programmable start detection mode Drives I/O buffers into 3-state if controller is not enabled Generates a Mode Failure interrupt when another master is detected 25 MHz SCLK when the I/O signals are routed via the EMIO interface to the PL pins
50 MHz SCLK clock frequency when I/O signals are routed to the MIO pins
Programmable clock phase and polarity (CPHA, CPOL) Programmable interrupt-driven device or poll status
www.xilinx.com
483
Device Boundary
Interconnect
APB
MIO Pins
Control Registers
EMIO Signals
PL
UG585_c17_01_030212
Figure 17-1:
Clocking
The PS clock subsystem provides a reference clock to the SPI controller. The SPI_Ref_Clk clock is used for the controller logic and by the baud rate generator to create the SCLK clock for master mode.
MIO-EMIO
The SPI I/O signals can be routed to the MIO pins or the EMIO interface to the PL, as explained in 17.5 I/O Interfaces. The general routing of signals is explained in Chapter 2, Signals, Interfaces, and Pins.
www.xilinx.com
484
MO TxFIFO Transmit SO SS[2:0] SPI Master APB Interface SPI CTRL SPI Slave SCLK SCLK
APB
SS
RxFIFO
Interrupts
Receive
Slave Sync
SI MI
Interrupts
UG585_c17_02_072512
Figure 17-2:
www.xilinx.com
485
Tx and Rx FIFOs
Each FIFO is 128 bytes. Software reads and writes these FIFOs using the register mapped data port registers. FIFO management for master mode is described in 17.3.3 Master Mode Data Transfer and for slave mode in 17.3.4 Slave Mode Data Transfer. The FIFOs bridge two clock domains; APB interface and the controllers SPI_Ref_Clk. Software writes to the TxFIFO in the APB clock domain and the controller reads the TxFIFO in the SPI_Ref_Clk domain. The controller fills the RxFIFO in the SPI_Ref_Clk domain and software reads the RxFIFO in the APB clock domain.
17.1.4 Notices
7z010 CLG225 Device
The 7z010 CLG225 device supports 32 MIO pins (not 54). This is shown in the MIO table in section 2.5.4 MIO-at-a-Glance Table. The 7z010 CLG225 device restricts the available MIO pins so connections through the EMIO should be considered. All of the 7z010 CLKG225 device restrictions are listed in section 1.1.3 Notices.
www.xilinx.com
486
Data Transfer
The SCLK clock and MOSI signals are under control of the master. Data to be transmitted is written into the TxFIFO by software using register writes and then unloaded for transmission by the controller hardware in a manual or automatic start sequence. Data is driven onto the master output (MOSI) data pin. Transmission is continuous while there is data in the TxFIFO. Data is received serially on the MISO data pin and is loaded 8 bits at a time into the RxFIFO. Software reads the RxFIFO using register reads. For every n bytes written to the TxFIFO, there will be n bytes stored in RxFIFO that must be read by software before starting the next transfer.
Operation
Software controls the slave select and must issue the start command to serialize data. Software controls the slave select, but the controller hardware automatically starts to serialize data when there is data in the TxFIFO.
www.xilinx.com
487
Table 17-1:
SPI Master Mode SS and Start Modes (Contd) Data Transfer Start Control
Manual Start Auto Start
Operation
Controller hardware controls the slave select, but the software must issue the start command to serialize data in the TxFIFO. Controller hardware controls the slave select and serializes data when there is data in the TxFIFO.
Auto SS (controller)
Manual SS
Software selects the manual slave select method by setting the spi.Config_reg0 [Manual_CS] bit = 1 . In this mode, software must explicitly control the slave select assertion/de-assertion. When the [Manual_CS] bit = 0 , the controller hardware automatically asserts the slave select during a data transfer.
Automatic SS
The SPI controller asserts/de-asserts the slave select for each transfer of TxFIFO content on to the MOSI signal. Software writes data to the TxFIFO and the controller asserts the slave select automatically, transmits the data in the TxFIFO and then de-asserts the slave select. The slave select gets de-asserted after all the data in the Tx FIFO is transmitted. This is the end of the transfer. Software ensures the following in automatic slave select mode. Software continuously fills the TxFIFO with the data bytes to be transmitted, without the TxFIFO becoming empty, to maintain an asserted slave select. Software continuously reads data bytes received in the RxFIFO to avoid overflow.
Software uses the TxFIFO and RxFIFO threshold levels to avoid FIFO under- and over-flows. The TxFIFO empty condition is flagged when the number of bytes in TxFIFO is less than the TxFIFO threshold level. The RxFIFO full condition is flagged when the number of bytes in RxFIFO is more than the RxFIFO threshold level.
Manual Start
Enable
Software selects the manual transfer method by setting the spi.Config_reg0 [Man_start_en] bit = 1 . In this mode, software must explicitly start the data transfer using manual start command mechanism. When the [Man_start_en] bit = 0 , the controller hardware automatically starts the data transfer when there is data available in the TxFIFO.
Command
Software starts a manual transfer by writing a 1 to the spi.Config_reg0 [Man_start_com] bit. When the software writes the 1 , the controller hardware starts the data transfer and transfers all the data
www.xilinx.com
488
bytes present in the TxFIFO. The [Man_start_com] bit is self-clearing. Writing a 1 to this bit is ignored if [Man_start_en] = 0 . Writing a 0 to [Man_start_com] has no effect, regardless of mode.
Clocking
The slave select input pin must be driven synchronously to the SCLK input. The controller operates in the SPI_Ref_Clk clock domain. The input signals are synchronized and analyzed in the SPI_Ref_Clk domain.
Word Detection
The start of a word is detected in th SPI_Ref_Clk clock domain. Detection when Controller is enabled: If the controller is enabled (from a disabled state) at a time when SS is Low (active), the controller will ignore the data and wait for the SCLK to be inactive (a word boundary) before capturing data. The controller counts SCLK inactivity in the SPI_Ref_Clk domain. A new word is assumed when the SCLK idle count reaches the value programmed into the [Slave_Idle_coun] bit field.
www.xilinx.com
489
Detection when SS asserts: With the controller enabled and SS is detected High (inactive), the controller will assume the start of the word occurs on the next active edge of SCLK after SS transitions Low (active).
Note: The start condition must be held active for at least four SPI_Ref_Clk cycles to be detected.
If slave mode is enabled at a time when the external master is very close to starting a data transfer, there is a small probability that false synchronization will occur, causing packet corruption. This issue can be avoided by any of the following means: Ensure that the external master does not initiate data transfer until at least ten SPI_Ref_Clk cycles have passed after slave mode has been enabled. Ensure that slave mode is enabled before the external master is enabled. Ensure that the slave select input signal is not active when the slave is enabled.
17.2.4 FIFOs
The Rx and Tx FIFOs are each 128 bytes deep.
RxFIFO
If the controller attempts to push data into a full RxFIFO then the content is lost and the sticky overflow flag is set. No data is added to a full RxFIFO. Software writes a 1 to the bit to clear the [RX_OVERFLOW] bit.
TxFIFO
If software attempts to write data into a full TxFIFO then the write is ignored. No data is added to a full TxFIFO. The [TX_FIFO_full] bit is asserted until the TxFIFO is read and the TxFIFO is no longer full. If the TxFIFO overflows, the sticky [RX_OVERFLOW] bit is set = 1.
www.xilinx.com
490
Full Interrupt
[RX_FIFO_full]
TxFIFO Threshold
spi.TX_thres_reg0
Not Full = 1
RxFIFO Threshold
spi.RX_thres_reg0
Underflow Interrupt
[TX_FIFO_underflow]
UG585_c17_03_022613
Figure 17-3:
Interrupts:
spi.Intrpt_status_reg0
Bit 6: [TX_FIFO_underflow] (sticky) Bit 5: [RX_FIFO_full] Bit 4: [RX_FIFO_not_empty] Bit 3: [TX_FIFO_full] Bit 2: [TX_FIFO_not_full] Bit 1: [MODE_FAIL] (sticky) Bit 0: [RX_OVERFLOW] (sticky)
spi.Intrpt_mask_reg0
0: masked 1: enabled
Figure 17-4:
www.xilinx.com
491
6.
Master Mode operation select: Manual/Auto start and SS, refer to section 17.3.3 Master Mode Data Transfer. Slave Mode operation, refer to section 17.3.4 Slave Mode Data Transfer.
www.xilinx.com
492
Set Mode fail generation, [Modefail_gen_en], for multi-master mode systems. Set SS to 0b1111 to de-assert all the slave selects before the start of transfers.
d. Set clock phase, [CLK_PH] and Polarity, [CLK_POL] to 1 . These parameters are discussed in section 17.5.1 Protocol. e. f. Select Master mode: [MODE_SEL] = 1 . Look for bus collisions: [Modefail_gen_en] = 1 .
Enable the interrupts: Write 0x27 to spi.Intrpt_en_reg to enableRxFIFO full, RxFIFO overflow, TXFIFO empty, and fault conditions. Start the data transfer: Set spi.Config_reg0 [Man_start_com] = 1 . Wait for interrupts.
www.xilinx.com
493
9.
Interrupt handler: Transfer any additional data to the slave the required data to SPI slave using the interrupt handler.
10. Disable interrupts: Write 0x27 to the spi.Intrpt_dis_reg to disable RxFIFO full, RxFIFO overlflow, TxFIFO empty, and fault conditions. 11. Disable the controller: Set spi.En_reg0 [SPI_EN] = 0 . 12. De-assert slave select: Set spi.Config_reg0 [CS] = 1111 .
Enable the interrupts: Write 0x27 to spi.Intrpt_en_reg to enable RxFIFO full, RxFIFO overflow, TxFIFO empty, and fault conditions. Wait for interrupts. Interrupt handler: Transfer any additional data to the slave the required data to SPI slave using the interrupt handler. Disable interrupts: Write 0x27 to the spi.Intrpt_dis_reg to disable RxFIFO full, RxFIFO overlflow, TxFIFO empty and fault conditions. Disable the controller: Set spi.En_reg0 [SPI_EN] = 0.
Set the FIFO threshold levels: Set spi.TX_thres_reg0 and spi.RX_thres_reg0 threshold levels. Refer to the description at automatic mode of operation section.
www.xilinx.com
494
6. 7. 8. 9.
Enable the interrupts: Write 0x27 to spi.Intrpt_en_reg to enable RxFIFO full, RxFIFO overflow, TxFIFO empty, and fault conditions. Start the data transfer: Set spi.Config_reg0 [Man_start_com] = 1 . Interrupt handler: Transfer any additional data to the slave the required data to SPI slave using the interrupt handler. Disable interrupts: Write 0x27 to the spi.Intrpt_dis_reg to disable RxFIFO full, RxFIFO overlflow, TxFIFO empty, and fault conditions.
10. Disable the controller: Set spi.En_reg0 [SPI_EN] = 0 . 11. De-assert slave select: Set spi.Config_reg0 [CS] = 1111 .
www.xilinx.com
495
a. 6.
Read data from the spi.Rx_Data_reg register. Continue to receive bytes using the data byte counter. Write data to the spi.Tx_Data_reg0 register. Increment the data byte counter after each byte is pushed.
Fill the TxFIFO: More data can be written to the TxFIFO, if needed: a. c. b. Continue to fill data until FIFO depth is reached or there is no further data.
7. 8. 9.
Check for overflow or underflow: Read the [TX_FIFO_underflow] or [RX_OVERFLOW] status bits. Handle the overflow and underflow conditions accordingly. Enable the interrupts: If more data need to be transmitted or received, set spi.Intrpt_en_reg0 [TX_FIFO_not_full] and [RX_FIFO_full] both = 1 . If there is data to be transferred (Sent/Received), then start the data transfer:
When in master mode, and data transfer is done using manual start (for both manual/auto SS), set spi.Config_reg [Man_start_en] = 1 .
Type
Controller Configuration Controller enable
Description
www.xilinx.com
496
17.4.1 Resets
The controller has two reset domains: the APB interface and the controller itself. They can be controlled together or independently. The effects for each reset type are summarized in Table 17-3. Table 17-3: SPI Reset Effects Name
ABP Interface Reset slcr.SPI_RST_CTRL [SPIx_CPU1X_RST] PS Reset Subsystem slcr.SPI_RST_CTRL [SPIx_REF_RST]
APB Interface
Yes No
Protocol Engine
No Yes
Registers
Yes No
17.4.2 Clocks
The core of each SPI controller is driven by the same reference clock (SPI_Ref_Clk) that is generated by the PS clock subsystem, Chapter 25, Clocks. The APB interface is clocked by the CPU_1x clock. The CPU_1x clock runs asynchronous to the reference clock. The operating frequency specifications for the controller clocks are defined in the data sheet. The I/O signals are clocked synchronously by the SCLK.
CPU_1x
The CPU_1x clock part of the CPU clock domain, refer section 25.2 CPU Clock.
SPI_Ref_Clk
The clock enable, PLL select and divisor settings are programmed using the slcr.SPI_CLK_CTRL register as described in section 25.6.3 SDIO, SMC, SPI, Quad-SPI and UART Clocks. Frequency Restriction Note: The SPI_Ref_Clk must be always be set to a higher frequency than the CPU_1x clock frequency.
www.xilinx.com
497
17.5.1 Protocol
Master Mode
The controller supports various I/O signaling relationships for master mode. There are four combinations for setting the phase and polarity control bits, spi.Config_reg0 [CLK_PH] and [CLK_POL]. These parameters affect the active edge of the serial clock, the assertion of the slave select and the idle state of the SCLK. The clock phase parameter defines the state of the SS between words and the state of SCLK when the controller is not transmitting bits. The phase and polarity parameters are summarized in Table 17-4 and illustrated in Figure 17-2.
www.xilinx.com
498
Table 17-4:
CLK_PH = 1 CLK_POL = 0
positive negative inactive inactive
CLK_POL = 1
negative positive
Driving Edge Sampling Edge SS State between Words SCLK State outside of Word
negative positive
CLK_PH = 0
SS Activity: The master automatically drives the SS outputs inactive (High) for a the time programmed into the spi.Delay_reg0 [d_nss] bit field: Time = (1 + [d_nss]) * SPI_Ref_Clk clock period. The minimum time is 2 SPI_Ref_Clk clock periods. Delay between Words: The delay between the last bit period of the current word and the first bit period on the next word: Time = (2 + [d_btwn]) * SPI_Ref_Clk clock period. The minimum time is 3 SPI_Ref_Clk clock periods. This delay enables the TxFIFO to be unloaded and ready for the next parallel-to-serial conversion and to toggle slave select inactive High.
CLK_PH = 1
SS Activity: The SS output signals are not driven inactive between words. Delay between Words: The minimum delay between the last bit period of the current word and the first bit period on the next word is, by default, one SPI_Ref_Clk cycles (configurable by the spi.Delay_reg0 register). This allows the TxFIFO to be unloaded and ready for the next parallel-to serial-conversion.
www.xilinx.com
499
CLK_PH = 0
SCLK SS
MOSI MISO
0 0
1 1
2 2
3 3
4 4
5 5
6 6
7 7
CLK_PH = 1
SCLK SS MOSI MISO
Figure 17-5:
0 0 1 1 2 2 3 3 4 4 5 5 6 6 7 7
UG585_c17_05_022613
www.xilinx.com
500
CLK_PH = 0
MOSI MISO SS
Word 0 Word 1 Word 2 Word 3
CLK_PH = 1
MOSI MISO SS
UG585_c17_06_022613
Word 0
Word 1
Word 2
Word 3
Figure 17-6:
www.xilinx.com
501
2.
Configure MIO pins 17 for MISO input. Write 0x0000_02A0 to each of the slcr.MIO_PIN_17 register. a. c. e. f. Route SPI 0 MISO to pin 17. LVCMOS18: [IO_TYPE] = 001 . Disable internal pull-up resistor. Disable HSTL receiver. b. Disable output. [TRI_ENABLE] = 1. d. Slow CMOS drive edge.
3.
Configure MIO pin 18, 19 and/or 20 for Slave Select outputs . Write 0x0000_32A0 to the slcr.MIO_PIN_18, 19 and/or 20 registers. The internal pull-up is enabled. a. Route SPI 0 slave selects signal(s) to pins 18, 19 and/or 20. Any and all of the slave selects can be activated for master mode. In slave mode, SS 0 must be used. LVCMOS18: [IO_TYPE] = 001 . Enable internal pull-up resistor. Disable HSTL receiver. Route SPI 0 MOSI to pin 21. LVCMOS18: [IO_TYPE] = 001 . Disable internal pull-up resistor. Disable HSTL receiver.
Configure MIO pins 21 for MOSI . Write 0x0000_22A0 to each of the slcr.MIO_PIN_21 register: b. 3-state controlled by SPI [TRI_ENABLE] = 0 . d. Slow CMOS drive edge.
The I/O signals of the two SPI controllers in the PS can be connected together as described in section 17.2.7 SPI-to-SPI Connection.
www.xilinx.com
502
Zynq-7000 AP SoC
MIO
SCLK MOSI
External Devices
Slave 0
MISO SS 0
Connect up to 3 slave devices (directly). For one slave device, connect it to any of the slave selects.
Slave 1
SS 1
Slave 2
SS 2
Device Boundary
UG585_c17_07_022613
Figure 17-7:
www.xilinx.com
503
SCLK
PS IOP
MOSI
EMIO SPI x SI EMIO SPI x MI EMIO SPI x SOTN EMIO SPI x SO EMIO SPI x SSNTN EMIO SPI x SSON 0 EMIO SPI x SSON 1 EMIO SPI x SSON 2 EMIO SPI x SSIN Device Boundary
UG585_c17_08_022613
MISO
nc nc
SS 0 SS 1 SS 2
Figure 17-8:
www.xilinx.com
504
Figure 17-9:
www.xilinx.com
505
Table 17-5:
Master Mode SS 1
O ~ 19 31 43 14 26 38 50
SS 0
IO 1 18 30 42 13 25 37 49
SS 2
O ~ 20 32 44 15 27 39 51
EMIO Signals
The SPI I/O interface signals available on the EMIO interface are identified in Table 17-6. Table 17-6: SPI EMIO Signals Controller Default Input Value
0 0 0 1 ~ ~ ~ 0 0 0 1 ~ ~ ~ EMIOSPI1SCLKI EMIOSPI1SI EMIOSPI1MI EMIOSPI1SSIN EMIOSPI1SCLKO EMIOSPI1MO EMIOSPI1SO EMIOSPI1SSON0 EMIOSPI1SSON1 EMIOSPI1SSON2 EMIOSPI1SSNTN
SPI Interface
SPI 0 Clock SPI 0 MOSI SPI 0 MISO SPI 0 Slave Select 0 SPI 0 Slave Select 1 SPI 0 Slave Select 2 SPI 0 SS 3-state SPI 1 Clock SPI 1 MOSI SPI 1 MISO SPI 1 Slave Select 0 SPI 1 Slave Select 1 SPI 1 Slave Select 2 SPI 1 SS 3-state
www.xilinx.com
506
Chapter 18
CAN Controller
18.1 Introduction
This chapter describes the architecture and features of the CAN controllers and the functions of the various registers in the design. There are two nearly identical CAN controllers in the PS that are independently operable. Defining the CAN protocol is outside the scope of this document, and knowledge of the specifications is assumed.
18.1.1 Features
CAN Controller features are summarized as follows: Compatible with the ISO 11898 -1, CAN 2.0A , and CAN 2.0B standards Standard (11-bit identifier) and extended (29-bit identifier) frames Bit rates up to 1 Mb/s Transmit message FIFO (TxFIFO) with a depth of 64 messages Transmit prioritization through one high-priority transmit buffer (TxHPB) Watermark interrupts for TxFIFO and RxFIFO Automatic re-transmission on errors or arbitration loss in normal mode Receive message FIFO (RxFIFO) with a depth of 64 messages Four Rx acceptance filters with enables, masks and IDs Loopback and snoop modes for diagnostic applications Maskable error and status interrupts 16-Bit time stamping for receive messages Readable Rx/Tx error counters
www.xilinx.com
507
Interconnect
APB
Tx, Rx
Control Registers
Clocking
Device Boundary
UG585_c18_01_071612
Figure 18-1:
Object Layer - Data Buffer and Filtering APB Interface Data Write TX Storage Tx FIFO TX Priority Logic
Tx HPB
Register R/W
CAN Rx
Data Read
Rx FIFO
Acceptance Filter
UG585_c18_02_021213
Figure 18-2:
www.xilinx.com
508
Configuration Registers
The CAN Controller Configuration register defines the configuration registers. This module allows for read and write access to the registers through the APB interface. An overview of the CAN controller registers are shown in section 18.3.8 Register Overview.
Acceptance Filters
Acceptance filters sort incoming messages with the user-defined acceptance mask and ID registers to determine whether to store messages in the RxFIFO, or to acknowledge and discard them. Messages passed through acceptance filters are stored in the RxFIFO.
18.1.4 Notices
Restrictions
There is a single PS clock generator for both controllers. When the internal clock is used, it will be of the same clock frequency, but the clock to each controller can be individually enabled using the slcr register, see section 25.6.4 CAN Clocks. Also, either or both controllers can be clocked from an external source via an MIO pin, see section 18.4.1 Clocks. It is recommended that a BRPR value of greater than 2 be used.
www.xilinx.com
509
Configuration Mode
The CAN controller enters the Configuration mode when any of the following actions are performed, regardless of the operation mode: Writing a 0 to the CEN bit in the SRR register. Writing a 1 to the SRST bit in the SRR register. The core enters the Configuration mode immediately following the software reset. Driving a 0 on the reset input. The core continues to be in reset as long as reset is 0 . The core enters Configuration mode after reset is negated to 1 .
Normal Mode
Normal mode transmits and receives messages on the Tx and Rx I/O signals as defined by the Bosch and IEEE specifications.
Sleep Mode
Sleep mode can be used to save a small amount of power during idle times. When in sleep mode, the controller can transition to normal mode or configuration mode. In sleep mode: When another node transmits a message, the controller receives the message and exits sleep mode. If there is a new Tx request then the hardware switches the controller to normal mode and the controller services the request(s). An interrupt can be generated when the controller enters sleep mode. An interrupt can be generated when the controller wakes up.
Sleep mode is exited by the hardware when there is CAN bus activity or a request in either TxFIFO or
www.xilinx.com
510
TxHPB. When the controller exits sleep mode, can.MSR[SLEEP] is set to 0 by the hardware and an interrupt can be generated. The CAN controller enters Sleep mode from Configuration mode when the LBACK bit in MSR is 0 , the SLEEP bit in MSR is 1 , and the CEN bit in SRR is 1 . The CAN controller enters Sleep mode only when there are no pending transmission requests from either the TX FIFO or the TX High Priority Buffer. The CAN controller enters Sleep mode from Normal mode only when the SLEEP bit is 1, the CAN bus is idle, and there are no pending transmission requests from either the TX FIFO or TX High Priority Buffer. When another node transmits a message, the CAN controller receives the transmitted message and exits Sleep mode. When the controller is in Sleep mode, if there are new transmission requests from either the TX FIFO or the TX High Priority Buffer, these requests are serviced, and the CAN controller exits Sleep mode. Interrupts are generated when the CAN controller enters Sleep mode or wakes up from Sleep mode. From sleep mode, the CAN controller can enter either the Configuration or Normal modes.
Mode Transitions
The supported mode transitions are shown in Figure 18-3. The transitions are primarily controlled by the resets, the CEN bit, the MSR register settings, and a hardware wake up mechanism. To enter normal mode from configuration mode: Clear can.MSR[LBACK, SNOOP, SLEEP] = 0
www.xilinx.com
511
Set can.SRR[CEN] = 1
To enter sleep mode from normal mode (interrupt generated): Set can.MSR[SLEEP] = 1
Events that cause the controller to exit sleep mode (interrupt generated): Rx signal activity (hardware sets can.MSR[SLEEP] = 0 ) TxFIFO or TxHPB activity (hardware sets can.MSR[SLEEP] = 0 ) Software writes 0 to can.MSR[SLEEP]
Reset:
slcr.CAN_RST_CTRL[CANx_CPU1x_RST] =1 OR can.SRR[SRST] = 1 (Self-clearing) Reset Hardware Forces can.SRR[CEN] = 0 Reset
slcr.CAN_RST_CTRL[CANx_CPU1x_RST] = 0
Configuration can.SRR[CEN] = 0
Figure 18-3:
Mode Settings
Table 18-1 defines the CAN controller modes of operation and corresponding control and status bits. Table 18-1:
.
Software Reset Mode Select Register Status Register (SR) CAN Register (can.SRR) (MSR) (Read/Write bits) (Read Only bits) CPU_1x SRST CEN PS Reset (CAN (CAN LBACK SLEEP SNOOP CONFIG LBACK SLEEP NORMAL SNOOP (slcr) Reset) Enable)
1 0 X 1 X X X X X X X X 1 1 0 0 0 0 0 0 0 0
Operational Mode
Reset Reset
www.xilinx.com
512
Table 18-1:
Software Reset Mode Select Register Status Register (SR) CAN Register (can.SRR) (MSR) (Read/Write bits) (Read Only bits) CPU_1x SRST CEN PS Reset (CAN (CAN LBACK SLEEP SNOOP CONFIG LBACK SLEEP NORMAL SNOOP (slcr) Reset) Enable)
0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 X 1 0 0 0 X X 1 0 0 X X 0 1 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 1 0 0 0 1 0
Operational Mode
Configuration Loop back Sleep Snoop Normal
www.xilinx.com
513
RTR
ID[28:18]
STR/RTR IDE
ID[17:0]
Reads
Data starts at byte 0 and continues for the number of counts in DLC. Software should read both data words, but the only valid bytes are determined by DLC. Table 18-3 provides bit descriptions for the identifier word bits, the DLC word bits, and data word 1 and data word 2 bits. Table 18-3: Bits
Identifier Word
Standard Message ID The identifier portion for a standard frame is 11 bits. These bits indicate the standard frame ID. This field is valid for both standard and extended frames. Substitute Remote Transmission Request This bit differentiates between data frames and remote frames. Valid only for standard frames. For extended frames this bit is 1 . 1 : Indicates that the message frame is a Remote Frame. 0 : Indicates that the message frame is a Data Frame. Identifier Extension This bit differentiates between frames using the Standard Identifier and those using the Extended Identifier. Valid for both Standard and Extended Frames. 1 : Indicates the use of an extended message identifier. 0 : Indicates the use of a standard message identifier. Extended Message ID This field indicates the extended identifier. Valid only for extended frames. For standard frames, reads from this field return 0 s. For Standard frames, writes to this field should be 0 s. Remote Transmission Request This bit differentiates between data frames and remote frames. Valid only for extended frames. 1 : Indicates the message object is a remote frame. 0 : Indicates the message object is a data frame. For standard frames, reads from this bit returns 0. For standard frames, writes to this bit should be 0.
CAN Message Word Register Bit Fields Name Default Value Description
31:21
ID[28:18]
20
SRR/RTR
19
IDE
18:1
ID[17:0]
RTR
DLC Word
Data Length Code This is the data length portion of the control field of the CAN frame. This indicates the number valid data bytes (0 to 8) that are in the Data Word 1 and Data Word 2 registers.
31-28
DLC
www.xilinx.com
514
Default Value
0
Description
Reads from this field return 0 s. Writes to this field should be 0s.
Data Word 1
DW1R[31:24] DW1R[23:16] DW1R[15:8] DW1R[7:0] DB0[7:0] DB1[7:0] DB2[7:0] DB3[7:0] 0 0 0 0 Data Byte 0 Data Byte 1 Data Byte 2 Data Byte 3
Data Word 2
DW2R[31:24] DW2R[23:16] DW2R[15:8] DW2R[7:0] DB4[7:0] DB5[7:0] D6[7:0] DB7[7:0] 0 0 0 0 Data Byte 4 Data Byte 5 Data Byte 6 Data Byte 7
Software must read all four registers of an Rx message in the RxFIFO, regardless of how many data bytes are in the message. The first word is read using the RXFIFO_ID register and contains the identifier of the received message (IDR). The second word is read using the RXFIFO_DLC register and contains the 16-bit timestamp and data length code (DLC) field. The third and fourth words contain data word 1 (DW1R) and data word 2 (DW2R). Writes to the RxFIFO registers are ignored. Read data from an empty RxFIFO are invalid and may generate an interrupt. The messages in the RxFIFO are retained even if the CAN controller enters Bus off state or Configuration mode.
www.xilinx.com
515
Tx Messages
The controller has a configurable TxFIFO that software can use buffer up to 64 Tx CAN messages. The controller also has a high priority transmit buffer (Tx HPB), with storage for one message. When a higher priority message needs to be sent, software writes the message to the high priority transmit buffer when it is available. The message in the TxHPB has higher priority over messages in the TxFIFO. When arbitration loss or errors occur during the transmission of a message, the controller tries to retransmit the message. No subsequent message, even a newer, higher priority message is transmitted until the original message is transmitted without errors or arbitration loss. The controller transmits the message starting with bit 31 of the IDR word, see table 18-2, CAN Message Format. After the identifier word is transmitted, the DLCR word is transmitted. This is followed by the data bytes in this order: DB0, DB1, ... DB7. The last bit in the data portion of the message is DB7, bit 0. Refer to Table 18-2. The status bit, can.ISR[TXOK] is set = 1 after the controller successfully transmits a message from either the TxFIFO or TxHPB. The messages in the TxFIFO and TxHPB are retained even if the CAN controller enters Bus off state or Configuration mode. The message format is described in 18.2.2 Message Format.
www.xilinx.com
516
18.2.4 Interrupts
Each CAN controller has a single interrupt signal to the GIC interrupt controller. CAN 0 connects to IRQ ID#60 and CAN 1 connects to ID #83. The source of an interrupt can be grouped into one of the following: TxFIFO and TxHPB RxFIFO Message passing and arbitration Sleep mode and bus off
Enable and disable interrupts using the can.IER register. Check the raw status of the interrupt using can.ISR. Clear interrupts by writing a 1 to can.ICR. Some interrupt sources have an additional method to clear the interrupt as shown in Table 18-4.
List of Interrupts
All of the CAN interrupts are sticky; that is, once the hardware sets them they stay set until cleared by software. CAN status and interrupts are identified in Table 18-4. Table 18-4: List of CAN Status and Interrupts Bit Number
13 14 2 3 12 7 6 5 4 1 8 0 10
Name
TxFIFO Watermark TxFIFO Empty TxFIFO Full TxHPB Full RxFIFO Watermark RxFIFO Not Empty RxFIFO overflow RxFIFO underflow Message Rx Message Tx Message Error Arbitration Lost Enter Sleep Mode
Usage
Operational threshold.
This status indicates if the buffer is in-use and should not be written. Operational threshold. One or more messages can be read. FIFO was full and message(s) likely lost. Programming error, message read from RxFIFO when no messages were there.
www.xilinx.com
517
Table 18-4:
Name
Exit Sleep Mode Bus Off
Usage
Controller can go to normal or configuration mode.
Interrupt bit TXFWMEMP is asserted when the number of messages in TxFIFO is less than the can.WIR[EW, bits 13:8] threshold.
UG585_c18_06_071012
Figure 18-4:
www.xilinx.com
518
3. 4. 5.
Clear TxFIFO watermark interrupt . Write a 1 to can.ICR[13]. Read TxFIFO watermark status . Read can.ISR[13]. Enable TxFIFO watermark interrupt. Write a 1 to can.IER[13].
www.xilinx.com
519
If any of the enabled filters (up to four) satisfy this equation, then the Rx message is stored in the RxFIFO: If (AFMR & Message_ID) == (AFMR & AFIR) then Capture Message Each acceptance filter is independently enabled. The filters are selected by the can.AFR register. Set can.AFR[UAF4] = 1 to enable AFMR4 and AFID4. Set can.AFR[UAF3] = 1 to enable AFMR3 and AFID3. Set can.AFR[UAF2] = 1 to enable AFMR2 and AFID2. Set can.AFR[UAF1] = 1 to enable AFMR1 and AFID1.
If all can.AFR[UAFx] bits are set = 0 , then all received messages are stored in the RxFIFO. The UAF bits are sampled by the hardware at the start of an incoming message.
www.xilinx.com
520
The user must ensure proper programming of the IDE bit for standard and extended frames. If the user sets the IDE bit in AMIR to 0, then it is considered to be a standard frame ID check only.
STR/RTR
Valid Valid
IDE
Valid Valid
ID[17:0]
Ignored Valid
RTR
Ignored Valid
In the AFMR mask register, enable (unmask) the compare functions for each field for the incoming Rx CAN message by writing a 1 to the bit field. In the AFIR register, write the values that are to be compared to the in-coming Tx CAN message.
www.xilinx.com
521
TX Bit Control
Control / Status
RX Message
Device Boundary
Reference Clock
Clock Prescalar
UG585_c18_03_101012
Figure 18-5:
www.xilinx.com
522
The nominal length of the bit time clock period is based on the CAN_REF_CLK clock frequency, the baud rate generator divider (can.BRPR register) and the segment lengths (can.BTR register). The bit timing logic module manages the re-synchronization function for CAN using the sync width parameter in the can.BTR[SJW] bit field. The CAN bit timing is shown in Figure 18-6.
X-Ref Target - Figure 18-6
TS1
TS2
Sync Segment
Propagation Segment
Phase Segment 1
Phase Segment 2
.
Time Quanta Clock (TQ_CLK)
.
Sample Point
UG585_c18_04_073012
Figure 18-6:
Sync Segment count always equals one time quanta period. The TS 1 and TS 2 period counts are programmable using the can.BTR[TS1, TS2] bit fields. These registers are written when the controller is in Configuration mode. The width of the propagation segment (PROP_SEG) must be less than the actual propagation delay.
www.xilinx.com
523
Note: A given bit-rate can be achieved with several bit-time configurations, but values should be
selected after careful consideration of oscillator tolerances and CAN propagation delays. For more information on CAN bit-time register settings, refer to the CAN 2.0A, CAN 2.0B, and ISO 11898-1 specifications.
Bitstream Processor
The bitstream processor (BSP) module performs several functions while sending and receiving CAN messages. The BSP obtains a message for transmission from either the TxFIFO or the TxHPB and performs the following functions before passing the bitstream to the BTL. Serializing the message Inserting stuff bits, CRC bits, and other protocol defined fields during transmission
During transmission the BSP simultaneously monitors Rx data and performs bus arbitration tasks. It then transmits the complete frame when arbitration is won, and retrying when arbitration is lost. During reception the BSP removes stuff bits, CRC bits, and other protocol fields from the received bitstream. The BSP state machine also analyses bus traffic during transmission and reception for Form, CRC, ACK, Stuff, and Bit violations. The state machine then performs error signaling and error confinement tasks. The CAN controller does not voluntarily generate overload frames but does respond to overload flags detected on the bus. This module determines the error state of the CAN controller: error active, error passive or bus-off. When Tx or Rx errors are observed on the bus, the BSP updates the transmit and receive error counters according to the rules defined in the CAN 2.0 A, CAN 2.0 B and ISO 11898-1 standards. Based on the values of these counters, the error state of the CAN controller is updated by the BSP.
www.xilinx.com
524
All the controller registers are listed in Table 18-6 and are described in detail in Appendix B, Register Details.
In configuration mode the following apply: The CAN controller loses synchronization with the CAN bus and drives a constant recessive bit on the bus line. The Error Count register (ECR) is reset. The Error Status register (ESR) is reset. The Bit Timing register (BTR) and Baud Rate Prescaler register (BRPR) can be modified. The CAN controller does not receive any new messages. The CAN controller does not transmit any messages. Messages in the TxFIFO and the TxHPB are appended. These packets are sent when normal operation is resumed. Reads from the RxFIFO can be performed. Writes to the TxFIFO and TxHPB can be performed (provided the SNOOP bit is not set). Interrupt Status register bits ARBLST, TXOK, RXOK, RXOFLW, ERROR, BSOFF, SLP, and WKUP are be cleared. Interrupt Status register bits RXNEMP and RXUFLW can be set due to read operations to the RxFIFO. Interrupt Status register bits TXBFLL and TXFLL, and Status register bits TXBFLL and TXFLL can be set due to write operations to the TX HPB and TX FIFO, respectively. Interrupts are generated if the corresponding bits in the Interrupt Enable register (IER) are 1 . All Configuration registers are accessible.
When in configuration mode, the CAN controller stays in this mode until the CEN bit in the SRR register is set to 1 . After the CEN bit is set to 1 the CAN controller waits for a sequence of 11 recessive bits before exiting configuration mode. The CAN controller enters normal, loop back, snoop, or sleep modes from configuration mode, depending on the LBACK, SNOOP, and SLEEP bits in the MSR register.
www.xilinx.com
525
care.
www.xilinx.com
526
www.xilinx.com
527
Overview
Enable/disable and reset the controller. Setup baud rate and timing. Clear timestamp counter.
Interrupt Processing
Enable/disable the interrupt detection, mark interrupt sent to the interrupt controller, read raw interrupt status. Inform about the status of the controller.
Status
Transmit FIFO
www.xilinx.com
528
Table 18-6:
CAN Register Overview (Contd) Function Register Names (CAN registers, except where noted)
RXFIFO_ID RXFIFO_DLC RXFIFO_DATA1 RXFIFO_DATA2 AFR AFMR[4:1] AFIR[4:1] slcr.CAN_CLK_CTRL slcr.CAN_MIOCLK_CTRL slcr.CAN_RST_CTRL
Overview
Read received message.
Receive FIFO
Acceptance Filter
Configure and control the four acceptance filters. A controller reset and clock control.
System level
CPU_1x Clock
Refer to Chapter 25, Clocks, for general clock programming information. The CPU_1x clock runs asynchronous to the CAN reference clock.
Reference Clock
CAN_REF_CLK is normally sourced from the PS clock subsystem, but it can alternatively be driven by an external clock source via an MIO pin. Internally, the PS has three PLLs and two clock divider pairs. The clock source choice, PS clock subsystem or external MIO pin, is controlled by the CAN_MIOCLK_CTRL register. The CAN clocks in the PS are controlled by slcr.CAN_CLK_CTRL. The generation of the CAN reference clock by the PS is described in section 25.6.4 CAN Clocks. There is one clock generator in the PS for both CAN controllers. If an MIO pins is used instead, the selected MIO_PIN Mux register is programmed as an input.
www.xilinx.com
529
Enable MIO path . Write to the slcr.CAN_MIOCLK_CTRL register to override the MIO PIN register setting that was written in the previous step. Write a 1 to slcr.CAN_MIOCLK_CTRL[CANx__REF_SEL] and write the desired MIO pin number into the slcr.CAN_MIOCLK_CTRL[CANx_MUX] bit field to match the pin in the previous step.
18.4.2 Resets
The effects for each reset type are summarized in Table 18-7. Table 18-7: CAN Reset Effects Name
Local CAN Reset can.SRR[SRST] PS Reset Subsystem slcr.CAN_RST_CTRL[CANx_CPU1X_RST]
www.xilinx.com
530
Configure MIO pin 47 for the Tx signal. Write 0x0000_1220 to the slcr.MIO_PIN_47 register: b. 3-state controlled by CAN (TRI_ENABLE = 0). d. Slow CMOS drive edge.
www.xilinx.com
531
CAN MIO Pins and EMIO Signals Default Controller Input Value
0 ~ ~ 0 ~ ~
Name
EMIOCAN0PHYRX EMIOCAN0PHYTX ~ EMIOCAN1PHYRX EMIOCAN1PHYTX ~
I/O
I O ~ I O ~
www.xilinx.com
532
Chapter 19
UART Controller
19.1 Introduction
The UART controller is a full-duplex asynchronous receiver and transmitter that supports a wide range of programmable baud rates and I/O signal formats. The controller can accommodate automatic parity generation and multi-master detection mode. The UART operations are controlled by the configuration and mode registers. The state of the FIFOs, modem signals and other controller functions are read using the status, interrupt status and modem status registers. The controller is structured with separate Rx and Tx data paths. Each path includes a 64-byte FIFO. The controller serializes and de-serializes data in the Tx and Rx FIFOs and includes a mode switch to support various loopback configurations for the RxD and TxD signals. The FIFO interrupt status bits support a polling or interrupt driven handler. Software reads and writes data bytes using the Rx and Tx data port registers. When the UART is being used in a modem-like application, the modem control module detects and generates the modem handshake signals and also controls the receiver and transmitter paths according to the handshaking protocol.
19.1.1 Features
Each UART controller (UART 0 and UART 1) has the following features: Programmable baud rate generator 64-byte receive and transmit FIFOs Programmable protocol:
6, 7, or 8 data bits 1, 1.5, or 2 stop bits Odd, even, space, mark, or no parity
Parity, framing and overrun error detection Line-break generation and detection Interrupts generation RxD and TxD modes: Normal/echo and diagnostic loopbacks using the mode switch
www.xilinx.com
533
Loop UART 0 with UART 1 option Modem control signals: CTS, RTS, DSR, DTR, RI and DCD are available only on the EMIO interface
IRQ ID# {59, 82} UART REF_RST UART REF_CLK Slave ports
Tx, Rx, CTSN, DCDN, DSRN, RIN, DTRN, RTSN
MIO Pins
EMIO Signals
PL
UG585_c19_01_010112
Figure 19-1:
The slcr register set (refer to section 4.3 SLCR Registers) includes control bits for the UART clocks, resets and MIO-EMIO signal mapping. Software accesses the UART controller registers using the APB 32-bit slave interface attached to the PS AXI interconnect. The IRQ from each controller is connected to the PS interrupt controller and routed to the PL.
19.1.3 Notices
Reference Clock Operating Restrictions
There is a single PS clock generator for both UART controllers. The reference clocks (UART_Ref_Clk) going to the baud rate generator of each UART controller are of the same clock frequency, but are individually enabled, refer to section 25.6.3 SDIO, SMC, SPI, Quad-SPI and UART Clocks. The controllers are always clocked by the internal, PS clock generator.
Note: There are no frequency restrictions in the relationship between the CPU_1x and UART_Ref_clk
clocks.
www.xilinx.com
534
PS AXI Interconnect
TxFIFO RxFIFO
Transmitter Receiver
EMIO
Interrupts
Optional Divide by 8
Figure 19-2:
www.xilinx.com
535
uart.Baud_rate_divider_reg0[7:0]
Divide by 8
Figure 19-3:
The baud rate generator can use either the master clock signal, uart_ref_clk, or the master clock divided by eight, uart_ref_clk/8. The clock signal used is selected according to the value of the CLKS bit in the Mode register (uart.mode_reg0). The resulting selected clock is termed sel_clk in the following description. The sel_clk clock is divided down to generate three other clocks: baud_sample, baud_tx_rate, and baud_rx_rate. The baud_tx_rate is the target baud rate used for transmitting data. The baud_rx_rate is nominally at the same rate, but gets resynchronised to the incoming received data. The baud_sample runs at a multiple ([BDIV] + 1) of baud_rx_rate and baud_tx_rate and is used to over-sample the received data. The sel_clk clock frequency is divided by the CD field value in the Baud Rate Generator register to generate the baud_sample clock enable. This register may be programmed with a value between 1 and 65535. The baud_sample clock is divided by [BDIV] plus 1. BDIV is a programmable field in the Baud Rate Divider register and can be programmed with a value between 4 and 255. It has a reset value of 15, inferring a default ratio of 16 baud_sample clocks per baud_tx_clock / baud_rx_rate. Thus the frequency of the baud_sample clock enable is shown in Equation 19-1. sel_clk ----baud_sample = CD
Equation 19-1
The frequency of the baud_rx_rate and baud_tx_rate clock enables is show in Equation 19-2. sel_clk ----------baud_rate = -CD ( BDIV + 1 )
Equation 19-2
It is essential to disable the transmitter and receiver before writing to the Baud Rate Generator register (uart.Baud_rate_gen_reg0), or the baud rate divider register (uart.Baud_rate_divider_reg0). A soft reset must be issued to both the transmitter and receiver before they are re-enabled. Some examples of the relationship between the uart_ref_clk clock, baud rate, clock divisors (CD and BDIV), and the rate of error are shown in Table 19-1. The highlighted entry shows the default reset values for CD and BDIV. For these examples, a system clock rate of UART_Ref_Clk = 50 MHz and Uart_ref_clk/8 = 6.25 MHz is assumed. The frequency of the UART reference clock can be changed to
www.xilinx.com
536
get a more accurate Baud rate frequency, refer to Chapter 25, Clocks for details to program the UART_Ref_Clk. Table 19-1: Clock
UART Ref clock UART Ref clock /8 UART Ref clock UART Ref clock UART Ref clock UART Ref clock UART Ref clock UART Ref clock
Calculated CD
10416.667 81.380 651.041 347.222 62.004 31.002 27.127 9.042
Actual CD
10417 81 651 347 62 31 9 9
BDIV
7 7 7 4 6 6 11 5
Error (BPS)
0.020 45.061 0.614 18.44 7.373 14.75 2,162.96 4,325.93
% Error
-0.003 0.469 0.006 0.064 0.0064 0.006 0.469 0.469
www.xilinx.com
537
baud_tx_rate
TXD START
D0
D1
D2
D3
D4
D5
D6
D7
PA
S STOP
UG585_c19_04_020613
Figure 19-4:
The uart.mode_reg0[CHRL] register bit selects the character length, in terms of the number of data bits. The uart.mode_reg0[NBSTOP] register bit selects the number of stop bits to transmit.
10
11
12
13
14
15
16
baud_sample
Data (LSB)
UG585_c19_05_022612
Figure 19-5:
When a valid start bit is identified, the receiver baud rate clock enable (baud_rx_rate) is re-synchronised so that further sampling of the incoming UART RxD signal occurs around the theoretical mid-point of each bit, as illustrated in Figure 19-6.
www.xilinx.com
538
baud_rx_rate
10
11
12
13
14
15
16
baud_sample
rxd
Data Bit
UG585_c19_06_022612
Figure 19-6:
When the re-synchronised baud_rx_rate is High, the last three sampled bits are compared. The logic value is determined by majority voting; two samples having the same value define the value of the data bit. When the value of a serial data bit has been determined, it is shifted to the receive shift register. When a complete character has been assembled, the contents of the register are then pushed to the RxFIFO.
www.xilinx.com
539
The upper 8 bits of the counter are reloaded from the value in the [RTO] bit field and the lower 2 bits are initialized to zero. The counter is clocked by the UART bit clock. As an example, if [RTO] = 0xFF, then the timeout period is 1,023 bit clocks (256 x 4 minus 1). If 0 is written into the [RTO] bit, the timeout mechanism is disabled. When the decrementing counter reaches 0, the receiver timeout occurs and the controller sets the timeout interrupt status bit uart.Chnl_int_sts_reg0 [TIMEOUT] = 1 . If the interrupt is enabled (uart.Intrpt_mask_reg0 [TIMEOUT] = 1 ), then the IRQ signal to the PS interrupt controller is asserted. Whenever the timeout interrupt occurs, it is cleared with a write back of 1 to the Chnl_int_sts_reg0 [TIMEOUT] bit. Software must set uart.Control_reg0 [RSTTO] = 1 to generate further receive timeout interrupts.
TxFIFO
UARTx TxD
RxFIFO
Receive
UARTx RxD
TxFIFO
TxFIFO
RxFIFO
Receive
RxFIFO
Receive
Normal Mode
TxFIFO Transmit Mode Switch RxFIFO Receive
www.xilinx.com
540
Normal Mode
Normal mode is used for standard UART operations.
The various FIFO and system indicators are routed to the uart.Channel_sts_reg0 register and/or the uart.Chnl_int_sts_reg0 register as shown in Figure 19-8.
www.xilinx.com
541
Status uart.Channel_sts_reg0[14:10, 4:0] (all bits are dynamic) uart.Intrpt_mask_reg0 0: Masked 1: Enabled
uart.Intrpt_dis_reg0
UG585_c19_03_010613
Figure 19-8:
The interrupt registers and bit fields are summarized in Table 19-2. Table 19-2: UART Interrupt Status Bits
uart.Channel_sts_reg0
TNFUL TTRIG FDELT TACTIVE RACTIVE X X X X X TFUL TEMPTY RFUL REMPTY RTRIG
This mask is controlled by the write-only Intrpt_en_reg0 and Intrpt_dis_reg0 registers. Each associated enable/disable interrupt bit should be set mutually exclusive (e.g., to enable an interrupt, write 1 to Intrpt_en_reg0[x] and write 0 to Intrpt_dis_reg0[x]).
Channel Status
These status bits are in the Channel_sts_reg0 register. TACTIVE : Transmitter state machine active status. If in an active state, the transmitter is currently shifting out a character. RACTIVE : Receiver state machine active status. If in an active state, the receiver is has detected a start bit and is currently shifting in a character.
www.xilinx.com
542
FDELT: Receiver flow delay trigger continuous status. The FDELT status bit is used to monitor the RxFIFO level in comparison with the flow delay trigger level.
Non-FIFO Interrupts
These interrupt status bits are in the Chnl_int_sts_reg0 register. TIMEOUT: Receiver Timeout Error interrupt status. This event is triggered whenever the receiver timeout counter has expired due to a long idle condition. PARE : Receiver Parity Error interrupt status. This event is triggered whenever the received parity bit does not match the expected value. FRAME : Receiver Framing Error interrupt status. This event is triggered whenever the receiver fails to detect a valid stop bit. Refer to section 19.2.7 Receiver Data Capture. DMSI : indicates a change of logic level on the DCD, DSR, RI or CTS modem flow control signals. This includes High-to-Low and Low-to-High logic transitions on any of these signals.
FIFO Interrupts
The status bits for the FIFO interrupts listed in Table 19-2 are illustrated in Figure 19-9. These interrupt status bits are in the Channel Status (uart.Channel_sts_reg0) and Channel Interrupt Status (uart.Chnl_int_sts_reg0) registers with the exception that the [TOVR] and [ROVR] bits are not part of the uart.Channel_sts_reg0 register.
X-Ref Target - Figure 19-9
Figure 19-9:
The FIFO trigger levels are controlled by these bit fields: uart.Rcvr_FIFO_trigger_level0[RTRIG], a 6-bit field uart.Tx_FIFO_trigger_level0[TTRIG], a 6-bit field
www.xilinx.com
543
status register, and FDELT in the channel status register. This event is triggered whenever the DCTS, DDSR, TERI, or DDCD in the modem status register are being set. The read-only Modem Status register is used to read the values of the clear to send (CTS), data carrier detect (DCD), data set ready, (DSR) and ring indicator (RI) modem inputs. It also reports changes in any of these inputs and indicates whether automatic flow control mode is currently enabled. The bits in the Modem Status register are cleared by writing a 1 to the particular bit. The read/write only Modem Control register is used to set the data terminal ready (DTR) and request to send (RTS) outputs, and to enable the Automatic Flow Control Mode register. By default, the automatic flow control mode is disabled, meaning that the modem inputs and outputs work completely under software control. When the automatic flow control mode is enabled by setting the FCM bit in the Modem Control register, the UART transmission and reception status is automatically controlled using the modem handshake inputs and outputs. In automatic flow control mode the request to send output is asserted and de-asserted based on the current fill level of the receiver FIFO, which results in the far-end transmitter pausing transmission and preventing an overflow of the UART receiver FIFO. The FDEL field in the Flow Delay register (Flow_delay_reg0) is used to setup a trigger level on the Receiver FIFO which causes the de-assertion of the request to send. It remains Low until the FIFO level has dropped to below four less than FDEL. Additionally in automatic flow control mode, the UART only transmits while the clear to send input is asserted. When the clear to send is de-asserted, the UART pauses transmission at the next character boundary. If flow control is selected as automatic, then Flow Delay register must be programmed in order to have a control on the inflow of data, which is done by de-asserting RTS signal. The value corresponds to the RxFIFO level at which RTS signal will be de-asserted. It will be re-asserted when the RxFIFO level drops to four below the value programmed in the Flow Delay register. The uart.Channel_sts_reg0 [FDELT] register bit is used to monitor the RxFIFO level in comparison with the flow delay trigger level. The [FDELT] bit is set whenever the RxFIFO level is greater than or equal to trigger the level programmed in the Flow Delay register. The trigger level programmed in the Flow Delay register has no dependency on the Rx Trigger Level register. This is to only control the inflow of data using the RTS modem signal. The CPU will be interrupted by receive data only on receipt of an Rx Trigger interrupt. Data is retrieved based on the trigger level programmed in the Rx Trigger Level register.
Programmable Parameters
The UART flow control signals, DTR and RTS are generated by the UART controller. The RTS flow control signal is used to signal for Rx (ready to send signal to the attached terminal). The DTR flow control signal indicates the status of the UART controller (data terminal ready).
The DTR and RTS can be controlled manually by software or automatically by the controller. In automatic mode, the modem control unit asserts and de-asserts the RTS and DTR signals.
www.xilinx.com
544
In manual mode, software controls the RTS and DTR signals using uart.Modem_ctrl_reg0.
uart.Modem_ctrl_reg0 : [DTR]: Data Terminal Ready output signal [RTS]: Request to Send output signal [FCM]: Select Automatic or Manual flow control.
uart.Modem_sts_reg0 : [DCTS]: Delta Clear To Send (input) status [DDSR]: Delta Data Set Ready (input) status [TERI]: Trailing-edge Ring Indicator (input) status [DDCD]: Delta Data Carrier Detect (input) status
When software writes a 1 to uart.Modem_ctrl_reg0 [FCM], the modem changes to automatic mode. The change of mode from manual to automatic is verified by reading the status bit FCMS in the Modem Status register.
Example: Monitor for a Change in the DCD DSR RI CTS Flow Control Signals
A logic level change to the DCD DSR RI CTS flow control signals is detected by the controller. When a logic level change is detected, the hardware sets the uart.Chnl_int_sts_reg0 [DMSI] bit. This change, or channel status can optionally generate an interrupt. 1. Check flow control signal status . uart.Modem_sts_reg0 register reports the modem status.
In interrupt mode, the ISR can run when the DMSI interrupt occurs when there is a change of status on modem lines.
www.xilinx.com
545
5.
6. 7.
www.xilinx.com
546
b. Disable the Txpath: set uart.Control_reg0 [TXEN] = 0 and [TXDIS] = 1 . c. e. f. 3. Write the calculated CD value into the uart.Baud_rate_gen_reg0 [CD] bit field. Reset Tx and Rx paths: uart.Control_reg0 [TXRST] and [RXRST] = 1 . These bits are self-clearing. Enable the Rx path: Set [RXEN] = 1 and [RXDIS] = 0 . d. Write the calculated BDIV value into the uart.Baud_rate_divider_reg0 [BDIV] bit value.
g. Enable the Tx path: Set [TXEN] = 1 and [TXDIS] = 0 . Set the level of the RxFIFO trigger level . Write the trigger level into the uart.Rcvr_FIFO_trigger_level0 register.
Option a: Enable the Rx trigger level: Write a value of 1 to 63 into the [RTRIG] bit field. Option b: Disable the Rx trigger level : Write 0 into the [RTRIG] bit field.
4.
Program the Receiver Timeout Mechanism . Write the timeout value into the uart.Rcvr_timeout_reg0 register. Refer to Receiver Timeout Mechanism, page 539. a. To enable the timeout mechanism, write a value of 1 to 255 into the [RSTTO] bit field. b. To disable the timeout mechanism, write a 0 into the [RSTTO] bit field.
5.
Note: Ensure that the Receiver Timeout register is programmed to a valid value before resetting
the timeout counter (previous step). a. Reset Tx and Rx paths: uart.Control_reg0 [TXRST] and [RXRST] = 1 . These bits are self-clearing. Enables the Tx path: [TXEN] = 1 and [TXDIS] = 0 . Does not start to transmit a break: [STTBRK] = 0 . Stop Break transmitter: [STPBRK] = 1
b. Enables the Rx path: [RXEN] = 1 and [RXDIS] = 0 . c. e. f. d. Restarts the Receiver Timeout Counter: [RSTTO] = 1 .
Note: When the TxFIFO Empty status is true, software can write 64 bytes (the size of the TxFIFO)
without checking the TxFIFO status. In reality, software can write more than 64 bytes when the transmitter is active because while the software is writing data to the TxFIFO, the controller is removing data and serializing it onto the TxD signal.
www.xilinx.com
547
2. 3.
Fill the TxFIFO with data . Write 64 bytes of data to the uart.TX_RX_FIFO0 register. Write more data to the TxFIFO. There are two methods: Option A: Check to see if the TxFIFO has room to another byte of data (i.e., the TxFIFO is not full) : Read uart.Channel_sts_reg0 [TFUL] until it equals 0 . When [TFUL] = 0 , write a single byte of data into the TxFIFO and then read [TFUL] again. Option B: Wait until the TxFIFO goes empty. Read uart.Channel_sts_reg0 [TEMPTY] until it equals 1 , then go to step 2 to fill the TxFIFO with 64 bytes of data.
4. 5. 6.
www.xilinx.com
548
When both the enable and disable bits are set for an interrupt, the interrupt is disabled. The state of the interrupt enable/disable mechamism can be determined by reading the uart.Intrpt_mask_reg0 register. If the mask bit = 1 , then the interrupt is enabled.
Function
Configuration
Overview
Configure mode and baud rate.
Interrupt processing
www.xilinx.com
549
Table 19-3:
Function
Rx and Tx Data Receiver Transmitter Modem
Overview
Read data Received. Write data to be Transmitted. Configure receiver timeout and RxFIFO trigger level value. Configure TxFIFO trigger level value. Configure modem-like application.
CPU_1x Clock
Refer to section 25.2 CPU Clock, for general clock programming information. The CPU_1x clock runs asynchronous to the UART reference clock.
Reference Clock
The generation of the reference clock in the PS clock subsystem is controlled by the slcr.UART_CLK_CTRL register. This register can select the PLL that the clock is derived from and sets the divider frequency. This register also controls the clock enables for each UART controller. The generation of the UART reference clock is described in section 25.6.3 SDIO, SMC, SPI, Quad-SPI and UART Clocks.
Operating Restrictions
Note: The clock operating restrictions are described in section 19.1.3 Notices.
www.xilinx.com
550
a. c.
Clock divisor, slcr.UART_CLK_CTRL[DIVISOR] = 0x14 . Enable the UART 0 Reference clock, slcr.UART_CLK_CTRL [CLKACT0] = 1 .
b. Select the IO PLL, slcr.UART_CLK_CTRL[SRCSEL] = 0. d. Disable UART 1 Reference clock, slcr.UART_CLK_CTRL [CLKACT1] bit = 0 .
19.4.2 Resets
The controller reset bits are generated by the PS, see Chapter 26, Reset System.
Configure MIO pin 47 for the TxD signal . Write 0x0000_12E0 to the slcr.MIO_PIN_47 register:
www.xilinx.com
551
b. 3-state controlled by the UART (TRI_ENABLE = 0 ). c. e. f. LVCMOS18 (refer to the register definition for other voltage options). Enable internal pull-up resistor. Disable HSTL receiver. d. Slow CMOS drive edge.
www.xilinx.com
552
EMIO Signals
Name
EMIOUART0TX EMIOUART0RX EMIOUART0CTSN EMIOUART0RTSN EMIOUART0DSRN EMIOUART0DCDN EMIOUART0RIN EMIOUART0DTRN EMIOUART1TX EMIOUART1RX EMIOUART1CTSN EMIOUART1RTSN EMIOUART1DSRN EMIOUART1DCDN EMIOUART1RIN EMIOUART1DTRN
I/O
O I I O I I I O O I I O I I I O
11, 15, 19, 23, 27, 31, 35, 39, 43, 47, 51 10, 14, 18, 22, 26, 30, 34, 38, 42, 46, 50 ~
~ ~ ~ ~
~ ~
~ 8, 12, 16, 20, 24, 28, 32, 36, 40, 44, 48, 52 9, 13, 17, 21, 25, 29, 33, 37, 41, 45, 49, 53 ~
~ ~ ~ ~
www.xilinx.com
553
Chapter 20
I2C Controller
20.1 Introduction
This I2C module is a bus controller that can function as a master or a slave in a multi-master design. It supports an extremely wide clock frequency range from DC (almost) up to 400 Kb/s. In master mode, a transfer can only be initiated by the processor writing the slave address into the I2C address register. The processor is notified of any available received data by a data interrupt or a transfer complete interrupt. If the HOLD bit is set, the I2C interface holds the SCL line Low after the data is transmitted to support slow processor service. The master can be programmed to use both normal (7-bit) addressing and extended (10-bit) addressing modes. In slave monitor mode, the I2C interface is set up as a master and continues to attempt a transfer to a particular slave until the slave device responds with an ACK. In slave mode, the extended address support is automatic by detecting a specific code in bits [7:3] of the first address byte. The HOLD bit can be set to prevent the master from continuing with the transfer, preventing an overflow condition in the slave. A common feature between master mode and slave mode is the timeout (TO) interrupt flag. If at any point the SCL line is held Low by the master or the accessed slave for more than the period specified in the Timeout register, a timeout (TO) interrupt is generated to avoid stall conditions.
20.1.1 Features
The PS supports two I2C devices with these key features: I2C bus specification version 2 Supports 16-byte FIFO Programmable normal and fast bus data rates Master mode
Write transfer Read transfer Extended address support Support HOLD for slow processor service Supports TO interrupt flag to avoid stall condition
www.xilinx.com
554
Slave transmitter Slave receiver Extended address support (10-bit address) Fully programmable slave response address Supports HOLD to prevent overflow condition Supports TO interrupt flag to avoid stall condition
Software can poll for status or function as interrupt-driven device Programmable interrupt generation
Device Boundary
Interconnect
APB
MIO Pins
Control Registers
EMIO PL
Clocking
UG585_c20_01_030612
Figure 20-1:
20.1.3 Notices
The 7z010 CLG225 device supports 32 MIO pins as shown in section 2.5.4 MIO-at-a-Glance Table. This restricts the availability of the I2C signals on the MIO pins. As needed, I2C signals can be routed through the EMIO interface and passed-through to the PL pins. All 7z010 CLKG225 device restrictions are listed in section 1.1.3 Notices.
www.xilinx.com
555
APB Interface
Interrupts
Interrupts
Status Register
Figure 20-2:
Write Transfer
To accomplish an I2C write transfer, the host must perform these steps: 1. 2. 3. 4. 5. Write to the control register to set up SCL speed and addressing mode. Set the MS, ACKEN, and CLR_FIFO bits and clear the RW bit in the Control register. If required, set the HOLD bit. Otherwise write the first byte of data to the I2C Data register. Write the slave address into the I2C address register. This initiates the I2C transfer. Continue to load the remaining data to be sent to the slave by writing to the I2C Data register. The data is pushed in the FIFO each time the host writes to the I2C Data register.
When all data is transferred successfully, the COMP bit is set in the interrupt status register. A data interrupt is generated whenever there are only two bytes left for transmission in the FIFO. When all data is transferred successfully, If the HOLD bit is not set, the I2C interface generates a STOP condition and terminates the transfer. If the HOLD bit is set, the I2C interface holds the SCL line Low
www.xilinx.com
556
after the data is transmitted. The host is notified of this event by a transfer complete interrupt (COMP bit set) and the TXDV bit in the status register is cleared. At this point, the host can proceed in three ways: 1. 2. 3. Clear the HOLD bit. This causes the I2C interface to generate a STOP condition. Supply more data by writing to the I2C address register. This causes the I2C interface to continue with the transfer, writing more data to the slave. Perform combined format transfer. This is accomplished by first writing to the Control register and, if necessary, changing the transfer direction or addressing mode. The host must then write to the I2C Address register. This leads to a RESTART condition being generated by the I2C interface.
If at any point the slave responds with a NACK, the transfer automatically terminates and a transfer NACK interrupt is generated (the NACK bit set). When a NACK is received the Transfer Size register indicates the number of bytes that still need to be sent minus one. Unless the very last byte written by the host into the FIFO was a NACK byte, TXDV remains High. In this case, the host must clear the FIFO by setting the CLR_FIFO bit in the Control register. If at any point the SCL line is held Low by the master or the accessed slave for more than the period specified in the Timeout register, a TO interrupt is generated and the outstanding amount of data minus one is then read from the Transfer Size register.
Read Transfer
To accomplish an I2C read transfer, the host must perform these steps: 1. 2. 3. 4. 5. Write to the Control register to set up the SCL speed and addressing mode. Set the MS, ACKEN, CLR_FIFO bits, and the RW bit in the Control register. If the host wants to hold the bus after the data is received, it must also set the HOLD bit. Write the number of requested bytes in the Transfer Size register. Write the slave address in the I2C Address register. This initiates the I2C transfer.
The host is notified of any available received data in two ways: 1. 2. If an outstanding transfer size is more than the FIFO size -2, a data interrupt is generated (DATA bit set) when there are two free locations available in the FIFO. If an outstanding transfer size is less than FIFO size -2, a transfer complete interrupt is generated (COMP bit set) when the outstanding transfer size bytes are received.
In both cases, the RXDV bit in the status register is set. The I2C interface automatically returns a NACK after receiving the last expected byte and terminates the transfer by generating a STOP condition. If the HOLD bit is set during a master read transfer, the I2C interface drives the SCL line Low. If at any point the slave responds with NACK while the master transmits a slave address for a master read transfer, the transfer automatically terminates and a transfer NACK interrupt is generated (NACK bit is set). The outstanding amount of data can be read from the Transfer Size register.
www.xilinx.com
557
If at any point the SCL line is held Low by the master or the accessed slave for more than the period specified in the Timeout register, a TO interrupt is generated. The I2C module, as a master, is capable of performing combined transfers as specified by the I2C specification. It can perform more than one transfer without releasing the I2C bus and these transfers are separated by a repeated START condition. The host can realize combined transfers by writing to the Address register before the end of the previous transfer. The correct transfer direction and slave addressing mode must be set by writing to the Control register, and then the Address register can be accessed for the second part of a combined transfer. For combined transfers, the host must set the HOLD bit in the beginning of the first part of a transfer. When the host receives a transfer complete interrupt, it can then initiate the second part of a combined transfer.
Slave Transmitter
The slave becomes a transmitter after recognizing the entire slave address sent by the master and when the R/W field in the last address byte sent is High. This means that the slave has been requested to send data over the I2C bus and the host is notified of this through an interrupt through an interrupt to the GIC (refer to Figure 20-1, page 555). At the same time, the SCL line is held Low to allow the host to supply data to the I2C slave before the I2C master starts sampling the SDA line. The host is notified of this event by setting the DATA interrupt flag.
www.xilinx.com
558
At the same time, the SCL line is held Low to allow the host to supply data to the I2C slave before the I2C master starts sampling the SDA line. The host must supply data for transmission through the I2C data register so that the SCL line is released and transfer continues. If it does not write to the I2C data register before the timeout period expires, an interrupt is generated and a TO interrupt flag is set. After the host writes to the I2C data register, the transfer continues by loading data in the FIFO while the transfer is in progress. The amount of data loaded in the FIFO might be a known system parameter or communicated in advance through a higher level protocol using the I2C bus. When there are only two valid bytes left in the FIFO for transmission, an interrupt is generated and the DATA interrupt flag is set. If the I2C master returns a NACK on the last byte transmitted from the FIFO, an interrupt is generated, and the COMP interrupt flag is set as soon as the I2C master generates a STOP condition. The transfer must continue if the master acknowledges on the last byte sent out from the FIFO. At that moment, the DATA interrupt flag is set. The TXDV flag in the Status register is cleared because the FIFO is empty. If the I2C master terminates the transfer before all of the data in the FIFO is sent by the slave, the host is notified, and the NACK interrupt flag is set while TXDV remains set and the Transfer Size register indicates the remaining bytes in the FIFO. The host must set the CLR_FIFO bit in the Control register to clear the FIFO and the TXDV bit.
Slave Receiver
The slave becomes a receiver after recognizing the entire slave address sent by the master and when the R/W bit in the first address byte is Low. This means that the master is about to send one or more data bytes to the slave over the I2C bus. After a byte is acknowledged by the I2C slave, the RXDV bit in the Status register is set, indicating that new data has been received. The host reads the received data through the I2C Data register. An interrupt is generated and the DATA interrupt flag is set when there are only two free locations left in the FIFO. Whenever the I2C master generates a STOP condition, an interrupt is generated and the COMP interrupt flag is set. The Transfer Size register then contains the number of bytes received that are available in the FIFO. This number is decremented by the host on each read of the I2C Data register. If the FIFO is full when one or more bytes are received by the I2C interface, an interrupt is generated and the RX_OVF interrupt flag is set. The last byte received is not acknowledged and the data in the FIFO is kept intact. The HOLD bit can be set in the Control register to avoid overflow conditions when it is impossible to respond to interrupts in a reasonable time. If the HOLD bit is set, the I2C interface keeps the SCL line Low until the host clears resources for data reception. This prevents the master from continuing with the transfer, causing an overflow condition in the slave. The host clears resources for data reception by reading the data register. If the HOLD bit is set and the I2C interface keeps the SCL line Low for longer than the timeout period, an interrupt is generated and the TO interrupt flag is set.
www.xilinx.com
559
1 to 4 divider
1 to 64 divider
UG585_c20_03_022912
Figure 20-3:
The frequency of the clock_enable signal is defined by the frequency of the CPU_1x clock and the values of divisor_a and divisor_b using Equation 20-1
Equation 20-1
Note: As seen from the above calculation, the SCL clock frequency range is limited by the cpu_1x
clock. This means that for some cpu_1x clock rates there will be some SCL frequencies that are not possible. See I2C register map in Appendix B, Register Details for details of register fields.
Table 20-1 lists the calculated values for standard and high speed SCL clock values. A programming example is provided in Section 20.3.2. I2C SCL Clock = CPU_1X_Clock / (22 * (divisor_a + 1) * (divisor_b + 1)) Table 20-1:
100 KHz 400 KHz 100 KHz 400 KHz 100 KHz
Calculated Values for Standard and High Speed SCL Clock Values CPU_1X_Clock
111 MHz 111 MHz 133 MHz 133 MHz 166 MHz
divisor_a
2 0 0 2 3
divisor_b
16 12 60 4 16
www.xilinx.com
560
15 14 13 12 11 10
i2c.Interrupt_status_reg0 i2c.Intrpt_mask_reg0 i2c.Intrpt_enable_reg0 i2c.Intrpt_disable_reg0 X X X X X X X X X X X X
ARB_LOST X
X BA
RX_UNF RXOVF
TX_OVF TXDV
RX_OVF RXDV
SLV_RDY X
TO RX_RW
NACK X
DATA X
COMP X
i2c.Status_reg0
This mask is controlled by the write-only Intrpt_enable_reg0 and Intrpt_disable_reg0 registers. Each associated enable/disable interrupt bit should be set mutually exclusive (e.g., to enable an interrupt, write 1 to Intrpt_enable_reg0[x] and write 0 to Intrpt_disable_reg0[x]).
www.xilinx.com
561
Status Register
All bits present the raw status of the interface. Bits in this register dynamically change based on FIFO and other conditions.
3. 4. 5. 6.
www.xilinx.com
562
e. f.
Clear the FIFOs: Set i2c.Control_reg0[CLR_FIFO] = 1 . Program the clock divisors: Set i2c.Control_reg0[divisor_a] = 0. Set i2c.Control_reg0[divisor_b] = 50.
These divisors generate an I2C SCL of 99 KHz using the CPU_1X clock of 111 MHz. For further details refer to section 20.2.5 I2C Speed . 2. Configure Timeout. Write 0x0000_00FF to the i2c.Time_out_reg0 register. Wait 255 SCL cycles when the SCL is held Low, before generating a timeout interrupt.
www.xilinx.com
563
2. 3.
Clear interrupts. Read and write back the read value to i2c.Interrupt_status_reg0. Write read data count to transfer size register and hold bus if required. Write read data count value to i2c.Transfer_size_reg0. If read data count greater than FIFO depth , set i2c.Control_reg0 [HOLD] = 1 . Write the slave address . Write the address to the i2c.I2C_address_reg0 register. Wait for data to be received into the FIFO. Poll on i2c.Status_reg0 [RXDV] = 1 . a. If i2c.Status_reg0 [RXDV] = 0 , and any of i2c.Interrupt_status_register [NACK], i2c.Interrupt_status_register [ARB_LOST], i2c.Interrupt_status_register [RX_OVF], i2c.Interrupt_status_register [RX_UNF] interrupts are set, then stop the transfer and report the error, otherwise continue to poll on i2c.Status_reg0 [RXDV].
4. 5.
b. If i2c.Status_reg0 [RXDV] = 1 , and if any of i2c.Interrupt_status_register [NACK], i2c.Interrupt_status_register [ARB_LOST], i2c.Interrupt_status_register [RX_OVF], i2c.Interrupt_status_register [RX_UNF] interrupts are set, then stop the transfer and report the error. Otherwise, go to step c. c. If read data count is less than or equal to FIFO depth, count of bytes to read is equal to read data count and go to step 7.
d. Subtract value of i2c.Transfer_size_reg0 from read data count to get count of bytes to read. 6. 7. 8. Update Read data count . Subtract count of bytes to read from read data count. Check if read data count is less than or equal to FIFO depth, clear i2c.Control_reg0[HOLD]. Read data from FIFO. Read data using count of bytes to read in step 5c or 5d from i2c.I2C_data_reg0. Check for Completion of transfer. If total read count is reached, poll on i2c.Interrupt_status_reg0 [COMP] = 1 . Otherwise continue from step 5.
b. If i2c.Status_reg0 [TXDV] = 0 , repeat step 3, 4 and 6 until there is no further data. 7. Wait for completion of transfer. Check for i2c.Interrupt_status_reg0 [COMP] = 1 .
www.xilinx.com
564
3. 4.
Enable Timeout, NACK, Rx overflow, Arbitration lost, DATA, Completion interrupts . Write 0x22F to i2c.Intrpt_en_reg0. Write read data count to transfer size register and hold bus if required. Write read data count value to i2c.Transfer_size_reg0. If read data count greater than FIFO depth , set i2c.Control_reg0 [HOLD]. Write the slave address . Write the address to the i2c.I2C_address_reg0 register. Wait for data to be received into FIFO. a. If read data count is greater than FIFO depth, wait for i2c.Interrupt_status_reg0 [DATA] = 1 . Subtract the value of i2c.Transfer_size_reg0 from the read data count to get the count of bytes to read.
5. 6.
b. Otherwise, wait for i2c.Interrupt_status_reg0 [COMP] = 1 and go to step 8. Here the count of bytes to read is equal to the read data count. 7. 8. 9. Update read data count . Subtract the count of bytes to read from the read data count. Check if the read data count is less than or equal to FIFO depth, clear i2c.Control_reg0[HOLD]. Read data from FIFO. Read data based on the count of bytes to read in step 6a or 6b from i2c.I2C_data_reg0. Check for completion of transfer. Check if the bytes read matches the total read count. Otherwise repeat from step 6.
www.xilinx.com
565
3. 4. 5. 6.
Enable Interrupts . Set i2c.Intrpt_en_reg0 [SLV_RDY] = 1 . Set slave monitor delay. Set i2c.Slave_mon_pause_reg0 with 0xF. Write the Slave Address . Write the address to the i2c.I2C_address_reg0 register. Wait for slave to be ready. Poll on i2c.Interrupt_status_reg0 [SLV_RDY] = 1 .
Function
Configuration Data
Overview
Configure the operating mode Transfer data and monitors status.
Interrupt Processing
Enable/disable interrupt detection, mask interrupt set to the interrupt controller, read raw interrupt status.
PS Clock Subsystem
CPU_1x Clock
Refer to section 25.2 CPU Clock, for general clock programming information.
Operating Restrictions
The clock operating restrictions are described in section 20.1.2 Notices.
www.xilinx.com
566
Example: Route I2C 0 SCL and SDA Signals to MIO Pins 50, 51
In this example, the I2C 0 SCL and SDA signals are routed through MIO pins 50 and 51. Many other pin options are possible. 1. Configure MIO pin 50 for the SCL signal. Write 0x0000_1240 to the slcr.MIO_PIN_50 register: a. c. e. f. 2. a. c. e. f. Route I2C 0 SCL signal to pin 50. LVCMOS18 (refer to the register definition for other voltage options). Enable internal pull-up resistor. Disable HSTL receiver. Route I2C 0 SDA signal to pin 51. LVCMOS18 (refer to the register definition for other voltage options). Enable internal pull-up resistor. Disable HSTL receiver. b. 3-state controlled by I2C (set TRI_ENABLE = 0 ). d. Slow CMOS edge (benign setting).
Configure MIO pin 51 for the SDA signal. Write 0x0000_1240 to the slcr.MIO_PIN_51 register: b. 3-state controlled by the I2C (set TRI_ENABLE = 0 ). d. Slow CMOS drive edge.
www.xilinx.com
567
I2C Interface
I/O
O I I O I I O I I O I I
www.xilinx.com
568
Chapter 21
21.1.1 Features
The PL provides a rich architecture of user-configurable capabilities. The key features are: Configurable logic blocks (CLB)
6-input look-up tables (LUTs) Memory capability within the LUT Register and shift register functionality
www.xilinx.com
569
Cascadable adders Dual port Up to 72 bit-wide Configurable as dual 18 KB Programmable FIFO logic Built-in error correction circuitry 25 18 two's complement multiplier/accumulator high-resolution 48-bit multiplier/accumulator Power saving 25-bit pre-adder to optimize symmetrical filter applications Advanced features: optional pipelining, optional ALU, and dedicated buses for cascading High-speed buffers and routing for low-skew clock distribution Frequency synthesis and phase shifting Low-jitter clock generation and jitter filtering High-performance SelectIO technology High-frequency decoupling capacitors within the package for enhanced signal integrity Digitally controlled impedance that can be 3-stated for lowest power, high-speed I/O operation High-range (HR) I/O supporting 1.2V to 3.3V High performance (HP) I/Os support 1.2V to 1.8V (7z030, 7z045, and 7z100 devices) High-performance transceivers capable of up to 12.5 Gb/s (GTX) Low-power mode optimized for chip-to-chip interfaces Advanced transmit pre and post emphasis, and receiver linear (CTLE) and decision feedback equalization (DFE), including adaptive equalization for additional margin Compatible with the PCI Express Base Specification 2.1 with Endpoint and Root Port capability Supports Gen2 (5.0 Gb/s) Advanced configuration options, advanced error reporting (AER), and end-to-end CRC (ECRC) advanced error reporting and ECRC features
36 KB block RAM
Clock management
Configurable I/Os
www.xilinx.com
570
Memory Resources
Block RAMs per device Number of 36 Kb block RAM columns per device Number of 36 Kb block RAMs per column 60 5 Varies, usually 20 140 6 Varies, usually 30 265 8 Varies, usually 40 545 9 Varies, usually 70 755 12 Varies, usually 70
DSP Resources
Total DSP48E1 slices per device Number of DSP48E1 columns per device Number of DSP48E1 slices per column 80 4 Varies, usually 40 220 5 Varies, usually 60 400 6 Varies, usually 80 900 7 Varies, usually 140 2020 15 Varies, usually 140
Clocking Resources
MMCM PLL 2 2 4 4 5 5 8 8 8 8
I/O Resources(1)
HR I/O HP I/O GTX Transceivers Notes:
1. This table shows the maximum I/Os that are available for each device type (those available in the devices largest package.) Refer to the Zynq-7000 AP SoC Overview for I/O counts of all packages.
100 -
200 -
100 150 4
212 150 16
250 150 16
www.xilinx.com
571
21.1.3 Notices
XADC Analog Mixed Signal Module (AMS)
The XADC is physically located in the PL and is powered by the PL. To use the XADC module, the PL must be powered up, but the PL does not need to be configured. The XADC is explained in Chapter 30, XADC Interface.
21.2 PL Components
21.2.1 CLBs, Slices, and LUTs
Some key features of the Configurable Logic Blocks (CLB) architecture include: True 6-input Look Up Tables (LUT)s Memory capability within the LUT Register and shift register functionality
The LUTs in the Zynq-7000 AP SoC can be configured as either one 6-input LUT (64-bit ROMs) with one output, or as two 5-input LUTs (32-bit ROMs) with separate outputs but common addresses or logic inputs. Each LUT output can optionally be configured to drive a flip-flop. A single LUT contains two flip-flops, a multiplexer (mux), and arithmetic carry logic. Two LUTs form a slice. And two slices form a Configurable Logic Block (CLB). Each LUT can have one of its two flip-flops configured as a latch. Between 2550% of all slices can use their LUTs as distributed 64-bit RAM, as 32-bit shift register (SRL32), or as two 16-bit shift registers (SRL16). Modern synthesis tools take advantage of these highly efficient logic, arithmetic, and memory features. For more details on Configuration Logic Blocks, see UG474 , 7 Series FPGAs Configurable Logic Block User Guide.
www.xilinx.com
572
Frequency synthesis and phase shifting Low-jitter clock generation and jitter filtering
Each Zynq-7000 AP SoC device has up to eight clock management tiles (CMTs), each consisting of one mixed-mode clock manager (MMCM) and one phase-locked loop (PLL).
Clock Distribution
Each Zynq-7000 AP SoC device provides six different types of clock lines (BUFG, BUFR, BUFIO, BUFH, BUFMR, and the high-performance clock) to address the different clocking requirements of high fanout, short propagation delay, and extremely low skew.
www.xilinx.com
573
independently enabled/disabled, allowing for clocks to be turned off within a region, thereby offering fine-grain control over which clock regions consume power. Global clock lines can be driven by global clock buffers, which can also perform glitchless clock multiplexing and clock enable functions. Global clocks are often driven from the CMT, which can completely eliminate the basic clock distribution delay.
Regional Clocks
Regional clocks can drive all clock destinations in their region. A region is defined as any area that is 50 I/O and 50 CLB high and half the device wide. Zynq-7000 AP SoC devices have between eight and twenty-four regions. There are four regional clock tracks in every region. Each regional clock buffer can be driven from either of four clock-capable input pins, and its frequency can optionally be divided by any integer from 1 to 8.
I/O Clocks
I/O clocks are especially fast and serve only I/O logic and serializer/deserializer (SerDes) circuits, as described in Input/Output. Direct connection from the MMCM to the I/O is provided for low-jitter, high-performance interfaces. For more details on clocking resources, see UG472 , Series FPGAs Clocking Resources User Guide .
Every Zynq-7000 AP SoC device has between 60 and 465 dual-port block RAMs, each storing 36 Kb. Each block RAM has two completely independent ports that share nothing but the stored data.
Synchronous Operation
Each memory access, read or write, is controlled by the clock. All inputs, data, address, clock enables, and write enables are registered. The input address is always clocked, retaining data until the next operation. An optional output data pipeline register allows higher clock rates at the cost of an extra cycle of latency. During a write operation, the data output can reflect either the previously stored data, the newly written data, or can remain unchanged.
www.xilinx.com
574
Each block RAM can be divided into two completely independent 18 Kb block RAMs that can each be configured to any aspect ratio from 16K 1 to 512 36. Everything described previously for the full 36 Kb block RAM also applies to each of the smaller 18 Kb block RAMs. Only in simple dual-port (SDP) mode can data widths of greater than 18 bits (18 Kb RAM) or 36 bits (36 Kb RAM) be accessed. In this mode, one port is dedicated to read operations, the other to write operations. In SDP mode, one side (read or write) can be variable, while the other is fixed to 32/36 or 64/72. Both sides of the dual-port 36 Kb RAM can be of variable width. Two adjacent 36 Kb block RAMs can be configured as one 64K 1 dual-port RAM without any additional logic.
FIFO Controller
The built-in FIFO controller for single-clock (synchronous) or dual-clock (asynchronous or multirate) operation increments the internal addresses and provides four handshaking flags: full, empty, almost full, and almost empty. The almost full and almost empty flags are freely programmable. Similar to the block RAM, the FIFO width and depth are programmable, but the write and read ports always have identical width. First word fall-through mode presents the first-written word on the data output even before the first read operation. After the first word has been read, there is no difference between this mode and the standard mode. For more details on Block RAM, see UG473, 7 Series FPGAs Memory Resources User Guide.
DSP applications use many binary multipliers and accumulators, best implemented in dedicated DSP slices. All Zynq-7000 AP SoC devices have many dedicated, full custom, low-power DSP slices, combining high speed with small size while retaining system design flexibility. Each DSP slice fundamentally consists of a dedicated 25 18 bit two's complement multiplier and a 48-bit accumulator. The multiplier can be dynamically bypassed, and two 48-bit inputs can feed a single-instruction-multiple-data (SIMD) arithmetic unit (dual 24-bit or quad 12-bit
www.xilinx.com
575
adder/subtracter/accumulator), or a logic unit that can generate any one of ten different logic functions of the two operands. The DSP includes an additional pre-adder, typically used in symmetrical filters. This pre-adder improves performance in densely packed designs and reduces the DSP slice count by up to 50%. The DSP also includes a 48-bit-wide pattern detector that can be used for convergent or symmetric rounding. The pattern detector is also capable of implementing 96-bit-wide logic functions when used in conjunction with the logic unit. The DSP slice provides extensive pipelining and extension capabilities that enhance the speed and efficiency of many applications beyond digital signal processing, such as wide dynamic bus shifters, memory address generators, wide bus multiplexers, and memory-mapped I/O register files. The accumulator can also be used as a synchronous up/down counter. For more details on DSP slices, see UG479 , 7 Series FPGAs DSP48E1 User Guide.
21.3 Input/Output
21.3.1 PS-PL Interfaces
The PS-PL interface contains all the signals available to the PL designer for integrating the PL-based functions and the PS. There are two types of interfaces between the PL and the PS: 1. Functional interfaces available for connecting with user-designed IP blocks in the PL a. c. e. f. 2. AXI interconnect Interrupts Clocks Debug interfaces b. Extended MIO interfaces for most of the I/O Peripherals d. DMA flow control
Configuration interface connected to fixed logic within the PL configuration block, providing PS control a. c. PCAP SEU b. Configuration status d. Program/Done/Init
For details on PS-PL interfaces refer to Chapter 2, Signals, Interfaces, and Pins.
www.xilinx.com
576
21.3.2 SelectIO
Some highlights of the input/output functionality include: High-performance SelectIO technology with support for 1,866 Mb/s DDR3 High-frequency decoupling capacitors within the package for enhanced signal integrity Digitally controlled impedance that can be 3-stated for lowest power, high-speed I/O operation
The number of I/O pins varies depending on device and package size. Each I/O is configurable and can comply with a large number of I/O standards. With the exception of the supply pins and a few dedicated configuration pins, all other PL pins have the same I/O capabilities, constrained only by certain banking rules. The SelectIO resources in Zynq-7000 AP SoC devices are classed as either high range (HR) or high performance (HP). The HR I/Os offer the widest range of voltage support, from 1.2V to 3.3V. The HP I/Os are optimized for highest performance operation, from 1.2V to 1.8V. All I/O pins are organized in banks, with 50 pins per bank. Each bank has one common VCCO output supply, which also powers certain input buffers. Some single-ended input buffers require an internally generated or an externally applied reference voltage (V REF). There are two VREF pins per bank (except configuration bank 0). A single bank can have only one V REF voltage value. Zynq-7000 AP SoC devices use a variety of package types to suit the needs of the user, including small form factor wire-bond packages for lowest cost; conventional, high performance flip-chip packages; and lidless flip-chip packages that balance smaller form factor with high performance. In the flip-chip packages, the silicon device is attached to the package substrate using a high-performance flip-chip process. Controlled ESR discrete decoupling capacitors are mounted on the package substrate to optimize signal integrity under simultaneous switching of outputs (SSO) conditions.
www.xilinx.com
577
I/O Logic
Input and Output Delay
All inputs and outputs can be configured as either combinatorial or registered. Double data rate (DDR) is supported by all inputs and outputs. Any input and some outputs can be individually delayed by up to 32 increments of 78 ps or 52 ps each. Such delays are implemented as IDELAY and ODELAY. The number of delay steps can be set by configuration and can also be incremented or decremented while in use. ODELAY is only available for HP Select I/O. It is not available for HR select I/Os. This means that it is only available for Z-7030 and Z-7045 devices.
www.xilinx.com
578
Ultra-fast serial data transmission to optical modules, between ICs on the same PCB, over the backplane, or over longer distances is becoming increasingly popular and important to enable customer line cards to scale to 200 Gb/s. It requires specialized dedicated on-chip circuitry and differential I/O capable of coping with the signal integrity issues at these high data rates. The Zynq-7000 AP SoC devices transceiver counts range from 0 to 16 transceiver circuits. Each serial transceiver is a combined transmitter and receiver. The various Zynq-7000 serial transceivers can use a combination of ring oscillators and LC tank architecture to allow the ideal blend of flexibility and performance while enabling IP portability across the family members. Lower data rates can be achieved using logic-based oversampling of PL. The serial transmitter and receiver are independent circuits that use an advanced PLL architecture to multiply the reference frequency input by certain programmable numbers between 4 and 25 to become the bit-serial data clock. Each transceiver has a large number of user-definable features and parameters. All of these can be defined during device configuration, and many can also be modified during operation.
Transmitter
The transmitter is fundamentally a parallel-to-serial converter with a conversion ratio of 16, 20, 32, 40, 64, or 80. This allows the designer to trade-off datapath width for timing margin in high-performance designs. These transmitter outputs drive the PC board with a single-channel differential output signal. TXOUTCLK is the appropriately divided serial data clock and can be used directly to register the parallel data coming from the internal logic. The incoming parallel data is fed through an optional FIFO and has additional hardware support for the 8B/10B, 64B/66B, or 64B/67B encoding schemes to provide a sufficient number of transitions. The bit-serial output signal drives two package pins with differential signals. This output signal pair has programmable signal swing as well as programmable pre- and post-emphasis to compensate for PC board losses and other interconnect characteristics. For shorter channels, the swing can be reduced to reduce power consumption.
Receiver
The receiver is fundamentally a serial-to-parallel converter, changing the incoming bit-serial differential signal into a parallel stream of words, each 16, 20, 32, 40, 64, or 80 bits. This allows the designers to trade-off internal datapath width versus logic timing margin. The receiver takes the incoming differential data stream, feeds it through programmable linear and decision feedback equalizers (to compensate for PC board and other interconnect characteristics), and uses the reference clock input to initiate clock recognition. There is no need for a separate clock line. The data pattern uses non-return-to-zero (NRZ) encoding and optionally guarantees sufficient data transitions by using the selected encoding scheme. Parallel data is then transferred into the PL using the RXUSRCLK clock. For short channels, the transceivers offers a special low power mode (LPM) for additional power reduction.
Out-of-Band Signaling
The transceivers provide out-of-band (OOB) signaling, often used to send low-speed signals from the transmitter to the receiver while high-speed serial data transmission is not active. This is typically done when the link is in a powered-down state or has not yet been initialized. This benefits PCI Express and SATA/SAS applications.
www.xilinx.com
579
For more details on GTX Transceivers, see UG476 , 7 Series FPGAs GTX Transceiver User Guide.
All Zynq-7000 AP SoC devices with transceivers include an integrated block for PCI Express technology that can be configured as an Endpoint or Root Port, compatible with the PCI Express Base Specification Revision 2.1. The Root Port can be used to build the basis for a compatible Root Complex, to allow custom communication between the Zynq-7000 AP SoC device and other devices via the PCI Express protocol, and to attach ASSP Endpoint devices, such as Ethernet controllers or fibre channel HBAs, to the Zynq-7000 devices. This block is highly configurable to system design requirements and can operate 1, 2, 4, or 8 lanes at the 2.5 Gb/s and 5.0 Gb/s data rates. For high-performance applications, advanced buffering techniques of the block offer a flexible maximum payload size of up to 1,024 bytes. The integrated block interfaces to the integrated high-speed transceivers for serial connectivity and to block RAMs for data buffering. Combined, these elements implement the physical layer, data link layer, and transaction layer of the PCI Express protocol. Xilinx provides a light-weight, configurable, easy-to-use LogiCORE IP wrapper that ties the various building blocks (the integrated block for PCI Express, the transceivers, block RAM, and clocking resources) into an Endpoint or Root Port solution. The system designer has control over many configurable parameters: lane width, maximum payload size, programmable logic interface speeds, reference clock frequency, and base address register decoding and filtering. Xilinx offers AXI4 memory mapped wrapper for the integrated block. AXI4 (memory mapped) is designed for Xilinx Platform Studio/EDK design flow and MicroBlaze processor based designs. For more details on PCIe, see UG477, 7 Series FPGAs Integrated Block v1.3 for PCI Express User Guide.
21.4 Configuration
Xilinx 7 series FPGAs store their customized configuration in SRAM-type internal latches. The number of configuration bits is between 17 and 107 Mbits, depending on device size and user-design implementation options. The configuration storage is volatile and must be reloaded whenever the FPGA is powered up. The Processing System can reload the configuration at any time. For details about different boot and configuration modes refer to Chapter 6, Boot and Configuration.
www.xilinx.com
580
Table 21-2:
In all Zynq-7000 AP SoC devices, the PL bitstream, which contains sensitive customer IP, can be protected with 256-bit AES encryption and HMAC/SHA-256 authentication to prevent unauthorized copying of the design. The PL performs decryption on the fly during configuration using an internally stored 256-bit key. This key can reside in battery-backed RAM or in nonvolatile eFUSE bits. Most configuration data can be read back without affecting the system's operation. Typically, configuration is an all-or-nothing operation, but Zynq-7000 AP SoC devices also support partial reconfiguration. This is an extremely powerful and flexible feature that allows the user to change portions of the logic in the PL while other portions remain static. Users can time-slice these portions to fit more IP into smaller devices, saving cost and power. Where applicable in certain designs, partial reconfiguration can greatly improve the versatility of the Zynq-7000 AP SoC device.
www.xilinx.com
581
Chapter 22
www.xilinx.com
582
Power
An additional benefit of moving operations to the programmable logic is a reduction in power. Depending on the operations, programmable logic can reduce power per OP by 10-100x. Thus it may be useful to implement algorithms in the PL solely to reduce system power. One issue to be aware of is that if the algorithm requires access to external memory, the energy cost of accessing the external memory could dominate the energy budget making a reduction in the operation power irrelevant.
Latency
Parallel logic in the PL has a low predictable delay, and cannot be interrupted. For this reason algorithms which are used to respond to real time events originating the in PL might best be serviced by algorithms in the programmable logic. This approach can reduce response time from thousands of clocks to tens of clocks.
Dataflow
Regardless of how an accelerator or offload engine is designed, once implemented it requires efficient dataflow to and from the accelerator. In many cases, scheduling the dataflow between the accelerator and DRAM can be more of a design challenge than implementing the actual algorithm. The word dataflow is used to reference the motion of data between system memories and PL functional units using AXI interconnect and local interconnect.
www.xilinx.com
583
Resource Limits
While potential speedup can be quite high, the amount of logic in the PL can limit the achievable speedup. For instance, an application which requires 100 DSP slices to achieve a speedup of 24x might be limited to a 12x speedup if only 50 DSP slices are available.
Latency Limits
The examples above assume that the PL can effectively proceed without intervention by the ARM processor. This is the case in situations where the PL implements a predetermined algorithm and dataflow using pre-allocated buffers and data is not resident in caches. In cases where the processor is creating data for the PL accelerator, additional CPU tasks might be required before the PL can begin working on the data. The CPU might need to allocate buffers and pass physical buffer addresses to the PL, or data might be flushed from cache to DDR or OCM or signal the PL to start processing. These additional steps add delays (called latency) to the total processing time. If these delays are significant, the potential acceleration is reduced. Typically it takes 100-200 clocks for the ARM processor to write a few words of data to a PL function. In general, CPU to PL calling latency is not a significant impact for applications processing more than 4 KB of data.
www.xilinx.com
584
RAM can be used at lower energy cost than processor caches. Table 22-1 summarizes the approximate energy cost for various functions implemented on both the A9 processor and the 7 series programmable logic. Table 22-1: Estimated Energy Costs for Common Operations PL Resource
LUT/FF LUT/FF DSP LUTRAM LUT/FF BRAM AXI/OCM AXI/DDR
Operation
Logical Op of 2 var 32-bit ADD 16x16 Mult 32-bit Read/Write register 32-bit Read/Write AXI register 32-bit Read/Write local RAM 32-bit Read/Write OCM 32-bit Read/Write DDR3 Notes:
ARM A9 Resource
ALU ALU ALU L1 AXI L2 CPU/OCM CPU/DDR
1. A9 energy costs estimated from ARM power indicative benchmarks. 2. PL Energy costs for custom programmable logic functions are estimated using the Xilinx XPE power estimator http://www.xilinx.com/ise/power_tools/license_7series.htm.
Typically, the energy cost to read or write external DDR memory is roughly the same and much larger than the operation cost. As a consequence the energy required by functions which require even a small percentage of external access is dominated by the energy cost of the external access and the total cost will be the same in both PL and CPU implementations. Thus a key to minimizing energy cost is to localize data movement to the PL. If space allows, rather than storing data structures off chip, store them in OCM, BRAM, LUTRAM or flip-flops and avoid the use of unnecessary storage. This approach may require code to be restructured to avoid the use of unnecessary buffers.
www.xilinx.com
585
PL Interrupt Servicing
PS interrupts are routed to the PL and can be serviced by a MicroBlaze processor or by hardware state machines.
HW State Machines
When programmable response times from a MicroBlaze or PicoBlaze CPU are not sufficient, hardware state machines can be created to respond to events. These state machines are generally created in RTL, but can also be generated using MATLAB Simulink and Labview graphical design languages.
Programmable Engines
Typically programmable logic based accelerators implement a specific data flow graph which directly converts input data to output data. An example would be a matrix multiply which pushes data from an input buffer through an array of multipliers and adders and stores the result in a result buffer. An alternative approach might be to build a programmable engine with multipliers and adder instructions to implement the algorithms and general purpose memories to store the data. While not generally as efficient as fixed function flowgraphs, programmable engines have the advantage of being reprogrammable to implement alternate algorithms. An additional advantage is that they can be used to implement complex functions as the number of operations is limited only by the instruction memory or the bandwidth required to fetch instructions from DRAM. Also a programmable engine may more easily match the required computational rate than a fixed function flowgraph. In general, programmable engines require access to local memories for code and data storage and can require significantly more memory than fixed function flowgraphs as well as additional logic for address generation and instruction decoding. OpenCL has been used as a programming language for these types of engines, but assembly code is also viable. These engines are an area of active research and some IP is now commercially available.
www.xilinx.com
586
Interface
General Purpose AXI General Purpose AXI High Performance (AFI) AXI_HP AXI _ACP DDR OCM
IF Clock (MHz)
150 150 150 150 1,066 222
Read Total Write R+W of Bandwidth Bandwidth Bandwidth Bandwidth Number Interfaces (MB/s) (MB/s) (MB/s) (MB/s)
600 600 1,200 1,200 4,264 1,779 600 600 1,200 1,200 4,264 1,779 1,200 1,200 2,400 2,400 4,264 3,557 2 2 4 1 1 1 2,400 2,400 9,600 2,400 4,264 3,557
IF Width (Bits)
64 4 8 4
IF Clock (MHz)
222 250 60 50
Read BW (MB/s)
1,776 125 60 25
Write BW (MB/s)
1,776 125 60 25
R+W BW (MB/s)
3,552 250 60 25
Number of Interfaces
1 2 2 2
www.xilinx.com
587
Table 22-4:
Interconnect Central Interconnect Masters Slaves Master Interconnect Slave Interconnect Memory Interconnect
A few performance insights can be inferred from these relative throughputs. The OCM or DDR memories are not able to be fully utilized by a single master, except if a low DDR clock rate is used. For example, DDR read bandwidth is limited to 2,840 MB/s on a particular port by the memory interconnect. The interconnect generally provides enough bandwidth to sustain access to the memory devices.
Access Type
Reads Reads Writes Writes Reads and Writes Reads and Writes
Efficiency (%)
97 92 90 87 87 79
From a design planning perspective, accesses tested in Table 22-5 could be described as optimistic to near-typical values. The random read/write pattern is not worst case as the DDR controller optimization features are still able to improve efficiency; there may be other more pessimistic access patterns. Overall, the DDR controller was designed to have a maximum efficiency of approximately 75%. Table 22-6 lists a DDR efficiency versus burst length example. It illustrates that moderate length bursts do not result in significant DDR efficiency loss. These moderate burst lengths can be useful in latency-sensitive environments where longer bursts can increase latency for higher-priority masters in the system.
www.xilinx.com
588
Table 22-6: DDR Efficiency versus AXI Burst Length (System #1, 4 HP/AFI masters, Sequential Read/Writes) Burst Length
4 8 16
Table 22-7:
System
#1
CPU_6x4x (MHz)
675
CPU_2x (MHz)
225
DDR_3x (MHz)
525
DDR_2x (MHz)
350
DRAM
DDR3
DRAM (Mb/s)
1,050
www.xilinx.com
589
Method
CPU Programmed I/O
Drawbacks
Lowest Throughput
Suggested Uses
Control Functions
Estimated Throughput
<25 MB/s
PS DMAC
600 MB/s
PL AXI_HP DMA
Highest Throughput Multiple Interfaces Command/Data FIFOs Highest Throughput Lowest Latency Optional Cache Coherency
OCM/DDR access only More complex PL Master design Large burst may cause cache thrashing Shares CPU Interconnect bandwidth More complex PL Master design More complex PL Master design
High Performance DMA for large datasets High Performance DMA for smaller, coherent datasets Medium granularity CPU offload PL to PS Control Functions PS I/O Peripheral Access
PL AXI_ACP DMA
PL AXI_GP DMA
Medium Throughput
600 MB/s
www.xilinx.com
590
Drawbacks of using a CPU to move data is that a sophisticated CPU is spending cycles performing simple data movement instead of complex control and computation tasks, and the limited throughput available. Transfer rates less than 25 MB/s are reasonable with this method.
X-Ref Target - Figure 22-1
Quad-SPI 1,2,4,8 bit Parallel 8-bit NOR/SRAM NAND 8,16-bit USB USB GigE GigE SD SD MIO Pins DMA DMA DMA DMA DMA DMA
SLCR
System Level Control Registers
NEON
SP, DP FPU 128-bit Vector DSP
NEON
SP, DP FPU 128-bit Vector DSP
ARM A9 APB
Register Access 32 KB I-Cache 32 KB D-Cache
ARM A9
32 KB I-Cache 32 KB D-Cache
Reset
IRQ
20 I, 29 O
CLK / PLL
ARM, I/O, DDR
PS_CLK
GPIO x54, x64 UART UART I2C I2C SPI SPI CAN CAN TTC/WDT PJTAG DAP
L2
Cache Memory 512 KB
OCM
On Chip Memory 256 KB
DDR
Memory Controller DDR2 DDR3 LPDDR2 16-bit 32-bit 16-bit w/ECC 32-bit AXI
Centrtal Interconnect
DDR
DMA 8 channel
Mem Switch
CoreSight EMIO
GTX GTX Control GTX GTX PCIe Block RAM Trace In Trace Out Cross Trigger M_AXI_GP x 2 General Purpose 32-bit AXI Master S_AXI_GP x 2 General Purpose 32-bit AXI Slave S_AXI_ACP AXI Coherent 64-bit Slave S_AXI_HP x 4 AXI Data 32/64-bit Slave
Config
Security
UG585_c22_03_021913
Figure 22-1:
www.xilinx.com
591
SLCR
System Level Control Registers
NEON
SP, DP FPU 128-bit Vector DSP
NEON
SP, DP FPU 128-bit Vector DSP
APB
USB USB GigE GigE SD SD MIO Pins DMA DMA DMA DMA DMA DMA Register Access
ARM A9
32 KB I-Cache 32 KB D-Cache
ARM A9
32 KB I-Cache 32 KB D-Cache
Reset
IRQ
20 I, 29 O
CLK / PLL
ARM, I/O, DDR
PS_CLK
GPIO x54, x64 UART UART I2C I2C SPI SPI CAN CAN TTC/WDT PJTAG DAP
L2
Cache Memory 512 KB
OCM
On Chip Memory 256 KB
DDR
Memory Controller DDR2 DDR3 LPDDR2 16-bit 32-bit 16-bit w/ECC 32-bit AXI
Central Interconnect
DDR
DMA 8 channel
Mem Switch
CoreSight EMIO
GTX GTX Control GTX GTX PCIe Block RAM Trace In Trace Out Cross Trigger M_AXI_GP x 2 General Purpose 32-bit AXI Master S_AXI_GP x 2 General Purpose 32-bit AXI Slave S_AXI_ACP AXI Coherent 64-bit Slave Row Control User IP I/O Interface S_AXI_HP x 4 AXI Data 32/64-bit Slave
64-bit AXI PCAP Processor Config Access Port XADC 16 ch ADC Config
Security
UG585_c22_04_021913
Figure 22-2:
www.xilinx.com
592
SLCR
System Level Control Registers
NEON
SP, DP FPU 128-bit Vector DSP
NEON
SP, DP FPU 128-bit Vector DSP
APB
USB USB GigE GigE SD SD MIO Pins DMA DMA DMA DMA DMA DMA Register Access
ARM A9
32 KB I-Cache 32 KB D-Cache
ARM A9
32 KB I-Cache 32 KB D-Cache
Reset
IRQ
20 I, 29 O
CLK / PLL
ARM, I/O, DDR
PS_CLK
GPIO x54, x64 UART UART I2C I2C SPI SPI CAN CAN TTC/WDT PJTAG DAP
L2
Cache Memory 512 KB
OCM
On Chip Memory 256 KB
DDR
Memory Controller DDR2 DDR3 LPDDR2 16-bit 32-bit 16-bit w/ECC 32-bit AXI
Central Interconnect
DDR
DMA 8 channel
Mem Switch
CoreSight EMIO
GTX GTX GTX GTX PCIe Trace In Trace Out Cross Trigger M_AXI_GP x 2 General Purpose 32-bit AXI Master S_AXI_GP x 2 General Purpose 32-bit AXI Slave S_AXI_ACP AXI Coherent 64-bit Slave S_AXI_HP x 4 AXI Data 32/64-bit Slave
DMA
User IP
Config Security
UG585_c22_05_021913
Figure 22-3:
www.xilinx.com
593
For more information on S_ACI_ACP, see Chapter 3, Application Processing Unit. See Chapter 29, On-Chip Memory (OCM) when using ACP with OCM.
X-Ref Target - Figure 22-4
SLCR
System Level Control Registers
NEON
SP, DP FPU 128-bit Vector DSP
NEON
SP, DP FPU 128-bit Vector DSP
APB
USB USB GigE GigE SD SD MIO Pins DMA DMA DMA DMA DMA DMA Register Access
ARM A9
32 KB I-Cache 32 KB D-Cache
ARM A9
32 KB I-Cache 32 KB D-Cache
Reset
IRQ
20 I, 29 O
CLK / PLL
ARM, I/O, DDR
PS_CLK
GPIO x54, x64 UART UART I2C I2C SPI SPI CAN CAN TTC/WDT PJTAG DAP
L2
Cache Memory 512 KB
OCM
On Chip Memory 256 KB
DDR
Memory Controller DDR2 DDR3 LPDDR2 16-bit 32-bit 16-bit w/ECC 32-bit AXI
Central Interconnect
DDR
DMA 8 channel
Mem Switch
Coresight EMIO
GTX GTX GTX GTX PCIe Trace In Trace Out Cross Trigger M_AXI_GP x 2 General Purpose 32-bit AXI Master S_AXI_GP x 2 General Purpose 32-bit AXI Slave S_AXI_ACP AXI Coherent 64-bit Slave S_AXI_HP x 4 AXI Data 32/64-bit Slave
DMA
User IP
Config Security
UG585_c22_06_021913
Figure 22-4:
www.xilinx.com
594
Chapter 23
23.1.1 Features
The key features of the PL test and debug are as follows: ARM CoreSight compliant 32-bit trace data from the PL 4-bit trace ID from the PL Clock domain crossing between the PL and PS FIFO buffering for trace packets to absorb bursts of trace data from the PL Indication of FIFO overflow via generation of an overflow packet Trace packets are compatible with ARM trace port software and hardware Trigger signals to/from the PL General-purpose I/Os to/from the PL
www.xilinx.com
595
APB
PL Debug
FTMTP2FDEBUG[31:0] FTMTF2PDEBUG[31:0] FTMTP2FTRIGACK[3:0] FTMTP2FTRIG[3:0] FTMTF2PTRIGACK[3:0] FTMTF2PTRIG[3:0] FTMTF2PTRIG[0] Cross Trigger Interface
CTI
PL Trace
FTMDTRACEINDATA[31:0] FTMDTRACEINATID[3:0] FTMDTRACEINVALID FTMDTRACEINCLOCK Clock Domain Crossing Cycle Count Generator Packet Formatter ATB Interface
FIFO
ATB
UG585_c23_01_030312
Figure 23-1:
As shown in Figure 23-1, the following functional blocks comprise the FTM: APB Interface
This is the interface to the CoreSight debug APB, through which CPUs and JTAG can interact with the FTM. These are programmable registers. This block synchronizes signals between the PL clock domain and the PS clock domain. This block provides: General purpose I/Os, 32 bits to the PL and 32 bits from the PL. These are accessed through reads and writes to registers. Trigger signals, 4 pairs to the PL and 4 pairs from the PL. Each pair consists of a trigger signal and an acknowledge signal, and follows ARM standard CTI handshake protocol.
FTM Registers
PL Debug Ports
www.xilinx.com
596
Packet Formatter
This block is responsible for gathering trace data and formatting the data into trace packets. In addition to trace packets, the packet formatter can also generate various other types of packets to convey additional information to the CoreSight system within the PS. This block is used to provide a binary count value for time stamping packets. This is achieved by a counter, which is: 32-bit, free-running, clocked by CPU_2x Pre-scaled by 2^CYCOUNTPRE (range:1 to 32,768) Reset by POR, FTMGLBCTRL[FTMENABLE]==0, CoreSight reset request through JTAG
FIFO
The FIFO is used to buffer packets before they are sent to the ATB. The FIFO has these properties: 64-packets deep When the FIFO overflows, it signals the packet formatter to generate an overflow packet. In this case, some trace data is lost.
ATB Interface
This is the interface to the CoreSight ATB, over which packets are sent. This block is the interface to the CoreSight ECT system (see Chapter 28, System Test and Debug).
www.xilinx.com
597
The packet formatter generates packets and submits them to the FIFO. The packet formatter can generate the following types of packets: Trace packets: These packets are generated when valid trace data is available from the PL. Trigger packets: These trigger packets can only be generated by the FTMTF2PTRIG[0] signal. Cycle count packets: These packets provide continuous timestamps that are used to reconstruct a real-time trace. Overflow packets: These packets are generated when the FIFO overflows. Synchronization packets: These packets are for packet analysis tools to re-align to packet boundaries.
The cross trigger interface communicates with the CoreSight ECT structure. This interface passes re-synchronized trigger signals between the PL and the ECT. This provides the capability of cross-triggering each other between the PS and PL.
Packets Generated
Trace Packet
Trace Packet
Trigger Packet
Trace Packet
UG585_c23_02_030312
Figure 23-2:
www.xilinx.com
598
Packets Generated
Trace Packet
Trace Packet
Trigger Packet
Trace Packet
UG585_c23_03_030312
Figure 23-3:
PL Trace Valid
PL Trace Valid
PL Trace Valid
Packets Generated
Trace Packet
Trace Packet
Overflow Packet
Trace Packet
Figure 23-4:
www.xilinx.com
599
Synchronization Case
This scenario illustrates how a synchronization packet is generated amid other types of packets. The FTMSYNCRELOAD register sets the number of packets for which a synchronization packet must be generated.
X-Ref Target - Figure 23-5
Trigger
Sync Time
Packets Generated
Trace Packet
Trace Packet
Trace Packet
Sync Packet
Trace Packet
UG585_c23_05_030712
Figure 23-5:
Byte
0 1 n
[6:0]
type data data data
Table 23-2 shows the encoding values for the type byte. Table 23-2:
Trace packet Trigger packet Cycle count packer
[6:3]
trace[3:0] 0100 count[3:0]
[2:0]
101 000 100
www.xilinx.com
600
Table 23-2:
[6:3]
1101 0000
[2:0]
000 000
Trace Packet
A trace packet contains the 32-bit value from each captured FTMDTRACEINDATA[31:0] from the PL. The MSB of the last byte is determined by the presence of an immediately following cycle count packet. If a cycle count packet follows, the MSB is 1 , otherwise it is 0. Table 23-3:
0 1 2 3 4
Byte
[6:0]
data[3:0], 101 data[10:4] data[17:11] data[24:18] data[31:25]
Trigger Packet
A trigger packet is generated for each acknowledged trigger input [0] from the PL, i.e., when both FTMTF2PTRIG[0] and FTMTF2PTRIGACK[0] are High. Table 23-4: Trigger Packet Format Byte
0 1 2 3
[7:0]
0x20 0xA0 0xA0 0x20 or 0xA0
Byte
[6:0]
count[3:0], 100 count[10:4] count[17:11]
www.xilinx.com
601
Table 23-5:
3 4
Byte
[6:0]
count[24:18] count[31:25]
[7:0]
0x68 0xE8 0xE8 0x68
Synchronization Packet
A synchronization packet allows the packet analysis tools to periodically re-align to correct packet boundaries, because the packet formatter does not maintain 32-bit word boundaries for packets. The synchronization packet follows the same format as other CoreSight components. Table 23-7: Synchronization Packet Format Byte
0-7 8
[7:0]
0x00 0x80
23.3 Signals
The FTM control signals are described in the following sections.
Group
IO
O O O O
Description
The FTMP2FDBG0 register controls its value. The FTMP2FDBG1 register controls its value. The FTMP2FDBG2 register controls its value. The FTMP2FDBG3 register controls its value.
www.xilinx.com
602
Table 23-8:
Group
IO
I I I I
Description
The FTMF2PDBG0 register shows its value. The FTMF2PDBG1 register shows its value. The FTMF2PDBG2 register shows its value. The FTMF2PDBG3 register shows its value.
Group
IO
O
Description
Each bit is an asynchronous trigger signal from the CoreSight ECT structure in the PS to the PL. Users must program the CTI connected to the FTM to enable these trigger output signals. Each bit is the asynchronous acknowledge signal for the corresponding FTMTP2FTRIG signal. Each bit is an asynchronous trigger signal from the PL to the CoreSight ECT structure in the PS. Users must program the CTI connected to FTM to enable these trigger input signals. Each bit is the asynchronous acknowledge signal for the corresponding FTMTF2PTRIG signal.
Trigger from PS to PL
FTMTP2FTRIGACK[3:0]
Trigger from PL to PS
FTMTF2PTRIG[3:0]
FTMTF2PTRIGACK[3:0]
IO
I I I I
Description
Clock signal for the trace data interface. Asynchronous to the PS. When this signal is sampled High by the PS using FTMDTRACEINCLOCK, the values on TRMDTRACEINDATA and FTMDTRACEINATID are valid. Trace data. All 32 bits must be provided. Trace ID to be carried over to the ATB. All 4 bits must be provided.
Trace from PL to PS
www.xilinx.com
603
Function
Control Status General debug Cycle counter prescaler Synchronization counter Configuration
Overview
Enable FTM, enable cycle count packets, enable trace packets. Idle status, security signal values, FIFO full/empty. Set the values of the signals presented to the PL. Read the values of the signals from the PL. Set the prescaler value for the cycle counter. Set how often synchronization packets should be generated. Set the ATID value to the ATB bus. These registers provide: Identification information Authentication and access control Integration test
CoreSight management
www.xilinx.com
604
Chapter 24
Power Management
24.1 Introduction
Power optimization can start with selecting the right Zynq-7000 AP SoC device. For low-power applications, choose either the 7z010 or 7z020 device. Power can dramatically be reduced by shutting-down the PL side of the device. I/O voltage and termination choice also affects power consumption. The clocks to individual PS subsystems can be stopped. The functionality of the PS is the same for all Zynq-7000 AP SoC devices, but the PL resources and clocking frequency varies with device type. The PL resource counts are listed in section 21.1.2 PL Resources by Device Type. The clock frequencies are listed in the device data sheets. Detailed device level power estimates for the PS and PL can be obtained using the XPE power estimator spreadsheet. Power specifications are found in the Zynq-7000 AP SoC device datasheets (see Appendix A, Additional Resources for a list of related documents).
24.1.1 Features
Key system power management features are as follows. Choose between device technology:
7z010 and 7z020 (derived from Artix AP FPGA technology) 7z030, 7z045, and 7z100 (derived from Kintex AP FPGA technology)
PL power-off Cortex A9 processor standby mode Clock gating for most PS subsystems Three PLLs can be programmed to minimize power consumption Subsystem clocks can be programmed for optional clock frequency Programmable voltage for I/O Banks:
MIO: HSTL 1.8V, LVCMOS 1.8V, 2.5V and 3.3V DDR: DDR2 1.8V, DDR3 1.5V and LPDDR2 1.2V
DDR3 and LPDDR2 low power mode DDR 16 or 32-bit data I/O Internal and external voltage measurements using XADC
www.xilinx.com
605
www.xilinx.com
606
www.xilinx.com
607
System Module
APU SCU (with GIC) L2-Cache Interconnect Peripherals Clocks
Description
Clocks are stopped automatically if enabled, refer to text. Clocks are stopped automatically if enabled, refer to text. Clocks are stopped automatically if enabled, refer to text. Clocks are stopped automatically if enabled, refer to Chapter 25, Clocks. Peripheral used as a wake up source must be clocked, refer to Table 24-2.
The SCU resumes normal operation when a CPU leaves WFI mode or a request on the ACP occurs.
www.xilinx.com
608
Standby Mode
The L2 cache controllers standby mode can be used in conjunction with the WFI mode of the processor that drives the L2 cache controller. When a processor is in the WFI mode, and standby mode is enabled the L2 cache controller stops its internal clocks. These two power saving modes are very similar and the dynamic clock gating feature is a superset of the standby mode. In standby mode, though, clock gating is limited to WFI states, thus making L2 cache accesses more predictable under normal run conditions.
24.3.2 Peripherals
The primary peripheral power management mechanisms are clock scaling and gating. Chapter 25, Clocks describes the system clocks and how they can be controlled through dividers, gates, and multiplexers. Table 24-2 gives a brief overview of the power management capabilities for the device subsystems. Every peripheral includes clock gating and, in some cases, low-power states. With all these pieces working together, the system-level sleep mode is defined. (Refer to section 24.4 Sleep Mode.) In sleep mode the whole chip enters a low-power state, waiting for a wake-up event to continue operation. Table 24-2: Power Management for Peripheral Controls Wake-up Source
No Yes Chapter 8, Timers No
Peripheral
PCAP Timers DMA Controller
DDR Controller
No
No No No
www.xilinx.com
609
Table 24-2:
Peripheral
GPIO Controller
USB Controller
Ethernet Controller SPI Controller CAN Controller UART Controller I2C Controller Programmable Logic Yes 19.3.5 RxFIFO Trigger Level Interrupt No No
Yes 18.4 System Functions Yes 18.4 System Functions Yes 19.3.4 Receive Data Yes 20.4 System Functions Yes Chapter 25, Clocks Sleep Mode 18.2.1 Controller Modes None None User Defined
Self Refresh
When enabled the DDRC dynamically puts the DRAM into self-refresh mode during idle periods. Normal operation continues when a new request is received by the DDRC. In this mode DRAM contents are maintained even when the DDRC core logic is fully powered down, thus allowing to stop
www.xilinx.com
610
the DDR2X and DDR3X clocks. Also the DCI clock, which controls the DDR termination, can be shut down. Self Refresh Sequence To put the DDR memory into self-refresh mode the following sequence can be used. When executing these steps, the executing CPU should be the only still active master, to guarantee that no new requests are issued to the DDR memory. This mode is typically used in sleep mode.
ddrc.ctrl_reg1[reg_ddrc_selfref_en] = 1 ddrc.DRAM_param_reg3[reg_ddrc_clock_stop_en] = 1 while (slcr.DDR_CMD_STA[CMD_Q_NEMPTY] != 0) while (ddrc.mode_sts_reg[ddrc_reg_operating_mode] != 3) slcr.DDR_CLK_CTRL[DDR_2XCLKACT] = 0 slcr.DDR_CLK_CTRL[DDR_3XCLKACT] = 0 slcr.DCI_CLK_CTRL[CLKACT] = 0
To resume normal DDR operation the clocks must be re-enabled first. Then DRAM is accessible again and the clock stop and self-refresh features can be disabled.
Note: Precharge power down and self refresh modes are mutually exclusive and must not be
activated at the same time.
I/O Buffer
www.xilinx.com
611
inaccessible, it must be assured that the CPU goes through the full wake-up process before any transactions to the DRAM take place. This guarantees that potential transactions targeting the DRAM are served correctly.
Although an ISR is not required (refer to section 24.3.2 Peripherals), it is recommended to attach a proper handler to acknowledge and clear the interrupt.
The location of the currently used translation table(s) and stacks are controllable through the TTBR and SP registers, respectively. This allows switching between different structures for normal running mode and standby mode if needed.
www.xilinx.com
612
During the standby sequence interrupts are disabled in the CPUs. This way execution cannot be interrupted while entering standby mode and once the wake up event occurs execution resumes right after the wfi instruction instead of jumping to a vector table. The wake up interrupt must be enabled in the corresponding wake up device and in the GIC interrupt controller to cause a qualified wake up event. Once interrupts are re-enabled after waking up, the wake up interrupt is still pending and causes the CPU to jump to its interrupt handler, as usual.
10. Increase the clock divisor to slow down the CPU clock. Set slcr.ARM_CLK_CTRL[DIVISOR] = 0x3f. 11. Execute the wf i instruction to enter WFI mode.
www.xilinx.com
613
8. 9.
Disable Cortex-A9 dynamic clock gating. Set cp15.power_control_register[dynamic_clock_gating] = 0 . Enable all required peripheral devices, including DDR controller clocks.
10. Re-enable and serve interrupts. Execute cpsie if. By executing these steps the core systems normal operating mode is restored. Software then can re-enable peripheral clocks and devices, and the second CPU if applicable, as needed.
Note: Bypassing the PLLs and modifying clock dividers change the clock frequencies in the system.
Proper care must be taken clocking the wake-up device, and watchdog timers (if used), etc., under these conditions.
Description
Comment
DDR
ddrc.ctrl_reg1 ddrc.DRAM_param_reg3 ddrc.mode_sts_reg DDRC control register (1) DRAM parameters (3) Controller operation mode status Set DDRC operating mode (e.g. self-refresh) Enable/disable clock stop
PS Clock Module
slcr.{ARM, DDR, IO}_PLL_CFG slcr.xxx_CLK_CTRL slcr.PLL_STATUS slcr.DDR_CMD_STA Program PLL clock generators Enable CPU_1x and reference clocks PLL stable/lock status DDR command store status
www.xilinx.com
614
Chapter 25
Clocks
25.1 Introduction
All of the clocks generated by the PS clock subsystem are derived from one of three programmable PLLs: CPU, DDR and I/O. Each of these PLLs is loosely associated with the clocks in the CPU, DDR and peripheral subsystems.
PLLs
PS_CLK
en
ARM PLL
Mux
I/O PLL
en Glitch-Free
Gate
Glitch-Free
DDR PLL
en
Gate
Glitch-Free
POR Latch
Gate
Glitch-Free
ddr_2x
Async
Bypass Control
Glitch-Free
Mux
PL
PL Clocks
UG585_c25_01_041212
Figure 25-1:
www.xilinx.com
615
ARM PLL: Recommended clock source for the CPUs and the interconnect DDR PLL: Recommended clock for the DDR DRAM controller and AXI_HP interfaces I/O PLL: Recommended clock for I/O peripherals
Individual PLL bypass control and frequency programming Shared bandgap reference voltage circuit for VCOs
Clock Branches
Six-bit programmable frequency dividers Dynamic switching on most clock circuits Four clock generators for the PL
Reset
The clock subsystem is an integral part of the PS and is only reset when the entire system is reset. When this occurs, all of the registers that control the clocking module return to their reset values.
www.xilinx.com
616
A9 MP Core
32K I-Cache 32L D-Cache
A9 MP Core
32K I-Cache 32L D-Cache
M0
M1 Coherent
M0
M1 Coherent
I-AXI D-AXI S0 S1
I-AXI D-AXI
TAG
TAG CTRL M1
S0
S0 DS M0
S0 AS M2 M1 US M0 US
M0 AS
M1
AXI_HP 64/32
Async QoS
DVC S0 US M0 M0 M1 M2 M3 M0 Event
DMAC
S2 QoS
S1 UZ
M0 M1
S1 S0
M0
S0 QoS US/UZ
M2 AS
M1 DS/DZ
PL
Peripheral Interrupts
Peripheral APB
S0
S1
S2
S3
DDR Controller
UG585_c25_02_021213
Figure 25-2:
www.xilinx.com
617
A version of the CPU clock is used for most of the internal clocking. The asynchronous DMA peripheral request interfaces between the DMAC and the PL are not shown in Figure 25-2. In addition, PL AXI channels (AXI_HP, AXI_ACP and AXI_GP) have asynchronous interfaces between the PS and PL. The synchronization, where the clock domain crossing occurs, is located inside the PS. Therefore, the PL provides the interface clock to the PS. Each of the aforementioned interfaces could use unique clocks in the PL.
www.xilinx.com
618
ARM_CLK_CTRL [24] CLK_621_TRUE [0] 1 ARM_CLK_CTRL [25] GlitchFree GlitchFree 2:1 GlitchFree 0 1 0
CPU_6x4x
Closely Coupled, Always 2:1 Ratio
CPU_3x2x
CPU_2x
Closely Coupled, Always 2:1 Ratio
[4]
[5]
[13:8]
ARM_CLK_CTRL
ARM_CLK_CTRL
6:1 or 4:1
CPU_1x
UG585_c25_03_022912
Figure 25-3:
Ratio Examples
The CPU clock domain operates in two modes 6:2:1 and 4:2:1. Table 25-1 shows example frequencies for these modes and modules operating in each clock domain. (See the applicable Zynq-7000 AP SoC data sheet for the specific allowed frequencies for each clock.) Table 25-1: CPU Clock
CPU_6x4x CPU_3x2x CPU_2x
4:2:1
600 MHz (4 times faster than CPU_1x) 300 MHz (2 times faster than CPU_1x) 300 MHz (2 times faster than CPU_1x) 150 MHz
CPU_1x
www.xilinx.com
619
Clock Usage
During normal usage, most system clocks will be derived by taking the input clock PS_CLK, sending it through the PLL, and finally dividing it down to be used within the PS. While the PS generates many different clocks, as shown in Figure 25-1, there are three clock domains that have the largest interaction and importance in the system: These are the DDR_3x domain, the DDR_2x domain, and the CPU clock domain. The DDR_3x clock domain includes the DDR memory controller. The DDR_2x domain is primarily used for the high performance AXI interfaces to the PL (AXI_HP{0:3}) and the interconnect. The CPU clock domain controls the ARM processors along with many of the CPU peripherals. The CPU clock domain is composed of four separate clocks: CPU_6x4x, CPU_3x2x, CPU_2x, and CPU_1x. These four clocks are named according to their frequencies, which are related by one of two ratios: 6:3:2:1 or 4:2:2:1 (abbreviated 6:2:1 and 4:2:1). The operating clock ratio is determined by the CLK_621_TRUE [0] bit value. In the 6:2:1 mode, the frequency of the CPU_6x4x clock is 6 times as fast as the CPU_1x clock. Table 25-1, page 619 shows examples of how these clocks are related. Refer to the applicable Zynq-700 AP SoC data sheet for the maximum clock frequency of each clock domain. All the CPU clocks are synchronous to each other; while the DDR clocks are independent of each other and the CPU clocks. The I/O peripheral clocks, such as CAN reference clocks and SDIO reference clocks, are all generated by a similar method, starting from the PS_CLK pin, through a PLL, then a divider, and finally to the peripheral destination. Each peripheral clock is completely asynchronous to all other clocks.
PS Peripheral Clocks
Every peripheral within the PS is supplied with its own independently gated version of the CPU clock. This gating is applied with a glitch-free clock gate as shown in Table 25-2.
www.xilinx.com
620
Table 25-2:
System Performance
The clock frequencies of the different clock domains of the PS help dictate total system performance. In many cases, the highest frequency CPU clock results in the highest performance. However, some users will find that the CPU is not the critical performer in the system and that bandwidth across the interconnect is the bottleneck. In that case, it may be useful to switch the ratio from 6:2:1 to 4:2:1 mode. Depending on the device speed grade, the frequency of the CPU clocks may be limited by the cpu_6x while in 6:2:1 mode and may be limited by the cpu_2x clock while in 4:2:1 mode. Therefore, it is suggested that for those applications that might exchange some CPU performance for interconnect performance, check the appropriate data sheet to determine the optimal frequencies.
www.xilinx.com
621
value is 40, which generates an ARM PLL output frequency of 33.33 * 40 = 1.33 GHz. For each of the clocks listed in the lower half of the table, the clock frequency equals the sourced PLL frequency divided by the divisor value. For some of the peripheral clocks, such as CAN, Ethernet, and the PL, there are two cascaded dividers. Table 25-3: Clock Frequency Setting Examples for 6:2:1 Mode Example 1 PS_CLK
PLL ARM PLL DDR PLL I/O PLL Clock cpu_6x4x cpu_3x2x cpu_2x cpu_1x ddr_3x ddr_2x DDR DCI SMC Quad SPI GigE SDIO UART SPI CAN PCAP Trace Port PLL FCLKs No. 1 1 1 1 1 1 1 1 1 2 2 1 2 2 1 1 4 PLL Source ARM PLL ARM PLL ARM PLL ARM PLL DDR PLL DDR PLL DDR PLL IO PLL IO PLL IO PLL IO PLL IO PLL IO PLL IO PLL IO PLL IO PLL IO PLL 2 3 7 10 5 8 10 40 5 10 5 10 20 2 PLL Feedback Divider Value 40 32 30 Divisor 0 Divisor 1 ~(1) ~ ~ ~ ~ ~ 15 ~ ~ 1 ~ ~ ~ 1 ~ ~ 1
Example 2 50 MHz
PLL Output Frequency 1333 1067 1000 Clock Frequency 667 333 222 111 533 356 10 100 200 125 100 25 200 100 200 100 50 2 3 7 12 6 8 10 40 8 12 6 15 20 2 PLL Feedback Divider value 20 16 20 Divisor 0 Divisor 1 ~ ~ ~ ~ ~ ~ 15 ~ ~ 1 ~ ~ ~ 1 ~ ~ 1 PLL Output Frequency 1000 800 1000 Clock Frequency 500 250 167 83 400 267 8 83 167 125 100 25 125 83 167 67 50
33.33 MHz
1. "~" in the table indicates that there is no second divider (not applicable).
www.xilinx.com
622
2-to-1 multiplexers for selecting a clock source Programmable divider(s) Glitch-free clock activation gate
Activate Bit
Clock Gate
Glitch-Free Not GlitchFree
DDR PLL
Select Bit Select Bit
I/O Peripheral
Figure 25-4:
PLL
The PLL uses a feedback divider to create an output clock that is equal to the input reference clock multiplied by the PLL_FDIV value supplied by the SLCR.
Glitch-Free Divider
The glitch-free dividers take an input clock and divide it based on the divisor. When the divisor is changed, the output smoothly transitions to the new clock frequency without any glitches.
www.xilinx.com
623
DDR_CLK_CTRL [1] en
Glitch-Free Output
Clock Gate
Glitch-Free
Glitch-Free Output
DDR_2x
DDR PLL
DDR_CLK_ CTRL [25:20] DDR_CLK_CTRL [0] en
Glitch-Free Output
Note: The DDR_2x and DDR_3x clocks are independent and asynchronous to each other.
Clock Gate
Glitch-Free
Glitch-Free Output
DDR_3x
UG585_c25_05_022912
Figure 25-5:
www.xilinx.com
624
Clock Gate
USB{1, 0}_ULPI_OUT
USB{1, 0}_CLK_CTRL[0]
UG585_c25_06_022712
Figure 25-6:
USB Clocks
www.xilinx.com
625
GEM{0,1}_RCLK_CTRL
[4]
Not Glitch-Free
MIO_ENET{0,1}_RX_CLK
0 0 1 1
Not Glitch-Free
EMIO_ENET{0,1}_RX_CLK
Clock Gate
Glitch-Free
ENET{0,1}_REF_CLK
[13:8] [4]
[25:20] 0
GEM{0,1}_CLK_CTRL
EMIO_ENET{0,1}_TX_CLK (signal from PL)
Clock Gate
Glitch-Free Not Glitch-Free
[0]
[6]
GEM{0,1}_CLK_CTRL
UG585_C25_07_022912
Figure 25-7:
www.xilinx.com
626
interface. They are also used to provide a stable reference clock to the Ethernet receive paths when internal loopback mode is selected. These clocks can also be sourced from the EMIO. In this case, the associated RGMII interface is disabled and the MAC connects to the PL through an MII or GMII interface. In this case, the Ethernet reference clock must be provided by the PL. This is regardless of MII or GMII, where normally tx_clk is an input in MII and an output in GMII. When operating in MII or GMII mode, its reference clock is provided by the PL through the eth*_emio_tx_clk. The EMIO source multiplexer is not glitch free because the EMIO source clock cannot be relied upon to be present. It is anticipated that this source selection is a static configuration or that the generated clock be gated before changing to the EMIO source. To support loopback mode, gem0_rx_clk and gem1_rx_clk are supplied with gem0_ref_clk and gem1_ref_clk.
Clock Gate
Glitch-Free
1 GlitchFree
I/O Peripheral
DevC SDIO 0 SDIO 1 SMC SPI 0 SPI 1 Quad-SPI UART 0 UART 1
Control Register
DIVISOR, 13:8 DIVISOR, 13:8 DIVISOR, 13:8 DIVISOR, 13:8 DIVISOR, 13:8
Figure 25-8:
www.xilinx.com
627
CAN_CLK_CTRL
[13:8] [25:20] [0], [1]
0 GlitchFree 1
[6], [22]
[4]
[5]
CAN_CLK_CTRL
Not GlitchFree 1
CAN Controller
53
CAN{0, 1}_REF_CLK
[5:0], [21:16]
CAN_MIOCLK_CTRL
UG585_c25_09_022912
Figure 25-9:
25.7 PL Clocks
The PL has its own clock management generation and distribution features and also receives four clock signals from the clock generator in the PS (see Figure 25-9). For the details of the PL clocking structures, see the 7 series FPGAs clocking documentation. The four clocks that are generated by the PS are completely asynchronous to each other with no relationship to other PL clocks. The four clocks are derived from individually selected PLLs in the PS. Each of the PL clocks are independent output signals that produce suitable clock waveforms for PL use.
www.xilinx.com
628
0 GlitchFree 1
PL FCLK Clock
Control Register
Figure 25-10:
PL Clock Generation
Each clock throttle has a 16-bit counter that is programmed for the number of clock pulses to generate. For a continuous clock output, write a 0 to the counter, which is the default value. The current count can be read by software. The counting and clock pulses can be paused by the PL logic using the FCLKCLKTRIGxN input signal from the PL. The software can re-start the clocking by writing to the PL clock control register. Table 25-4: PL Clock Throttle Input Signal I/O
I
Signal Name
FCLKCLKTRIGxN
Description
The PL clock trigger signal is an input from the PL logic and is used to halt (pause) the PL clock when counting a programmed number of clock pulses. The halt mode is entered by the rising edge (logic 0 to logic 1) of the FCLKCLKTRIGxN signal. This signal can be asserted asynchronously to the FCLK and all other signals. This pin has no affect when the clock is running continuously, [LAST_CNT] = 0 .
www.xilinx.com
629
Software
RUN
decrement Hardware: [CURR_VAL] =0
[CURR_VAL]
HALT
Clock stopped & halt [CURR_VAL]
UG585_c25_11_102912
Figure 25-11:
2.
www.xilinx.com
630
[CPU_START] = 0 [CNT_RST] = 0 [Reserved] = 0x001 [LAST_CNT] = 0x0250 [Reserved] = 0 [CPU_START] = 1 [CNT_RST] = 0 [Reserved] = 0x001
2.
3.
Assert the Start Clock bit: write 0x0000_0005 to the control register, slcr.FPGAx_THR_CTRL.
Example: Program 592 Pulses and Interact with the PL Trigger Input
In this example, there will be 592 clock pulses that are paused by the clock trigger signal (FCLKCLKTRIGxN) and re-started by software. The slcr.FPGAx_THR_CTRL [CPU_START] bit is positive edge triggered to start the clock. 1. 2. 3. 4. 5. Prime the Start Clock bit: See previous example. Program a count of 592 : See previous example. Assert the Start Clock bit : See previous example. PL Logic Pauses the Clock (HALT state): the logic asserts FCLKCLKTRIGxN input to stop the clock. Prime the Start Clock bit: See previous example.
www.xilinx.com
631
EMIOTRACECLK
1 Not GlitchFree 0
0 GlitchFree 1
Clock Gate
Glitch-Free
Debug Subsystem
[6]
[5]
[13:8]
[6]
[0]
UG585_c25_11_072512
Figure 25-12:
Description
PLL
Comments
www.xilinx.com
632
Table 25-5:
Comments
USB{1, 0}_CLK_CTRL GEM{1, 0}_CLK_CTRL GEM{1, 0}_CLK_CTRL SMC_CLK_CTRL LQSPI_CLK_CTRL SDIO_CLK_CTRL UART_CLK_CTRL SPI_CLK_CTRL CAN_CLK_CTRL CAN_MIOCLK_CTRL DBG_CLK_CTRL PCAP_CLK_CTRL
www.xilinx.com
633
3.
25.10.4 PLLs
The three PLLs share the clock input signal, PS_ CLK. Each PLL can be bypassed individually under software control. As part of the power-on reset sequence, all PLLs can be bypassed using the pll_bypass boot mode pin straps. (Refer to the boot mode section of Chapter 6, Boot and Configuration.) The PLL configuration and control registers are in the SLCR. The PLL frequency control registers include the M (feedback divide ratio also known as PLL_FDIV), LOCK_CNT, PLL_CP, and PLL_RES control fields. For each divide ratio M, the PLL_CP, PLL_RES, and LOCK_CNT fields must also be updated to the values shown in Table 25-6. The worst case lock time for the PLLs is 60 us.
Enable PLL Mode when PLL Bypass Mode Pin is Tied High
After the system boots in bypass mode, the following sequence can be used to enable a PLL. Each PLL can be individually enabled. This example shows how to enable the ARM PLL: 1. 2. Program the ARM_PLL CTRL[PLL_FDIV] value and the PLL configuration register, ARM_PLL_CFG[LOCK_CNT, PLL_CP, PLL_RES], to their required values. Force the PLL into bypass mode by writing a 1 to ARM_PLL_CTRL [PLL_BYPASS_FORCE, 4] and setting the ARM_PLL_CTRL [PLL_BYPASS_QUAL, 3] bit to a 0 . This de-asserts the reset to the ARM PLL. Assert and de-assert the PLL reset by writing a 1 and then a 0 to ARM_PLL_CTRL [PLL_RESET, 0].
3.
www.xilinx.com
634
4. 5.
Verify that the PLL is locked by reading PLL_STATUS [ARM_PLL_LOCK, 3]. Disable the PLL bypass mode by writing a 0 to ARM_PLL_CTRL [4].
Table 25-6:
PLL CP
2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 3 2
PLL RES
6 6 6 10 10 10 10 12 12 12 12 12 12 12 12 2 2 2 12 4
LOCK CNT
750 700 650 625 575 550 525 500 475 450 425 400 375 350 325 300 275 250 250 250
www.xilinx.com
635
www.xilinx.com
636
Chapter 26
Reset System
26.1 Introduction
The reset system includes resets generated by hardware, watchdog timers, the JTAG controller, and software. Every module and system in Zynq-7000 AP SoC devices includes a reset that is driven by the reset system. Hardware resets are driven by the power-on reset signal (PS_POR_B) and the system reset signal (PS_SRST_B). There are three watchdog timers in the PS that can generate resets. The JTAG controller can generate a reset that only resets the debug portion of the PS and a system-level reset. Software can generate individual sub-module resets or a system-level reset. Resets are caused by many different sources and go to many different destinations. This chapter identifies all of the resets and either explains their functionality or provides a pointer to another chapter or another document.
26.1.1 Features
The key features of the reset system: Collects resets from hardware, watchdog timers, the JTAG controller and software Drives the reset of every module and subsystem Is an integral part of the device security system Executes a three-stage sequence: power-on, memory clear, and system enabling
www.xilinx.com
637
MODE_PINS
MIO Pin
Internal Registers
Resets
Peripheral Resets
SLCR Soft Reset Debug System Reset Peripheral Reset Control Registers
UG585_c26_01_101812
Figure 26-1:
www.xilinx.com
638
Power-on Reset
Legend Control
Logic
Debug Reset
External System Reset System Software Reset Watchdog Timer Resets Debug System Reset
SCU SoC Debug L-2 Cache CPU 0 Software Reset AWDT 0 Reset CPU 1 Software Reset AWDT 1 Reset IOP Software Resets PL Software Resets
SLCR
I/O Peripherals
Figure 26-2:
www.xilinx.com
639
Stable Voltage Stable PS_CLK clock Release PS_POR_B Sample Bootstrap Pins Apply eFUSE bits
User Visible
PLL BYPASS?
(BOOT_MODE) No
Yes
RAM Memory Clear De-assert all Resets for CPUs and peripherals
User Code
UG585_c26_03_021213
Figure 26-3:
www.xilinx.com
640
The PS_POR_B signal is often connected to the power-good signal from the power supply. When PS_POR_B is de-asserted, the system samples the boot strap mode pins and begins its internal initialization process.
www.xilinx.com
641
The PS does not support the external TRST, although it does support assertion of a reset sequence using TMS. The JTAG logic is only reset at power-on reset or assertion of CDBGRSTREQ from the ARM debug access port (DAP) Controller (JTAG). All of the logic in the JTAG TCK clock domain is reset by this signal.
Source
Device pin DevC Device pin SLCR JTAG SWDT AWDT AWDT JTAG SLCR
RAMs Cleared
All All All
26.3.1 Peripherals
All PS peripherals will be reset when the PS is reset. In addition, individual peripheral resets may also be asserted under software control, through programmable bits within the SLCR. Most peripherals have the ability to reset each of the clock domains within that peripheral. For instance, the Ethernet controller can reset the RX side, TX side, or the interconnect side. Each clock domain can be reset separately. Please note, that individual peripherals may have their own resets defined within those blocks. Peripheral resets will not result in the RAM memory clear logic being activated to clear all memories within the design.
www.xilinx.com
642
26.4 PL Resets
26.4.1 PL General Purpose User Resets
There are four separate reset signals, FCLKRESETN[3:0], routed to the PL which could be used as general purpose reset signals for PL logic. These reset signals are not removed until the PS is out of its boot sequence and user code de-asserts them. They are controllable by the SLCR. SLCR.FPGA_RST_CTRL. PL logic connecting to the PS must not be reset when active transactions exist, since uncompleted transactions could be left pending in the PS. It should be noted, that the reset signal is loosely associated with the FCLK of the same number, however, the timing is such that it must be considered an asynchronous reset to the PL. If the user requires a synchronized reset, they must synchronize it themselves in the PL. (The FCLK needs to be toggling for the reset to propagate out of the PS.)
Name
HW Register Name
slcr.RST_REASON slcr.RST_REASON_CLR slcr.REBOOT_STATUS
www.xilinx.com
643
Table 26-2:
Persistent
Name
HW Register Name
devcfg.LOCK, devcfg.MULTIBOOT_ADDR, devcfg.STATUS, devcfg.UNLOCK, slcr.SLCR.REBOOT_STATUS, slcr.RESET_REASON, devcfg.CTRL.MULTIBOOT_EN, devcfg.CTRL.PCFG_AES_FUSE, devcfg.CTRL.PCFG_AES_EN, devcfg.CTRL.SEU_EN, devcfg.CTRL.SEC_EN, devcfg.LOCK, devcfg.STATUS.SECURE_RST, slcr.ARM_CLK_CTRL.SRCSEL, slcr.APU_CTRL.CFGSDISABLE, slcr.APU_CTRL.CP15SDISABLE, scu.Watchdog_Reset_Status_Register See Chapter 28, System Test and Debug
Debug
The persistent registers are registers that are not cleared during any reset other than the POR reset. Two types of persistent registers are used; one stores the state for user identification, and the other is used for security reasons. For information on the security registers, please see Appendix B, Register Details, or Chapter 32, Device Secure Boot. The first group includes the RST_REASON and the REBOOT_STATUS registers. The RST_REASON register indicates the cause of the last reset. User code should read this register, act on it, then clear it out using the slcr.RST_REASON_CLR register so it is primed for the next event. This register is written to by hardware. REBOOT_STATUS is written to by the BootROM. The details of values in the REBOOT_STATUS register can be found in Chapter 6, Boot and Configuration.
Systems Affected
All
HW Register Name
slcr.PSS_RST_CTRL
Peripheral Name
AXI Interconnect CPU and Peripherals
HW Register
slcr.TOPSW_RST_CTRL slcr.A9_CPU_RST_CTRL
www.xilinx.com
644
Table 26-4:
OCM CAN DDR DMA DevC Ethernet PSPL GPIO I2C Quad-SPI SDIO SPI SMC UART USB
Peripheral Name
HW Register
slcr.OCM_RST_CTRL slcr.CAN_RST_CTRL slcr.DDR_RST_CTRL slcr.DMAC_RST_CTRL slcr.DEVCI_RST_CTRL slcr.GEM_RST_CTRL slcr.FPGA_RST_CTRL slcr.GPIO_RST_CTRL slcr.I2C_RST_CTRL slcr.LQSPI_RST_CTRL slcr.SDIO_RST_CTRL slcr.SPI_RST_CTRL slcr.SMC_RST_CTRL slcr.UART_RST_CTRL slcr.USB_RST_CTRL
www.xilinx.com
645
Chapter 27
www.xilinx.com
646
accidental debug enablement under the security environment due to a single event upset (SEU). Zynq-7000 AP SoC devices also provide JTAG disable lock-down to prevent debug enablement due to software errors. The Zynq-7000 AP SoC provides for permanently disabling JTAG, by using one eFuse bit to record. Care should be used when selecting this option because the eFuse JTAG disable is not reversible. Figure 27-2 shows the debug trace architecture. The user can enable debug trace source, PTM, ITM, and FTM using either the JTAG/DAP interface or software through the debug APB bus.
X-Ref Target - Figure 27-1
PS Domain
Hard Logic
PL Domain
Hard Logic
Xilinx PL TAP
* 6-bit instructions * ICAP
PL JTAG
Xilinx Platform Cable
Figure 27-1:
This section focuses on the trace port interface unit, which is one of the trace sink modules used to dump real-time trace to an external trace capture module. Both TPIU and ETB receive exact same copies of aggregated trace from multiple trace sources. Although ETB is able to support high trace bandwidth, the 4 KB limit only allows capturing the trace in a small time window. To monitor trace information over a longer period of time, the user must enable the TPIU to dump either through MIO or EMIO so the trace is captured by external trace capture equipment such as an HP logic analyzer, Lauterbach Trace32, ARM DStream, etc.
www.xilinx.com
647
PTM
ITM
FTM
Debug APB
PS
TPIU
MIO
Trace Port
UG585_c27_02_050212
Figure 27-2:
27.1.2 Features
Key features of the JTAG debug interface are: JTAG 1149.1 boundary scan support Two 1149.1 compliance TAP controllers: One JTAG TAP controller and one ARM DAP Single unique IDCODE from the Xilinx TAP for each of the Zynq 7000 family of devices IEEE 1532 programming in-system-configurable (ISC) devices support
On-board flash programming Xilinx chipscope debug support ARM CoreSight debug center control using ARM DAP Indirect PS address space access through DAP-AP port External trace capture using MIO in PS, or EMIO in PL
www.xilinx.com
648
www.xilinx.com
649
The PL Xilinx TAP controller serves four key purposes: boundary scan test, eFuse programming, BBRAM programming, and PL debug chipscope.
X-Ref Target - Figure 27-3
AHB-AP
Top Switch
PL
APB-AP
CPU Debug
CTM
CTM
CTI
CTI
CTI CTI FTM Cross Trig(8) Trace Debug JTAG Interface (Chipscope)
PTM
CPU
PTM
CPU
PL Logic
PS
PS_Pad
PL_Pad
TPIU
4K ETB
XILINX TAP
Trace Port
eFuse BBRAM
Figure 27-3:
The TPIU provides the mechanism to capture trace over long periods of time. There is no internal time limit to how long a trace can be dumped so the only practical limit is the Zynq-7000 bandwidth. If doing a trace dump using PS I/O through MIO, the maximum trace bandwidth depends on how many MIO trace I/Os could be allocated. Another alternative is trace dump through EMIO. PL soft logic connects the EMIO trace signal to the PL SelectIO. There are other potential innovative ways to handle EMIO trace. For example, users could loopback EMIO trace data back to the PS and store it in DDR memory or export trace via gigabit Ethernet to enable remote debug or monitor. In typical debug flow, the user enables minimum trace source dumping capability to fit trace data into allocated TPIU throughput. After a small time window when debug occurs as determined through trace monitoring, the user could enable full trace dumping capability if required, and store short periods of data into the ETB for the next level of debug. Other than debugging, trace port also brings significant value for software profiling. Soft profiling helps the user to identify those software routines that consume the
www.xilinx.com
650
most CPU power. Based on that, the user could decide to either perform software optimization or offload the process to the PL.
Pin
MIO 12, 24, 36 or 48 MIO 13, 25, 37 or 49 MIO 10, 22, 34 or 46 MIO 11, 23, 35 or 47
I/O
I I I O
Then TPIU output, as shown in Figure 27-3, can be routed to either EMIO or MIO (but not both). Table 27-2 shows the signal routing. Note that EMIO supports the full 32 bits of TRACE_DATA (bits [31:16] are not shown in the table), while MIO supports only 16 bits of TRACE_DATA. Table 27-2 shows the ARM DAP/Xilinx TPIU signal routing. Table 27-2: Signal Name
TRACE_CLK TRACE_CTL TRACE_DATA TRACE_DATA TRACE_DATA TRACE_DATA Notes:
With EMIO, the boundary for the I/O reference is the PS/PL boundary. With PJTAG, the boundary is the device package pins.
MIO I/O
I O
Pin
MIO12 or MIO24 MIO 13 or MIO25 MIO[15:14] or [27:26] MIO[23:22] MIO[19:16] MIO[9:2]
I/O
O O
EMIOTRACEDATA
www.xilinx.com
651
PS
PL
JTAG
SS
DAP
TAP
TPIU
SRST
SS
ARM DStream
UG585_c27_04_031812
Figure 27-4:
27.4.2 Use Case II: PS and PL Debug with Trace Port Enabled
The second use case shows how to enable PS software and PL hardware at the same time with two separate debug tools. The tool connected to the Xilinx TAP is typically a Xilinx debug tool. The tools connected to the PS DAP could be Xilinx or any third-party debug tools from ARM or Lauterbach. To support this mode, PL configuration is required to bring the DAP JTAG signals to the PL SelectIOs. Figure 27-5 shows trace port access through the PL SelectIO, but the user could use the MIO trace port as in the previous use case if there is way to manage to fit the trace port into the limited MIO pin multiplexing. Trace port access through SelectIO could support up to 32-bit trace data and gives users enough trace port throughput to address most debug need. As with the JTAG DAP access, the
www.xilinx.com
652
PL must be configured to route the trace signal from the EMIO at the PS/PL boundary to the PL SelectIO.
X-Ref Target - Figure 27-5
PS
PL
Xilinx Platform Cable
JTAG
SS
DAP
TAP
Soft Core
JTAG
SS
TPIU
Soft Core
SS
ARM DStream
SRST
UG585_c27_05_031812
Figure 27-5:
An APACC might access a register of a debug component of the system to which the interface is connected. The scan chain model implemented by a JTAG-DP has the concepts of capturing the current value of APACC or DPACC, and of updating APACC or DPACC with a new value. An update might cause a read or write access to a DAP register that might then cause a read or write access to a debug register of a connected debug component. Table 27-3 shows four Tap ARM DAP IR Instructions. All other IR Instructions are implemented as BYPASS.
www.xilinx.com
653
Table 27-3:
ABORT DPACC APACC
IR Instruction
DR Width
35 35 35 32 1
Description
JTAG-DP abort register JTAG DP access register JTAG-AP access Register IDCODE for ARM DAP IP
ARM_IDCODE BYPASS
The ARM DAP is composed of one debug port (DP) and up to three access ports (APs). Among the three APs, Zynq-7000 devices only implement APB-AP as the bus master to access all debug components and AHB-AP to access system memory space directly. Table 27-4 lists all registers within the DP. Table 27-4:
CTRL/STAT SELECT
DP Register
Description
DP Control and Status register Its main purpose is to select the current access port and the active four-word register window in that access port
Table 27-5 shows AHB-AP and APB-AP registers in the DAP. For each AP, there is a unique set of registers associated with each AP port. Although the DAP allows JTAG-AP, Zynq devices do not support this feature. Table 27-5:
CSW TAR DRW BD0-3
AP Register
Description
Control and status word Transfer address, TAR Data read/write Band data 0 to 3
www.xilinx.com
654
TPIU Register
SUPPORT_PORT_SIZE CURRENT_PORT_SIZE TRIG_MODE TRG_COUNT TRIG_MULT TEST_PATTERN FORMAT_SYNC
Description
32-bit register with each bit indicating whether a single port size is allowed Indicates current trace port size with only 1 of 32-bits that could be set Indicates trigger mode support 8-bit register to enable delaying the indication of triggers to the external trace capture device Trigger counter multiplier Configures a test pattern to generate a known bit sequence that could be capture by external capture device Control generation of stop, trigger, and flush events
Description
Enables boundary-scan EXTEST operation Enables boundary-scan SAMPLE operation Access user-defined register 1 Access user-defined register 2 Access user-defined register 3 Access user-defined register 4 Access the configuration bus for readback Access the configuration bus for configuration Enables shifting out user code Enables shifting out of ID code Marks the beginning of ISC configuration; full shutdown is executed
www.xilinx.com
655
Table 27-7:
Description
Enables in-system programming Change security status from secure to non-secure mode and vice versa No operation Used to read back BBR Completes ISC configuration. Startup sequence is executed Enables bypass
www.xilinx.com
656
Chapter 28
28.1.1 Features
The CoreSight components provide the following capabilities for the system-wide trace: Debug and trace visibility of whole systems with a single debugger connection Cross triggering support between SoC subsystems Multi-source trace in a single stream Higher data compression than previous solutions Standard programmer's models for standard tools support
www.xilinx.com
657
Automatic discovery of topology Open interfaces for third party soft cores Low pin count options
28.1.2 Notices
7z010 CLG225 Device
This device supports 32 MIO pins as shown in the MIO table in section 2.5.4 MIO-at-a-Glance Table. The width of the TPIU in the 7x010 CLG225 device is restricted to 1, 2 or 4-bits via the MIO pins. All 32 data signals are available on the EMIO interface. All of the 7z010 CLKG225 device restrictions are listed in section 1.1.3 Notices.
Instrumentation Trace Macrocell (ITM) Trigger Register ITM Trigger Write Packet Registers
MIO/ EMIO
CPUs
Detector Packetizer
UG585_c28_01_022612
Figure 28-1:
www.xilinx.com
658
Access and control: DAP, ECT Trace source: PTM, FTM, ITM Trace link: Funnel, Replicator Trace sink: ETB, TPIU
The components are connected by three types of buses/signals: Programming Trigger Trace
The CoreSight system interacts with: CPUs CPUs PL CPUs EMIO/MIO CPUs/JTAG through PTM for debug and trace through ITM for trace through FTM for debug and trace through ETB for dumping trace through TPIU for dumping trace through DAP for programming CoreSight components
A debugger can use JTAG to communicate with the CoreSight infrastructure, while software running on a CPU uses APB through memory-mapped addresses assigned to the CoreSight infrastructure. The DAP forwards access requests arriving via either interface to the requested CoreSight component. In addition, the DAP also has another interface to access subsystems other than CoreSight, on the PS: Internal: AHB master, to the master interconnect
With AHB, the DAP can forward access requests from JTAG to other subsystems in the PS, subject to authentication requirements. For example, a debugger can query the value of a location in DDR or the value of a coprocessor register. The DAP follows the access model described in ARM Debug Interface v5 Architecture Specification and ARM Debug Interface v5.1 Architecture Supplement , where JTAG indirectly accesses debug components and resources by way of registers in the DAP. The DAP block is an ARM-supplied IP with the following configuration:
www.xilinx.com
659
JTAG is the only external interface on chip pinout. Serial wire interface (SW-DP) is not present. APB slave and AHB master are the two internal interfaces. JTAG at the DAP's internal side (JTAG-AP) is present, but only the nSRSTOUT[0] output is connected to the system reset controller. Power-down is not supported.
One or more CTMs form an event broadcasting network with multiple channels. A CTI listens to one or more channels for an event, maps a received event into a trigger, and sends the trigger to one or more CoreSight components connected to the CTI. A CTI also combines and maps the triggers from the connected CoreSight components and broadcasts them as events on one or more channels. Both CTM and CTI are CoreSight components of the control and access class. ECT is configured with: Four broadcast channels Four CTIs Power-down is not supported.
Table 28-1 lists the connections of trigger inputs and outputs of the CTIs. Table 28-1: CTI Trigger Inputs and Outputs
Signal
ETB full ETB acquisition complete ITM trigger ETB flush ETB trigger TPIU flush TPIU trigger
www.xilinx.com
660
Table 28-1:
Note: For details on the two CTIs connected to CPU0 and CPU1, refer to the CoreSight PTM-A9
Technical Reference Manual, r1p0, DDI0401C, section 1.3.6.
www.xilinx.com
661
The ITM block in Zynq-7000 AP SoC devices is the standard ARM-supplied IP, with the no custom configuration.
28.2.5 Funnel
The funnel is the block for merging trace data from multiple sources into a single stream. It is a CoreSight component of the trace link class. Users select the sources to be merged and assign priorities to them. The funnel in Zynq-7000 AP SoC devices is the standard ARM-supplied IP, with the no custom configuration. Table 28-2 lists the connections of the input ports of the Funnel.
[
Table 28-2:
0 1 2 3 4-7
Port
www.xilinx.com
662
Table 28-3 shows the two operating modes of TPIU. Table 28-3: Operating Modes of TPIU Values 1
Active interface Clock source to operate the TPIU Output clock present? Clock edge(s) to sample trace data and control Supported data widths Application Note EMIO EMIOTRACECLK No Rising 1, 2, 4, 8, 16, 32 Since PL supplies the clock to TPIU, PL can use the same clock to sample. MIO PS clock controller Yes Rising and falling 1, 2, 4, 8, 16 External device should delay the trace clock output by approximately half clock period, and use the delayed clock to sample.
SLCR[DBG_CLK_CTRL[6]]
Figure 28-2 shows the waveforms of TPIU I/O signals in the two modes. In EMIO mode, the PL supplies the trace clock signal to TPIU; PL can use the same clock to sample the trace data and control signals from PS. In MIO mode, all signals, including data, control, and clock, are aligned at the selected MIO pins; therefore, the external device should delay the trace clock output by approximately half the clock period to successfully sample the trace data and control signals.
www.xilinx.com
663
trace data, control output on selected MIO pins trace clock output on selected MIO pins trace clock delayed by approximately half period TPIU Signals on MIO
UG585_c28_02_022612
Figure 28-2:
EMIO Signals
Signal Name
EMIOTRACECLK ~ EMIOTRACECTL
TPIU Signal
Trace clock input Trace clock output Trace control
I/O
I ~ O
www.xilinx.com
664
Note: CPU0 debug logic and CPU1 debug logic can also be accessed through CP14 coprocessor
instructions. See the Cortex-A9 Technical Reference Manual for details.
www.xilinx.com
665
28.4.2 Functionality
Table 28-6 summarizes the registers in each CoreSight component. Table 28-6: CoreSight Component Register Summary Name
Entry0-9 Peripheral ID0-7 Component ID0-3
Function
DAP ROM
Pointers CoreSight management
Overview
Pointers to other CoreSight components These registers provide identification information
ETB
Control Status RAM depth RAM read RAM write Trigger counter Formatter and flush CoreSight management CTL STS RDP RRD, RRP RWD, RWP TRG FFCR, FFSR Peripheral ID Component ID Device ID, type Claim, lock, authentication Integration test Enable/disable capture Status on pipeline, acquisition, trigger, full/empty Depth of RAM in words Read pointer and data Write pointer and data Sets the number of words to be stored after a trigger event Stop events, trigger mark, flush start, formatting control These registers provide: Identification information Authentication and access control Integration test
CTI
Control Acknowledge Channel event generation Channel event gating Forwarding control Trigger/Channel interface status CoreSight management CONTROL INTACK APPSET, APPCLR, APPPULSE GATE INEN, OUTEN TRIGINSTATUS, TRIGOUTSTATUS, CHINSTATUS, CHOUTSTATUS Peripheral ID Component ID Device ID, type Claim, lock, authentication Integration test Enable/disable CTI Provide for SW to acknowledge TRIGOUT when no hardware acknowledge is supplied Raise/clear/pulse channel events, used with GATE register to create local events Prevent the channel events from propagating to other CTI's in the system Enable the forwarding of events between the trigger interface and the channel interface Provide the current status of the trigger and channel interfaces These registers provide: Identification information Authentication and access control Integration test
www.xilinx.com
666
Table 28-6:
Function
TPIU
Supported feature Trigger Testing Format and finish CoreSight management
Funnel
Control CoreSight management Control, Priority Peripheral ID Component ID Device ID, type Claim, lock, authentication Integration test Enable slave ports, set hold time, and priority These registers provide: Identification information Authentication and access control Integration test
ITM
Control Stimulus Trace CoreSight management CR, SCR SPR TER, TTR Peripheral ID Component ID Device ID, type Claim, lock, authentication Integration test Enable ITM, configure features like timestamp, sync packets, sync count, etc. Cause the write data to be inserted into the FIFO for packets Enable trace and trigger These registers provide: Identification information Authentication and access control Integration test
CPU debug
Control Breakpoints DBGDSCCR BVR BCR WVR WCR Controls cache behavior while the CPU is in debug state Set breakpoint values, and control breakpoints. A breakpoint can be set on an Instruction Virtual Address (IVA) or/and a Context ID Set watchpoint values, and control watchpoints. A watchpoint can be set on a Data Virtual Address (DVA) or with a Context ID
Watchpoints
www.xilinx.com
667
Table 28-6:
Function
CoreSight management
Overview
These registers provide: Identification information Authentication and access control Integration test
CPU PMU
Control Status Counter PMCR PMOVSR PMCNTENSET PMCNTENCLR PMSELR PMCCNTR PMXEVTYPER PMXEVCNTR PMUSERENR PMINTENSET PMINTENCLR Performance monitor control Overflow flag status Counter enable set/clear, software increment, cycle count
Counters to gather statistics on the operation of the processor and memory system User enable Interrupt enable set/clear
PTM
Configuration ETMCR, ETMCCR, ETMTRIGGER, ETMSR, ETMSCR ETMSSSCR, ETMTEEVR, ETMTECR1 ETMACVR, ETMACTR ETMCNTRLDVR, ETMCNTENR, ETMCNTVR ETMSQMNEVR, ETMSQR ETMEXTOUTEVER ETMCIDCVR1, ETMCIDCMR ETMSYNCFR, ETMIDR ETMCCER, ETMEXTINSELR, ETMTSEVR, ETMAUXCR, ETMTRACEIDR, ETMOSLSR Peripheral ID Component ID Device ID, type Claim, lock, authentication Integration test Main control registers, configuration, set trigger events, and status Trace enable start/stop, Trace enable event, Trace enable control Address comparator values, types Counter reload values, enable events, reload events, current values Sequencer state transition events, sequencer current state Set events that control the corresponding external output Context ID comparator value, mask Sync frequency, ID Sync frequency, ID Configuration code, external input selection, timestamp, auxiliary control, CoreSight trace ID, OS lock, power-down These registers provide: Identification information Authentication and access control Integration test
CoreSight management
www.xilinx.com
668
Table 28-7 lists the Zynq-7000 AP SoC device authentication requirements for the CoreSight components. Table 28-7:
Requirement DAP AHB master
Non-secure access Secure access 1 1 x x 0 1 x x
www.xilinx.com
669
Table 28-7:
Requirement Funnel TPIU ETB
ITM
Disable stimulus registers 0-15 Disable stimulus registers 16-31 0 x 0 x 0 0 0 0
PTM
Prohibited regions of trace Use the following to determine: if (~NIDEN & ~DBGEN) Prohibited = 1 else if (security level == non-secure) Prohibited = 0 else if ((privilege level == user) & (SUNIDEN)) Prohibited = 0 else if (SPIDEN || SPNIDEN) Prohibited = 0 else Prohibited = 1
www.xilinx.com
670
Chapter 29
www.xilinx.com
671
256 KB RAM
Arbiter
APB I/F
Registers
IRQ
UG585_c29_01_042512
Figure 29-1:
29.1.2 Features
Key features of the OCM include: On-chip 256 KB RAM On-chip 128 KB BootROM (not user visible) Two AXI 3.0, 64-bit slave interfaces Low latency path for CPU/ACP reads to OCM (CPU at 667 MHz minimum 23 cycles) Round-robin pre-arbitration between read and write AXI channels on OCM-interconnect port (non-CPU port) Fixed priority arbitration between the CPU/ACP (via SCU) and OCM-interconnect AXI ports Supports full AXI 64-bit bandwidth of simultaneous read and write commands (with optimal alignment restrictions) on the OCM interconnect port Random access supported to RAM from AXI masters
www.xilinx.com
672
TrustZone support for on-chip RAM with 4 KB page granularity Flexible address mapping capability RAM byte-wise parity generation, checking, and interrupt support Support for the following non-AXI features on the CPU (SCU) port:
Zero line fill Pre-fetch hint Early BRESP Speculative line pre-fetch
S0
S1
S0
S1
OCM Interconnect
M
DDR
S0 S1
On-chip RAM
256 kB
UG585_c29_02_022212
Figure 29-2:
www.xilinx.com
673
29.2.3 Clocking
The OCM module is clocked by the CPU_6x4x clock. However, the RAM array itself is an exception, and is clocked by CPU_2x, though its 128-bit width is double that of any of the incoming 64-bit wide AXI channels. The OCM switch feeding the OCM module is clocked by CPU_2x, and the SCU is clocked by CPU_6x4x.
Using the ocm.OCM_CONTROL.ScuWrPriorityLo register setting (see Appendix B, Register Details), the decreasing priority arbitration can be modified to: 1. 2. 3. SCU-Rd OCM-Switch SCU-Wr
www.xilinx.com
674
Addr/Cmd
Req
Hi Priority
Addr/Cmd/Data
Req
Med Priority
128
256 KB RAM
Req
Req
Req
Low Priority
Addr/Cmd/Data
Gnt[1:0]
Gnt[2:0]
UG585_c29_03_042512
Figure 29-3:
There is an additional round-robin pre-arbitration process that selects between a read or write transaction on a per data-beat basis for the OCM-switch port traffic.
Note: Arbitration is performed on a transfer (data beat or clock cycle) basis, not on an AXI command
basis. The in-coming AXI read and write commands are split into individual addresses (or 128-bit address pairs for aligned bursts) before arbitration.
Note: Each individual write address beat will not request access to the memory array until the write data associated with it is available inside the OCM module this prevents the scenario of a write request being stalled due to write data not being available.
Starvation Scenarios
System constraints on the OCM are: The RAM array and OCM Switch port are clocked with CPU_2x which runs at one third or one half the CPU clock. The SCU (CPU/ACP) port is clocked at full the CPU clock rate. Each of the four incoming AXI data channels are 64-bits wide.
www.xilinx.com
675
The RAM array is 128-bits wide. The OCM switch port has separate read and write channels that can be simultaneously active. The SCU (CPU/ACP) port has separate read and write channels that can be simultaneously active. The SCU (CPU/ACP) port channels have a fixed arbitration priority higher than the OCM switch port by default.
The address range assigned to the OCM can be modified to exist in the first or last 256 KB of the address map, to flexibly handle the ARM low or high exception vector modes. In addition, the CPU and ACP AXI interfaces can have their lowest 1 MB address range accesses diverted to DDR, using the SCU address filtering feature. This section describes these features through a series of example address configurations.
Mapping Summary
(See Appendix B, Register Details for detailed register information.) When addressing the OCM the following details should be considered: The 256 KB RAM array can be mapped to either a low address range (0x0000_0000 to 0x0003_FFFF ) or a high address range (0xFFFC_0000 to 0xFFFF_FFFF ) in a granularity of four independent 64 KB sections via the 4-bit slcr.OCM_CFG[RAM_HI]. The SCU address filtering (mpcore.SCU_CONTROL_REGISTER[Address_filtering_enable]) field is set by hardware on any form of reset and should not be disabled by the user. Address filtering on non-OCM addresses is necessary to correctly route transactions between the two downstream SCU ports.The address filtering range has a 1 MB granularity. The SCU address filtering feature is able to redirect accesses from its CPU and ACP masters targeting the range ( 0x0000_0000 to 0x000F_FFFF ) which includes the OCM's low address range, to the PS DDR DRAM, independent of the RAM address settings. For each 64 KB section mapped to the high OCM address range via slcr.OCM_CFG[RAM_HI] which is not also part of the SCU address filtering range will be aliased for CPU and ACP masters at a range of 0x000C_0000-0x000F_FFFF. All other masters that do not pass through the SCU are always unable to access the lower 512 KB of DDR in the OCM's low address range ( 0x0000_0000 to 0x0007_FFFF ). Accesses to addresses which the RAM array is not currently mapped to are given an error response.
Initial View
Upon entering user mode, the BootROM is no longer accessible, and the RAM space is split. Note that one 64 KB range resides at the high OCM address, and the other 192 KB resides at the lower address range. Table 29-1 and Table 29-2 identify the initial OCM/DDR address map and register settings, respectively. Attempted accesses to reserved areas return all zeroes along with a SLVERR bus response.
www.xilinx.com
676
Table 29-1:
CPUs/ACP
OCM OCM OCM Reserved Reserved Reserved Reserved Reserved Reserved OCM3 (alias) DDR Reserved Reserved Reserved OCM3
Other Masters
OCM OCM OCM Reserved Reserved DDR DDR DDR DDR DDR DDR Reserved Reserved Reserved OCM3
Table 29-2:
OCM Relocation
For a contiguous RAM address range, RAM located at address 0x0000_0000 to 0x0002_FFFF can be relocated to base address 0xFFFF_C0000 by programming the SLCR registers. Each bit of slcr.OCM_CFG[RAM_HI] corresponds to a 64 KB range, with the MSB corresponding to the highest address offset range. For more register programming details, refer to the SLCR information in the system level control registers section of Appendix B, Register Details. Table 29-3 and Table 29-4 identify an example OCM relocation address map and OCM relocation register settings, respectively. Table 29-3: Example OCM Relocation Address Map Size
64 KB 64 KB
CPUs/ACP
Reserved Reserved
Other Masters
Reserved Reserved
www.xilinx.com
677
Table 29-3:
CPUs/ACP
Reserved Reserved Reserved OCM0 (alias) OCM1 (alias) OCM2 (alias) OCM3 (alias) DDR OCM0 OCM1 OCM2 OCM3
Other Masters
Reserved Reserved Reserved DDR DDR DDR DDR DDR OCM0 OCM1 OCM2 OCM3
Table 29-4:
www.xilinx.com
678
Table 29-5:
CPUs/ACP
DDR DDR DDR OCM0 OCM1 OCM2 OCM3
Other Masters
Reserved DDR DDR OCM0 OCM1 OCM2 OCM3
Table 29-6:
29.2.5 Interrupts
The OCM module is able to assert an interrupt signal to the APU under the following circumstances: Single-bit Parity Error Multiple-bit Parity Error Unsupported LOCK Request
All interrupts are enabled via the OCM.OCM_PARITY_CTRL register. Individual interrupt status is accessed via the OCM.OCM_IRQ_STS register, and cleared with a write of 1 to each bit location. Parity on the RAM array is performed when the OCM.OCM_PARITY_CTRL[ParityCheckDis] is not asserted. When parity checking is enabled, a single- or multi-bit parity error sets the appropriate interrupt status, and triggers an external interrupt if the associated enable bit is set. The address offset of the first parity error is stored in the OCM.OCM_PARITY_ERRADDRESS register. For reads, a SLVERR response can also be issued to the requesting master for devices that are unable to or prefer not to handle interrupts.
www.xilinx.com
679
Overview
Returns RAM parity error address Set interrupt enables, AXI read response error enable, parity enable, odd parity generation Read raw interrupt status, clear interrupts Change pre-arbitration priority SLCR register write disable SLCR register write enable OCM subsystem reset OCM TrustZone Configures RAM address mapping SCU address filtering enable SCU address filtering base address SCU address filtering end address
slcr
mpcore
3. 4. 5. 6. 7.
www.xilinx.com
680
8.
Modify the mpcore.Filtering_Start_Address_Register to the desired start address of transactions that should be filtered away from the OCM for SCU masters. Typical settings are 0x0010_0000 (default, do not redirect lower 1 MB), and 0x0000_0000 (start redirect at lowest address to DDR RAM). Modify the mpcore.Filtering_End_Address_Register to the desired end address of transactions that should be filtered away from the OCM for SCU masters. A typical setting is 0xFFE0_0000 .
9.
10. Set mpcore.SCU_CONTROL_REGISTER[Address_filtering_enable] to enable address filtering. 11. Ensure that the access has completed to the SLCR by issuing a data memory barrier (DMB) instruction. This allows subsequent accesses to rely on the new address mapping.
DECERR
SLVERR
www.xilinx.com
681
Chapter 30
XADC Interface
30.1 Introduction
The Xilinx analog mixed signal module, referred to as the XADC, is a hard macro. It has JTAG and DRP interfaces for accessing the XADCs status and control registers in the 7-series FPGAs. Zynq-7000 AP SoC devices add a third interface, the PS-XADC interface for the PS software to control the XADC. The Zynq-7000 AP SoC devices combine a flexible analog-to-digital converter with programmable logic to address a broad range of analog data acquisition and monitoring requirements. The XADC is part of a larger analog mixed signal (AMS) topic that is a combination of analog and digital circuits. The XADC has two 12 - bit 1 mega samples per second (MSPS) ADCs with separate track and hold amplifiers, an analog multiplexer (up to 17 external analog input channels), and on-chip thermal and on-chip voltage sensors. The two ADCs can be configured to simultaneously sample two external-input analog channels. The track and hold amplifiers support a range of analog input signal types, including unipolar, bipolar, and differential . The analog inputs can support signal bandwidth of 50 0 KHz at sample rate of 1 MSPS. It is possible to support higher analog bandwidths using external analog multiplexer mode with the dedicated analog input. The XADC optionally uses an on-chip reference circuit, thereby eliminating the need for external active components for basic on-chip monitoring of temperature and power supply rails. To achieve the full 12-bit performance of the ADCs , an external 1.25V reference IC is recommended. The most recent measurement results (together with maximum and minimum readings) are stored in dedicated registers. User-defined alarm thresholds can automatically indicate over-temperature events and unacceptable power supply variation . A user-specified limit (for example , 100C) can be used to initiate a software-controlled system power- down.
Control Interfaces
Software running in the PS can communicate with the XADC in one of two ways: PS-XADC Interface: a 32-bit APB slave interface on the PS interconnect that is FIFOd and serialized. PS to PL AXI master could also be used to control the XADC via the AXI XADC core logic.
Development tools can connect to the PL-JTAG pins and control many parts of the AP SoC including the XADC. The interface is described in Chapter 27, JTAG and DAP Subsystem. The PL-JTAG interface and the internal PS-XADC interface cannot be used at the same time. The selection between the
www.xilinx.com
682
these interfaces is controlled by the devcfg.XADCIF_CFG[ENABLE] bit. However, the XADC arbitrates between the selected interface (PL-JTAG or PS-XADC) and the DRP interface.
System Considerations
For high-performance ADC applications managed by the PS, use the IP core Core Logic connected to an M_AXI_GP interface. This is a parallel data path. When using the PS-XADC interface, FIFOs are used for commands and read data to allow software to quickly queue-up commands without having to wait for serialization, but on the back end the data is serialized to the XADC much like the PL-JTAG interface. This is the serial datapath and is much slower.
30.1.1 Features
Analog-to-Digital Converters
Dual 12-bit 1 MSPS analog-to-digital converters (ADCs) Up to 17 flexible and user-configurable analog inputs On-chip or external reference option On-chip temperature and power supply sensors JTAG access to ADC measurements
PS-XADC Interface
Read and write XADC registers Serial data transfers to/from XADC Buffered read-write data operations 15-word by 32-bit command FIFO 15-word by 32-bit Read Data FIFO Programmable FIFO-level interrupts Programmable alarm interrupts Configured interface operations (using devcfg registers)
PL-JTAG Interface
Access the XADC when the PL is not programmed but is powered-up Uses the JTAG TAP controller to access the XADC registers
www.xilinx.com
683
JTAG
PL
PL-JTAG Interface
DRP
16-bit data
Arbitor
Security
PCAP
PS
LogiCORE IP AXI XADC Core Logic
Refer to the PG019 Product Specification
External Voltages
Dual purpose PL pins.
Misc. Signals
UG585_c30_10_021913
Note: The XADC arbitrates between the DRP interface and either the PS-XADC or the PL- JTAG
PS-XADC Interface
The PS-XADC interface description consumes the majority of this chapter. Software running in the PS configures the interface using the devcfg registers. Software writes commands to the interface that are pushed into the Command FIFO. These 32-bit writes, consisting of DRP command, address and data, are serialized and sent to the XADC in a loopback path that fills the returning Read Data FIFO that is read by the software. The interface is configured by the devcfg registers, refer to Appendix B, Register Details.
DRP Interface
The DRP interface is a parallel 16-bit bidirectional interface that can connect to a PL bus master via the LogiCORE IP AXI XADC PL logic using an AXI4-Lite interface to enable the PS or a MicroBlaze processor to control the XADC. The IP core receives 16 bits of data with each AXI4-Lite read/write transaction. The interface is described in DS790, Product Specification.
www.xilinx.com
684
The PL-AXI interface provides the highest performance. This interface uses the PL-AXI interface protocol and provides flexibility of integrating additional signal processing IPs in the data path of XADCs samples. For example, a FIR filter can be instantiated in the PL-AXI data path between the XADC and the M_AXI_GP interface of PS (or other logic in the PL).
PL JTAG Interface
The JTAG interface features and functions are described in UG480, 7 Series FPGAs and Zynq-7000 All Programmable SoC XADC Dual 12-Bit 1 MSPS Analog-to-Digital Converter User Guide . This interface connects to the development tools. The Chipscope application can use the PL JTAG interface to read and write to the XADC status and control registers respectively. Note: The PL-JTAG interface is disabled, including control by Chipscope, when the PS-XADC interface is selected.
Alarms
The seven alarm and over temperature signals are routed to the PS-XADC interface and made available to the PL. For the PS-XADC interface, these are described in section 30.3 PS-XADC Interface Description. Their use by the LogiCORE IP is described in PG091, LogiCORE IP XADC Wizard Product Guide .
www.xilinx.com
685
PS Interconnect
32
32
Parallel-to-serial Converter
1 XADC_PS_TCK XADC_PS_RESET XADC_PS_EN XADC_PS_ALARM[6:0] XADC_PS_OT
Serial-to-parallel Converter
1 XADC_PS_TDO
UG585_c31_01_021913
XADC_PS_TDI
Word in XADC
Figure 30-2:
DRP Interface
The programming model for the DRP interface is described in UG480, 7 Series FPGAs and Zynq-7000 All Programmable SoC XADC Dual 12-Bit 1 MSPS Analog-to-Digital Converter User Guide . This interface can connect to the LogiCORE IP AXI XADC interface to provide an AXI4-lite interface as described in the AXI XADC Interface product specification.
PL-JTAG Interface
The programming model for the PL-JTAG interface is described in the UG480, 7 Series FPGAs and Zynq-7000 All Programmable SoC XADC Dual 12-Bit 1 MSPS Analog-to-Digital Converter User Guide.
www.xilinx.com
686
Notices
7z010 CLG225 Device
This device provides four external ADC signal pairs (differential inputs). All other Zynq-7000 devices provide 12 external ADC signal pairs. The hardware pin information is provided in UG865, Zynq-7000 All Programmable SoC Packaging and Pinout product Specification.
If a JTAG transaction is in progress when a DRP request occurs, the LogiCORE XADC bridge can buffer the request until the JTAG transaction is complete. The XADC asserts the JTAGBUSY signal to indicate an ongoing JTAG transaction. A JTAG transaction cannot be started if a DRP read/write operation is in progress. For more details on the arbitration, please refer to UG480, 7 Series FPGAs and Zynq-7000 All Programmable SoC XADC Dual 12-Bit 1 MSPS Analog-to-Digital Converter User Guide .
www.xilinx.com
687
The channel is a full duplex synchronous bit-serial link with dedicated control signals using a JTAG protocol. By default, after reset, the connection between the PS and XADC (PS-XADC interface) is disabled. PS software can write a 1 to the devcfg.XADCIF_CFG [ENABLE] bit to control the source and switch the communication channel from the PL-JTAG interface to the PS-XADC interface. When the PS-XADC interface is enabled to control the XADC, the XADC is no longer accessible by the PL - JTAG interface. The inverse is true, when XADC is accessible by PL-JTAG, it can not be accessed by the PS-XADC. The PS-XADC interface interacts with the PS via an APB 3.0 interface on the PS interconnect. This interface is part of the DevC module and is described in section 6.4 Device Configuration Interface .
PS-XADC Interface
The alarm signals are routed directly from the XADC block into the PS_XADC interface block, thus allowing alarm status to be reflected directly in the PS XADCs interface registers and enabling alarms to trigger interrupts. Individual alarm interrupts can be disabled using the devcfg.XADCIF_INT_MASK register. The alarm signals are sent to the PS-XADC Interface Status register. This register is masked and the masked interrupts are ORd together to generate the IRQ ID #39 interrupt to the PS interrupt controller. When an alarm goes active, it triggers a maskable interrupt. The alarm signals get latched in the PS-XADC interface devcfg.XADCIF_INT_STS register and it can be used to determine which alarm was activated. Writing a 1 to the active alarm bit in the devcfg.XADCIF_INT_STS register clears the interrupt. The unmasked status of the alarm signals can be read using the devcfg.XADCIF_MSTS register.
DRP Interface
The alarms and OT signals are available on the DRP interface. They are actively connected to and used by the LogiCORE AXI_XADC bridge, refer PG019, LogiCORE IP AXI XADC Product Guide .
www.xilinx.com
688
Functional Description
When the measured value on a voltage sensor is greater than the maximum thresholds or less than the minimum threshold values, then the output alarm signal goes active. The alarm is reset (inactive) when a subsequent measurement value falls between the upper and lower threshold values . This operation differs for the temperature sensor alarm, The temperature alarm goes active when the measured temperature exceeds the high threshold. The temperature alarm is reset (inactive) when the temperature falls below the lower threshold value. The alarm signals are summarized in Table 30-1. Table 30-1: Alarm
ALM[0] ALM[1] ALM[2] ALM[3] ALM[4] ALM[5] ALM[6] OT
www.xilinx.com
689
n
32-bit
n+1
n+2
32-bit
n-1
Dummy Data or Previous Command Result
n
Result from First Command
n +1
Result from Second Command
UG585_c30_11_022513
Figure 30-3:
The status of the command and Read Data FIFOs can be monitored using the devcfg.XADCIF_MSTS Interface Miscellaneous Status register. Software can also setup interrupts using the devcfg.XADCIF_INT_STS iNterrupt Status register.
Note: Reading from an empty Read Data FIFO causes an APB slave bus error.
www.xilinx.com
690
One packet remains in the XADC when the Command FIFO is emptied. To retrieve the packet, write a dummy command.
31 30 29
26 25
16 15
CMD [3:0]
Others
31
16 15
0
Figure 30-5:
www.xilinx.com
691
www.xilinx.com
692
1. 2. 3.
Reset the serial communication channel. Write a 1 and then a 0 to devcfg.XADCIF_MCTRL [RESET]. Reset the XADC. Write any 16-bit value to DRP address 0x03 (reset register). Write 08030000h to the devcfg.XADCIF_CMDFIFO register. Flush the FIFOs. There is no reset signal, instead flush the FIFOs: a. Wait for the Command FIFO to empty. The last command should be a NOOP (dummy write). b. Read the Read Data FIFO until empty.
g. Enable the PS access of XADC. Write 0x1 to devcfg.XADCIF_CFG [ENABLE]. Configure the interrupts : Interrupts are used to manage the alarms from the XADC and Command/Read Data FIFOs. Refer to the program example in section 30.5.3 Interrupts. Data transfers to the XADC : Refer to section 30.5.2 Read and Write FIFOs.
www.xilinx.com
693
3.
Wait until the Command FIFO becomes empty. Wait until devcfg.XADCIF_MSTS [CFIFOE] = 1.
Note: For every write to the devcfg.XADCIF_CMDFIFO register, data is shifted into the
devcfg.XADCIF_RDFIFO register (Read Data FIFO).
Note: After a read command has been sent to the XADC, the corresponding read data will be
available during the next shift period. Therefore, one dummy command write (as shown in step 5) is always needed to push out the last read data.
30.4.2 Interrupts
Example: Configure and Manage Alarm 5 (VCCPAUX)
This example configures the XADC registers to set alarm thresholds, operating mode, and enables the Alarm 5 (VCCPAUX) interrupt in the PS-XADC interface. The XADC hard macro has to be operated in Independent mode because alarms are not enabled in Default mode (refer to the XADC Operating Modes section of UG480, 7 Series FPGAs and Zynq-7000 All Programmable SoC XADC Dual 12-Bit 1 MSPS Analog-to-Digital Converter User Guide. 1. Prepare commands. Prepare commands as described in section 30.4.3 Command Preparation for writing to the XADC hard macro alarm threshold registers (VCCPAUX Upper- 0x5A and VCCPAUX Lower- 0x5E ) with the required thresholds and XADC Config_Reg1 (0x41 ) to set the XADC in Independent mode. Write commands to the Command FIFO. Write the commands prepared in step 1 to the devcfg.XADCIF_CMDFIFO register. Enable the Alarm 5 interrupt in the PS-XADC interface. Write devcfg.XADCIF_INT_MASK [M_ALM] = 7Eh . Check if Alarm 5 is triggered. Poll for devcfg.XADCIF_INT_STS [M_ALM] = 1 . Clear the Alarm 5 interrupt. Write devcfg.XADCIF_INT_STS [M_ALM] = 1 . Disable the Alarm 0 interrupt. Write devcfg.XADCIF_INT_MASK [M_ALM] = 7Fh
2. 3. 4. 5. 6.
www.xilinx.com
694
Note: After power-up (refer to the Zynq-7000 AP SoC data sheet for the proper voltage sequencing),
PS-to-PL voltage shifters are automatically enabled. The PL must be powered-up to access the PS-XADC interface registers, but the PL does not need to be configured to access the registers. Table 30-3 shows an overview of XADC Interface registers. Table 30-3: Register Overview Mnemonic
devcfg.XADCIF_CFG Configuration devcfg.XADCIF_MCTL Interrupts devcfg.XADCIF_INT_STS devcfg.XADCIF_INT_MASK devcfg.XADCIF_MSTS
Function
Description
Configuration: Enable, FIFO threshold, frequency ratio, and launch edge. XADC Interface Misc. Control register XADC Interface Interrupt Status register XADC Interface Interrupt Mask register XADC Interface Misc. Status register
Type
Read/Write Read/Write Read, Write 1 to clear Read/Write Read
www.xilinx.com
695
Table 30-3:
Function
Command and Read Data FIFOs
Description
XADC Interface Command FIFO XADC Interface Read Data FIFO
Type
Write Read
Note: PL-JTAG cannot access the XADC if the PS-XADC interface is accessing the XADC (i.e.,
devcfg.XADCIF_CFG [ENABLE] = 1 ).
See Chapter 25, Clocks for more information about the PS clocks.
www.xilinx.com
696
30.7.2 Resets
There are several resets in the XADC module.
Note: The PS-XADC FIFOs are not cleared by the interface reset.
XADC Reset
The XADC is reset by writing to the reset register using a DRP address of 03h . Write 0x08030000 to the devcfg.XADCIF_CMDFIFO register. The data that is included is ignored by the XADC.
www.xilinx.com
697
Chapter 31
PCI Express
31.1 Introduction
The Zynq-7z030, Zynq-7z045, and Zynq-7z100 AP SoC devices include the Xilinx 7 series Integrated block for PCI Express core which is a reliable, high-bandwidth, third-generation I/O solution. The PCI Express solution for these Zynq AP SoC devices supports x1, x2, x4, and x8 lane Root Port and Endpoint configurations at both Gen1 (2.5 Gb/s) and Gen2 (5 Gb/s) speeds. Attention must be paid to system level bandwidth if full Gen 2 x8 throughput is needed. This might include either inline processing of the data in PL before storing it to the PS DDR memory or using a wider DDR3 memory interface in the PL. The Root Port configuration can be used to build a Root Complex solution. These configurations are compatible with the PCI Express Base Specification, Rev 2.1. The PCI Express module supports the AXI4-stream interface for the user interface at both 64-bit and 128-bit widths. For more detailed information regarding the 7 Series FPGAs Integrated block for PCI Express core, refer to these documents on the Xilinx website: DS821, LogiCORE IP 7 Series FPGAs Integrated Block for PCI Express Data Sheet UG477, LogiCORE IP 7 Series FPGAs Integrated Block for PCI Express User Guide
www.xilinx.com
698
User Logic
Transaction (AXI-ST)
Physical (PL)
Transceivers
Host Interface
Configuration (CFG)
Optional Debug
User Logic
User Logic
System (SYS)
Figure 31-1:
For additional information regarding the different interfaces to the Integrated block for PCI Express core, refer to Chapter 2: Core Overview of UG477, 7 Series FPGAs Integrated Block for PCI Express User Guide .
31.3 Features
The PCI Express core provides these key features: High-performance, highly flexible, scalable, and reliable, general-purpose I/O core
Compatible with the PCI Express Base Specification, rev. 2.1 Compatible with conventional PCI software model
Incorporates Xilinx Smart-IP technology to guarantee critical timing Uses GTXE2 transceivers for 7 Series FPGA families
2.5 Gb/s and 5.0 Gb/s line speed Supports 1-lane, 2-lane, 4-lane, and 8-lane operation Elastic buffers and clock compensation
www.xilinx.com
699
Supports Endpoint and Root Port configurations 8B/10B encode and decode Supports lane reversal and lane polarity inversion per PCI Express specification requirements Standardized user interface
Supports AXI4-stream interface Easy-to-use packet-based protocol Full-duplex communication Back-to-back transactions enable greater link bandwidth utilization Supports flow control of data and discontinuation of an in-process transaction in transmit direction
Supports flow control of data in receive direction Compatible with PCI/PCI Express power management functions Supports a maximum transaction payload of up to 1,024 bytes Supports multi-vector MSI for up to 32 vectors and MSI-X Up-configure capability enables application-driven bandwidth scalability Compatible with PCI Express transaction ordering rules
www.xilinx.com
700
Chapter 32
32.1.2 Features
Zynq-7000 AP SoC devices provide the following secure boot features: Advanced Encryption Standard
AES-CBC with 256-bit key Encryption key stored on-chip in either eFuse or Battery-backed RAM (BBRAM) SHA-256 authentication engine (FIPS180-2) 2048-bit public key
www.xilinx.com
701
bootstrap
Zynq-7000 AP SoC
ROM Step 1 On-Chip RAM NAND NOR QSPI IOP Step 3 Step 4 CPU0 CPU1
Processing System
DAP
AXI
FIFO PCAP
Step 5
PL
Programmable Logic
UG585_c33_01_022613
Figure 32-1:
A device secure boot involves several systems contained within the AP SoC device. The secure boot process is always initiated by the boot ROM. If RSA authentication has been enabled the boot ROM will use the public key to authenticate the first stage boot loader (FSBL) before it is decrypted or executed. If the boot image header indicates a secure boot, the boot ROM enables the AES and HMAC engines which reside in the PL. The encrypted FSBL is then sent by the boot ROM to the AES and HMAC in the PL via the processor configuration access port (PCAP). The FSBL image is decrypted and sent back to the PS via the PCAP where it is loaded into the on-chip RAM (OCM) for execution. The PS is then able to securely configure the PL by sending an encrypted bitstream through the PCAP to the AES for decryption and distribution to the PL memory cells.
www.xilinx.com
702
Note: The master secure boot mode uses the AES decr yption and HMAC authentication engines
within the PL , therefore the PL must be powered on during the secure boot process. The boot ROM ensures that the PL is powered before reading the encr ypted image from the external boot device. It is the users responsibility to ensure that the PL is powered on before trying to decrypt any new configuration files .
Power on Reset
After the power-on and reset sequences have completed, the on-chip boot ROM begins to execute. An optional eFuse setting can be used to perform a full 128 KB CRC on the boot ROM for a small boot time penalty. After the integrity check the boot ROM reads the boot mode setting specified by the bootstrap pins . The boot ROM then reads the boot header from the specified external memory.
Secure Boot
If a secure boot is specif ied in the boot image header, the boot ROM starts by checking the power-on status of the PL . Since the AES and HMAC engines reside within the PL, the PL must be powered up to perform a secure boot. The boot ROM waits until the PL is powered up before continuing the secure boot sequence. After the power-on status of the PL is conf irmed , the boot ROM begins to load the encrypted FSBL into the AES engine via the PCAP. The PL sends the decrypted FSBL back to the PS via the PCAP . The decrypted image is then loaded into the OCM . The boot ROM also monitors the HMAC authentication status of the FSBL and if an authentication error occurs, the boot ROM puts the PS into a secure lockdown state.
www.xilinx.com
703
Handoff to FSBL
Once the FSBL has been successfully loaded and authenticated, control is turned over to the decrypted FSBL which now resides in the OCM. Based on the user application, the FSBL could then start processing, configure the PL, load additional software, or wait for further instruction from an external source.
X-Ref Target - Figure 32-2
Power On Reset
(Debug access with JTAG disabled)
Internal memory hardware clean process (Optional ROM CRC) RSA enabled
Secure boot
Non-secure boot
Enable JTAG
Figure 32-2:
PS Boot Flow
www.xilinx.com
704
Partition Data
Partition data is signed and encrypted. The partition data is decrypted and authenticated by the AES and HMAC engines within the PL.
www.xilinx.com
705
FSBL
Partition
Partition
PS Image or PL Bitstream
HMAC Signature Partition RSA authentication certificate (optional) Partition Partition RSA authentication certificate (optional)
Expansion Space
. . .
Figure 32-3: Secure Boot Image Format
UG585_c33_03_022513
www.xilinx.com
706
SPK Modulus Extension Public Exponent SPK Signature 2,048 bits 32 bits, padded to 512-bit boundary 2,048 bits
FSBL Signature
2,048 bits
UG585_c33_04_022513
Figure 32-4:
Description
The AP SoC device must boot securely and use the eFuse key as the AES key source. Non-secure boot of the device is not allowed. If the boot image header does not match this setting, a security lockdown occurs. If the AP SoC device is booted in secure mode, then the eFuse key must be selected. Non-secure boot of the device is allowed. If the boot image header does not match this setting, a security lockdown occurs. The ARM DAP and PL TAP are permanently disabled. Any attempt to active the ARM DAP or the PL TAP controllers causes a security lockdown.
www.xilinx.com
707
PS eFUSE Settings
The PS also has an eFuse array. The primary purpose is to store the memory built in self repair information and the RSA public key hash. The PS eFuse also has a number of fuses that can be used to control the security boot flow of the device. (see Table 32-3). Table 32-3: PS eFuse Setting Summary eFuse
eFuse Write Protection (2 fuses)
Description
Blow both of these fuses to permanently disable all writes to the PS eFuse array. Enables a full 128 KB CRC on the ROM prior to loading the FSBL. Enables RSA authentication for NAND, NOR, SD, or QSPI. The ARM DAP and PL TAP are disabled when the device is booted in DFT mode, any attempt to activate the ARM DAP or the PL TAP causes a security lockdown. The DFT boot mode is permanently disabled. Booting in DFT mode immediately triggers a security lockdown. SHA-256 signature for the RSA primary public key including extra ECC bits.
ROM 128KB CRC Enable RSA Authentication Enable DFT JTAG Disable
www.xilinx.com
708
www.xilinx.com
709
www.xilinx.com
710
The PS DAP and PL TAP controllers can be permanently disabled using the JTAG CHAIN DISABLE eFuse. The JTAG access to the PL can also be disabled by setting the DISABLE_JTAG configuration option when creating the PL bitstream. (see UG628, Command Line Tools User Guide for more information.
32.3.6 Readback
Whenever an encrypted bitstream is loaded into the PL, readback of the internal configuration memory cannot be performed by any of the external interfaces, including JTAG. The only readback access to the configuration memory after an encrypted bitstream load is via PCAP or ICAP. The PCAP and ICAP interfaces are trusted channels since access to these interfaces are from an authenticated PS image or an authenticated PL bitstream.
Table 32-4:
User SW RSA
Not allowed No No No No
AES / HMAC
No Not allowed Not allowed Not allowed Not allowed
Table 32-5:
FSBL PL Bitstream u-Boot Linux Applications
User SW RSA
Not allowed Allowed Allowed Allowed Allowed
AES / HMAC
No Not allowed Not allowed Not allowed Not allowed
www.xilinx.com
711
Table 32-6:
FSBL PL Bitstream u-Boot Linux Applications
User SW RSA
Not allowed Allowed Allowed Allowed Allowed
AES / HMAC
Yes Allowed Allowed Allowed Allowed
Table 32-7:
FSBL PL Bitstream u-Boot Linux Applications
User SW RSA
Not allowed Allowed Allowed Allowed Allowed
AES / HMAC
Yes Allowed Allowed Allowed Allowed
www.xilinx.com
712
Appendix A
Additional Resources
A.1 Xilinx Resources
Product Support and Documentation
www.xilinx.com/support
Xilinx Glossary
www.xilinx.com/company/terms.htm
www.xilinx.com
713
A.3 References
A.3.1 Zynq-7000 AP SoC Documents
Refer to the following Zynq-7000 AP SoC documents for further reference:
DS190, Zynq-7000 AP SoC Product Overview DS187, Zynq-7000 AP SoC (7z010 and 7z020): AC and DC Switching Characteristics Data Sheet DS191, Zynq-7000 AP SoC (7z030, 7z045, and 7z100): AC and DC Switching Characteristics Data Sheet UG865, Zynq-7000 AP SoC Packaging and Pinout Specifications UG821, Zynq-7000 AP SoC Software Developers Guide UG933, Zynq-7000 AP SoC PCB Design and Pin Planning Guide EN191, Zynq-7000 AP SoC Errata Sheet
DS821, Xilinx LogiCORE IP 7 Series FPGAs Integrated Block for PCI Express Product Specification UG471, Xilinx 7 Series FPGAs SelectIO Resources User Guide UG472, Xilinx 7 Series FPGAs Clocking Resources User Guide UG473, Xilinx 7 Series FPGAs Memory Resources User Guide UG474, Xilinx 7 Series FPGAs Configurable Logic Block User Guide UG476, Xilinx 7 Series FPGAs GTX Transceiver User Guide UG477, Xilinx 7 Series FPGAs Integrated Block v1.3 for PCI Express User Guide UG479, Xilinx 7 Series FPGAs DSP48E1 User Guide UG480, Xilinx 7 Series FPGAs XADC User Guide UG483, Xilinx 7-Series FPGAs PCB and Pin Planning Guide
These user guides and additional relevant information can be found in the 7 Series overall set of documentation on the 7 Series FPGAs, which is available on the Xilinx website: http://www.xilinx.com/support/documentation/7_series.htm Zynq-7000 AP SoC Technical Reference Manual UG585 (v1.5) March 7, 2013 www.xilinx.com 714
www.xilinx.com
715
ChipScope Pro Software and Cores User Guide (UG029) PlanAhead Tutorial: Debugging with ChipScope (UG677) Xilinx Problem Solvers
http://www.xilinx.com/support/troubleshoot.htm
ARM AMBA Level 2 Cache Controller (L2C-310) TRM (also called PL310) ARM AMBA Specification Revision 2.0, 1999 (IHI 0011A) ARM Architecture Reference Manual (Need to register with ARM) ARM Cortex-A Series Programmer's Guide
www.xilinx.com
716
ARM Cortex-A9 Technical Reference Manual, Revision r3p0 ARM Cortex-A9 MPCore Technical Reference Manual, Revision r3p0 (DDI0407F) includes descriptions for accelerator coherency port (ACP), CPU private timers and watchdog timers (AWDT), event bus, general interrupt controller (GIC), and snoop control unit (SCU) ARM Cortex-A9 NEON Media Processing Engine Technical Reference Manual, Revision r3p0 ARM Cortex-A9 Floating-Point Unit Technical Reference Manual, Revision r3p0 ARM CoreSight v1.0 Architecture Specification includes descriptions for ATB Bus, and Authentication ARM CoreSight Program Flow Trace Architecture Specification ARM Debug Interface v5.1Architecture Specification ARM Debug Interface v5.1 Architecture Specification Supplement ARM CoreSight Components TRM includes descriptions for embedded cross trigger (ECT), embedded trace buffer (ETB), instrumentation trace macrocell (ITM), debug access port (DAP), and trace port interface unit (TPIU) ARM CoreSight PTM-A9 TRM ARM CoreSight Trace Memory Controller Technical Reference Manual ARM Generic Interrupt Controller v1.0 Architecture Specification (IHI 0048B) ARM Generic Interrupt Controller PL390 Technical Reference Manual (DDI0416B) ARM PrimeCell DMA Controller (PL330) Technical Reference Manual ARM Application Note 239: Example programs for CoreLink DMA Controller DMA-330 ARM PrimeCell Static Memory Controller (PL350 series) Technical Reference Manual, Revision r2p1, 12 October 2007 (ARM DDI 0380G)
BOSCH, CAN Specification Version 2.0 PART A and PART B, 1991 Cadence, Watchdog Timer (SWDT) Specification IEEE 802.3-2008 - IEEE Standard for Information technology-Specific requirements - Part 3: Carrier Sense Multiple Access with Collision Detection (CSMA/CD) Access Method and Physical Layer Specifications, 2008 Universal Serial Bus (USB) Specification, Revision 2.0 UTMI+ Low Pin Interface (ULPI) Specification, Revision 1.1 Enhanced Host Controller Interface (EHCI) Specification for USB, Revision 1.0 SD Association, Part A2 SD Host Controller Standard Specification Ver2.00 Final 070130 SD Association, Part E1 SDIO Specification Ver2.00 Final 070130 SD Group, Part 1 Physical Layer Specification Ver2.00 Final 060509
www.xilinx.com
717
Appendix B
Register Details
B.1 Overview
This appendix provides details of all the memory-mapped registers in the Zynq-7000 AP SoC. Throughout this manual, the names of registers and register bit fields used match those given in the hardware. They are called the hardware names. C header files are delivered with this product which define register and bit field names for easy use in software code. In some cases, the software names are different from the hardware names. This appendix includes software names where they differ from hardware names: Software Module Name: This is included in the module introduction section and is named Software Name . Software Register Name: This is included in the detailed register description and is also named Software Name . Software Bit field Name: These are included in the register bit field tables in the Field Name column. These names follow the hardware field name and are contained in parentheses.
Note: If a software name does not exist in the C header files or if it exists but is the same as the
hardware name, it is not included in this appendix and the above fields are not present. The software register name will be: <software module name>_<software register name>_<optional suffix> . One common suffix used for register names is OFFSET, which would give the OFFSET address of that register from the base address for the module. The software bit field name will be: <software module name>_<software register name>_<software bit field name>_<optional suffix> . One common suffix used for bit field names is MASK, which would be useful when extracting the bit field of interest from the full register.
www.xilinx.com
718
B.2 Acronyms
The following acronyms are used for many of the registers.
Access Type
clronrd clronwr nsnsro nsnsrw nsnswo nssraz raz ro rud rw rwso sro srw swo waz wo wtc z Readable, clears value on read Readable, clears value on write During non-secure access, if thread is non-secure, it is read only During non-secure access, if thread is non-secure, it is read write During non-secure access, if thread is non-secure, it is write only During non-secure access, if thread is secure, it is read as zero Read as zero Read-only Read undefined Normal read/write Read/write, set only During secure access, it is read only During secure access, it is read write During secure access, it is write only Write as zero Write-only Readable, write a one to clear Access (read or write) as zero
Description
www.xilinx.com
719
www.xilinx.com
720
Module Name debug_itm debug_tpiu devcfg dmac0_ns dmac0_s gem0 gem1 gpio gpv_qos301_c pu gpv_qos301_d mac
Module Type itm tpiu devcfg dmac dmac GEM GEM gpio qos301
Base Address 0xF8805000 0xF8803000 0xF8007000 0xF8004000 0xF8003000 0xE000B000 0xE000C000 0xE000A000 0xF8946000
Description Instrumentation Trace Macrocell Trace Port Interface Unit Device configuraion Interface Direct Memory Access Controller, PL330 Direct Memory Access Controller (Non-Secure Mode) Direct Memory Access Controller, PL330 Direct Memory Access Controller (Secure Mode) Gigabit Ethernet Controller Instance no. 0. Gigabit Ethernet Controller Instance no. 1. General Purpose Input / Output AMBA Network Interconnect Advanced Quality of Service (QoS-301) AMBA Quality of Service for CPU-to-DDR. AMBA Network Interconnect Advanced Quality of Service (QoS-301) AMBA Quality of Service for DMAC. AMBA Network Interconnect Advanced Quality of Service (QoS-301) AMBA Quality of Service for IOU. AMBA NIC301 TrustZone.
qos301
0xF8947000
0xF8948000
nic301_addr_r 0xF8900000 egion_ctrl_regi sters IIC IIC L2Cpl310 mpcore ocm qspi sdio 0xE0004000 0xE0005000 0xF8F02000 0xF8F00000 0xF800C000 0xE000D000 0xE0100000
Inter Integrated Circuit (I2C) Instance no. 0. Inter Integrated Circuit (I2C) Instance no. 1. L2 cache PL310 Mpcore - SCU, Interrupt controller, Counters and Timers On-Chip Memory Registers LQSPI module Registers SD2.0/ SDIO2.0/ MMC3.31 AHB Host ControllerRegisters Instance no. 0. SD2.0/ SDIO2.0/ MMC3.31 AHB Host ControllerRegisters Instance no. 1. System Level Control Registers
sd1
sdio
0xE0101000
slcr
slcr
0xF8000000
www.xilinx.com
721
Module Name smcc spi0 spi1 swdt ttc0 ttc1 uart0 uart1 usb0 usb1
Module Type pl353 SPI SPI swdt ttc ttc UART UART usb usb
Base Address 0xE000E000 0xE0006000 0xE0007000 0xF8005000 0xF8001000 0xF8002000 0xE0000000 0xE0001000 0xE0002000 0xE0003000
Description Shared memory controller Serial Peripheral Interface Instance no. 0. Serial Peripheral Interface Instance no. 1. System Watchdog Timer Registers Triple Timer Counter Instance no. 0. Triple Timer Counter Instance no. 1. Universal Asynchronous Receiver Transmitter Instance no. 0. Universal Asynchronous Receiver Transmitter Instance no. 1. USB controller registers Instance no. 0. USB controller registers Instance no. 1.
www.xilinx.com
722
Register Summary
Register Name AFI_RDCHAN_CTRL AFI_RDCHAN_ISSUI NGCAP AFI_RDQOS AFI_RDDATAFIFO_LE VEL AFI_RDDEBUG AFI_WRCHAN_CTRL AFI_WRCHAN_ISSUI NGCAP AFI_WRQOS AFI_WRDATAFIFO_L EVEL AFI_WRDEBUG Address 0x00000000 0x00000004 0x00000008 0x0000000C 0x00000010 0x00000014 0x00000018 0x0000001C 0x00000020 0x00000024 Width 32 32 32 32 32 32 32 32 32 32 Type mixed mixed mixed mixed mixed mixed mixed mixed mixed mixed Reset Value 0x00000000 0x00000007 0x00000000 0x00000000 0x00000000 0x00000F00 0x00000007 0x00000000 0x00000000 0x00000000 Description Read Channel Control Register Read Issuing Capability Register QOS Read Channel Register Read Data FIFO Level Register Read Channel Debug Register Write Channel Control Register Write Issuing Capability Register QOS Write Channel Register Write Data FIFO Level Register Write Channel Debug Register
www.xilinx.com
723
www.xilinx.com
724
www.xilinx.com
725
Type raz rw
Description Return 0 when read Sets the level of the Qos field to be used for the read channel 4'b0000: Lowest Priority' ' '4'b1111: Highest Priority
www.xilinx.com
726
www.xilinx.com
727
Type raz rw
Description Return 0 when read Sets the threshold at which to send the write command. Note that this is measured in data beats, and is therefore dependent on the '32bitEn' field. 4'b0000: Send Write Command When 1 data beat is pushed into the Write Data FIFO 4'b0001: Send Write Command When 2 data beats are pushed into the Write Data FIFO' ' '4'b1111: Send Write Command When 16 data beats are pushed into the Write Data FIFO Note: If this field is programmed to be less than the actual burst length of the write command, the 'Wlast' will take priority. For example, if 'WrDataThreshold' is set to 4'b1111 (indicates 16 beats), and a Wlast is received after 8 beats, the write command is sent.
reserved WrCmdReleaseMode
7:6 5:4
raz rw
0x0 0x0
Return 0 when read Mode of Write Command Release. 2'b00: Release Wr Command on 'Wlast' enqueue into Write Data FIFO 2'b01: Release Wr Command on a particular threshold being reached on the enqueue into Write Data FIFO. The 'WrDataThreshold' field is used to program the actual threshold. 2'b10: Reserved 2'b11: Reserved
QosHeadOfCmdQEn
rw
0x0
When set, allows the priority of a transaction at the head of the WrCmdQ to be promoted if higher priority transactions are backed up behind it. The entire WrCmdQ will therefore be 'promoted' when the fabric 'WrQos' signal is promoted. When disabled, only the new write commands issued will receive the 'promotion'.
FabricOutCmdEn
rw
0x0
Enable control of outstanding write commands from the fabric 0: The maximum number of outstanding write commands is always taken from APB register field, 'wrIssueCap0'1: The maximum outstanding number of write commands is selected from the fabric input, 'axds_wrissuecap1_en', as follows: Max Outstanding Write Commands = axds_wrissuecap1_en ? wrIssueCap1 : wrIssueCap0
www.xilinx.com
728
Bits 1
Type rw
Description Enable control of qos from the fabric 0: The qos bits are derived from APB register, 'AFI_WRQOS.staticQos'1: The qos bits are dynamically driven from the fabric input, 'axds_awqos[3:0]'
32BitEn
rw
0x0
Configures the Write Channel as a 32-bit interface. 1: 32-bit enabled 0: 64-bit enabled
www.xilinx.com
729
www.xilinx.com
730
Type raz ro
Description Return 0 when read Returns the level measured in Dwords (64-bits) of the Write Data FIFO 8'h00: 0 Entries 8'h01: 1 Entry' ' '8'h8F: 128 Entries
www.xilinx.com
731
Register Summary
Register Name SRR MSR BRPR BTR ECR ESR SR ISR IER ICR TCR WIR TXFIFO_ID TXFIFO_DLC TXFIFO_DATA1 TXFIFO_DATA2 TXHPB_ID TXHPB_DLC Address 0x00000000 0x00000004 0x00000008 0x0000000C 0x00000010 0x00000014 0x00000018 0x0000001C 0x00000020 0x00000024 0x00000028 0x0000002C 0x00000030 0x00000034 0x00000038 0x0000003C 0x00000040 0x00000044 Width 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 Type rw rw rw rw ro mixed mixed mixed rw mixed mixed rw wo rw rw rw wo rw Reset Value 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000001 0x00006000 0x00000000 0x00000000 0x00000000 0x00003F3F 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 Description Software Reset Register Mode Select Register Baud Rate Prescaler Register Bit Timing Register Error Counter Register Error Status Register Status Register Interrupt Status Register Interrupt Enable Register Interrupt Clear Register Timestamp Control Register Watermark Interrupt Register transmit message fifo message identifier transmit message fifo data length code transmit message fifo data word 1 transmit message fifo data word 2 transmit high priority buffer message identifier transmit high priority buffer data length code
www.xilinx.com
732
Register Name TXHPB_DATA1 TXHPB_DATA2 RXFIFO_ID RXFIFO_DLC RXFIFO_DATA1 RXFIFO_DATA2 AFR AFMR1 AFIR1 AFMR2 AFIR2 AFMR3 AFIR3 AFMR4 AFIR4
Address 0x00000048 0x0000004C 0x00000050 0x00000054 0x00000058 0x0000005C 0x00000060 0x00000064 0x00000068 0x0000006C 0x00000070 0x00000074 0x00000078 0x0000007C 0x00000080
Width 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32
Type rw rw ro rw rw rw rw rw rw rw rw rw rw rw rw
Description transmit high priority buffer data word 1 transmit high priority buffer data word 2 receive message fifo message identifier receive message fifo data length code receive message fifo data word 1 receive message fifo data word 2 Acceptance Filter Register Acceptance Filter Mask Register 1 Acceptance Filter ID Register 1 Acceptance Filter Mask Register 2 Acceptance Filter ID Register 2 Acceptance Filter Mask Register 3 Acceptance Filter ID Register 3 Acceptance Filter Mask Register 4 Acceptance Filter ID Register 4
www.xilinx.com
733
The Transfer Layer Configuration Registers can be changed only when CEN bit in the SRR Register is '0.' If the CEN bit is changed during core operation, it is recommended to reset the core so that operations start afresh.
Field Name reserved CEN Bits 31:2 1 Type rw rw Reset Value 0x0 0x0 Reserved. Can Enable The Enable bit for the CAN controller. 1: The CAN controller is in Loop Back, Sleep or Normal mode depending on the LBACK and SLEEP bits in the MSR. 0: The CAN controller is in the Configuration mode. If the CEN bit is changed during core operation, it is recommended to reset the core so that operations start afresh. SRST 0 rw 0x0 Reset The Software reset bit for the CAN controller. 1: CAN controller is reset. If a 1 is written to this bit, all the CAN controller configuration registers (including the SRR) are reset. Reads to this bit always return a 0. Description
www.xilinx.com
734
Bits 31:3 2
Type rw rw
Description
Snoop Mode Select The Snoop Mode Select bit. 1: CAN controller is in Snoop mode. 0: CAN controller is in Normal, Loop Back, Configuration, or Sleep mode. This bit can be written to only when CEN bit in SRR is 0.
LBACK
rw
0x0
Loop Back Mode Select The Loop Back Mode Select bit. 1: CAN controller is in Loop Back mode. 0: CAN controller is in Normal, Snoop, Configuration, or Sleep mode. This bit can be written to only when CEN bit in SRR is 0.
SLEEP
rw
0x0
Sleep Mode Select The Sleep Mode select bit. 1: CAN controller is in Sleep mode. 0: CAN controller is in Normal, Snoop, Configuration or Loop Back mode. This bit is cleared when the CAN controller wakes up from the Sleep mode.
www.xilinx.com
735
Type rw rw
Description
Baud Rate Prescaler These bits indicate the prescaler value. The actual value ranges from 1 to 256.
www.xilinx.com
736
www.xilinx.com
737
www.xilinx.com
738
Bits 1
Type wtc
Description
Indicates an error in one of the fixed form fields in the message frame. 1: Indicates a form error has occurred. 0: Indicates a form error has not occurred on the bus since the last write to this register. If this bit is set, writing a 1 clears it. CRCER 0 wtc 0x0 CRC Error Indicates a CRC error has occurred. 1: Indicates a CRC error has occurred. 0: Indicates a CRC error has not occurred on the bus since the last write to this register. If this bit is set, writing a 1 clears it. In case of a CRC Error and a CRC delimiter corruption, only the FMER bit is set.
Register (can) SR
Name Relative Address Absolute Address Width Access Type Reset Value Description SR 0x00000018 can0: 0xE0008018 can1: 0xE0009018 32 bits mixed 0x00000001 Status Register
Register SR Details
The CAN Status Register provides a status of all conditions of the Core. Specifically, FIFO status, Error State, Bus State and Configuration mode are reported.
Field Name reserved SNOOP Bits 31:13 12 Type rw ro Reset Value 0x0 0x0 Reserved Snoop Mode Indicates the CAN controller is in Snoop Mode. 1: Indicates the CAN controller is in Snoop Mode. 0: Indicates the CAN controller is not in Snoop mode. Description
www.xilinx.com
739
Bits 11
Type ro
Description Acceptance Filter Busy indicator. Indicates write-ablity of the Mask and ID registers, read-only: 0: writable 1: not writable. This bit reads 1 when a 0 is written to any of the valid UAF bits in an Acceptance Filter Register.
TXFLL
10
ro
0x0
Transmit FIFO Full Indicates that the TX FIFO is full. 1: Indicates the TX FIFO is full. 0: Indicates the TX FIFO is not full.
TXBFLL
ro
0x0
High Priority Transmit Buffer Full Indicates the High Priority Transmit Buffer is full. 1: Indicates the High Priority Transmit Buffer is full. 0: Indicates the High Priority Transmit Buffer is not full.
ESTAT
8:7
ro
0x0
Error Status Indicates the error status of the CAN controller. 00: Indicates Configuration Mode (CONFIG = 1). Error State is undefined. 01: Indicates Error Active State. 11: Indicates Error Passive State. 10: Indicates Bus Off State.
ERRWRN
ro
0x0
Error Warning Indicates that either the Transmit Error counter or the Receive Error counter has exceeded a value of 96. 1: One or more error counters have a value greater than or equal to 96. 0: Neither of the error counters has a value greater than or equal to 96.
BBSY
ro
0x0
Bus Busy Indicates the CAN bus status. 1: Indicates that the CAN controller is either receiving a message or transmitting a message. 0: Indicates that the CAN controller is either in Configuration mode or the bus is idle.
BIDLE
ro
0x0
Bus Idle Indicates the CAN bus status. 1: Indicates no bus communication is taking place. 0: Indicates the CAN controller is either in Configuration mode or the bus is busy.
www.xilinx.com
740
Bits 3
Type ro
Description
Indicates the CAN controller is in Normal Mode. 1: Indicates the CAN controller is in Normal Mode. 0: Indicates the CAN controller is not in Normal mode. SLEEP 2 ro 0x0 Sleep Mode Indicates the CAN controller is in Sleep mode. 1: Indicates the CAN controller is in Sleep mode. 0: Indicates the CAN controller is not in Sleep mode. LBACK 1 ro 0x0 Loop Back Mode Indicates the CAN controller is in Loop Back mode. 1: Indicates the CAN controller is in Loop Back mode. 0: Indicates the CAN controller is not in Loop Back mode. CONFIG 0 ro 0x1 Configuration Mode Indicator Indicates the CAN controller is in Configuration mode. 1: Indicates the CAN controller is in Configuration mode. 0: Indicates the CAN controller is not in Configuration mode.
www.xilinx.com
741
Bits 31:15 14
Type rw ro
Description
Transmit FIFO EmptyInterrupt A 1 indicates that the Transmit FIFO is empty. The interrupt continues to assert as long as the TX FIFO is empty. This bit can be cleared only by writing to the ICR.
TXFWMEMP (IXR_TXFWMEMP)
13
ro
0x1
Transmit FIFO Watermark Empty Interrupt A 1 indicates that the TX FIFO is empty based on watermark programming. The interrupt continues to assert as long as the number of empty spaces in the TX FIFO is greater than TX FIFO empty watermark. This bit can be cleared only by writing to the Interrupt Clear Register.
RXFWMFLL (IXR_RXFWMFLL)
12
ro
0x0
Receive FIFO Watermark Full Interrupt A 1 indicates that the RX FIFO is full based on watermark programming. The interrupt continues to assert as long as the RX FIFO count is above RX FIFO Full watermark. This bit can be cleared only by writing to the Interrupt Clear Register.
WKUP (IXR_WKUP)
11
ro
0x0
Wake up Interrupt A 1 indicates that the CAN controller entered Normal mode from Sleep Mode. This bit can be cleared by writing to the ICR. This bit is also cleared when a 0 is written to the CEN bit in the SRR.
SLP (IXR_SLP)
10
ro
0x0
Sleep Interrupt A 1 indicates that the CAN controller entered Sleep mode. This bit can be cleared by writing to the ICR. This bit is also cleared when a 0 is written to the CEN bit in the SRR.
BSOFF (IXR_BSOFF)
ro
0x0
Bus Off Interrupt A 1 indicates that the CAN controller entered the Bus Off state. This bit can be cleared by writing to the ICR. This bit is also cleared when a 0 is written to the CEN bit in the SRR.
www.xilinx.com
742
Bits 8
Type ro
Description
A 1 indicates that an error occurred during message transmission or reception. This bit can be cleared by writing to the ICR. This bit is also cleared when a 0 is written to the CEN bit in the SRR.
ro
0x0
Receive FIFO Not Empty Interrupt A 1 indicates that the Receive FIFO is not empty. This bit can be cleared only by writing to the ICR.
ro
0x0
RX FIFO Overflow Interrupt A 1 indicates that a message has been lost. This condition occurs when a new message is being received and the Receive FIFO is Full. This bit can be cleared by writing to the ICR. This bit is also cleared when a 0 is written to the CEN bit in the SRR.
RXUFLW (IXR_RXUFLW)
ro
0x0
RX FIFO Underflow Interrupt A 1 indicates that a read operation was attempted on an empty RX FIFO. This bit can be cleared only by writing to the ICR.
RXOK (IXR_RXOK)
ro
0x0
New Message Received Interrupt A 1 indicates that a message was received successfully and stored into the RX FIFO. This bit can be cleared by writing to the ICR. This bit is also cleared when a 0 is written to the CEN bit in the SRR.
TXBFLL (IXR_TXBFLL)
ro
0x0
High Priority Transmit Buffer Full Interrupt A 1 indicates that the High Priority Transmit Buffer is full. The status of the bit is unaffected if write transactions occur on the High Priority Transmit Buffer when it is already full. This bit can be cleared only by writing to the ICR.
TXFLL (IXR_TXFLL)
ro
0x0
Transmit FIFO Full Interrupt A 1 indicates that the TX FIFO is full. The status of the bit is unaffected if write transactions occur on the Transmit FIFO when it is already full. This bit can be cleared only by writing to the Interrupt Clear Register.
www.xilinx.com
743
Bits 1
Type ro
Description Transmission Successful Interrupt A 1 indicates that a message was transmitted successfully. This bit can be cleared by writing to the ICR. This bit is also cleared when a 0 is written to the CEN bit in the SRR. In Loop Back mode, both TXOK and RXOK bits are set. The RXOK bit is set before the TXOK bit.
ARBLST (IXR_ARBLST)
ro
0x0
Arbitration Lost Interrupt A 1 indicates that arbitration was lost during message transmission. This bit can be cleared by writing to the ICR. This bit is also cleared when a 0 is written to the CEN bit in the SRR.
www.xilinx.com
744
Bits 13
Type rw
Description Enable TXFIFO watermark Empty Interrupt Writes to this bit enable or disable interrupts when the TXFWMEMP bit in the ISR is set. 1: Enable interrupt generation if TXFWMEMP bit in ISR is set. 0: Disable interrupt generation if TXFWMEMP bit in ISR is set.
ERXFWMFLL (IXR_RXFWMFLL)
12
rw
0x0
Enable RXFIFO watermark Full Interrupt Writes to this bit enable or disable interrupts when the RXFLL bit in the ISR is set. 1: Enable interrupt generation if RXFWMFLL bit in ISR is set. 0: Disable interrupt generation if RXFWMFLL bit in ISR is set.
EWKUP (IXR_WKUP)
11
rw
0x0
Enable Wake up Interrupt Writes to this bit enable or disable interrupts when the WKUP bit in the ISR is set. 1: Enable interrupt generation if WKUP bit in ISR is set. 0: Disable interrupt generation if WKUP bit in ISR is set.
ESLP (IXR_SLP)
10
rw
0x0
Enable Sleep Interrupt Writes to this bit enable or disable interrupts when the SLP bit in the ISR is set. 1: Enable interrupt generation if SLP bit in ISR is set. 0: Disable interrupt generation if SLP bit in ISR is set.
EBSOFF (IXR_BSOFF)
rw
0x0
Enable Bus OFF Interrupt Writes to this bit enable or disable interrupts when the BSOFF bit in the ISR is set. 1: Enable interrupt generation if BSOFF bit in ISR is set. 0: Disable interrupt generation if BSOFF bit in ISR is set.
EERROR (IXR_ERROR)
rw
0x0
Enable Error Interrupt Writes to this bit enable or disable interrupts when the ERROR bit in the ISR is set. 1: Enable interrupt generation if ERROR bit in ISR is set. 0: Disable interrupt generation if ERROR bit in ISR is set.
www.xilinx.com
745
Bits 7
Type rw
Description Enable Receive FIFO Not Empty Interrupt Writes to this bit enable or disable interrupts when the RXNEMP bit in the ISR is set. 1: Enable interrupt generation if RXNEMP bit in ISR is set. 0: Disable interrupt generation if RXNEMP bit in ISR is set.
ERXOFLW (IXR_RXOFLW)
rw
0x0
Enable RX FIFO Overflow Interrupt Writes to this bit enable or disable interrupts when the RXOFLW bit in the ISR is set. 1: Enable interrupt generation if RXOFLW bit in ISR is set. 0: Disable interrupt generation if RXOFLW bit in ISR is set.
ERXUFLW (IXR_RXUFLW)
rw
0x0
Enable RX FIFO Underflow Interrupt Writes to this bit enable or disable interrupts when the RXUFLW bit in the ISR is set. 1: Enable interrupt generation if RXUFLW bit in ISR is set. 0: Disable interrupt generation if RXUFLW bit in ISR is set.
ERXOK (IXR_RXOK)
rw
0x0
Enable New Message Received Interrupt Writes to this bit enable or disable interrupts when the RXOK bit in the ISR is set. 1: Enable interrupt generation if RXOK bit in ISR is set. 0: Disable interrupt generation if RXOK bit in ISR is set.
ETXBFLL (IXR_TXBFLL)
rw
0x0
Enable High Priority Transmit Buffer Full Interrupt Writes to this bit enable or disable interrupts when the TXBFLL bit in the ISR is set. 1: Enable interrupt generation if TXBFLL bit in ISR is set. 0: Disable interrupt generation if TXBFLL bit in ISR is set.
ETXFLL (IXR_TXFLL)
rw
0x0
Enable Transmit FIFO Full Interrupt Writes to this bit enable or disable interrupts when TXFLL bit in the ISR is set. 1: Enable interrupt generation if TXFLL bit in ISR is set. 0: Disable interrupt generation if TXFLL bit in ISR is set.
www.xilinx.com
746
Bits 1
Type rw
Description Enable Transmission Successful Interrupt Writes to this bit enable or disable interrupts when the TXOK bit in the ISR is set. 1: Enable interrupt generation if TXOK bit in ISR is set. 0: Disable interrupt generation if TXOK bit in ISR is set.
EARBLST (IXR_ARBLST)
rw
0x0
Enable Arbitration Lost Interrupt Writes to this bit enable or disable interrupts when the ARBLST bit in the ISR is set. 1: Enable interrupt generation if ARBLST bit in ISR is set. 0: Disable interrupt generation if ARBLST bit in ISR is set.
www.xilinx.com
747
Field Name CWKUP (IXR_WKUP) CSLP (IXR_SLP) CBSOFF (IXR_BSOFF) CERROR (IXR_ERROR) CRXNEMP (IXR_RXNEMP) CRXOFLW (IXR_RXOFLW) CRXUFLW (IXR_RXUFLW) CRXOK (IXR_RXOK) CTXBFLL (IXR_TXBFLL) CTXFLL (IXR_TXFLL) CTXOK (IXR_TXOK) CARBLST (IXR_ARBLST)
Bits 11
Type wo
Description Clear Wake up Interrupt Writing a 1 to this bit clears the WKUP bit in the ISR.
10 9
wo wo
0x0 0x0
Clear Sleep Interrupt Writing a 1 to this bit clears the SLP bit in the ISR. Clear Bus Off Interrupt Writing a 1 to this bit clears the BSOFF bit in the ISR.
wo
0x0
Clear Error Interrupt Writing a 1 to this bit clears the ERROR bit in the ISR.
wo
0x0
Clear Receive FIFO Not Empty Interrupt Writing a 1 to this bit clears the RXNEMP bit in the ISR.
wo
0x0
Clear RX FIFO Overflow Interrupt Writing a 1 to this bit clears the RXOFLW bit in the ISR.
wo
0x0
Clear RX FIFO Underflow Interrupt Writing a 1 to this bit clears the RXUFLW bit in the ISR.
wo
0x0
Clear New Message Received Interrupt Writing a 1 to this bit clears the RXOK bit in the ISR.
wo
0x0
Clear High Priority Transmit Buffer Full Interrupt Writing a 1 to this bit clears the TXBFLL bit in the ISR.
wo
0x0
Clear Transmit FIFO Full Interrupt Writing a 1 to this bit clears the TXFLL bit in the ISR.
wo
0x0
Clear Transmission Successful Interrupt Writing a 1 to this bit clears the CTXOK bit in the ISR.
wo
0x0
Clear Arbitration Lost Interrupt Writing a 1 to this bit clears the ARBLST bit in the ISR.
www.xilinx.com
748
can0: 0xE0008028 can1: 0xE0009028 32 bits mixed 0x00000000 Timestamp Control Register
www.xilinx.com
749
Type rw rw
Description
TXFIFO Empty watermark TXFIFO generates an EMPTY interrupt based on the value programmed in this field. The valid range is (1-63). No protection is given for illegal programming in this field. This field can be written to only when CEN bit in SRR is 0.
FW
7:0
rw
0x3F
RXFIFO Full watermark RXFIFO generates FULL interrupt based on the value programmed in this field. The valid range is (1-63). No protection is given for illegal programming in this field. This field can be written to only when CEN bit in SRR is 0.
SRRRTR (IDR_SRR)
www.xilinx.com
750
Bits 19
Type wo
Description Identifier Extension This bit differentiates between frames using the Standard Identifier and those using the Extended Identifier. Valid for both Standard and Extended Frames. 1: Indicates the use of an Extended Message Identifier. 0: Indicates the use of a Standard Message Identifier.
IDL (IDR_ID2)
18:1
wo
0x0
Extended Message ID This field indicates the Extended Identifier. Valid only for Extended Frames. For Standard Frames, reads from this field return 0s. For Standard Frames, writes to this field should be 0s.
RTR (IDR_RTR)
wo
0x0
Remote Transmission Request This bit differentiates between data frames and remote frames. Valid only for Extended Frames. 1: Indicates the message object is a Remote Frame 0: Indicates the message object is a Data Frame For Standard Frames, reads from this bit returns 0 For Standard Frames, writes to this bit should be 0
reserved
www.xilinx.com
751
www.xilinx.com
752
SRRRTR (IDR_SRR)
www.xilinx.com
753
Bits 19
Type wo
Description Identifier Extension This bit differentiates between frames using the Standard Identifier and those using the Extended Identifier. Valid for both Standard and Extended Frames. 1: Indicates the use of an Extended Message Identifier. 0: Indicates the use of a Standard Message Identifier.
IDL (IDR_ID2)
18:1
wo
0x0
Extended Message ID This field indicates the Extended Identifier. Valid only for Extended Frames. For Standard Frames, reads from this field return 0s. For Standard Frames, writes to this field should be 0s.
RTR (IDR_RTR)
wo
0x0
Remote Transmission Request This bit differentiates between data frames and remote frames. Valid only for Extended Frames. 1: Indicates the message object is a Remote Frame 0: Indicates the message object is a Data Frame For Standard Frames, reads from this bit returns 0 For Standard Frames, writes to this bit should be 0
reserved
www.xilinx.com
754
www.xilinx.com
755
www.xilinx.com
756
www.xilinx.com
757
Relative Address Absolute Address Width Access Type Reset Value Description
0x00000054 can0: 0xE0008054 can1: 0xE0009054 32 bits rw x receive message fifo data length code
reserved RXT
www.xilinx.com
758
Bits 15:8
Type rw
Description
Reads from this field return invalid data if the message has only 2 byte of data or fewer 7:0 rw x Data Byte 3 Reads from this field return invalid data if the message has only 3 byte of data or fewer
www.xilinx.com
759
www.xilinx.com
760
Bits 1
Type rw
Description Use Acceptance Filter Number 2 Enables the use of acceptance filter pair 2. 1: Indicates Acceptance Filter Mask Register 2 and Acceptance Filter ID Register 2 are used for acceptance filtering. 0: Indicates Acceptance Filter Mask Register 2 and Acceptance Filter ID Register 2 are not used for acceptance filtering.
UAF1
rw
0x0
Use Acceptance Filter Number 1. Enables the use of acceptance filter pair 1. 1: Indicates Acceptance Filter Mask Register 1 and Acceptance Filter ID Register 1 are used for acceptance filtering. 0: Indicates Acceptance Filter Mask Register 1 and Acceptance Filter ID Register 1 are not used for acceptance filtering.
www.xilinx.com
761
www.xilinx.com
762
Bits 18:1
Type rw
Reset Value x
Description Extended Message ID Mask These bits are used for masking the Identifier in an Extended Frame. 1: Indicates the corresponding bit in Acceptance Mask ID Register is used when comparing the incoming message identifier. 0: Indicates the corresponding bit in Acceptance Mask ID Register is not used when comparing the incoming message identifier.
AMRTR
rw
Remote Transmission Request Mask. This bit is used for masking the RTR bit in an Extended Frame. 1: Indicates the corresponding bit in Acceptance Mask ID Register is used when comparing the incoming message identifier. 0: Indicates the corresponding bit in Acceptance Mask ID Register is not used when comparing the incoming message identifier.
www.xilinx.com
763
Bits 18:1 0
Type rw rw
Reset Value x x
Description Extended Message ID Mask Extended Identifier Remote Transmission Request Mask RTR bit for Extended frames.
www.xilinx.com
764
Bits 19
Type rw
Reset Value x
Description Identifier Extension Mask Used for masking the IDE bit in CAN frames. 1: Indicates the corresponding bit in Acceptance Mask ID Register is used when comparing the incoming message identifier. 0: Indicates the corresponding bit in Acceptance Mask ID Register is not used when comparing the incoming message identifier. If AMIDE = 1 and the AIIDE bit in the corresponding Acceptance ID register is 0, this mask is applicable to only Standard frames. If AMIDE = 1 and the AIIDE bit in the corresponding Acceptance ID register is 1, this mask is applicable to only extended frames. If AMIDE = 0 this mask is applicable to Standard frame.
AMIDL
18:1
rw
Extended Message ID Mask These bits are used for masking the Identifier in an Extended Frame. 1: Indicates the corresponding bit in Acceptance Mask ID Register is used when comparing the incoming message identifier. 0: Indicates the corresponding bit in Acceptance Mask ID Register is not used when comparing the incoming message identifier.
AMRTR
rw
Remote Transmission Request Mask. This bit is used for masking the RTR bit in an Extended Frame. 1: Indicates the corresponding bit in Acceptance Mask ID Register is used when comparing the incoming message identifier. 0: Indicates the corresponding bit in Acceptance Mask ID Register is not used when comparing the incoming message identifier.
www.xilinx.com
765
Description
www.xilinx.com
766
www.xilinx.com
767
Bits 18:1
Type rw
Reset Value x
Description Extended Message ID Mask These bits are used for masking the Identifier in an Extended Frame. 1: Indicates the corresponding bit in Acceptance Mask ID Register is used when comparing the incoming message identifier. 0: Indicates the corresponding bit in Acceptance Mask ID Register is not used when comparing the incoming message identifier.
AMRTR
rw
Remote Transmission Request Mask. This bit is used for masking the RTR bit in an Extended Frame. 1: Indicates the corresponding bit in Acceptance Mask ID Register is used when comparing the incoming message identifier. 0: Indicates the corresponding bit in Acceptance Mask ID Register is not used when comparing the incoming message identifier.
www.xilinx.com
768
Bits 18:1 0
Type rw rw
Reset Value x x
Description Extended Message ID Mask Extended Identifier Remote Transmission Request Mask RTR bit for Extended frames.
www.xilinx.com
769
Bits 19
Type rw
Reset Value x
Description Identifier Extension Mask Used for masking the IDE bit in CAN frames. 1: Indicates the corresponding bit in Acceptance Mask ID Register is used when comparing the incoming message identifier. 0: Indicates the corresponding bit in Acceptance Mask ID Register is not used when comparing the incoming message identifier. If AMIDE = 1 and the AIIDE bit in the corresponding Acceptance ID register is 0, this mask is applicable to only Standard frames. If AMIDE = 1 and the AIIDE bit in the corresponding Acceptance ID register is 1, this mask is applicable to only extended frames. If AMIDE = 0 this mask is applicable to Standard frame.
AMIDL
18:1
rw
Extended Message ID Mask These bits are used for masking the Identifier in an Extended Frame. 1: Indicates the corresponding bit in Acceptance Mask ID Register is used when comparing the incoming message identifier. 0: Indicates the corresponding bit in Acceptance Mask ID Register is not used when comparing the incoming message identifier.
AMRTR
rw
Remote Transmission Request Mask. This bit is used for masking the RTR bit in an Extended Frame. 1: Indicates the corresponding bit in Acceptance Mask ID Register is used when comparing the incoming message identifier. 0: Indicates the corresponding bit in Acceptance Mask ID Register is not used when comparing the incoming message identifier.
www.xilinx.com
770
Description
www.xilinx.com
771
Register Summary
Register Name ddrc_ctrl Two_rank_cfg HPR_reg LPR_reg WR_reg DRAM_param_reg0 DRAM_param_reg1 DRAM_param_reg2 DRAM_param_reg3 DRAM_param_reg4 DRAM_init_param DRAM_EMR_reg DRAM_EMR_MR_reg DRAM_burst8_rdwr DRAM_disable_DQ Address 0x00000000 0x00000004 0x00000008 0x0000000C 0x00000010 0x00000014 0x00000018 0x0000001C 0x00000020 0x00000024 0x00000028 0x0000002C 0x00000030 0x00000034 0x00000038 Width 32 29 26 26 26 21 32 32 32 28 14 32 32 29 13 20 32 28 30 20 32 21 Type rw rw rw rw rw rw rw rw mixed mixed rw rw rw mixed mixed rw rw rw rw ro mixed ro Reset Value 0x00000200 0x000C1076 0x03C0780F 0x03C0780F 0x0007F80F 0x00041016 0x351B48D9 0x83015904 0x250882D0 0x0000003C 0x00002007 0x00000008 0x00000940 0x00020034 0x00000000 0x00000F77 0xFFF00000 0x0FF55555 0x00000249 0x00000000 0x00010200 0x00000000 Description DDRC Control Two Rank Configuration HPR Queue control LPR Queue control WR Queue control DRAM Parameters 0 DRAM Parameters 1 DRAM Parameters 2 DRAM Parameters 3 DRAM Parameters 4 DRAM Initialization Parameters DRAM EMR2, EMR3 access DRAM EMR, MR access DRAM Burst 8 read/write DRAM Disable DQ Row/Column address bits Column address bits Select DRAM row address bits DRAM ODT control PHY debug PHY command time out and read data capture FIFO Controller operation mode status
DRAM_addr_map_ban 0x0000003C k DRAM_addr_map_col DRAM_addr_map_ro w DRAM_ODT_reg phy_dbg_reg phy_cmd_timeout_rdd ata_cpt mode_sts_reg 0x00000040 0x00000044 0x00000048 0x0000004C 0x00000050 0x00000054
www.xilinx.com
772
Register Name DLL_calib ODT_delay_hold ctrl_reg1 ctrl_reg2 ctrl_reg3 ctrl_reg4 ctrl_reg5 ctrl_reg6 CHE_REFRESH_TIME R01 CHE_T_ZQ CHE_T_ZQ_Short_Inte rval_Reg deep_pwrdwn_reg reg_2c reg_2d dfi_timing CHE_ECC_CONTROL _REG_OFFSET CHE_CORR_ECC_LO G_REG_OFFSET CHE_CORR_ECC_AD DR_REG_OFFSET CHE_CORR_ECC_DA TA_31_0_REG_OFFSE T
Address 0x00000058 0x0000005C 0x00000060 0x00000064 0x00000068 0x0000006C 0x00000078 0x0000007C 0x000000A0 0x000000A4 0x000000A8 0x000000AC 0x000000B0 0x000000B4 0x000000B8 0x000000C4 0x000000C8 0x000000CC 0x000000D0
Width 17 16 13 18 26 16 32 32 24 32 28 9 29 11 25 2 8 31 32
Reset Value 0x00000101 0x00000023 0x0000003E 0x00020000 0x00284027 0x00001610 0x00455111 0x00032222 0x00008000 0x10300802 0x0020003A 0x00000000 0x00000000 0x00000200 0x00200067 0x00000000 0x00000000 0x00000000 0x00000000
Description DLL calibration ODT delay and ODT hold Controller 1 Controller 2 Controller 3 Controller 4 Controller register 5 Controller register 6 CHE_REFRESH_TIMER01 ZQ parameters Misc parameters Deep powerdown (LPDDR2) Training control Misc Debug DFI timing ECC error clear ECC error correction ECC error correction address log ECC error correction data log low ECC error correction data log mid ECC error correction data log high ECC unrecoverable error status ECC unrecoverable error address ECC unrecoverable error data low
CHE_CORR_ECC_DA 0x000000D4 TA_63_32_REG_OFFSE T CHE_CORR_ECC_DA 0x000000D8 TA_71_64_REG_OFFSE T CHE_UNCORR_ECC_ LOG_REG_OFFSET CHE_UNCORR_ECC_ ADDR_REG_OFFSET CHE_UNCORR_ECC_ DATA_31_0_REG_OFF SET 0x000000DC 0x000000E0 0x000000E4
32
ro
0x00000000
ro
0x00000000
1 31 32
clron wr ro ro
www.xilinx.com
773
Register Name CHE_UNCORR_ECC_ DATA_63_32_REG_OF FSET CHE_UNCORR_ECC_ DATA_71_64_REG_OF FSET CHE_ECC_STATS_RE G_OFFSET ECC_scrub CHE_ECC_CORR_BIT _MASK_31_0_REG_OF FSET CHE_ECC_CORR_BIT _MASK_63_32_REG_O FFSET phy_rcvr_enable PHY_Config0 PHY_Config1 PHY_Config2 PHY_Config3 phy_init_ratio0 phy_init_ratio1 phy_init_ratio2 phy_init_ratio3 phy_rd_dqs_cfg0 phy_rd_dqs_cfg1 phy_rd_dqs_cfg2 phy_rd_dqs_cfg3 phy_wr_dqs_cfg0
Address 0x000000E8
Width 32
Type ro
Description ECC unrecoverable error data middle ECC unrecoverable error data high ECC error count ECC mode/scrub ECC data mask low
0x000000EC
ro
0x00000000
16 4 32
clron wr rw ro
0x000000FC
32
ro
0x00000000
0x00000114 0x00000118 0x0000011C 0x00000120 0x00000124 0x0000012C 0x00000130 0x00000134 0x00000138 0x00000140 0x00000144 0x00000148 0x0000014C 0x00000154
8 31 31 31 31 20 20 20 20 20 20 20 20 20
rw rw rw rw rw rw rw rw rw rw rw rw rw rw
0x00000000 0x40000001 0x40000001 0x40000001 0x40000001 0x00000000 0x00000000 0x00000000 0x00000000 0x00000040 0x00000040 0x00000040 0x00000040 0x00000000
Phy receiver enable register PHY configuration register for data slice 0. PHY configuration register for data slice 1. PHY configuration register for data slice 2. PHY configuration register for data slice 3. PHY init ratio register for data slice 0. PHY init ratio register for data slice 1. PHY init ratio register for data slice 2. PHY init ratio register for data slice 3. PHY read DQS configuration register for data slice 0. PHY read DQS configuration register for data slice 1. PHY read DQS configuration register for data slice 2. PHY read DQS configuration register for data slice 3. PHY write DQS configuration register for data slice 0.
www.xilinx.com
774
Register Name phy_wr_dqs_cfg1 phy_wr_dqs_cfg2 phy_wr_dqs_cfg3 phy_we_cfg0 phy_we_cfg1 phy_we_cfg2 phy_we_cfg3 wr_data_slv0 wr_data_slv1 wr_data_slv2 wr_data_slv3 reg_64 reg_65 reg69_6a0 reg69_6a1 reg6c_6d2 reg6c_6d3 reg6e_710 reg6e_711 reg6e_712 reg6e_713 phy_dll_sts0 phy_dll_sts1
Address 0x00000158 0x0000015C 0x00000160 0x00000168 0x0000016C 0x00000170 0x00000174 0x0000017C 0x00000180 0x00000184 0x00000188 0x00000190 0x00000194 0x000001A4 0x000001A8 0x000001B0 0x000001B4 0x000001B8 0x000001BC 0x000001C0 0x000001C4 0x000001CC 0x000001D0
Width 20 20 20 21 21 21 21 20 20 20 20 32 20 29 29 29 29 30 30 30 30 27 27
Type rw rw rw rw rw rw rw rw rw rw rw rw rw ro ro ro ro ro ro ro ro ro ro
Reset Value 0x00000000 0x00000000 0x00000000 0x00000040 0x00000040 0x00000040 0x00000040 0x00000080 0x00000080 0x00000080 0x00000080 0x10020000 0x00000000 0x000F0000 0x000F0000 0x000F0000 0x000F0000 x x x x 0x00000000 0x00000000
Description PHY write DQS configuration register for data slice 1. PHY write DQS configuration register for data slice 2. PHY write DQS configuration register for data slice 3. PHY FIFO write enable configuration for data slice 0. PHY FIFO write enable configuration for data slice 1. PHY FIFO write enable configuration for data slice 2. PHY FIFO write enable configuration for data slice 3. PHY write data slave ratio config for data slice 0. PHY write data slave ratio config for data slice 1. PHY write data slave ratio config for data slice 2. PHY write data slave ratio config for data slice 3. Training control 2 Training control 3 Training results for data slice 0. Training results for data slice 1. Training results for data slice 2. Training results for data slice 3. Training results (2) for data slice 0. Training results (2) for data slice 1. Training results (2) for data slice 2. Training results (2) for data slice 3. Slave DLL results for data slice 0. Slave DLL results for data slice 1.
www.xilinx.com
775
Register Name phy_dll_sts2 phy_dll_sts3 dll_lock_sts phy_ctrl_sts phy_ctrl_sts_reg2 axi_id page_mask axi_priority_wr_port0 axi_priority_wr_port1 axi_priority_wr_port2 axi_priority_wr_port3 axi_priority_rd_port0 axi_priority_rd_port1 axi_priority_rd_port2 axi_priority_rd_port3 trusted_mem_cfg excl_access_cfg0 excl_access_cfg1 excl_access_cfg2 excl_access_cfg3 mode_reg_read lpddr_ctrl0 lpddr_ctrl1 lpddr_ctrl2 lpddr_ctrl3
Address 0x000001D4 0x000001D8 0x000001E0 0x000001E4 0x000001E8 0x00000200 0x00000204 0x00000208 0x0000020C 0x00000210 0x00000214 0x00000218 0x0000021C 0x00000220 0x00000224 0x00000290 0x00000294 0x00000298 0x0000029C 0x000002A0 0x000002A4 0x000002A8 0x000002AC 0x000002B0 0x000002B4
Width 27 27 24 30 27 26 32 20 20 20 20 20 20 20 20 16 18 18 18 18 32 12 32 22 18
Reset Value 0x00000000 0x00000000 0x00000000 x 0x00000000 0x00153042 0x00000000 0x000803FF 0x000803FF 0x000803FF 0x000803FF 0x000003FF 0x000003FF 0x000003FF 0x000003FF 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x003C0015 0x00000601
Description Slave DLL results for data slice 2. Slave DLL results for data slice 3. DLL Lock Status, read PHY Control status, read PHY Control status (2), read ID and revision information Page mask AXI Priority control for write port 0. AXI Priority control for write port 1. AXI Priority control for write port 2. AXI Priority control for write port 3. AXI Priority control for read port 0. AXI Priority control for read port 1. AXI Priority control for read port 2. AXI Priority control for read port 3. Trusted Memory configuration Exclusive access configuration for port 0. Exclusive access configuration for port 1. Exclusive access configuration for port 2. Exclusive access configuration for port 3. Mode register read data LPDDR2 Control 0 LPDDR2 Control 1 LPDDR2 Control 2 LPDDR2 Control 3
www.xilinx.com
776
www.xilinx.com
777
Bits 6:4
Type rw
Description Refresh timeout. Programmed value plus one will be the number of refresh timeouts that will be allowed to accumulate before traffic is blocked and the refreshes are forced to execute. Closing pages to perform a refresh is a one-time penalty that must be paid for each group of refreshes; therefore, performing refreshes in a burst reduces the per-refresh penalty of these page closings. Higher numbers for burst_of_N_refresh slightly increases utilization; lower numbers decreases the worst-case latency associated with refreshes. 0: single refresh 1: burst-of-2 ... 7: burst-of-8 refresh
reg_ddrc_data_bus_wi dth
3:2
rw
0x0
DDR bus width control 00: 32-bit 01: 16-bit 1x: reserved
reg_ddrc_powerdown_ en
rw
0x0
Controller power down control. Update during normal operation. Enable the controller to powerdown after it becomes idle. Dynamic Bit Field. 0: disable 1: enable
reg_ddrc_soft_rstb
rw
0x0
Active low soft reset. Update during normal operation. 0: Resets the controller 1: Takes the controller out of reset. Dynamic Bit Field. Note: Software changes DRAM controller register values only when the controller is in the reset state, except for bit fields that can be dymanically updated.
www.xilinx.com
778
Description
rw rw
0xF 0xF
www.xilinx.com
779
21:11 10:0
rw rw
0xF 0xF
rw
0xF
10:0
rw
0xF
www.xilinx.com
780
reg_ddrc_t_rfc_min
13:6
rw
0x40
www.xilinx.com
781
reg_ddrc_powerdown_ to_x32
9:5
rw
0x6
reg_ddrc_wr2pre
4:0
rw
0x19
www.xilinx.com
782
reg_ddrc_rd2pre
27:23
rw
0x6
www.xilinx.com
783
Bits 9:5
Type rw
Description Minimum time from read command to write command. Include time for bus turnaround and all per-bank, per-rank, and global constraints. DDR2 and DDR3: RL + BL/2 + 2 - WL LPDDR2: RL + BL/2 + RU (tDQSCKmax / tCK) + 1 - WL Write Pre-amble and DQ/DQS jitter timer is included in the above equation. DRAM RELATED.
reg_ddrc_write_latenc y
4:0
rw
0x4
Time from write command to write data on DDRC to PHY Interface. (PHY adds an extra flop delay on the write data path; hence this value is one less than the write latency of the DRAM device itself). DDR2 and DDR3: WL -1 LPDDR2: WL Where WL: Write Latency of DRAM DRAM related. In non-LPDDR mode, the minimum DRAM Write Latency (DDR2) supported is 3. In LPDDR mode, the required DRAM Write Latency of 1 is supported. Since write latency (CWL) min is 3, and DDR2 CWL is CL-1, the min (DDR2) CL supported is 4
www.xilinx.com
784
Field Name
Bits
Type rw rw
Description
Non-LPDDR2: not used. DDR2 and DDR3: Set to Read Latency, RL. Time from Read command to Read data on DRAM interface. It is used to calculate when DRAM clock may be stopped. Unit: DDR clock.
reg_ddrc_en_dfi_dram _clk_disable
23
rw
0x0
Enables the assertion of ddrc_dfi_dram_clk_disable. In DDR2/DDR3, only asserted in Self Refresh. In mDDR/LPDDR2, can be asserted in following: - during normal operation (Clock Stop), - in Power Down - in Self Refresh - In Deep Power Down
reg_ddrc_mobile reserved
22 21
rw rw rw
0: DDR2 or DDR3 device. 1: LPDDR2 device. Reserved. Do not modify. If the refresh timer (tRFC_nom, as known as tREFI) has expired at least once, but it has not expired burst_of_N_refresh times yet, then a 'speculative refresh' may be performed. A speculative refresh is a refresh performed at a time when refresh would be useful, but before it is absolutely required. When the DRAM bus is idle for a period of time determined by this refresh idle timeout and the refresh timer has expired at least once since the last refresh, then a 'speculative refresh' will be performed. Speculative refreshes will continue successively until there are no refreshes pending or until new reads or writes are issued to the controller. Dynamic Bit Field. tRP - Minimum time from precharge to activate of same bank. DRAM RELATED Issue critical refresh or page close this many cycles before the critical refresh or page timer expires. It is recommended that this not be changed from the default value. tRRD - Minimum time between activates from bank A to bank B. (spec: 10ns or less) DRAM RELATED
reg_ddrc_refresh_to_x3 20:16 2
reg_ddrc_t_rp
15:12
rw
0x8
reg_ddrc_refresh_marg in
11:8
rw
0x2
reg_ddrc_t_rrd
7:5
rw
0x6
www.xilinx.com
785
Bits 4:2
Type rw
Description tCCD - Minimum time between two reads or two writes (from bank a to bank b) is this value + 1. DRAM related. Reserved
reserved
1:0
ro
0x0
reg_ddrc_mr_rdata_val 27 id
www.xilinx.com
786
Bits 24:9
Type rw
Description DDR2 and DDR3: Mode register write data. LPDDR2: The 16 bits are interpreted for reads and writes: Reads: MR Addr[7:0], Don't Care[7:0]. Writes: MR Addf[7:0], MR Data[7:0].
reg_ddrc_mr_addr
8:7
rw
0x0
DDR2 and DDR3: Mode register address. LPDDR2: not used. 00: MR0 01: MR1 10: MR2 11: MR3
reg_ddrc_mr_wr
wo
0x0
A low to high signal on this signal will do a mode register write or read. Controller will accept this command, if this signal is detected high and "ddrc_reg_mr_wr_busy" is detected low. Reserved. Do not modify. 1: Bank selector prefers writes over reads 1: DDRC will use 2T timing 0: DDRC will use 1T timing
5:2 1 0
rw rw rw
www.xilinx.com
787
Bits 10:7
Type rw
Description Wait period before driving the 'OCD Complete' command to DRAM. Units are in counts of a global timer that pulses every 32 clock cycles. There is no known spec requirement for this. It may be set to zero. Cycles to wait after completing the DRAM init sequence before starting the dynamic scheduler. Units are in counts of a global timer that pulses every 32 clock cycles. Default value is set for DDR3.
reg_ddrc_final_wait_x3 6:0 2
rw
0x7
www.xilinx.com
788
www.xilinx.com
789
Bits 25:16
Type rw
Description Clock cycles to wait after driving CKE high to start the DRAM initialization sequence. Units: 1024 clocks. DDR2 typically require a 400 ns delay, requiring this value to be programmed to 2 at all clock speeds. LPDDR2 - Typically require this to be programmed for a delay of 200 us.
reserved
15:14
ro rw
0x0 0x3
Reserved Clock cycles to wait after a DDR software reset before driving CKE high to start the DRAM initialization sequence. Units: 1024 clock cycles. DDR2 Specifications typically require this to be programmed for a delay of >= 200 uS. LPDDR2 - tINIT0 of 20 mS (max) + tINIT1 of 100 nS (min)
reg_ddrc_pre_cke_x102 13:4 4
reg_ddrc_burst_rdwr
3:0
rw
0x4
Controls the burst size used to access the DRAM. This must match the BL mode register setting in the DRAM. 0010: Burst length of 4 0100: Burst length of 8 1000: Burst length of 16 (LPDDR2 with ___-bit data) All other values are reserved
www.xilinx.com
790
Bits 6 5:2 1
Type rw ro rw
Description Reserved. Do not modify. Reserved When 1, DDRC will not de-queue any transactions from the CAM. Bypass will also be disabled. All transactions will be queued in the CAM. This is for debug only; no reads or writes are issued to DRAM as long as this is asserted. Dynamic Bit Field. Read Transaction Priority disable. 0: read transactions forced to low priority (turns off Bypass). 1: HPR reads allowed if enabled in the AXI priority read registers.
reg_ddrc_force_low_pr i_n
rw
0x0
www.xilinx.com
791
Bits 11:8
Type rw
Description Selects the AXI address bit used as bank address bit 2. Valid range 0 to 14, and 15. Internal Base: 7. The selected address bit is determined by adding the Internal Base to the value of this field. If set to 15, bank address bit 2 is set to 0. Selects the address bits used as bank address bit 1. Valid Range: 0 to 14; Internal Base: 6. The selected address bit for each of the bank address bits is determined by adding the Internal Base to the value of this field.
reg_ddrc_addrmap_ba nk_b1
7:4
rw
0x7
reg_ddrc_addrmap_ba nk_b0
3:0
rw
0x7
Selects the address bits used as bank address bit 0. Valid Range: 0 to 14. Internal Base: 5. The selected address bit for each of the bank address bits is determined by adding the Internal Base to the value of this field.
www.xilinx.com
792
Bits 31:28
Type rw
Description Full bus width mode: Selects the address bit used as column address bit 13. (Column address bit 12 in LPDDR2 mode) Half bus width mode: Unused. To make it unused, this should be set to 15. (Column address bit 13 in LPDDR2 mode) Valid Range: 0 to 7, and 15. Internal Base: 14. The selected address bit is determined by adding the Internal Base to the value of this field. If set to 15, this column address bit is set to 0. Note: Per JEDEC DDR2 spec, column address bit 10 is reserved for indicating auto-precharge, and hence no source address bit can be mapped to column address bit 10. In LPDDR2, there is a dedicated bit for auto-precharge in the CA bus, and hence column bit 10 is used.
reg_ddrc_addrmap_col _b10
27:24
rw
0xF
Full bus width mode: Selects the address bit used as column address bit 12. (Column address bit 11 in LPDDR2 mode) Half bus width mode: Selects the address bit used as column address bit 13. (Column address bit 12 in LPDDR2 mode) Valid Range: 0 to 7, and 15. Internal Base: 13 The selected address bit is determined by adding the Internal Base to the value of this field. If set to 15, this column address bit is set to 0. Note: Per JEDEC DDR2 spec, column address bit 10 is reserved for indicating auto-precharge, and hence no source address bit can be mapped to column address bit 10. In LPDDR2, there is a dedicated bit for auto-precharge in the CA bus, and hence column bit 10 is used.
reg_ddrc_addrmap_col _b9
23:20
rw
0xF
Full bus width mode: Selects the address bit used as column address bit 11. (Column address bit 10 in LPDDR2 mode) Half bus width mode: Selects the address bit used as column address bit 12. (Column address bit 11 in LPDDR2 mode) Valid Range: 0 to 7, and 15 Internal Base: 12 The selected address bit is determined by adding the Internal Base to the value of this field. If set to 15, this column address bit is set to 0. Note: Per JEDEC DDR2 spec, column address bit 10 is reserved for indicating auto-precharge, and hence no source address bit can be mapped to column address bit 10. In LPDDR2, there is a dedicated bit for auto-precharge in the CA bus, and hence column bit 10 is used.
www.xilinx.com
793
Bits 19:16
Type rw
Description Full bus width mode: Selects the address bit used as column address bit 9. Half bus width mode: Selects the address bit used as column address bit 11. (Column address bit 10 in LPDDR2 mode) Valid Range: 0 to 7, and 15 Internal Base: 11 The selected address bit is determined by adding the Internal Base to the value of this field. If set to 15, this column address bit is set to 0. Note: Per JEDEC spec, column address bit 10 is reserved for indicating auto-precharge, and hence no source address bit can be mapped to column address bit 10. In LPDDR2, there is a dedicated bit for auto-precharge in the CA bus, and hence column bit 10 is used.
reg_ddrc_addrmap_col _b7
15:12
rw
0x0
Full bus width mode: Selects the address bit used as column address bit 8. Half bus width mode: Selects the address bit used as column address bit 9. Valid Range: 0 to 7, and 15. Internal Base: 10. The selected address bit is determined by adding the Internal Base to the value of this field. If set to 15, this column address bit is set to 0. Note: Per JEDEC spec, column address bit 10 is reserved for indicating auto-precharge, and hence no source address bit can be mapped to column address bit 10.In LPDDR2, there is a dedicated bit for auto-precharge in the CA bus, and hence column bit 10 is used.
reg_ddrc_addrmap_col _b4
11:8
rw
0x0
Full bus width mode: Selects the address bit used as column address bit 5. Half bus width mode: Selects the address bit used as column address bits 6. Valid Range: 0 to 7. Internal Base: 7. The selected address bit for each of the column address bits is determined by adding the Internal Base to the value of this field.
www.xilinx.com
794
Bits 7:4
Type rw
Description Full bus width mode: Selects the address bit used as column address bit 4. Half bus width mode: Selects the address bit used as column address bit 5. Valid Range: 0 to 7 Internal Base: 6 The selected address bit is determined by adding the Internal Base to the value of this field.
reg_ddrc_addrmap_col _b2
3:0
rw
0x0
Full bus width mode: Selects the address bit used as column address bit 3. Half bus width mode: Selects the address bit used as column address bit 4. Valid Range: 0 to 7. Internal Base: 5 The selected address bit is determined by adding the Internal Base to the value of this field.
reg_ddrc_addrmap_ro w_b14
23:20
rw
0xF
www.xilinx.com
795
Bits 19:16
Type rw
Description Selects the AXI address bit used as row address bit 13. Valid Range: 0 to 7, Internal Base: 22 The selected address bit is determined by adding the Internal Base to the value of this field. If set to 15, row address bit 13 is set to 0. Selects the AXI address bit used as row address bit 12. Valid Range: 0 to 8, Internal Base: 21 The selected address bit is determined by adding the Internal Base to the value of this field. If set to 15, row address bit 12 is set to 0. Selects the AXI address bits used as row address bits 2 to 11. Valid Range: 0 to 11. Internal Base: 11 (for row address bit 2) to 20 (for row address bit 11) The selected address bit for each of the row address bits is determined by adding the Internal Base to the value of this field. Selects the AXI address bits used as row address bit 1. Valid Range: 0 to 11. Internal Base: 10 The selected address bit for each of the row address bits is determined by adding the Internal Base to the value of this field. Selects the AXI address bits used as row address bit 0. Valid Range: 0 to 11. Internal Base: 9 The selected address bit for each of the row address bits is determined by adding the Internal Base to the value of this field
reg_ddrc_addrmap_ro w_b12
15:12
rw
0x5
reg_ddrc_addrmap_ro w_b2_11
11:8
rw
0x5
reg_ddrc_addrmap_ro w_b1
7:4
rw
0x5
reg_ddrc_addrmap_ro w_b0
3:0
rw
0x5
Note: address bits are relative to a byte address. For example, the value 0x0FFF6666 selects byte address bits [29:15] as row ddress bits in a 32-bit bus width configuration.
www.xilinx.com
796
Type rw rw rw rw rw
Description Reserved. Do not modify. Reserved. Do not modify. Reserved. Do not modify. Reserved. Do not modify. Value to drive on the 2-bit local_odt PHY outputs when output enable is not asserted and a read is not in progress. Typically this is the value required to disable termination to save power when idle. Value to drive on the 2-bit local_odt PHY outputs when write levelling is enabled for DQS. Value to drive on the 2-bit local_odt PHY outputs when output enable is not asserted and a read is in progress (where 'in progress' is defined as after a read command is issued and until all read data has been returned all the way to the controller.) Typically this is set to the value required to enable termination at the desired strength for read usage. Reserved. Do not modify. Reserved. Do not modify. Reserved. Do not modify. Reserved. Do not modify.
reg_phy_wr_local_odt reg_phy_rd_local_odt
15:14 13:12
rw rw
0x0 0x0
rw rw rw rw
www.xilinx.com
797
Field Name phy_reg_bc_dqs_oe3 phy_reg_bc_dq_oe3 phy_reg_bc_fifo_re2 phy_reg_bc_fifo_we2 phy_reg_bc_dqs_oe2 phy_reg_bc_dq_oe2 phy_reg_bc_fifo_re1 phy_reg_bc_fifo_we1 phy_reg_bc_dqs_oe1 phy_reg_bc_dq_oe1 phy_reg_bc_fifo_re0 phy_reg_bc_fifo_we0 phy_reg_bc_dqs_oe0 phy_reg_bc_dq_oe0 phy_reg_rdc_fifo_rst_e rr_cnt
Bits 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3:0
Type ro ro ro ro ro ro ro ro ro ro ro ro ro ro ro
Reset Value 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0
Description Debug DQS output enable for data slice 3. Debug DQ output enable for data slice 3. Debug read capture FIFO read enable for data slice 2. Debug read capture FIFO write enable, for data slice 2. Debug DQS output enable for data slice 2. Debug DQ output enable for data slice 2. Debug read capture FIFO read enable for data slice 1. Debug read capture FIFO write enable, for data slice 1. Debug DQS output enable for data slice 1. Debug DQ output enable for data slice 1. Debug read capture FIFO read enable for data slice 0. Debug read capture FIFO write enable, for data slice 0. Debug DQS output enable for data slice 0. Debug DQ output enable for data slice 0. Counter for counting how many times the pointers of read capture FIFO differ when they are reset by dll_calib.
www.xilinx.com
798
17
rw
0x0
14:12
ro
0x0
www.xilinx.com
799
Bits 11:8
Type rw
Description This register value + 1 give the number of clock cycles between writing into the Read Capture FIFO and the read operation. The setting of this register determines the read data timing and depends upon total delay in the system for read operation which include fly-by delays, trace delay, clkout_invert etc. This is used only if reg_phy_use_fixed_re=1.
7:4 3:0
rw rw
0x0 0x0
ddrc_reg_dbg_hpr_q_d 20:16 epth ddrc_reg_dbg_lpr_q_d epth ddrc_reg_dbg_wr_q_d epth ddrc_reg_dbg_stall 15:10 9:4 3
www.xilinx.com
800
reg_ddrc_rd_odt_hold
11:8
rw
0x0
www.xilinx.com
801
Bits 7:4
Type rw
Description The delay, in clock cycles, from issuing a write command to setting ODT values associated with that command. ODT setting should remain constant for the entire time that DQS is driven by the controller. The suggested value for DDR2 is WL - 5 and for DDR3 is 0. WL is Write latency. DDR2 ODT has a 2-cycle on-time delay and a 2.5-cycle off-time delay. ODT is not applicable to LPDDR2. UNUSED
reg_ddrc_rd_odt_delay
3:0
rw
0x3
reg_ddrc_dis_wc
rw
0x0
www.xilinx.com
802
Bits 8
Type rw
Description Toggle this signal to indicate that refresh register(s) have been updated. The value will be automatically updated when exiting soft reset. So it does not need to be toggled initially. Dynamic Bit Field. When set, most reads and writes will be issued with auto-precharge. (Exceptions can be made for collision cases.) Number of entries in the low priority transaction store is this value plus 1. In this design, by default all read ports are treated as low priority and hence the value of 0x1F. The hpr_num_entries is 32 minus this value. Bit [6] is ignored. If true, bank will be closed and kept closed if no transactions are available for it. If false, bank will remain open until there is a need to close it (to open a different page, or for page timeout or refresh timeout.) This does not apply when auto-refresh is used.
reg_ddrc_auto_pre_en
rw
0x0
reg_ddrc_lpr_num_ent ries
6:1
rw
0x1F
reg_ddrc_pageclose
rw
0x0
www.xilinx.com
803
Bits 12:5
Type rw
Description Describes the number of cycles that co_gs_go2critical_rd or co_gs_go2critical_wr must be asserted before the corresponding queue moves to the 'critical' state in the DDRC. The arbiter controls the co_gs_go2critical_* signals; it is designed for use with this hysteresis field set to 0. Reserved
reserved
4:0
ro
0x0
www.xilinx.com
804
dfi_t_ctrlupd_interval_ min_x1024
7:0
rw
0x10
www.xilinx.com
805
reg_ddrc_dfi_t_dram_c lk_disable
7:4
rw
0x1
reg_ddrc_dfi_t_ctrl_del ay
3:0
rw
0x1
www.xilinx.com
806
www.xilinx.com
807
rw 0x00008000 CHE_REFRESH_TIMER01
reg_ddrc_t_zq_long_n op
www.xilinx.com
808
t_zq_short_interval_x1 024
19:0
rw
0x3A
www.xilinx.com
809
reg_ddrc_dfi_wr_level _en
www.xilinx.com
810
Bits 25
Type ro
Description DDR2: not applicable. LPDDR2 and DDR3: When '1' indicates that the reg_ddrc_dfi_rdrlvl_max_x1024 timer has timed out. This is a Clear-on-Write register. If read leveling or gate training timed out, an error is indicated by the DDRC and this bit gets set. The value is held at that value until it is cleared. Clearing is done by writing a '0' to this register.
ddrc_reg_twrlvl_max_ error
24
ro
0x0
When '1' indicates that the reg_ddrc_dfi_wrlvl_max_x1024 timer has timed out. This is a Clear-on-Write register. If write leveling timed out, an error is indicated by the DDRC and this bit gets set. The value is held until it is cleared. Clearing is done by writing a '0' to this register. Only present in designs that support DDR3.
dfi_rdlvl_max_x1024
23:12
rw
0x0
Read leveling maximum time. Specifies the maximum number of clock cycles that the controller will wait for a response (phy_dfi_rdlvl_resp) to a read leveling enable signal (ddrc_dfi_rdlvl_en or ddrc_dfi_rdlvl_gate_en). Only applicable when connecting to PHY's operating in 'PHY RdLvl Evaluation' mode. Typical value 0xFFF Units 1024 clocks
dfi_wrlvl_max_x1024
11:0
rw
0x0
Write leveling maximum time. Specifies the maximum number of clock cycles that the controller will wait for a response (phy_dfi_wrlvl_resp) to a write leveling enable signal (ddrc_dfi_wrlvl_en). Only applicable when connecting to PHY's operating in 'PHY WrLvl Evaluation' mode. Typical value 0xFFF Units 1024 clocks
www.xilinx.com
811
4:0
rw
0x7
www.xilinx.com
812
www.xilinx.com
813
www.xilinx.com
814
Type ro ro
Description
www.xilinx.com
815
www.xilinx.com
816
www.xilinx.com
817
www.xilinx.com
818
STAT_NUM_UNCORR _ERR
7:0
clron wr
0x0
www.xilinx.com
819
www.xilinx.com
820
www.xilinx.com
821
Relative Address Absolute Address Width Access Type Reset Value Description
Note: This register is the first in an array of 4 identical registers listed in the table below. The details provided in this section apply to the entire array.
www.xilinx.com
822
reg_phy_data_slice_in_ 0 use
www.xilinx.com
823
Note: This register is the first in an array of 4 identical registers listed in the table below. The details provided in this section apply to the entire array.
Name phy_init_ratio0 phy_init_ratio1 phy_init_ratio2 phy_init_ratio3 Address 0xf800612c 0xf8006130 0xf8006134 0xf8006138
Note: This register is the first in an array of 4 identical registers listed in the table below. The details provided in this section apply to the entire array.
Name phy_rd_dqs_cfg0 phy_rd_dqs_cfg1 phy_rd_dqs_cfg2 phy_rd_dqs_cfg3 Address 0xf8006140 0xf8006144 0xf8006148 0xf800614c
www.xilinx.com
824
10
rw
0x0
Note: This register is the first in an array of 4 identical registers listed in the table below. The details provided in this section apply to the entire array.
Name phy_wr_dqs_cfg0 phy_wr_dqs_cfg1 phy_wr_dqs_cfg2 phy_wr_dqs_cfg3 Address 0xf8006154 0xf8006158 0xf800615c 0xf8006160
www.xilinx.com
825
10
rw
0x0
Note: This register is the first in an array of 4 identical registers listed in the table below. The details provided in this section apply to the entire array.
Name phy_we_cfg0 phy_we_cfg1 phy_we_cfg2 phy_we_cfg3 Address 0xf8006168 0xf800616c 0xf8006170 0xf8006174
www.xilinx.com
826
Note: This register is the first in an array of 4 identical registers listed in the table below. The details provided in this section apply to the entire array.
Name wr_data_slv0 wr_data_slv1 wr_data_slv2 wr_data_slv3 Address 0xf800617c 0xf8006180 0xf8006184 0xf8006188
www.xilinx.com
827
10
rw
0x0
www.xilinx.com
828
Bits 20
Type rw
Description 0: Use reg_phy_ctrl_slave_ratio for address/command timing slave DLL 1: overwrite the delay/tap value for address/command timing slave DLL with the value of the reg_phy_rd_dqs_slave_delay bus.
reg_phy_ctrl_slave_rati o
19:10
rw
0x80
Ratio value for address/command launch timing in phy_ctrl macro. This is the fraction of a clock cycle represented by the shift to be applied to the read DQS in units of 256ths. In other words, the full cycle tap value from the master DLL will be scaled by this number over 256 to get the delay value for the slave delay line. Selects one of the two read leveling algorithms.'b0: Select algorithm # 1'b1: Select algorithm # 2 Please refer to Read Data Eye Training section in PHY User Guide for details about the Read Leveling algorithms
reg_phy_sel_logic
rw
0x0
reserved reg_phy_invert_clkout
8 7
rw rw
0x0 0x0
Reserved. Do not modify. Inverts the polarity of DRAM clock. 0: core clock is passed on to DRAM 1: inverted core clock is passed on to DRAM. Use this when CLK can arrive at a DRAM device ahead of DQS or coincidence with DQS based on board topology. This effectively delays the CLK to the DRAM device by half -cycle, providing a CLK edge that DQS can align to during leveling.
6:5 4 3 2 1 0
rw rw rw rw rw rw
Reserved. Do not modify. Reserved. Do not modify. Reserved. Do not modify. Reserved. Do not modify. Reserved for future Use. Reserved. Do not modify.
www.xilinx.com
829
17
rw
0x0
www.xilinx.com
830
Bits 9:5
Type rw
Description This delay determines when to select the active rank's ratio logic delay for Read Data and Read DQS slave delay lines after PHY receives a read command at Control Interface. The programmed value must be (Read Latency 3) with a minimum value of 1.
reg_phy_wr_rl_delay
4:0
rw
0x0
This delay determines when to select the active rank's ratio logic delay for Write Data and Write DQS slave delay lines after PHY receives a write command at Control Interface. The programmed value must be (Write Latency 4) with a minimum value of 1.
The fifo_we_slave ratios for each slice(0 through 3) must be interpreted by software in the following way: Slice 0: fifo_we_ratio_slice_0[10:0] = {Reg_6A[9],Reg_69[18:9]} Slice1: fifo_we_ratio_slice_1[10:0] = {Reg_6B[10:9],Reg_6A[18:10]} Slice2: fifo_we_ratio_slice_2[10:0] = {Reg_6C[11:9],Reg_6B[18:11]} Slice3: fifo_we_ratio_slice_3[10:0] = {phy_reg_rdlvl_fifowein_ratio_slice3_msb,Reg_6C[18:12]}
Note: This register is the first in an array of 2 identical registers listed in the table below. The details provided in this section apply to the entire array.
Name reg69_6a0 reg69_6a1 Address 0xf80061a4 0xf80061a8
www.xilinx.com
831
Note: This register is the first in an array of 2 identical registers listed in the table below. The details provided in this section apply to the entire array.
Name reg6c_6d2 reg6c_6d3 Address 0xf80061b0 0xf80061b4
www.xilinx.com
832
Relative Address Absolute Address Width Access Type Reset Value Description
Note: This register is the first in an array of 4 identical registers listed in the table below. The details provided in this section apply to the entire array.
Name reg6e_710 reg6e_711 reg6e_712 reg6e_713 Address 0xf80061b8 0xf80061bc 0xf80061c0 0xf80061c4
Note: This register is the first in an array of 4 identical registers listed in the table below. The details provided in this section apply to the entire array.
www.xilinx.com
833
www.xilinx.com
834
Bits 1
Type ro
phy_reg_status_dll_loc k_0
ro
0x0
www.xilinx.com
835
www.xilinx.com
836
Relative Address Absolute Address Width Access Type Reset Value Description
Note: This register is the first in an array of 4 identical registers listed in the table below. The details provided in this section apply to the entire array.
Name axi_priority_wr_port0 axi_priority_wr_port1 axi_priority_wr_port2 axi_priority_wr_port3 Address 0xf8006208 0xf800620c 0xf8006210 0xf8006214
www.xilinx.com
837
Note: This register is the first in an array of 4 identical registers listed in the table below. The details provided in this section apply to the entire array.
Name axi_priority_rd_port0 axi_priority_rd_port1 axi_priority_rd_port2 axi_priority_rd_port3 Address 0xf8006218 0xf800621c 0xf8006220 0xf8006224
www.xilinx.com
838
www.xilinx.com
839
Note: This register is the first in an array of 4 identical registers listed in the table below. The details provided in this section apply to the entire array.
Name excl_access_cfg0 excl_access_cfg1 excl_access_cfg2 excl_access_cfg3 Address 0xf8006294 0xf8006298 0xf800629c 0xf80062a0
www.xilinx.com
840
Bits 31:0
Type ro
Description Mode register read Data. Valid when ddrc_co_rd_mrr_data_valid is high. Bits[7:0] carry the 8-bit MRR value. Valid for LPDDR2 only.
www.xilinx.com
841
11:4
rw
0x1
www.xilinx.com
842
www.xilinx.com
843
Register Summary
Register Name CTICONTROL CTIINTACK CTIAPPSET CTIAPPCLEAR CTIAPPPULSE CTIINEN0 CTIINEN1 CTIINEN2 CTIINEN3 CTIINEN4 CTIINEN5 CTIINEN6 CTIINEN7 CTIOUTEN0 Address 0x00000000 0x00000010 0x00000014 0x00000018 0x0000001C 0x00000020 0x00000024 0x00000028 0x0000002C 0x00000030 0x00000034 0x00000038 0x0000003C 0x000000A0 Width 1 8 4 4 4 4 4 4 4 4 4 4 4 4 Type rw wo rw wo wo rw rw rw rw rw rw rw rw rw Reset Value 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 Description CTI Control Register CTI Interrupt Acknowledge Register CTI Application Trigger Set Register CTI Application Trigger Clear Register CTI Application Pulse Register CTI Trigger to Channel Enable 0 Register CTI Trigger to Channel Enable 1 Register CTI Trigger to Channel Enable 2 Register CTI Trigger to Channel Enable 3 Register CTI Trigger to Channel Enable 4 Register CTI Trigger to Channel Enable 5 Register CTI Trigger to Channel Enable 6 Register CTI Trigger to Channel Enable 7 Register CTI Channel to Trigger Enable 0 Register
www.xilinx.com
844
Register Name CTIOUTEN1 CTIOUTEN2 CTIOUTEN3 CTIOUTEN4 CTIOUTEN5 CTIOUTEN6 CTIOUTEN7 CTITRIGINSTATUS CTITRIGOUTSTATUS CTICHINSTATUS CTICHOUTSTATUS CTIGATE ASICCTL ITCHINACK ITTRIGINACK ITCHOUT ITTRIGOUT ITCHOUTACK ITTRIGOUTACK ITCHIN ITTRIGIN ITCTRL CTSR CTCR LAR LSR ASR DEVID
Address 0x000000A4 0x000000A8 0x000000AC 0x000000B0 0x000000B4 0x000000B8 0x000000BC 0x00000130 0x00000134 0x00000138 0x0000013C 0x00000140 0x00000144 0x00000EDC 0x00000EE0 0x00000EE4 0x00000EE8 0x00000EEC 0x00000EF0 0x00000EF4 0x00000EF8 0x00000F00 0x00000FA0 0x00000FA4 0x00000FB0 0x00000FB4 0x00000FB8 0x00000FC8
Width 4 4 4 4 4 4 4 8 8 4 4 4 8 4 8 4 8 4 8 4 8 1 4 4 32 3 4 20
Type rw rw rw rw rw rw rw ro ro ro ro rw rw wo wo wo wo ro ro ro ro rw rw rw wo ro ro ro
Reset Value 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 x 0x00000000 x 0x00000000 0x0000000F 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x0000000F 0x00000000 0x00000000 0x00000003 x 0x00040800
Description CTI Channel to Trigger Enable 1 Register CTI Channel to Trigger Enable 2 Register CTI Channel to Trigger Enable 3 Register CTI Channel to Trigger Enable 4 Register CTI Channel to Trigger Enable 5 Register CTI Channel to Trigger Enable 6 Register CTI Channel to Trigger Enable 7 Register CTI Trigger In Status Register CTI Trigger Out Status Register CTI Channel In Status Register CTI Channel Out Status Register Enable CTI Channel Gate Register External Multiplexor Control Register ITCHINACK Register ITTRIGINACK Register ITCHOUT Register ITTRIGOUT Register ITCHOUTACK Register ITTRIGOUTACK Register ITCHIN Register ITTRIGIN Register IT Control Register Claim Tag Set Register Claim Tag Clear Register Lock Access Register Lock Status Register Authentication Status Register Device ID
www.xilinx.com
845
Register Name DTIR PERIPHID4 PERIPHID5 PERIPHID6 PERIPHID7 PERIPHID0 PERIPHID1 PERIPHID2 PERIPHID3 COMPID0 COMPID1 COMPID2 COMPID3
Address 0x00000FCC 0x00000FD0 0x00000FD4 0x00000FD8 0x00000FDC 0x00000FE0 0x00000FE4 0x00000FE8 0x00000FEC 0x00000FF0 0x00000FF4 0x00000FF8 0x00000FFC
Width 8 8 8 8 8 8 8 8 8 8 8 8 8
Type ro ro ro ro ro ro ro ro ro ro ro ro ro
Reset Value 0x00000014 0x00000004 0x00000000 0x00000000 0x00000000 0x00000006 0x000000B9 0x0000002B 0x00000000 0x0000000D 0x00000090 0x00000005 0x000000B1
Description Device Type Identifier Register Peripheral ID4 Peripheral ID5 Peripheral ID6 Peripheral ID7 Peripheral ID0 Peripheral ID1 Peripheral ID2 Peripheral ID3 Component ID0 Component ID1 Component ID2 Component ID3
www.xilinx.com
846
www.xilinx.com
847
www.xilinx.com
848
Absolute Address
www.xilinx.com
849
www.xilinx.com
850
www.xilinx.com
851
www.xilinx.com
852
www.xilinx.com
853
www.xilinx.com
854
www.xilinx.com
855
www.xilinx.com
856
www.xilinx.com
857
www.xilinx.com
858
www.xilinx.com
859
www.xilinx.com
860
Absolute Address
www.xilinx.com
861
www.xilinx.com
862
Bits 1 0
Type rw rw
www.xilinx.com
863
www.xilinx.com
864
Absolute Address
www.xilinx.com
865
www.xilinx.com
866
Description
ITTRIGIN Register
www.xilinx.com
867
www.xilinx.com
868
www.xilinx.com
869
www.xilinx.com
870
www.xilinx.com
871
www.xilinx.com
872
www.xilinx.com
873
Absolute Address
www.xilinx.com
874
Absolute Address
www.xilinx.com
875
Absolute Address
www.xilinx.com
876
www.xilinx.com
877
Register Summary
Register Name PMXEVCNTR0 PMXEVCNTR1 PMXEVCNTR2 PMXEVCNTR3 PMXEVCNTR4 PMXEVCNTR5 PMCCNTR PMXEVTYPER0 PMXEVTYPER1 PMXEVTYPER2 PMXEVTYPER3 PMXEVTYPER4 PMXEVTYPER5 PMCNTENSET PMCNTENCLR PMINTENSET PMINTENCLR PMOVSR PMSWINC PMCR PMUSERENR Address 0x00000000 0x00000004 0x00000008 0x0000000C 0x00000010 0x00000014 0x0000007C 0x00000400 0x00000404 0x00000408 0x0000040C 0x00000410 0x00000414 0x00000C00 0x00000C20 0x00000C40 0x00000C60 0x00000C80 0x00000CA0 0x00000E04 0x00000E08 Width 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 Type rw rw rw rw rw rw rw rw rw rw rw rw rw rw rw rw rw rw wo rw rw Reset Value x x x x x x x x x x x x x 0x00000000 0x00000000 0x00000000 0x00000000 x x 0x41093000 0x00000000 Description PMU event counter 0 PMU event counter 1 PMU event counter 2 PMU event counter 3 PMU event counter 4 PMU event counter 5 pmccntr pmevtyper0 pmevtyper1 pmevtyper2 pmevtyper3 pmevtyper4 pmevtyper5 pmcntenset pmcntenclr pmintenset pmintenclr pmovsr pmswinc pmcr pmuserenr
www.xilinx.com
878
www.xilinx.com
879
www.xilinx.com
880
www.xilinx.com
881
rw x pmevtyper0
www.xilinx.com
882
www.xilinx.com
883
rw x pmevtyper5
www.xilinx.com
884
www.xilinx.com
885
rw x pmovsr
www.xilinx.com
886
www.xilinx.com
887
Register Summary
Register Name ETMCR ETMCCR ETMTRIGGER ETMSR ETMSCR ETMTSSCR ETMTECR1 ETMACVR1 ETMACVR2 ETMACVR3 ETMACVR4 ETMACVR5 ETMACVR6 ETMACVR7 ETMACVR8 ETMACTR1 ETMACTR2 Address 0x00000000 0x00000004 0x00000008 0x00000010 0x00000014 0x00000018 0x00000024 0x00000040 0x00000044 0x00000048 0x0000004C 0x00000050 0x00000054 0x00000058 0x0000005C 0x00000080 0x00000084 Width 30 32 17 4 15 24 26 32 32 32 32 32 32 32 32 12 12 Type rw ro rw mixed ro rw rw rw rw rw rw rw rw rw rw mixed mixed Reset Value 0x00000400 0x8D294004 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000001 0x00000001 Description Main Control Register Configuration Code Register Trigger Event Register Status Register System Configuration Register TraceEnable Start/Stop Control Register TraceEnable Control Register 1 Address Comparator Value Register 1 Address Comparator Value Register 2 Address Comparator Value Register 3 Address Comparator Value Register 4 Address Comparator Value Register 5 Address Comparator Value Register 6 Address Comparator Value Register 7 Address Comparator Value Register 8 Address Comparator Access Type Register 1 Address Comparator Access Type Register 2
www.xilinx.com
888
Register Name ETMACTR3 ETMACTR4 ETMACTR5 ETMACTR6 ETMACTR7 ETMACTR8 ETMCNTRLDVR1 ETMCNTRLDVR2 ETMCNTENR1 ETMCNTENR2 ETMCNTRLDEVR1 ETMCNTRLDEVR2 ETMCNTVR1 ETMCNTVR2 ETMSQ12EVR ETMSQ21EVR ETMSQ23EVR ETMSQ31EVR ETMSQ32EVR ETMSQ13EVR ETMSQR ETMEXTOUTEVR1 ETMEXTOUTEVR2 ETMCIDCVR1
Address 0x00000088 0x0000008C 0x00000090 0x00000094 0x00000098 0x0000009C 0x00000140 0x00000144 0x00000150 0x00000154 0x00000160 0x00000164 0x00000170 0x00000174 0x00000180 0x00000184 0x00000188 0x0000018C 0x00000190 0x00000194 0x0000019C 0x000001A0 0x000001A4 0x000001B0
Width 12 12 12 12 12 12 16 16 18 18 17 17 16 16 17 17 17 17 17 17 2 17 17 32
Reset Value 0x00000001 0x00000001 0x00000001 0x00000001 0x00000001 0x00000001 0x00000000 0x00000000 0x00020000 0x00020000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
Description Address Comparator Access Type Register 3 Address Comparator Access Type Register 4 Address Comparator Access Type Register 5 Address Comparator Access Type Register 6 Address Comparator Access Type Register 7 Address Comparator Access Type Register 8 Counter Reload Value Register 1 Counter Reload Value Register 2 Counter Enable Event Register 1 Counter Enable Event Register 2 Counter Reload Event Register 1 Counter Reload Event Register 2 Counter Value Register 1 Counter Value Register 2 Sequencer State Transition Event Register 12 Sequencer State Transition Event Register 21 Sequencer State Transition Event Register 23 Sequencer State Transition Event Register 31 Sequencer State Transition Event Register 32 Sequencer State Transition Event Register 13 Current Sequencer State Register External Output Event Register 1 External Output Event Register 2 Context ID Comparator Value Register
www.xilinx.com
889
Register Name ETMCIDCMR ETMSYNCFR ETMIDR ETMCCER ETMEXTINSELR ETMAUXCR ETMTRACEIDR OSLSR ETMPDSR ITMISCOUT ITMISCIN ITTRIGGER ITATBDATA0 ITATBCTR2 ITATBID ITATBCTR0 ETMITCTRL CTSR CTCR LAR LSR ASR DEVID DTIR PERIPHID4 PERIPHID5 PERIPHID6 PERIPHID7 PERIPHID0 PERIPHID1
Address 0x000001BC 0x000001E0 0x000001E4 0x000001E8 0x000001EC 0x000001FC 0x00000200 0x00000304 0x00000314 0x00000EDC 0x00000EE0 0x00000EE8 0x00000EEC 0x00000EF0 0x00000EF4 0x00000EF8 0x00000F00 0x00000FA0 0x00000FA4 0x00000FB0 0x00000FB4 0x00000FB8 0x00000FC8 0x00000FCC 0x00000FD0 0x00000FD4 0x00000FD8 0x00000FDC 0x00000FE0 0x00000FE4
Width 32 12 32 26 14 4 7 32 32 10 7 1 5 2 7 10 1 8 8 32 3 8 32 8 8 8 8 8 8 8
Type rw mixed ro ro rw rw rw ro ro wo ro wo wo ro wo wo rw rw rw wo ro ro ro ro ro ro ro ro ro ro
Reset Value 0x00000000 0x00000400 0x411CF300 0x00C019A2 0x00000000 0x00000000 0x00000000 0x00000000 0x00000001 0x00000000 x 0x00000000 0x00000000 x 0x00000000 0x00000000 0x00000000 0x000000FF 0x00000000 0x00000000 0x00000003 x 0x00000000 0x00000013 0x00000004 0x00000000 0x00000000 0x00000000 0x00000050 0x000000B9
Description Context ID Comparator Mask Register Synchronization Frequency Register ID Register Configuration Code Extension Register Extended External Input Selection Register Auxiliary Control Register CoreSight Trace ID Register OS Lock Status Register Device Powerdown Status Register Miscellaneous Outputs Register Miscellaneous Inputs Register Trigger Register ATB Data 0 Register ATB Control 2 Register ATB Identification Register ATB Control 0 Register Integration Mode Control Register Claim Tag Set Register Claim Tag Clear Register Lock Access Register Lock Status Register Authentication Status Register Device ID Device Type Identifier Register Peripheral ID4 Peripheral ID5 Peripheral ID6 Peripheral ID7 Peripheral ID0 Peripheral ID1
www.xilinx.com
890
Width 8 8 8 8 8 8
Type ro ro ro ro ro ro
Description Peripheral ID2 Peripheral ID3 Component ID0 Component ID1 Component ID2 Component ID3
www.xilinx.com
891
Bits 9
Type rw
Description Debug Request Control When set to b1 and the trigger event occurs, the PTMDBGRQ output is asserted until PTMDBGACK is observed. This enables a debugger to force the processor into Debug state.
8 7:1 0
rw rw rw
When this bit is set to b1, addresses are output for all executed branches, both direct and indirect. Reserved This bit enables external control of the PTM. This bit must be cleared by the trace software tools at the beginning of a debug session. When this bit is set to b0, both the PTM and the trace interface in the processor are enabled. To avoid corruption of trace data, this bit must not be set before the Programming Status bit in the PTM Status Register has been read as 1.
www.xilinx.com
892
Type ro ro ro ro ro
Description Specifies the number of external inputs, four. Indicates that the sequencer is present. Specifies the number of counters, two. Reserved Specifies the number of address comparator pairs, four.
www.xilinx.com
893
Description
Status Register
TSSRStat
rw
0x0
ProgBit
ro
0x0
Overflow
ro
0x0
www.xilinx.com
894
debug_cpu_ptm0: 0xF889C018 debug_cpu_ptm1: 0xF889D018 24 bits rw 0x00000000 TraceEnable Start/Stop Control Register
www.xilinx.com
895
www.xilinx.com
896
www.xilinx.com
897
www.xilinx.com
898
www.xilinx.com
899
www.xilinx.com
900
www.xilinx.com
901
www.xilinx.com
902
www.xilinx.com
903
www.xilinx.com
904
www.xilinx.com
905
www.xilinx.com
906
www.xilinx.com
907
www.xilinx.com
908
www.xilinx.com
909
www.xilinx.com
910
www.xilinx.com
911
www.xilinx.com
912
www.xilinx.com
913
Relative Address Absolute Address Width Access Type Reset Value Description
0x00000190 debug_cpu_ptm0: 0xF889C190 debug_cpu_ptm1: 0xF889D190 17 bits rw 0x00000000 Sequencer State Transition Event Register 32
www.xilinx.com
914
www.xilinx.com
915
www.xilinx.com
916
www.xilinx.com
917
www.xilinx.com
918
www.xilinx.com
919
www.xilinx.com
920
Bits 1
Type rw
Description Specifies whether the PTM issues a timestamp on a barrier instruction. Possible values for this bit are: b0 = PTM issues timestamps on barrier instructions. This is the reset value. b1 = PTM does not issue timestamps on barriers
DisableForcedOF
rw
0x0
Specifies whether the PTM enters overflow state when synchronization is requested, and the previous synchronization sequence has not yet completed. This does not affect entry to overflow state when the FIFO becomes full. Possible values for this bit are: b0 = Forced overflow enabled. This is the reset value. b1 = Forced overflow disabled.
www.xilinx.com
921
www.xilinx.com
922
www.xilinx.com
923
www.xilinx.com
924
www.xilinx.com
925
Bits 1 0
Type wo wo
www.xilinx.com
926
www.xilinx.com
927
Description
www.xilinx.com
928
www.xilinx.com
929
Bits 3:2
Type ro
Reset Value x
Description Non-secure non-invasive debug IF NIDEN or DBGEN is 1, this field is 2'b11, indicating the functionality is implemented and enabled. Otherwise, this field is 2'b10 (implemented but disabled)
NSI
1:0
ro
0x0
www.xilinx.com
930
www.xilinx.com
931
www.xilinx.com
932
www.xilinx.com
933
www.xilinx.com
934
www.xilinx.com
935
www.xilinx.com
936
Register Summary
Register Name ROMENTRY00 ROMENTRY01 ROMENTRY02 ROMENTRY03 ROMENTRY04 ROMENTRY05 ROMENTRY06 ROMENTRY07 ROMENTRY08 ROMENTRY09 ROMENTRY10 ROMENTRY11 ROMENTRY12 ROMENTRY13 ROMENTRY14 ROMENTRY15 PERIPHID4 PERIPHID5 PERIPHID6 PERIPHID7 PERIPHID0 PERIPHID1 PERIPHID2 PERIPHID3 Address 0x00000000 0x00000004 0x00000008 0x0000000C 0x00000010 0x00000014 0x00000018 0x0000001C 0x00000020 0x00000024 0x00000028 0x0000002C 0x00000030 0x00000034 0x00000038 0x0000003C 0x00000FD0 0x00000FD4 0x00000FD8 0x00000FDC 0x00000FE0 0x00000FE4 0x00000FE8 0x00000FEC Width 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 8 8 8 8 8 8 8 8 Type ro ro ro ro ro ro ro ro ro ro rw rw rw rw rw rw ro ro ro ro ro ro ro ro Reset Value 0x00001003 0x00002003 0x00003003 0x00004003 0x00005003 0x00009003 0x0000A003 0x0000B003 0x0000C003 0x00080003 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000003 0x00000000 0x00000000 0x00000000 0x000000B2 0x00000093 0x00000008 0x00000000 Description ROM entry 00 ROM entry 01 ROM entry 02 ROM entry 03 ROM entry 04 ROM entry 05 ROM entry 06 ROM entry 07 ROM entry 08 ROM entry 09 ROM entry 10 ROM entry 11 ROM entry 12 ROM entry 13 ROM entry 14 ROM entry 15 Peripheral ID4 Peripheral ID5 Peripheral ID6 Peripheral ID7 Peripheral ID0 Peripheral ID1 Peripheral ID2 Peripheral ID3
www.xilinx.com
937
Width 8 8 8 8
Type ro ro ro ro
www.xilinx.com
938
www.xilinx.com
939
Bits 1
Type ro
EntryPresent
ro
0x1
www.xilinx.com
940
www.xilinx.com
941
Bits 1
Type ro
EntryPresent
ro
0x1
www.xilinx.com
942
www.xilinx.com
943
Bits 1
Type ro
EntryPresent
ro
0x1
www.xilinx.com
944
www.xilinx.com
945
www.xilinx.com
946
www.xilinx.com
947
Relative Address Absolute Address Width Access Type Reset Value Description
www.xilinx.com
948
www.xilinx.com
949
www.xilinx.com
950
Description
Component ID1
www.xilinx.com
951
Register Summary
Register Name RDP STS RRD RRP RWP TRG CTL RWD FFSR FFCR ITMISCOP0 ITTRFLINACK ITTRFLIN ITATBDATA0 ITATBCTR2 ITATBCTR1 ITATBCTR0 IMCR Address 0x00000004 0x0000000C 0x00000010 0x00000014 0x00000018 0x0000001C 0x00000020 0x00000024 0x00000300 0x00000304 0x00000EE0 0x00000EE4 0x00000EE8 0x00000EEC 0x00000EF0 0x00000EF4 0x00000EF8 0x00000F00 Width 32 4 32 10 10 10 1 32 2 14 2 2 2 5 2 7 10 1 Type ro ro ro rw rw rw rw rw ro mixed wo wo wo ro wo ro ro rw Reset Value 0x00000400 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000200 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 Description RAM Depth Register Status Register RAM Read Data Register RAM Read Pointer Register RAM Write Pointer Register Trigger Counter Register Control Register RAM Write Data Register Formatter and Flush Status Register Formatter and Flush Control Register Integration Test Miscellaneous Output Register 0 Integration Test Trigger In and Flush In Acknowledge Register Integration Test Trigger In and Flush In Register Integration Test ATB Data Register Integration Test ATB Control Register 2 Integration Test ATB Control Register 1 Integration Test ATB Control Register 0 Integration Mode Control Register
www.xilinx.com
952
Register Name CTSR CTCR LAR LSR ASR DEVID DTIR PERIPHID4 PERIPHID5 PERIPHID6 PERIPHID7 PERIPHID0 PERIPHID1 PERIPHID2 PERIPHID3 COMPID0 COMPID1 COMPID2 COMPID3
Address 0x00000FA0 0x00000FA4 0x00000FB0 0x00000FB4 0x00000FB8 0x00000FC8 0x00000FCC 0x00000FD0 0x00000FD4 0x00000FD8 0x00000FDC 0x00000FE0 0x00000FE4 0x00000FE8 0x00000FEC 0x00000FF0 0x00000FF4 0x00000FF8 0x00000FFC
Width 4 4 32 3 8 6 8 8 8 8 8 8 8 8 8 8 8 8 8
Type rw rw wo ro ro ro ro ro ro ro ro ro ro ro ro ro ro ro ro
Reset Value 0x0000000F 0x00000000 0x00000000 0x00000003 0x00000000 0x00000000 0x00000021 0x00000004 0x00000000 0x00000000 0x00000000 0x00000007 0x000000B9 0x0000002B 0x00000000 0x0000000D 0x00000090 0x00000005 0x000000B1
Description Claim Tag Set Register Claim Tag Clear Register Lock Access Register Lock Status Register Authentication Status Register Device ID Device Type Identifier Register Peripheral ID4 Peripheral ID5 Peripheral ID6 Peripheral ID7 Peripheral ID0 Peripheral ID1 Peripheral ID2 Peripheral ID3 Component ID0 Component ID1 Component ID2 Component ID3
www.xilinx.com
953
Full
ro
0x0
www.xilinx.com
954
www.xilinx.com
955
Relative Address Absolute Address Width Access Type Reset Value Description
www.xilinx.com
956
www.xilinx.com
957
Relative Address Absolute Address Width Access Type Reset Value Description
FlInProg
ro
0x0
11 10 9
ro rw rw
www.xilinx.com
958
Bits 8 7 6
Type rw ro rw
Description Indicate a trigger on TRIGIN being asserted. Reserved Manually generate a flush of the system. Setting this bit causes a flush to be generated. This is cleared when the flush has been serviced. This bit is clear on reset. Generate flush using Trigger event. Set this bit to cause a flush of data in the system when a Trigger Event occurs. This bit is clear on reset. Generate flush using the FLUSHIN interface. Set this bit to enable use of the FLUSHIN connection. This bit is clear on reset. Reserved Continuous Formatting. Continuous mode in the ETB corresponds to normal mode with the embedding of triggers. Can only be changed when FtStopped is HIGH. This bit is clear on reset. Enable Formatting. Do not embed Triggers into the formatted stream. Trace disable cycles and triggers are indicated by TRACECTL, where fitted. Can only be changed when FtStopped is HIGH. This bit is clear on reset.
FOnTrig
rw
0x0
FOnFlIn
rw
0x0
reserved EnFCont
3:2 1
ro rw
0x0 0x0
EnFTC
rw
0x0
www.xilinx.com
959
www.xilinx.com
960
www.xilinx.com
961
www.xilinx.com
962
www.xilinx.com
963
www.xilinx.com
964
www.xilinx.com
965
ro 0x00000000 Device ID
www.xilinx.com
966
www.xilinx.com
967
Relative Address Absolute Address Width Access Type Reset Value Description
www.xilinx.com
968
www.xilinx.com
969
www.xilinx.com
970
www.xilinx.com
971
Register Summary
Register Name FTMGLBCTRL FTMSTATUS FTMCONTROL FTMP2FDBG0 FTMP2FDBG1 FTMP2FDBG2 FTMP2FDBG3 FTMF2PDBG0 FTMF2PDBG1 FTMF2PDBG2 FTMF2PDBG3 CYCOUNTPRE FTMSYNCRELOAD FTMSYNCCOUT FTMATID FTMITTRIGOUTACK FTMITTRIGGER FTMITTRACEDIS FTMITCYCCOUNT FTMITATBDATA0 Address 0x00000000 0x00000004 0x00000008 0x0000000C 0x00000010 0x00000014 0x00000018 0x0000001C 0x00000020 0x00000024 0x00000028 0x0000002C 0x00000030 0x00000034 0x00000400 0x00000ED0 0x00000ED4 0x00000ED8 0x00000EDC 0x00000EEC Width 1 8 3 8 8 8 8 8 8 8 8 4 12 12 7 4 4 1 32 5 Type rw ro rw rw rw rw rw ro ro ro ro rw rw ro rw ro wo ro rw wo Reset Value 0x00000000 0x00000082 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000001 0x00000000 Description FTM Global Control Register FTM Status Register FTM Configuration FPGA Debug Register P2F0 FPGA Debug Register P2F1 FPGA Debug Register P2F2 FPGA Debug Register P2F3 FPGA Debug Register F2P0 FPGA Debug Register F2P1 FPGA Debug Register F2P2 FPGA Debug Register F2P3 AXI Cycle Count clock pre-scaler FTM Synchronization Counter reload value FTM Synchronization Counter value FTM ATID Value Register Trigger Output Acknowledge Integration Test Register Trigger Output Integration Test Register External Trace Disable Integration Test Register Cycle Counter Test Register ATB Data Integration Test Register 0
www.xilinx.com
972
Register Name FTMITATBCTR2 FTMITATBCTR1 FTMITATBCTR0 FTMITCR CLAIMTAGSET CLAIMTAGCLR LOCK_ACCESS LOCK_STATUS FTMAUTHSTATUS FTMDEVID FTMDEV_TYPE FTMPERIPHID4 FTMPERIPHID5 FTMPERIPHID6 FTMPERIPHID7 FTMPERIPHID0 FTMPERIPHID1 FTMPERIPHID2 FTMPERIPHID3 FTMCOMPONID0 FTMCOMPONID1 FTMCOMPONID2 FTMCOMPONID3
Address 0x00000EF0 0x00000EF4 0x00000EF8 0x00000F00 0x00000FA0 0x00000FA4 0x00000FB0 0x00000FB4 0x00000FB8 0x00000FC8 0x00000FCC 0x00000FD0 0x00000FD4 0x00000FD8 0x00000FDC 0x00000FE0 0x00000FE4 0x00000FE8 0x00000FEC 0x00000FF0 0x00000FF4 0x00000FF8 0x00000FFC
Width 2 7 10 1 8 8 32 3 8 1 8 8 8 8 8 8 8 8 8 8 8 8 8
Type ro rw wo rw rw rw wo ro ro ro ro ro ro ro ro ro ro ro ro ro ro ro ro
Reset Value 0x00000001 0x00000000 0x00000000 0x00000000 0x000000FF 0x000000FF 0x00000000 0x00000003 0x00000088 0x00000000 0x00000033 0x00000000 0x00000000 0x00000000 0x00000000 0x00000001 0x00000090 0x0000000C 0x00000000 0x0000000D 0x00000090 0x00000005 0x000000B1
Description ATB Control Integration Test Register 2 ATB Control Integration Test Register 1 ATB Control Integration Test Register 0 FTM Test Control Register Claim Tag Set Register Claim Tag Clear Register Lock Access Register Lock Status Register Authentication Status Register Device Configuration Register Device Type Identification Register Peripheral ID4 Peripheral ID5 Peripheral ID6 Peripheral ID7 Peripheral ID0 Peripheral ID1 Peripheral ID2 Peripheral ID3 Component ID0 Component ID1 Component ID2 Component ID3
www.xilinx.com
973
www.xilinx.com
974
Description
FTM Configuration
www.xilinx.com
975
www.xilinx.com
976
www.xilinx.com
977
www.xilinx.com
978
Description
www.xilinx.com
979
www.xilinx.com
980
www.xilinx.com
981
Relative Address Absolute Address Width Access Type Reset Value Description
www.xilinx.com
982
www.xilinx.com
983
www.xilinx.com
984
www.xilinx.com
985
www.xilinx.com
986
www.xilinx.com
987
www.xilinx.com
988
Relative Address Absolute Address Width Access Type Reset Value Description
www.xilinx.com
989
www.xilinx.com
990
www.xilinx.com
991
Description
Component ID2
www.xilinx.com
992
Register Summary
Register Name Control PriControl ITATBDATA0 ITATBCTR2 ITATBCTR1 ITATBCTR0 IMCR CTSR CTCR LAR LSR ASR DEVID DTIR PERIPHID4 PERIPHID5 PERIPHID6 PERIPHID7 PERIPHID0 PERIPHID1 PERIPHID2 Address 0x00000000 0x00000004 0x00000EEC 0x00000EF0 0x00000EF4 0x00000EF8 0x00000F00 0x00000FA0 0x00000FA4 0x00000FB0 0x00000FB4 0x00000FB8 0x00000FC8 0x00000FCC 0x00000FD0 0x00000FD4 0x00000FD8 0x00000FDC 0x00000FE0 0x00000FE4 0x00000FE8 Width 12 24 5 2 7 10 1 4 4 32 3 8 8 8 8 8 8 8 8 8 8 Type rw rw rw rw rw mixed rw rw rw wo ro ro ro ro ro ro ro ro ro ro ro Reset Value 0x00000300 0x00FAC688 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x0000000F 0x00000000 0x00000000 0x00000003 0x00000000 0x00000028 0x00000012 0x00000004 0x00000000 0x00000000 0x00000000 0x00000008 0x000000B9 0x0000001B Description CSTF Control Register CSTF Priority Control Register Integration Test ATB Data 0 Register Integration Test ATB Control 2 Register Integration Test ATB Control 1 Register Integration Test ATB Control 0 Register Integration Mode Control Register Claim Tag Set Register Claim Tag Clear Register Lock Access Register Lock Status Register Authentication Status Register Device ID Device Type Identifier Register Peripheral ID4 Peripheral ID5 Peripheral ID6 Peripheral ID7 Peripheral ID0 Peripheral ID1 Peripheral ID2
www.xilinx.com
993
Width 8 8 8 8 8
Type ro ro ro ro ro
Description Peripheral ID3 Component ID0 Component ID1 Component ID2 Component ID3
EnableSlave6
rw
0x0
EnableSlave5
rw
0x0
EnableSlave4
rw
0x0
www.xilinx.com
994
Bits 3
Type rw
Description Setting this bit enables this slave port. If the bit is not set then this has the effect of excluding the port from the priority selection scheme. Setting this bit enables this slave port. If the bit is not set then this has the effect of excluding the port from the priority selection scheme. Setting this bit enables this slave port. If the bit is not set then this has the effect of excluding the port from the priority selection scheme. Setting this bit enables this slave port. If the bit is not set then this has the effect of excluding the port from the priority selection scheme.
EnableSlave2
rw
0x0
EnableSlave1
rw
0x0
EnableSlave0
rw
0x0
www.xilinx.com
995
rw
0x0
www.xilinx.com
996
www.xilinx.com
997
www.xilinx.com
998
www.xilinx.com
999
www.xilinx.com
1000
www.xilinx.com
1001
Relative Address Absolute Address Width Access Type Reset Value Description
www.xilinx.com
1002
www.xilinx.com
1003
www.xilinx.com
1004
www.xilinx.com
1005
Relative Address Absolute Address Width Access Type Reset Value Description
www.xilinx.com
1006
Register Summary
Register Name StimPort00 StimPort01 StimPort02 StimPort03 StimPort04 StimPort05 StimPort06 StimPort07 StimPort08 StimPort09 StimPort10 StimPort11 StimPort12 StimPort13 StimPort14 StimPort15 StimPort16 StimPort17 StimPort18 StimPort19 StimPort20 StimPort21 StimPort22 Address 0x00000000 0x00000004 0x00000008 0x0000000C 0x00000010 0x00000014 0x00000018 0x0000001C 0x00000020 0x00000024 0x00000028 0x0000002C 0x00000030 0x00000034 0x00000038 0x0000003C 0x00000040 0x00000044 0x00000048 0x0000004C 0x00000050 0x00000054 0x00000058 Width 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 Type rw rw rw rw rw rw rw rw rw rw rw rw rw rw rw rw rw rw rw rw rw rw rw Reset Value 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 Description Stimulus Port Register 0 Stimulus Port Register 1 Stimulus Port Register 2 Stimulus Port Register 3 Stimulus Port Register 4 Stimulus Port Register 5 Stimulus Port Register 6 Stimulus Port Register 7 Stimulus Port Register 8 Stimulus Port Register 9 Stimulus Port Register 10 Stimulus Port Register 11 Stimulus Port Register 12 Stimulus Port Register 13 Stimulus Port Register 14 Stimulus Port Register 15 Stimulus Port Register 16 Stimulus Port Register 17 Stimulus Port Register 18 Stimulus Port Register 19 Stimulus Port Register 20 Stimulus Port Register 21 Stimulus Port Register 22
www.xilinx.com
1007
Register Name StimPort23 StimPort24 StimPort25 StimPort26 StimPort27 StimPort28 StimPort29 StimPort30 StimPort31 TER TTR CR SCR ITTRIGOUTACK ITTRIGOUT ITATBDATA0 ITATBCTR2 ITATABCTR1 ITATBCTR0 IMCR CTSR CTCR LAR LSR ASR DEVID DTIR PERIPHID4 PERIPHID5
Address 0x0000005C 0x00000060 0x00000064 0x00000068 0x0000006C 0x00000070 0x00000074 0x00000078 0x0000007C 0x00000E00 0x00000E20 0x00000E80 0x00000E90 0x00000EE4 0x00000EE8 0x00000EEC 0x00000EF0 0x00000EF4 0x00000EF8 0x00000F00 0x00000FA0 0x00000FA4 0x00000FB0 0x00000FB4 0x00000FB8 0x00000FC8 0x00000FCC 0x00000FD0 0x00000FD4
Width 32 32 32 32 32 32 32 32 32 32 32 24 12 1 1 2 1 7 2 1 8 8 32 3 8 13 8 8 8
Type rw rw rw rw rw rw rw rw rw rw rw mixed rw ro wo wo ro wo wo rw rw rw wo ro ro ro ro ro ro
Reset Value 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000004 0x00000400 0x00000000 0x00000000 0x00000000 0x00000001 0x00000000 0x00000000 0x00000000 0x000000FF 0x00000000 0x00000000 0x00000003 0x00000088 0x00000020 0x00000043 0x00000004 0x00000000
Description Stimulus Port Register 23 Stimulus Port Register 24 Stimulus Port Register 25 Stimulus Port Register 26 Stimulus Port Register 27 Stimulus Port Register 28 Stimulus Port Register 29 Stimulus Port Register 30 Stimulus Port Register 31 Trace Enable Register Trace Trigger Register Control Register Synchronization Control Register Integration Test Trigger Out Acknowledge Register Integration Test Trigger Out Register Integration Test ATB Data Register 0 Integration Test ATB Control Register 2 Integration Test ATB Control Register 1 Integration Test ATB Control Register 0 Integration Mode Control Register Claim Tag Set Register Claim Tag Clear Register Lock Access Register Lock Status Register Authentication Status Register Device ID Device Type Identifier Register Peripheral ID4 Peripheral ID5
www.xilinx.com
1008
Register Name PERIPHID6 PERIPHID7 PERIPHID0 PERIPHID1 PERIPHID2 PERIPHID3 COMPID0 COMPID1 COMPID2 COMPID3
Address 0x00000FD8 0x00000FDC 0x00000FE0 0x00000FE4 0x00000FE8 0x00000FEC 0x00000FF0 0x00000FF4 0x00000FF8 0x00000FFC
Width 8 8 8 8 8 8 8 8 8 8
Type ro ro ro ro ro ro ro ro ro ro
Reset Value 0x00000000 0x00000000 0x00000013 0x000000B9 0x0000002B 0x00000000 0x0000000D 0x00000090 0x00000005 0x000000B1
Description Peripheral ID6 Peripheral ID7 Peripheral ID0 Peripheral ID1 Peripheral ID2 Peripheral ID3 Component ID0 Component ID1 Component ID2 Component ID3
www.xilinx.com
1009
www.xilinx.com
1010
www.xilinx.com
1011
www.xilinx.com
1012
www.xilinx.com
1013
www.xilinx.com
1014
www.xilinx.com
1015
www.xilinx.com
1016
www.xilinx.com
1017
www.xilinx.com
1018
www.xilinx.com
1019
www.xilinx.com
1020
www.xilinx.com
1021
www.xilinx.com
1022
www.xilinx.com
1023
www.xilinx.com
1024
www.xilinx.com
1025
www.xilinx.com
1026
www.xilinx.com
1027
www.xilinx.com
1028
www.xilinx.com
1029
www.xilinx.com
1030
www.xilinx.com
1031
www.xilinx.com
1032
www.xilinx.com
1033
www.xilinx.com
1034
www.xilinx.com
1035
www.xilinx.com
1036
www.xilinx.com
1037
www.xilinx.com
1038
www.xilinx.com
1039
www.xilinx.com
1040
www.xilinx.com
1041
Register (itm) CR
Name Relative Address Absolute Address Width Access Type Reset Value Description CR 0x00000E80 0xF8805E80 24 bits mixed 0x00000004 Control Register
Register CR Details
Field Name ITMBusy TraceID reserved TSPrescale Bits 23 22:16 15:10 9:8 Type rw rw ro rw Reset Value 0x0 0x0 0x0 0x0 Description ITM is transmitting trace and FIFO is not empty ATIDM[6:0] value Reserved Timestamp Prescaler Enumerated Value List: DIVBY1=0. DIVBY4=1. DIVBY16=2. DIVBY64=3. reserved DWTEn SYNCEn TSSEn ITMEn 7:4 3 2 1 0 ro ro ro rw rw 0x0 0x0 0x1 0x0 0x0 Reserved Enable DWT input port Enable sync packets Enable timestamps, delta Enable ITM Stimulus, also acts as a global enable
www.xilinx.com
1042
www.xilinx.com
1043
Description
www.xilinx.com
1044
www.xilinx.com
1045
Description
www.xilinx.com
1046
www.xilinx.com
1047
Relative Address Absolute Address Width Access Type Reset Value Description
www.xilinx.com
1048
www.xilinx.com
1049
Relative Address Absolute Address Width Access Type Reset Value Description
www.xilinx.com
1050
www.xilinx.com
1051
www.xilinx.com
1052
www.xilinx.com
1053
Relative Address Absolute Address Width Access Type Reset Value Description
www.xilinx.com
1054
Register Summary
Register Name SuppSize CurrentSize SuppTrigMode TrigCount TrigMult SuppTest CurrentTest TestRepeatCount FFSR FFCR FormatSyncCount EXTCTLIn EXTCTLOut ITTRFLINACK ITTRFLIN ITATBDATA0 ITATBCTR2 Address 0x00000000 0x00000004 0x00000100 0x00000104 0x00000108 0x00000200 0x00000204 0x00000208 0x00000300 0x00000304 0x00000308 0x00000400 0x00000404 0x00000EE4 0x00000EE8 0x00000EEC 0x00000EF0 Width 32 32 18 8 5 18 18 8 3 14 12 8 8 2 2 5 2 Type rw rw ro rw rw ro mixed rw ro mixed rw ro rw wo ro ro wo Reset Value 0xFFFFFFFF 0x00000001 0x0000011F 0x00000000 0x00000000 0x0003000F 0x00000000 0x00000000 0x00000006 0x00000000 0x00000040 0x00000000 0x00000000 0x00000000 x x 0x00000000 Description Supported Port Size Register Current Port Size Register Supported Trigger Modes Register Trigger Counter Register Trigger Multiplier Register Supported Test Patterns/Modes Register Current Test Patterns/Modes Register TPIU Test Pattern Repeat Counter Register Formatter and Flush Status Register Formatter and Flush Control Register Formatter Synchronization Counter Register EXTCTL In Port EXTCTL Out Port Integration Test Trigger In and Flush In Acknowledge Register Integration Test Trigger In and Flush In Register Integration Test ATB Data Register 0 Integration Test ATB Control Register 2
www.xilinx.com
1055
Register Name ITATBCTR1 ITATBCTR0 IMCR CTSR CTCR LAR LSR ASR DEVID DTIR PERIPHID4 PERIPHID5 PERIPHID6 PERIPHID7 PERIPHID0 PERIPHID1 PERIPHID2 PERIPHID3 COMPID0 COMPID1 COMPID2 COMPID3
Address 0x00000EF4 0x00000EF8 0x00000F00 0x00000FA0 0x00000FA4 0x00000FB0 0x00000FB4 0x00000FB8 0x00000FC8 0x00000FCC 0x00000FD0 0x00000FD4 0x00000FD8 0x00000FDC 0x00000FE0 0x00000FE4 0x00000FE8 0x00000FEC 0x00000FF0 0x00000FF4 0x00000FF8 0x00000FFC
Width 7 10 1 4 4 32 3 8 12 8 8 8 8 8 8 8 8 8 8 8 8 8
Type ro ro rw rw rw wo ro ro ro ro ro ro ro ro ro ro ro ro ro ro ro ro x x
Reset Value
Description Integration Test ATB Control Register 1 Integration Test ATB Control Register 0 Integration Mode Control Register Claim Tag Set Register Claim Tag Clear Register Lock Access Register Lock Status Register Authentication Status Register Device ID Device Type Identifier Register Peripheral ID4 Peripheral ID5 Peripheral ID6 Peripheral ID7 Peripheral ID0 Peripheral ID1 Peripheral ID2 Peripheral ID3 Component ID0 Component ID1 Component ID2 Component ID3
0x00000000 0x0000000F 0x00000000 0x00000000 0x00000003 0x00000000 0x000000A0 0x00000011 0x00000004 0x00000000 0x00000000 0x00000000 0x00000012 0x000000B9 0x0000004B 0x00000000 0x0000000D 0x00000090 0x00000005 0x000000B1
www.xilinx.com
1056
www.xilinx.com
1057
www.xilinx.com
1058
www.xilinx.com
1059
www.xilinx.com
1060
11 10 9 8 7
ro rw rw rw ro
www.xilinx.com
1061
Bits 6
Type rw
Description Manually generate a flush of the system. Setting this bit causes a flush to be generated. This is cleared when this flush has been serviced. Generate a flush using Trigger event. Set this bit to cause a flush of data in the system when a Trigger Event occurs.
FOnTrig
rw
0x0
4 3:2 1
rw ro rw
Generate flush using the FLUSHIN interface. Set this bit to enable use of the FLUSHIN connection. Reserved Continuous Formatting, no TRACECTL. Embed in trigger packets and indicate null cycles using Sync packets. Can only be changed when FtStopped is HIGH. Enable Formatting. Do not embed Triggers into the formatted stream. Trace disable cycles and triggers are indicated by TRACECTL, where fitted. Can only be changed when FtStopped is HIGH.
EnFTC
rw
0x0
www.xilinx.com
1062
www.xilinx.com
1063
www.xilinx.com
1064
Bits 1 0
Type ro ro
Reset Value x x
www.xilinx.com
1065
Relative Address Absolute Address Width Access Type Reset Value Description
www.xilinx.com
1066
Description
www.xilinx.com
1067
Description
www.xilinx.com
1068
www.xilinx.com
1069
ro 0x000000A0 Device ID
www.xilinx.com
1070
www.xilinx.com
1071
Relative Address Absolute Address Width Access Type Reset Value Description
www.xilinx.com
1072
www.xilinx.com
1073
www.xilinx.com
1074
www.xilinx.com
1075
Register Summary
Register Name CTRL Address 0x00000000 Width 32 Type mixed Reset Value 0x0C006000 Description Control Register : This register defines basic control registers. Some of the register bits can be locked by control bits in the LOCK Register 0x004. LOCK 0x00000004 32 mixed 0x00000000 This register defines LOCK register used to lock changes in the Control Register 0x000 after configuration. All those LOCK register is set only register. The only way to clear those registers is power on reset signal. Configuration Register : This register contains configuration information for the AXI transfers, and other general setup.
CFG
0x00000008
32
rw
0x00000508
www.xilinx.com
1076
Address 0x0000000C
Width 32
Type mixed
Description Interrupt Status Register : This register contains interrupt status flags. All register bits are clear on write by writing 1s to those bits, however the register bits will only be cleared if the condition that sets the interrupt flag is no longer true. Note that individual status bits will be set if the corresponding condition is satisfied regardless of whether the interrupt mask bit in 0x010 is set. However, external interrupt will only be generated if an interrupt status flag is set and the corresponding mask bit is not set
INT_MASK
0x00000010
32
rw
0xFFFFFFFF
Interrupt Mask Register: This register contains interrupt mask information. Set a bit to 1 to mask the interrupt generation from the corresponding interrupting source in Interrupt Status Register 0x00C.
STATUS DMA_SRC_ADDR
0x00000014 0x00000018
32 32
mixed rw
0x40000820 0x00000000
Status Register: This register contains miscellaneous status. DMA Source address Register: This register contains the source address for DMA transfer. A DMA command consists of source address, destination address, source transfer length, and destination transfer length. It is important that the parameters are programmed in the exact sequence as described
www.xilinx.com
1077
Address 0x0000001C
Width 32
Type rw
Description DMA Destination address Register: This register contains the destination address for DMA transfer. A DMA command consists of source address, destination address, source transfer length, and destination transfer length. It is important that the parameters are programmed in the exact sequence as described.
DMA_SRC_LEN
0x00000020
32
rw
0x00000000
DMA Source transfer Length Register: This register contains the DMA source transfer length in unit of 4-byte word. A DMA command that consists of source address, destination address, source transfer length, and destination transfer length. It is important that the parameters are programmed in the exact sequence as described.
DMA_DEST_LEN
0x00000024
32
rw
0x00000000
DMA Destination transfer Length Register: This register contains the DMA destination transfer length in unit of 4-byte word. A DMA command that consists of source address, destination address, source transfer length, and destination transfer length is accepted when this register is written to. It is important that the parameters are programmed in the exact sequence as described.
ROM_SHADOW MULTIBOOT_ADDR
0x00000028 0x0000002C
32 32
wo rw
0x00000000 0x00000000
ROM Shadow Register: This register defines ROM shadow MULTI Boot Addr Pointer Register: This register defines multi-boot address pointer. This register is power on reset only used to remember multi-boot address pointer set by previous boot.
www.xilinx.com
1078
Address 0x00000030
Width 32
Type mixed
Description Software ID Register: This register defines PS boot software ID. It will be used by firmware and software to perform consistent check for subsequent PS software and PL image loads. It is both readable and writeable after reset, and it becomes read only after system has entered user mode (bit 15 of reg 0x000 is set). Unlock Register: This register is used to protect the DEVCI configuration registers from ROM code corruption. The boot ROM will unlock the DEVCI by writing 0x757BDF0D to this register. Writing anything other than the unlock word to this register will cause an illegal access state and make the DEVCI inaccessible until a system reset occurs.
UNLOCK
0x00000034
32
rw
0x00000000
MCTRL
0x00000080
32
mixed
Miscellaneous control Register: This register contains miscellaneous controls. XADC Interface Configuration Register : This register configures the XADC Interface operation XADC Interface Interrupt Status Register : This register contains the interrupt status flags of the XADC interface block. All register bits are clear on write by writing 1s to those bits, however the register bits will only be cleared if the condition that sets the interrupt flag is no longer true. Note that individual status bits will be set if the corresponding condition is satisfied regardless of whether the interrupt mask bit in 0x108 is set. However, external interrupt will only be generated if an interrupt status flag is set and the corresponding mask bit is not set
XADCIF_CFG
0x00000100
32
rw
0x00001114
XADCIF_INT_STS
0x00000104
32
mixed
0x00000200
www.xilinx.com
1079
Address 0x00000108
Width 32
Type rw
Description XADC Interface Interrupt Mask Register : This register contains the interrupt mask information. Set a bit to 1 to mask the interrupt generation from the corresponding interrupting source in 0x104
XADCIF_MSTS
0x0000010C
32
ro
0x00000500
XADC Interface miscellaneous Status Register : This register contains miscellaneous status of the XADC Interface XADC Interface Command FIFO Register : This address is the entry point to the command FIFO. Commands get push into the FIFO when there is a write to this address
XADCIF_CMDFIFO
0x00000110
32
wo
0x00000000
XADCIF_RDFIFO
0x00000114
32
ro
0x00000000
XADC Interface Data FIFO Register : This address is the exit point of the read data FIFO. Read data is returned when there is a read from this address
XADCIF_MCTL
0x00000118
32
rw
0x00000010
XADC Interface Miscellaneous Control Register : This register provides miscellaneous control of the XADC Interface.
www.xilinx.com
1080
www.xilinx.com
1081
Bits 23
Type rw
Description This bit is used to disable the JTAG scan chain. The primary purpose is to protect the PL from unwanted JTAG accesses. The JTAG connection to the PS DAP and PL TAP will be disabled when this bit is set.
22:16 15 14 13 12
rw wo rw rw rw
Reserved Reserved. Do not modify. Reserved - always write with 1 Reserved - always write with 1 (Lockable, see 0x004, bit 4) This bit is used to select the AES key source 0 - BBRAM key 1 - eFuse key User access to this bit is restricted. The boot ROM will make the key selection and lock this bit during the initial boot sequence. This bit is only cleared by PS_POR_B reset.
PCFG_AES_EN
11:9
rw
0x0
(Lockable, see 0x004, bit 3) This bit enables the AES engine within the PL. The three bits need to be either all 0's or 1's, any inconsistency will lead to security lockdown. 000 - Disable AES engine 111 - Enable AES engine All others - Secure lockdown User access to this bit is restricted. The boot ROM will enable the AES engine for secure boot and will always lock this bit before passing control to user code. This bit is only cleared by PS_POR_B reset.
SEU_EN
rw
0x0
(Lockable, see 0x004, bit 2) This bit enables an automatic lockdown of the PS when a PL SEU is detected. 0 - Ignore SEU signal from PL 1 - Initiate secure lockdown when SEU signal received from PL This bit is sticky, once set it can only be cleared with a PS_POR_B reset.
www.xilinx.com
1082
Bits 7
Type ro
Description (Lockable, see 0x004, bit 1) This bit is used to indicate if the PS has been booted securely. 0 - PS was not booted securely 1 - PS was booted securely User access to this bit is restricted. The boot ROM will set this bit when a secure boot is initiated and will always lock the bit before passing control to user code. This bit is only cleared by PS_POR_B reset.
SPNIDEN
rw
0x0
(Lockable, see 0x004, bit 0) Secure Non-Invasive Debug Enable 0 - Disable 1 - Enable
SPIDEN
rw
0x0
(Lockable, see 0x004, bit 0) Secure Invasive Debug Enable 0 - Disable 1 - Enable
NIDEN
rw
0x0
DBGEN
rw
0x0
DAP_EN
2:0
rw
0x0
(Lockable, see 0x004, bit 0) These bits will enable the ARM DAP. 111 - ARM DAP Enabled Others - ARM DAP will be bypassed
www.xilinx.com
1083
Description
This register defines LOCK register used to lock changes in the Control Register 0x000 after configuration. All those LOCK register is set only register. The only way to clear those registers is power on reset signal.
www.xilinx.com
1084
DISABLE_DST_INC
rw
0x0
reserved
rw
0x1
www.xilinx.com
1085
Bits 2 1 0
Type rw rw rw
Description Reserved. Do not modify. Reserved. Do not modify. Reserved. Do not modify.
AXI_WERR_INT (IXR_AXI_WERR)
www.xilinx.com
1086
Bits 21
Type wtc
Description AXI read address or response time out. AXI read is taking longer than expected (> 2048 cpu_1x clock cycles), this can be an indication of starvation
20 19 18
wtc rw wtc
AXI read response error Reserved This bit is used to indicate that RX FIFO overflows. Incoming read data from PCAP will be dropped and the DEVCI DMA may enter an unrecoverable state . Tx FIFO level < threshold, see reg 0x008 Rx FIFO level >= threshold, see reg 0x008 Illegal DMA command
WR_FIFO_LVL_INT (IXR_WR_FIFO_LVL) RD_FIFO_LVL_INT (IXR_RD_FIFO_LVL) DMA_CMD_ERR_INT (IXR_DMA_CMD_ERR ) DMA_Q_OV_INT (IXR_DMA_Q_OV) DMA_DONE_INT (IXR_DMA_DONE)
17 16 15
14 13
wtc wtc
0x0 0x0
DMA command queue overflows This bit is used to indicate a DMA command is done. The bit is set either as soon as DMA is done (PCAP may not be finished) or both DMA and PCAP are done.
D_P_DONE_INT (IXR_D_P_DONE) P2D_LEN_ERR_INT (IXR_P2D_LEN_ERR) reserved PCFG_HMAC_ERR_I NT (IXR_PCFG_HMAC_E RR) PCFG_SEU_ERR_INT (IXR_PCFG_SEU_ERR) PCFG_POR_B_INT (IXR_PCFG_POR_B) PCFG_CFG_RST_INT (IXR_PCFG_CFG_RST)
12 11 10:7 6
Both DMA and PCAP transfers are done for intermediate and final transfers. Inconsistent PCAP to DMA transfer length error Reserved Triggers when an HMAC error is received from the PL
5 4 3
Triggers when an SEU error is received from the PL Triggers if the PL loses power, PL POR_B signal goes low Triggers if the PL configuration controller is under reset
www.xilinx.com
1087
Bits 2 1 0
Description DONE signal from PL indicating that programming is complete and PL is in user mode. Triggered on the positive edge of the PL INIT signal Triggered on the negative edge of the PL INIT signal
www.xilinx.com
1088
Field Name M_AXI_RERR_INT (IXR_AXI_RERR) reserved M_RX_FIFO_OV_INT (IXR_RX_FIFO_OV) M_WR_FIFO_LVL_IN T (IXR_WR_FIFO_LVL) M_RD_FIFO_LVL_INT (IXR_RD_FIFO_LVL) M_DMA_CMD_ERR_I NT (IXR_DMA_CMD_ERR ) M_DMA_FIFO_OV_IN T (IXR_DMA_Q_OV) M_DMA_DONE_INT (IXR_DMA_DONE) M_D_P_DONE_INT (IXR_D_P_DONE) M_P2D_LEN_ERR_IN T (IXR_P2D_LEN_ERR) reserved M_PCFG_HMAC_ERR _INT (IXR_PCFG_HMAC_E RR) M_PCFG_SEU_ERR_I NT (IXR_PCFG_SEU_ERR) M_PCFG_POR_B_INT (IXR_PCFG_POR_B) M_PCFG_CFG_RST_I NT (IXR_PCFG_CFG_RST) M_PCFG_DONE_INT (IXR_PCFG_DONE)
Bits 20 19 18 17
Type rw rw rw rw
Description Interrupt mask for AXI read response error interrupt Reserved Interrupt mask for Rx FIFO overflow interrupt Interrupt mask for Tx FIFO level < threshold interrupt Interrupt mask for Rx FIFO level > threshold interrupt Interrupt mask for illegal DMA command interrupt
16 15
rw rw
0x1 0x1
14
rw
0x1
Interrupt mask for DMA command FIFO overflows Interrupt mask for DMA command done interrupt Interrupt mask for DMA and PCAP done interrupt Interrupt mask Inconsistent xfer length error interrupt Reserved Interrupt mask for HMAC error
13 12 11
rw rw rw
10:7 6
rw rw
0xF 0x1
rw
0x1
4 3
rw rw
0x1 0x1
Interrupt mask for PCFG_POR_B Interrupt Interrupt mask for PCFG_CFG_RESET interrupt
rw
0x1
www.xilinx.com
1089
Bits 1
Type rw
rw
0x1
www.xilinx.com
1090
Bits 11 10 9 8 7 6
Type ro ro ro ro ro ro
Description Tri-state IO during HIZ, active low First PL configuration done, active low. Global power down, active low Tri-state IO during config, active low This bit is used to indicate a secure lockdown. Can only be cleared by a PS_POR_B reset. Indicates the UNLOCK register was not written with the correct unlock word. If set all secure boot features will be disabled, the DAP will be disabled and writing to the DEVCI registers will be disabled. The illegal access mode can only be cleared with a PS_POR_B reset.
PSS_CFG_RESET_B PCFG_INIT
5 4
ro ro
0x1 0x0
PL configuration reset, active low. PL INIT signal, indicates when housecleaning is done and the PL is ready to receive PCAP data. Positive and negative edges of the signal generate maskable interrupts in 0x00C.
ro
0x0
When this eFuse is blown, the BBRAM AES key is disabled. If the device is booted securely, the eFuse key must be used.
ro
0x0
When this eFuse is blown, the Zynq device must boot securely and use the eFuse as the AES key source. Non-secure boot will cause a security lockdown. When this eFuse is blown, the ARM DAP controller is permanently set in bypass mode. Any attempt to activate the DAP will cause a security lockdown.
EFUSE_JTAG_DIS
ro
0x0
reserved
ro
0x0
www.xilinx.com
1091
Description
DMA Source address Register: This register contains the source address for DMA transfer. A DMA command consists of source address, destination address, source transfer length, and destination transfer length. It is important that the parameters are programmed in the exact sequence as described
www.xilinx.com
1092
www.xilinx.com
1093
www.xilinx.com
1094
www.xilinx.com
1095
0xF8007080 32 bits mixed x Miscellaneous control Register: This register contains miscellaneous controls.
www.xilinx.com
1096
rw 0x00001114 XADC Interface Configuration Register : This register configures the XADC Interface operation
www.xilinx.com
1097
0xF8007104 32 bits mixed 0x00000200 XADC Interface Interrupt Status Register : This register contains the interrupt status flags of the XADC interface block. All register bits are clear on write by writing 1s to those bits, however the register bits will only be cleared if the condition that sets the interrupt flag is no longer true. Note that individual status bits will be set if the corresponding condition is satisfied regardless of whether the interrupt mask bit in 0x108 is set. However, external interrupt will only be generated if an interrupt status flag is set and the corresponding mask bit is not set
www.xilinx.com
1098
www.xilinx.com
1099
www.xilinx.com
1100
rw 0x00000010 XADC Interface Miscellaneous Control Register : This register provides miscellaneous control of the XADC Interface.
www.xilinx.com
1101
Register Summary
Register Name DSR DPC INTEN INT_EVENT_RIS INTMIS INTCLR FSRD FSRC FTRD FTR0 FTR1 FTR2 FTR3 FTR4 FTR5 FTR6 FTR7 CSR0 CPC0 CSR1 CPC1 CSR2 Address 0x00000000 0x00000004 0x00000020 0x00000024 0x00000028 0x0000002C 0x00000030 0x00000034 0x00000038 0x00000040 0x00000044 0x00000048 0x0000004C 0x00000050 0x00000054 0x00000058 0x0000005C 0x00000100 0x00000104 0x00000108 0x0000010C 0x00000110 Width 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 Type mixed mixed mixed mixed mixed mixed mixed mixed mixed mixed mixed mixed mixed mixed mixed mixed mixed mixed mixed mixed mixed mixed Reset Value 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 Description DMA Manager Status DMA Program Counter DMASEV Instruction Response Control Event Interrupt Raw Status Interrupt Status Interrupt Clear Fault Status DMA Manager Fault Status DMA Channel Fault Type DMA Manager Default Type DMA Channel 0 Default Type DMA Channel 1 Default Type DMA Channel 2 Default Type DMA Channel 3 Default Type DMA Channel 4 Default Type DMA Channel 5 Default Type DMA Channel 6 Default Type DMA Channel 7 Channel Status DMA Channel 0 Channel PC for DMA Channel 0 Channel Status DMA Channel 1 Channel PC for DMA Channel 1 Channel Status DMA Channel 2
www.xilinx.com
1102
Register Name CPC2 CSR3 CPC3 CSR4 CPC4 CSR5 CPC5 CSR6 CPC6 CSR7 CPC7 SAR0 DAR0 CCR0
Address 0x00000114 0x00000118 0x0000011C 0x00000120 0x00000124 0x00000128 0x0000012C 0x00000130 0x00000134 0x00000138 0x0000013C 0x00000400 0x00000404 0x00000408
Width 32 32 32 32 32 32 32 32 32 32 32 32 32 32
Type mixed mixed mixed mixed mixed mixed mixed mixed mixed mixed mixed mixed mixed mixed
Reset Value 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 dmac0_ns: 0x00000000 dmac0_s: 0x00800200
Description Channel PC for DMA Channel 2 Channel Status DMA Channel 3 Channel PC for DMA Channel 3 Channel Status DMA Channel 4 Channel PC for DMA Channel 4 Channel Status DMA Channel 5 Channel PC for DMA Channel 5 Channel Status DMA Channel 6 Channel PC for DMA Channel 6 Channel Status DMA Channel 7 Channel PC for DMA Channel 7 Source Address DMA Channel 0 Destination Addr DMA Channel 0 Channel Control DMA Channel 0
32 32 32 32 32
Loop Counter 0 DMA Channel 0 Loop Counter 1 DMA Channel 0 Source address DMA Channel 1 Destination Addr DMA Channel 1 Channel Control DMA Channel 1
32 32 32 32 32
Loop Counter 0 DMA Channel 1 Loop Counter 1 DMA Channel 1 Source Address DMA Channel 2 Destination Addr DMA Channel 2 Channel Control DMA Channel 2
LC0_2 LC1_2
0x0000044C 0x00000450
32 32
mixed mixed
0x00000000 0x00000000
www.xilinx.com
1103
Width 32 32 32
Description Source Address DMA Channel 3 Destination Addr DMA Channel 3 Channel Control DMA Channel 3
32 32 32 32 32
Loop Counter 0 DMA Channel 3 Loop Counter 1 DMA Channel 3 Source Address DMA Channel 4 Destination Addr DMA Channel 4 Channel Control DMA Channel 4
32 32 32 32 32
Loop Counter 0 DMA Channel 4 Loop Counter 1 DMA Channel 4 Source Address DMA Channel 5 Destination Addr DMA Channel 5 Channel Control DMA Channel 5
32 32 32 32 32
Loop Counter 0 DMA Channel 5 Loop Counter 1 DMA Channel 5 Source Address DMA Channel 6 Destination Addr DMA Channel 6 Channel Control DMA Channel 6
32 32 32 32
Loop Counter 0 DMA Channel 6 Loop Counter 1 DMA Channel 6 Source Address DMA Channel 7 Destination Addr DMA Channel 7
www.xilinx.com
1104
Address 0x000004E8
Width 32
Type mixed
32 32 32 32 32 32 32
0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 dmac0_ns: 0x00000000 dmac0_s: 0x001E3071
Loop Counter 0 DMA Channel 7 Loop Counter 1 DMA Channel 7 DMA Manager Execution Status DMA Manager Instr. Command DMA Manager Instruction Part A DMA Manager Instruction Part B Config. 0: Events, Peripheral Interfaces, PC, Mode Config. 1: Instruction Cache
CR1
0x00000E04
32
mixed
32 32 32 32
Config. 2: DMA Mgr Boot Addr Config. 3: Security state of IRQs Config 4, Security of Periph Interfaces DMA configuration
WD periph_id_0
0x00000E80 0x00000FE0
32 32
mixed mixed
periph_id_1
0x00000FE4
32
mixed
periph_id_2
0x00000FE8
32
mixed
www.xilinx.com
1105
Width 32 32
pcell_id_1
0x00000FF4
32
mixed
pcell_id_2
0x00000FF8
32
mixed
pcell_id_3
0x00000FFC
32
mixed
www.xilinx.com
1106
Bits 8:4
Description When the DMA manager executes a DMAWFE instruction, it is waiting for one of the following events to occur from any of the DMA channel treads: 0 0000: event[0] 0 0001: event[1] ... 0 1111: event[15] 1 xxxx: reserved
DMA_status
3:0
0x0
The current operating state of the DMA manager: 0000: Stopped 0001: Executing 0010: Cache miss 0011: Updating PC 0100: Waiting for event 0101 to 1110: reserved 1111: Faulting.
www.xilinx.com
1107
dmac0_ns: 0xF8004020 dmac0_s: 0xF8003020 32 bits mixed 0x00000000 DMASEV Instruction Response Control
www.xilinx.com
1108
www.xilinx.com
1109
www.xilinx.com
1110
www.xilinx.com
1111
Bits 15:6 5
Description
Indicates whether the DMA manager was attempting to execute DMAWFE or DMASEV with inappropriate security permissions: 0: the DMA manager has appropriate security to execute DMAWFE or DMASEV 1: a DMA manager thread in the Non-secure state attempted to execute either: DMAWFE to wait for a secure event H18DMASEV to create a secure event or secure interrupt.
dmago_err
0x0
Indicates whether the DMA manager was attempting to execute DMAGO with inappropriate security permissions: 0: appropriate security to execute DMAGO 1: Non-secure state attempted to execute DMAGO to create a DMA channel thread operating in the Secure state
reserved operand_invalid
3:2 1
0x0 0x0
read undefined Indicates whether the DMA manager was attempting to execute an instruction operand that was not valid for the configuration of the DMAC: 0: valid operand 1: invalid operand
undef_instr
0x0
Indicates whether the DMA manager was attempting to execute an undefined instruction: 0: defined instruction 1: undefined instruction.
www.xilinx.com
1112
data_read_err
18
0x0
Indicates the AXI response that the DMAC receives on the RRESP bus, after the DMA channel thread performs a data read: 0: OKAY response 1: EXOKAY, SLVERR, or DECERR response. This fault is an imprecise abort.
data_write_err
17
0x0
Indicates the AXI response that the DMAC receives on the BRESP bus, after the DMA channel thread performs a data write: 0: OKAY response 1: EXOKAY, SLVERR, or DECERR response. This fault is an imprecise abort.
instr_fetch_err
16
0x0
Indicates the AXI response that the DMAC receives on the RRESP bus after the DMA channel thread performs an instruction fetch: 0: OKAY response 1: EXOKAY, SLVERR, or DECERR response. This fault is a precise abort.
reserved
15:14
0x0
read undefined
st_data_unavailable
13
0x0
Indicates whether the MFIFO did not contain the data to enable the DMAC to perform the DMAST: 0: MFIFO contains all the data to enable the DMAST to complete 1: previous DMALDs have not put enough data in the MFIFO to enable the DMAST to complete. This fault is a precise abort.
www.xilinx.com
1113
Bits 12
Description Indicates whether the MFIFO prevented the DMA channel thread from executing DMALD or DMAST: DMALD: 0: MFIFO contains sufficient space 1: MFIFO is too small to hold the data that DMALD requires. DMAST: 0: MFIFO contains sufficient data 1: MFIFO is too small to store the data to enable DMAST to complete. This fault is an imprecise abort.
reserved
11:8
0x0
read undefined
ch_rdwr_err
0x0
Indicates whether a DMA channel thread, in the Non-secure state, attempts to program the CCR registers to perform a secure read or secure write: 0: a DMA channel thread in the Non-secure state is not violating the security permissions 1: a DMA channel thread in the Non-secure state attempted to perform a secure read or secure write. This fault is a precise abort.
ch_periph_err
0x0
Indicates whether a DMA channel thread, in the Non-secure state, attempts to execute DMAWFP, DMALDP, DMASTP, or DMAFLUSHP with inappropriate security permissions: 0: a DMA channel thread in the Non-secure state is not violating the security permissions 1: a DMA channel thread in the Non-secure state attempted to execute either: a) DMAWFP to wait for a secure peripheral, b) DMALDP or DMASTP to notify a secure peripheral, or c) DMAFLUSHP to flush a secure peripheral. This fault is a precise abort.
ch_evnt_err
0x0
Indicates whether the DMA channel thread attempts to execute DMAWFE or DMASEV with inappropriate security permissions: 0: a DMA channel thread in the Non-secure state is not violating the security permissions 1: a DMA channel thread in the Non-secure state attempted to execute either: a) DMAWFE to wait for a secure event, or b) DMASEV to create a secure event or secure interrupt. This fault is a precise abort.
www.xilinx.com
1114
Bits 4:2
Description
operand_invalid
0x0
Indicates whether the DMA channel thread was attempting to execute an instruction operand that was not valid for the configuration of the DMAC: 0: valid operand 1: invalid operand. This fault is a precise abort.
undef_instr
0x0
Indicates whether the DMA channel thread was attempting to execute an undefined instruction: 0: defined instruction 1: undefined instruction. This fault is a precise abort.
www.xilinx.com
1115
Bits 29:19
Description
data_read_err
18
0x0
Indicates the AXI response that the DMAC receives on the RRESP bus, after the DMA channel thread performs a data read: 0: OKAY response 1: EXOKAY, SLVERR, or DECERR response. This fault is an imprecise abort.
data_write_err
17
0x0
Indicates the AXI response that the DMAC receives on the BRESP bus, after the DMA channel thread performs a data write: 0: OKAY response 1: EXOKAY, SLVERR, or DECERR response. This fault is an imprecise abort.
instr_fetch_err
16
0x0
Indicates the AXI response that the DMAC receives on the RRESP bus after the DMA channel thread performs an instruction fetch: 0: OKAY response 1: EXOKAY, SLVERR, or DECERR response. This fault is a precise abort.
reserved
15:14
0x0
read undefined
st_data_unavailable
13
0x0
Indicates whether the MFIFO did not contain the data to enable the DMAC to perform the DMAST: 0: MFIFO contains all the data to enable the DMAST to complete 1: previous DMALDs have not put enough data in the MFIFO to enable the DMAST to complete. This fault is a precise abort.
mfifo_err
12
0x0
Indicates whether the MFIFO prevented the DMA channel thread from executing DMALD or DMAST: DMALD: 0: MFIFO contains sufficient space 1: MFIFO is too small to hold the data that DMALD requires. DMAST: 0: MFIFO contains sufficient data 1: MFIFO is too small to store the data to enable DMAST to complete. This fault is an imprecise abort.
www.xilinx.com
1116
Bits 11:8
Description
ch_rdwr_err
0x0
Indicates whether a DMA channel thread, in the Non-secure state, attempts to program the CCR registers to perform a secure read or secure write: 0: a DMA channel thread in the Non-secure state is not violating the security permissions 1: a DMA channel thread in the Non-secure state attempted to perform a secure read or secure write. This fault is a precise abort.
ch_periph_err
0x0
Indicates whether a DMA channel thread, in the Non-secure state, attempts to execute DMAWFP, DMALDP, DMASTP, or DMAFLUSHP with inappropriate security permissions: 0: a DMA channel thread in the Non-secure state is not violating the security permissions 1: a DMA channel thread in the Non-secure state attempted to execute either: a) DMAWFP to wait for a secure peripheral, b) DMALDP or DMASTP to notify a secure peripheral, or c) DMAFLUSHP to flush a secure peripheral. This fault is a precise abort.
ch_evnt_err
0x0
Indicates whether the DMA channel thread attempts to execute DMAWFE or DMASEV with inappropriate security permissions: 0: a DMA channel thread in the Non-secure state is not violating the security permissions 1: a DMA channel thread in the Non-secure state attempted to execute either: a) DMAWFE to wait for a secure event, or b) DMASEV to create a secure event or secure interrupt. This fault is a precise abort.
reserved
4:2
0x0
read undefined
operand_invalid
0x0
Indicates whether the DMA channel thread was attempting to execute an instruction operand that was not valid for the configuration of the DMAC: 0: valid operand 1: invalid operand. This fault is a precise abort.
undef_instr
0x0
Indicates whether the DMA channel thread was attempting to execute an undefined instruction: 0: defined instruction 1: undefined instruction. This fault is a precise abort.
www.xilinx.com
1117
data_read_err
18
0x0
Indicates the AXI response that the DMAC receives on the RRESP bus, after the DMA channel thread performs a data read: 0: OKAY response 1: EXOKAY, SLVERR, or DECERR response. This fault is an imprecise abort.
data_write_err
17
0x0
Indicates the AXI response that the DMAC receives on the BRESP bus, after the DMA channel thread performs a data write: 0: OKAY response 1: EXOKAY, SLVERR, or DECERR response. This fault is an imprecise abort.
www.xilinx.com
1118
Bits 16
Description Indicates the AXI response that the DMAC receives on the RRESP bus after the DMA channel thread performs an instruction fetch: 0: OKAY response 1: EXOKAY, SLVERR, or DECERR response. This fault is a precise abort.
reserved
15:14
0x0
read undefined
st_data_unavailable
13
0x0
Indicates whether the MFIFO did not contain the data to enable the DMAC to perform the DMAST: 0: MFIFO contains all the data to enable the DMAST to complete 1: previous DMALDs have not put enough data in the MFIFO to enable the DMAST to complete. This fault is a precise abort.
mfifo_err
12
0x0
Indicates whether the MFIFO prevented the DMA channel thread from executing DMALD or DMAST: DMALD: 0: MFIFO contains sufficient space 1: MFIFO is too small to hold the data that DMALD requires. DMAST: 0: MFIFO contains sufficient data 1: MFIFO is too small to store the data to enable DMAST to complete. This fault is an imprecise abort.
reserved
11:8
0x0
read undefined
ch_rdwr_err
0x0
Indicates whether a DMA channel thread, in the Non-secure state, attempts to program the CCR registers to perform a secure read or secure write: 0: a DMA channel thread in the Non-secure state is not violating the security permissions 1: a DMA channel thread in the Non-secure state attempted to perform a secure read or secure write. This fault is a precise abort.
www.xilinx.com
1119
Bits 6
Description Indicates whether a DMA channel thread, in the Non-secure state, attempts to execute DMAWFP, DMALDP, DMASTP, or DMAFLUSHP with inappropriate security permissions: 0: a DMA channel thread in the Non-secure state is not violating the security permissions 1: a DMA channel thread in the Non-secure state attempted to execute either: a) DMAWFP to wait for a secure peripheral, b) DMALDP or DMASTP to notify a secure peripheral, or c) DMAFLUSHP to flush a secure peripheral. This fault is a precise abort.
ch_evnt_err
0x0
Indicates whether the DMA channel thread attempts to execute DMAWFE or DMASEV with inappropriate security permissions: 0: a DMA channel thread in the Non-secure state is not violating the security permissions 1: a DMA channel thread in the Non-secure state attempted to execute either: a) DMAWFE to wait for a secure event, or b) DMASEV to create a secure event or secure interrupt. This fault is a precise abort.
reserved
4:2
0x0
read undefined
operand_invalid
0x0
Indicates whether the DMA channel thread was attempting to execute an instruction operand that was not valid for the configuration of the DMAC: 0: valid operand 1: invalid operand. This fault is a precise abort.
undef_instr
0x0
Indicates whether the DMA channel thread was attempting to execute an undefined instruction: 0: defined instruction 1: undefined instruction. This fault is a precise abort.
www.xilinx.com
1120
data_read_err
18
0x0
Indicates the AXI response that the DMAC receives on the RRESP bus, after the DMA channel thread performs a data read: 0: OKAY response 1: EXOKAY, SLVERR, or DECERR response. This fault is an imprecise abort.
data_write_err
17
0x0
Indicates the AXI response that the DMAC receives on the BRESP bus, after the DMA channel thread performs a data write: 0: OKAY response 1: EXOKAY, SLVERR, or DECERR response. This fault is an imprecise abort.
instr_fetch_err
16
0x0
Indicates the AXI response that the DMAC receives on the RRESP bus after the DMA channel thread performs an instruction fetch: 0: OKAY response 1: EXOKAY, SLVERR, or DECERR response. This fault is a precise abort.
reserved
15:14
0x0
read undefined
www.xilinx.com
1121
Bits 13
Description Indicates whether the MFIFO did not contain the data to enable the DMAC to perform the DMAST: 0: MFIFO contains all the data to enable the DMAST to complete 1: previous DMALDs have not put enough data in the MFIFO to enable the DMAST to complete. This fault is a precise abort.
mfifo_err
12
0x0
Indicates whether the MFIFO prevented the DMA channel thread from executing DMALD or DMAST: DMALD: 0: MFIFO contains sufficient space 1: MFIFO is too small to hold the data that DMALD requires. DMAST: 0: MFIFO contains sufficient data 1: MFIFO is too small to store the data to enable DMAST to complete. This fault is an imprecise abort.
reserved
11:8
0x0
read undefined
ch_rdwr_err
0x0
Indicates whether a DMA channel thread, in the Non-secure state, attempts to program the CCR registers to perform a secure read or secure write: 0: a DMA channel thread in the Non-secure state is not violating the security permissions 1: a DMA channel thread in the Non-secure state attempted to perform a secure read or secure write. This fault is a precise abort.
ch_periph_err
0x0
Indicates whether a DMA channel thread, in the Non-secure state, attempts to execute DMAWFP, DMALDP, DMASTP, or DMAFLUSHP with inappropriate security permissions: 0: a DMA channel thread in the Non-secure state is not violating the security permissions 1: a DMA channel thread in the Non-secure state attempted to execute either: a) DMAWFP to wait for a secure peripheral, b) DMALDP or DMASTP to notify a secure peripheral, or c) DMAFLUSHP to flush a secure peripheral. This fault is a precise abort.
www.xilinx.com
1122
Bits 5
Description Indicates whether the DMA channel thread attempts to execute DMAWFE or DMASEV with inappropriate security permissions: 0: a DMA channel thread in the Non-secure state is not violating the security permissions 1: a DMA channel thread in the Non-secure state attempted to execute either: a) DMAWFE to wait for a secure event, or b) DMASEV to create a secure event or secure interrupt. This fault is a precise abort.
reserved
4:2
0x0
read undefined
operand_invalid
0x0
Indicates whether the DMA channel thread was attempting to execute an instruction operand that was not valid for the configuration of the DMAC: 0: valid operand 1: invalid operand. This fault is a precise abort.
undef_instr
0x0
Indicates whether the DMA channel thread was attempting to execute an undefined instruction: 0: defined instruction 1: undefined instruction. This fault is a precise abort.
www.xilinx.com
1123
data_read_err
18
0x0
Indicates the AXI response that the DMAC receives on the RRESP bus, after the DMA channel thread performs a data read: 0: OKAY response 1: EXOKAY, SLVERR, or DECERR response. This fault is an imprecise abort.
data_write_err
17
0x0
Indicates the AXI response that the DMAC receives on the BRESP bus, after the DMA channel thread performs a data write: 0: OKAY response 1: EXOKAY, SLVERR, or DECERR response. This fault is an imprecise abort.
instr_fetch_err
16
0x0
Indicates the AXI response that the DMAC receives on the RRESP bus after the DMA channel thread performs an instruction fetch: 0: OKAY response 1: EXOKAY, SLVERR, or DECERR response. This fault is a precise abort.
reserved
15:14
0x0
read undefined
st_data_unavailable
13
0x0
Indicates whether the MFIFO did not contain the data to enable the DMAC to perform the DMAST: 0: MFIFO contains all the data to enable the DMAST to complete 1: previous DMALDs have not put enough data in the MFIFO to enable the DMAST to complete. This fault is a precise abort.
www.xilinx.com
1124
Bits 12
Description Indicates whether the MFIFO prevented the DMA channel thread from executing DMALD or DMAST: DMALD: 0: MFIFO contains sufficient space 1: MFIFO is too small to hold the data that DMALD requires. DMAST: 0: MFIFO contains sufficient data 1: MFIFO is too small to store the data to enable DMAST to complete. This fault is an imprecise abort.
reserved
11:8
0x0
read undefined
ch_rdwr_err
0x0
Indicates whether a DMA channel thread, in the Non-secure state, attempts to program the CCR registers to perform a secure read or secure write: 0: a DMA channel thread in the Non-secure state is not violating the security permissions 1: a DMA channel thread in the Non-secure state attempted to perform a secure read or secure write. This fault is a precise abort.
ch_periph_err
0x0
Indicates whether a DMA channel thread, in the Non-secure state, attempts to execute DMAWFP, DMALDP, DMASTP, or DMAFLUSHP with inappropriate security permissions: 0: a DMA channel thread in the Non-secure state is not violating the security permissions 1: a DMA channel thread in the Non-secure state attempted to execute either: a) DMAWFP to wait for a secure peripheral, b) DMALDP or DMASTP to notify a secure peripheral, or c) DMAFLUSHP to flush a secure peripheral. This fault is a precise abort.
ch_evnt_err
0x0
Indicates whether the DMA channel thread attempts to execute DMAWFE or DMASEV with inappropriate security permissions: 0: a DMA channel thread in the Non-secure state is not violating the security permissions 1: a DMA channel thread in the Non-secure state attempted to execute either: a) DMAWFE to wait for a secure event, or b) DMASEV to create a secure event or secure interrupt. This fault is a precise abort.
www.xilinx.com
1125
Bits 4:2
Description
operand_invalid
0x0
Indicates whether the DMA channel thread was attempting to execute an instruction operand that was not valid for the configuration of the DMAC: 0: valid operand 1: invalid operand. This fault is a precise abort.
undef_instr
0x0
Indicates whether the DMA channel thread was attempting to execute an undefined instruction: 0: defined instruction 1: undefined instruction. This fault is a precise abort.
www.xilinx.com
1126
Bits 29:19
Description
data_read_err
18
0x0
Indicates the AXI response that the DMAC receives on the RRESP bus, after the DMA channel thread performs a data read: 0: OKAY response 1: EXOKAY, SLVERR, or DECERR response. This fault is an imprecise abort.
data_write_err
17
0x0
Indicates the AXI response that the DMAC receives on the BRESP bus, after the DMA channel thread performs a data write: 0: OKAY response 1: EXOKAY, SLVERR, or DECERR response. This fault is an imprecise abort.
instr_fetch_err
16
0x0
Indicates the AXI response that the DMAC receives on the RRESP bus after the DMA channel thread performs an instruction fetch: 0: OKAY response 1: EXOKAY, SLVERR, or DECERR response. This fault is a precise abort.
reserved
15:14
0x0
read undefined
st_data_unavailable
13
0x0
Indicates whether the MFIFO did not contain the data to enable the DMAC to perform the DMAST: 0: MFIFO contains all the data to enable the DMAST to complete 1: previous DMALDs have not put enough data in the MFIFO to enable the DMAST to complete. This fault is a precise abort.
mfifo_err
12
0x0
Indicates whether the MFIFO prevented the DMA channel thread from executing DMALD or DMAST: DMALD: 0: MFIFO contains sufficient space 1: MFIFO is too small to hold the data that DMALD requires. DMAST: 0: MFIFO contains sufficient data 1: MFIFO is too small to store the data to enable DMAST to complete. This fault is an imprecise abort.
www.xilinx.com
1127
Bits 11:8
Description
ch_rdwr_err
0x0
Indicates whether a DMA channel thread, in the Non-secure state, attempts to program the CCR registers to perform a secure read or secure write: 0: a DMA channel thread in the Non-secure state is not violating the security permissions 1: a DMA channel thread in the Non-secure state attempted to perform a secure read or secure write. This fault is a precise abort.
ch_periph_err
0x0
Indicates whether a DMA channel thread, in the Non-secure state, attempts to execute DMAWFP, DMALDP, DMASTP, or DMAFLUSHP with inappropriate security permissions: 0: a DMA channel thread in the Non-secure state is not violating the security permissions 1: a DMA channel thread in the Non-secure state attempted to execute either: a) DMAWFP to wait for a secure peripheral, b) DMALDP or DMASTP to notify a secure peripheral, or c) DMAFLUSHP to flush a secure peripheral. This fault is a precise abort.
ch_evnt_err
0x0
Indicates whether the DMA channel thread attempts to execute DMAWFE or DMASEV with inappropriate security permissions: 0: a DMA channel thread in the Non-secure state is not violating the security permissions 1: a DMA channel thread in the Non-secure state attempted to execute either: a) DMAWFE to wait for a secure event, or b) DMASEV to create a secure event or secure interrupt. This fault is a precise abort.
reserved
4:2
0x0
read undefined
operand_invalid
0x0
Indicates whether the DMA channel thread was attempting to execute an instruction operand that was not valid for the configuration of the DMAC: 0: valid operand 1: invalid operand. This fault is a precise abort.
undef_instr
0x0
Indicates whether the DMA channel thread was attempting to execute an undefined instruction: 0: defined instruction 1: undefined instruction. This fault is a precise abort.
www.xilinx.com
1128
data_read_err
18
0x0
Indicates the AXI response that the DMAC receives on the RRESP bus, after the DMA channel thread performs a data read: 0: OKAY response 1: EXOKAY, SLVERR, or DECERR response. This fault is an imprecise abort.
data_write_err
17
0x0
Indicates the AXI response that the DMAC receives on the BRESP bus, after the DMA channel thread performs a data write: 0: OKAY response 1: EXOKAY, SLVERR, or DECERR response. This fault is an imprecise abort.
www.xilinx.com
1129
Bits 16
Description Indicates the AXI response that the DMAC receives on the RRESP bus after the DMA channel thread performs an instruction fetch: 0: OKAY response 1: EXOKAY, SLVERR, or DECERR response. This fault is a precise abort.
reserved
15:14
0x0
read undefined
st_data_unavailable
13
0x0
Indicates whether the MFIFO did not contain the data to enable the DMAC to perform the DMAST: 0: MFIFO contains all the data to enable the DMAST to complete 1: previous DMALDs have not put enough data in the MFIFO to enable the DMAST to complete. This fault is a precise abort.
mfifo_err
12
0x0
Indicates whether the MFIFO prevented the DMA channel thread from executing DMALD or DMAST: DMALD: 0: MFIFO contains sufficient space 1: MFIFO is too small to hold the data that DMALD requires. DMAST: 0: MFIFO contains sufficient data 1: MFIFO is too small to store the data to enable DMAST to complete. This fault is an imprecise abort.
reserved
11:8
0x0
read undefined
ch_rdwr_err
0x0
Indicates whether a DMA channel thread, in the Non-secure state, attempts to program the CCR registers to perform a secure read or secure write: 0: a DMA channel thread in the Non-secure state is not violating the security permissions 1: a DMA channel thread in the Non-secure state attempted to perform a secure read or secure write. This fault is a precise abort.
www.xilinx.com
1130
Bits 6
Description Indicates whether a DMA channel thread, in the Non-secure state, attempts to execute DMAWFP, DMALDP, DMASTP, or DMAFLUSHP with inappropriate security permissions: 0: a DMA channel thread in the Non-secure state is not violating the security permissions 1: a DMA channel thread in the Non-secure state attempted to execute either: a) DMAWFP to wait for a secure peripheral, b) DMALDP or DMASTP to notify a secure peripheral, or c) DMAFLUSHP to flush a secure peripheral. This fault is a precise abort.
ch_evnt_err
0x0
Indicates whether the DMA channel thread attempts to execute DMAWFE or DMASEV with inappropriate security permissions: 0: a DMA channel thread in the Non-secure state is not violating the security permissions 1: a DMA channel thread in the Non-secure state attempted to execute either: a) DMAWFE to wait for a secure event, or b) DMASEV to create a secure event or secure interrupt. This fault is a precise abort.
reserved
4:2
0x0
read undefined
operand_invalid
0x0
Indicates whether the DMA channel thread was attempting to execute an instruction operand that was not valid for the configuration of the DMAC: 0: valid operand 1: invalid operand. This fault is a precise abort.
undef_instr
0x0
Indicates whether the DMA channel thread was attempting to execute an undefined instruction: 0: defined instruction 1: undefined instruction. This fault is a precise abort.
www.xilinx.com
1131
data_read_err
18
0x0
Indicates the AXI response that the DMAC receives on the RRESP bus, after the DMA channel thread performs a data read: 0: OKAY response 1: EXOKAY, SLVERR, or DECERR response. This fault is an imprecise abort.
data_write_err
17
0x0
Indicates the AXI response that the DMAC receives on the BRESP bus, after the DMA channel thread performs a data write: 0: OKAY response 1: EXOKAY, SLVERR, or DECERR response. This fault is an imprecise abort.
instr_fetch_err
16
0x0
Indicates the AXI response that the DMAC receives on the RRESP bus after the DMA channel thread performs an instruction fetch: 0: OKAY response 1: EXOKAY, SLVERR, or DECERR response. This fault is a precise abort.
reserved
15:14
0x0
read undefined
www.xilinx.com
1132
Bits 13
Description Indicates whether the MFIFO did not contain the data to enable the DMAC to perform the DMAST: 0: MFIFO contains all the data to enable the DMAST to complete 1: previous DMALDs have not put enough data in the MFIFO to enable the DMAST to complete. This fault is a precise abort.
mfifo_err
12
0x0
Indicates whether the MFIFO prevented the DMA channel thread from executing DMALD or DMAST: DMALD: 0: MFIFO contains sufficient space 1: MFIFO is too small to hold the data that DMALD requires. DMAST: 0: MFIFO contains sufficient data 1: MFIFO is too small to store the data to enable DMAST to complete. This fault is an imprecise abort.
reserved
11:8
0x0
read undefined
ch_rdwr_err
0x0
Indicates whether a DMA channel thread, in the Non-secure state, attempts to program the CCR registers to perform a secure read or secure write: 0: a DMA channel thread in the Non-secure state is not violating the security permissions 1: a DMA channel thread in the Non-secure state attempted to perform a secure read or secure write. This fault is a precise abort.
ch_periph_err
0x0
Indicates whether a DMA channel thread, in the Non-secure state, attempts to execute DMAWFP, DMALDP, DMASTP, or DMAFLUSHP with inappropriate security permissions: 0: a DMA channel thread in the Non-secure state is not violating the security permissions 1: a DMA channel thread in the Non-secure state attempted to execute either: a) DMAWFP to wait for a secure peripheral, b) DMALDP or DMASTP to notify a secure peripheral, or c) DMAFLUSHP to flush a secure peripheral. This fault is a precise abort.
www.xilinx.com
1133
Bits 5
Description Indicates whether the DMA channel thread attempts to execute DMAWFE or DMASEV with inappropriate security permissions: 0: a DMA channel thread in the Non-secure state is not violating the security permissions 1: a DMA channel thread in the Non-secure state attempted to execute either: a) DMAWFE to wait for a secure event, or b) DMASEV to create a secure event or secure interrupt. This fault is a precise abort.
reserved
4:2
0x0
read undefined
operand_invalid
0x0
Indicates whether the DMA channel thread was attempting to execute an instruction operand that was not valid for the configuration of the DMAC: 0: valid operand 1: invalid operand. This fault is a precise abort.
undef_instr
0x0
Indicates whether the DMA channel thread was attempting to execute an undefined instruction: 0: defined instruction 1: undefined instruction. This fault is a precise abort.
www.xilinx.com
1134
reserved dmawfp_periph
20:16 15
www.xilinx.com
1135
Bits 8:4
Description When the DMA channel thread executes a WFE or WFP instruction, these bits indicate the event or peripheral number that the channel is waiting for: Waiting for Event (WFE): 0 0000: waiting for event 0 0 0001: waiting for event 1 ... 0 1111: waiting for event 15 1 xxxx: reserved Waiting for Peripheral (WFP): 0 0000: waiting for peripheral 0 0 0001: waiting for peripheral 1 0 0010: waiting for peripheral 2 0 0011: waiting for peripheral 3 1 11xx: reserved
channel_status
3:0
0x0
The channel status encoding is: 0000: Stopped 0001: Executing 0010: Cache miss 0011: Updating PC 0100: Waiting for event 0101: At barrier 0110: reserved 0111: Waiting for peripheral 1000: Killing 1001: Completing 1010 to 1101: reserved 1110: Faulting completing 1111: Faulting.
www.xilinx.com
1136
reserved dmawfp_periph
20:16 15
www.xilinx.com
1137
Bits 8:4
Description When the DMA channel thread executes a WFE or WFP instruction, these bits indicate the event or peripheral number that the channel is waiting for: Waiting for Event (WFE): 0 0000: waiting for event 0 0 0001: waiting for event 1 ... 0 1111: waiting for event 15 1 xxxx: reserved Waiting for Peripheral (WFP): 0 0000: waiting for peripheral 0 0 0001: waiting for peripheral 1 0 0010: waiting for peripheral 2 0 0011: waiting for peripheral 3 1 11xx: reserved
channel_status
3:0
0x0
The channel status encoding is: 0000: Stopped 0001: Executing 0010: Cache miss 0011: Updating PC 0100: Waiting for event 0101: At barrier 0110: reserved 0111: Waiting for peripheral 1000: Killing 1001: Completing 1010 to 1101: reserved 1110: Faulting completing 1111: Faulting.
www.xilinx.com
1138
Description
reserved dmawfp_periph
20:16 15
www.xilinx.com
1139
Description
When the DMA channel thread executes a WFE or WFP instruction, these bits indicate the event or peripheral number that the channel is waiting for: Waiting for Event (WFE): 0 0000: waiting for event 0 0 0001: waiting for event 1 ... 0 1111: waiting for event 15 1 xxxx: reserved Waiting for Peripheral (WFP): 0 0000: waiting for peripheral 0 0 0001: waiting for peripheral 1 0 0010: waiting for peripheral 2 0 0011: waiting for peripheral 3 1 11xx: reserved
channel_status
3:0
0x0
The channel status encoding is: 0000: Stopped 0001: Executing 0010: Cache miss 0011: Updating PC 0100: Waiting for event 0101: At barrier 0110: reserved 0111: Waiting for peripheral 1000: Killing 1001: Completing 1010 to 1101: reserved 1110: Faulting completing 1111: Faulting.
www.xilinx.com
1140
reserved dmawfp_periph
20:16 15
www.xilinx.com
1141
Bits 14
Description When the DMA channel thread executes DMAWFP, this bit indicates whether the burst or single operand were set: 0: single operand set 1: burst operand set
reserved wakeup_num
13:9 8:4
0x0 0x0
reserved When the DMA channel thread executes a WFE or WFP instruction, these bits indicate the event or peripheral number that the channel is waiting for: Waiting for Event (WFE): 0 0000: waiting for event 0 0 0001: waiting for event 1 ... 0 1111: waiting for event 15 1 xxxx: reserved Waiting for Peripheral (WFP): 0 0000: waiting for peripheral 0 0 0001: waiting for peripheral 1 0 0010: waiting for peripheral 2 0 0011: waiting for peripheral 3 1 11xx: reserved
channel_status
3:0
0x0
The channel status encoding is: 0000: Stopped 0001: Executing 0010: Cache miss 0011: Updating PC 0100: Waiting for event 0101: At barrier 0110: reserved 0111: Waiting for peripheral 1000: Killing 1001: Completing 1010 to 1101: reserved 1110: Faulting completing 1111: Faulting.
www.xilinx.com
1142
dmac0_ns: 0xF800411C dmac0_s: 0xF800311C 32 bits mixed 0x00000000 Channel PC for DMA Channel 3
reserved
20:16
www.xilinx.com
1143
Bits 15
Description When the DMA channel thread executes DMAWFP, this bit indicates whether the periph operand is set: 0: periph operand not set 1: periph operand set. Note: the status only applies when the channel is connected to one of the four peripheral request interfaces.
dmawfp_b_ns
14
0x0
When the DMA channel thread executes DMAWFP, this bit indicates whether the burst or single operand were set: 0: single operand set 1: burst operand set
reserved wakeup_num
13:9 8:4
0x0 0x0
reserved When the DMA channel thread executes a WFE or WFP instruction, these bits indicate the event or peripheral number that the channel is waiting for: Waiting for Event (WFE): 0 0000: waiting for event 0 0 0001: waiting for event 1 ... 0 1111: waiting for event 15 1 xxxx: reserved Waiting for Peripheral (WFP): 0 0000: waiting for peripheral 0 0 0001: waiting for peripheral 1 0 0010: waiting for peripheral 2 0 0011: waiting for peripheral 3 1 11xx: reserved
channel_status
3:0
0x0
The channel status encoding is: 0000: Stopped 0001: Executing 0010: Cache miss 0011: Updating PC 0100: Waiting for event 0101: At barrier 0110: reserved 0111: Waiting for peripheral 1000: Killing 1001: Completing 1010 to 1101: reserved 1110: Faulting completing 1111: Faulting.
www.xilinx.com
1144
reserved
20:16
www.xilinx.com
1145
Bits 15
Description When the DMA channel thread executes DMAWFP, this bit indicates whether the periph operand is set: 0: periph operand not set 1: periph operand set. Note: the status only applies when the channel is connected to one of the four peripheral request interfaces.
dmawfp_b_ns
14
0x0
When the DMA channel thread executes DMAWFP, this bit indicates whether the burst or single operand were set: 0: single operand set 1: burst operand set
reserved wakeup_num
13:9 8:4
0x0 0x0
reserved When the DMA channel thread executes a WFE or WFP instruction, these bits indicate the event or peripheral number that the channel is waiting for: Waiting for Event (WFE): 0 0000: waiting for event 0 0 0001: waiting for event 1 ... 0 1111: waiting for event 15 1 xxxx: reserved Waiting for Peripheral (WFP): 0 0000: waiting for peripheral 0 0 0001: waiting for peripheral 1 0 0010: waiting for peripheral 2 0 0011: waiting for peripheral 3 1 11xx: reserved
channel_status
3:0
0x0
The channel status encoding is: 0000: Stopped 0001: Executing 0010: Cache miss 0011: Updating PC 0100: Waiting for event 0101: At barrier 0110: reserved 0111: Waiting for peripheral 1000: Killing 1001: Completing 1010 to 1101: reserved 1110: Faulting completing 1111: Faulting.
www.xilinx.com
1146
reserved
20:16
www.xilinx.com
1147
Bits 15
Description When the DMA channel thread executes DMAWFP, this bit indicates whether the periph operand is set: 0: periph operand not set 1: periph operand set. Note: the status only applies when the channel is connected to one of the four peripheral request interfaces.
dmawfp_b_ns
14
0x0
When the DMA channel thread executes DMAWFP, this bit indicates whether the burst or single operand were set: 0: single operand set 1: burst operand set
reserved wakeup_num
13:9 8:4
0x0 0x0
reserved When the DMA channel thread executes a WFE or WFP instruction, these bits indicate the event or peripheral number that the channel is waiting for: Waiting for Event (WFE): 0 0000: waiting for event 0 0 0001: waiting for event 1 ... 0 1111: waiting for event 15 1 xxxx: reserved Waiting for Peripheral (WFP): 0 0000: waiting for peripheral 0 0 0001: waiting for peripheral 1 0 0010: waiting for peripheral 2 0 0011: waiting for peripheral 3 1 11xx: reserved
channel_status
3:0
0x0
The channel status encoding is: 0000: Stopped 0001: Executing 0010: Cache miss 0011: Updating PC 0100: Waiting for event 0101: At barrier 0110: reserved 0111: Waiting for peripheral 1000: Killing 1001: Completing 1010 to 1101: reserved 1110: Faulting completing 1111: Faulting.
www.xilinx.com
1148
reserved
20:16
www.xilinx.com
1149
Bits 15
Description When the DMA channel thread executes DMAWFP, this bit indicates whether the periph operand is set: 0: periph operand not set 1: periph operand set. Note: the status only applies when the channel is connected to one of the four peripheral request interfaces.
dmawfp_b_ns
14
0x0
When the DMA channel thread executes DMAWFP, this bit indicates whether the burst or single operand were set: 0: single operand set 1: burst operand set
reserved wakeup_num
13:9 8:4
0x0 0x0
reserved When the DMA channel thread executes a WFE or WFP instruction, these bits indicate the event or peripheral number that the channel is waiting for: Waiting for Event (WFE): 0 0000: waiting for event 0 0 0001: waiting for event 1 ... 0 1111: waiting for event 15 1 xxxx: reserved Waiting for Peripheral (WFP): 0 0000: waiting for peripheral 0 0 0001: waiting for peripheral 1 0 0010: waiting for peripheral 2 0 0011: waiting for peripheral 3 1 11xx: reserved
channel_status
3:0
0x0
The channel status encoding is: 0000: Stopped 0001: Executing 0010: Cache miss 0011: Updating PC 0100: Waiting for event 0101: At barrier 0110: reserved 0111: Waiting for peripheral 1000: Killing 1001: Completing 1010 to 1101: reserved 1110: Faulting completing 1111: Faulting.
www.xilinx.com
1150
www.xilinx.com
1151
Software Name Relative Address Absolute Address Width Access Type Reset Value Description
DA_0 0x00000404 dmac0_ns: 0xF8004404 dmac0_s: 0xF8003404 32 bits mixed 0x00000000 Destination Addr DMA Channel 0
www.xilinx.com
1152
Bits 27:25
Description Programs the AXI AWCACHE signals that are used when the DMAC writes to the destination (0: Low, 1: High): Bit [27] programs AWCACHE[3] Hardwired Low to AWCACHE[2] Bit [26] programs AWCACHE[1] Bit [25] programs AWCACHE[0] Note: Setting AWCACHE[3,1]=b10 violates the AXI protocol.
dst_prot_ctrl
24:22
Programs the AWPROT signals that are used when the DMAC writes the destination data (0: Low, 1: High): Bit [24] programs AWPROT[2] Bit [23] programs AWPROT[1] Bit [22] programs AWPROT[0] Note: Only DMA channels in the Secure state can program AWPROT[1] Low, that is, a secure access. If a DMA channel in the Non-secure state attempts to set AWPROT[1] Low, then the DMA channel aborts.
dst_burst_len
21:18
0x0
For each burst, these bits program the number of data transfers that the DMAC performs when it writes the destination data: 0000: 1 data transfer 0001: 2 data transfers 0010: 3 data transfers ... 1111: 16 data transfers. The total number of bytes that the DMAC writes out of the MFIFO when it executes a DMAST instruction is the product of dst_burst_len and dst_burst_size. Note: These bits control the state of AWLEN[3:0].
www.xilinx.com
1153
Bits 17:15
Description For each beat within a burst, it programs the number of bytes that the DMAC writes to the destination: 000: writes 1 byte per beat 001: writes 2 bytes per beat 010: writes 4 bytes per beat 011: writes 8 bytes per beat 100: writes 16 bytes per beat 101 to 111: reserved. The total number of bytes that the DMAC writes out of the MFIFO when it executes a DMAST instruction is the product of dst_burst_len and dst_burst_size. Note: These bits control the state of AWSIZE[2:0].
dst_inc
14
0x0
Programs the burst type that the DMAC performs when it writes the destination data: 0: Fixed-address burst. The DMAC signals AWBURST[0] Low. 1: Incrementing-address burst. The DMAC signals AWBURST[0] HIgh.
src_cache_ctrl
13:11
0x0
Programs the AXI ARCACHE signals that are used for DMA reads of the source data (0: Low, 1: High): Bit [13] programs ARCACHE[2] Bit [12] programs ARCACHE[1] Bit [11] programs ARCACHE[0] Note: The DMAC ties ARCACHE[3] Low. Setting ARCACHE[2:1]= b10 violates the AXI protocol.
src_prot_ctrl
10:8
Programs the AXI ARPROT signals that are used for DMA reads of the source data (0: Low, 1: High): Bit [10] programs ARPROT[2] Bit [9] programs ARPROT[1] Bit [8] programs ARPROT[0] Note: Only DMA channels in the Secure state can program ARPROT[1] Low, that is, a secure access. If a DMA channel in the Non-secure state attempts to set ARPROT[1] Low, the DMA channel aborts.
www.xilinx.com
1154
Bits 7:4
Description For each burst, these bits program the number of data transfers that the DMAC performs when it reads the source data: 0000: 1 data transfer 0001: 2 data transfers ... 1111: 16 data transfers. The total number of bytes that the DMAC reads into the MFIFO when it executes a DMALD instruction is the product of src_burst_len and src_burst_size. Note: These bits control the state of ARLEN[3:0].
src_burst_size
3:1
0x0
For each beat within a burst, it programs the number of bytes that the DMAC reads from the source: 000: reads 1 byte per beat 001: reads 2 bytes per beat 010: reads 4 bytes per beat 011: reads 8 bytes per beat 100: reads 16 bytes per beat 101 to 111: reserved. The total number of bytes that the DMAC reads into the MFIFO when it executes a DMALD instruction is the product of src_burst_len and src_burst_size. Note: These bits control the state of ARSIZE[2:0].
src_inc
0x0
Programs the burst type that the DMAC performs when it reads the source data: 0: Fixed-address burst, DMAC signal ARBURST[0] driven Low. 1: Incrementing-address burst, DMAC signal ARBURST[0] driven High.
www.xilinx.com
1155
www.xilinx.com
1156
Description
www.xilinx.com
1157
www.xilinx.com
1158
Bits 17:15
Description For each beat within a burst, it programs the number of bytes that the DMAC writes to the destination: 000: writes 1 byte per beat 001: writes 2 bytes per beat 010: writes 4 bytes per beat 011: writes 8 bytes per beat 100: writes 16 bytes per beat 101 to 111: reserved. The total number of bytes that the DMAC writes out of the MFIFO when it executes a DMAST instruction is the product of dst_burst_len and dst_burst_size. Note: These bits control the state of AWSIZE[2:0].
dst_inc
14
0x0
Programs the burst type that the DMAC performs when it writes the destination data: 0: Fixed-address burst. The DMAC signals AWBURST[0] Low. 1: Incrementing-address burst. The DMAC signals AWBURST[0] HIgh.
src_cache_ctrl
13:11
0x0
Programs the AXI ARCACHE signals that are used for DMA reads of the source data (0: Low, 1: High): Bit [13] programs ARCACHE[2] Bit [12] programs ARCACHE[1] Bit [11] programs ARCACHE[0] Note: The DMAC ties ARCACHE[3] Low. Setting ARCACHE[2:1]= b10 violates the AXI protocol.
src_prot_ctrl
10:8
Programs the AXI ARPROT signals that are used for DMA reads of the source data (0: Low, 1: High): Bit [10] programs ARPROT[2] Bit [9] programs ARPROT[1] Bit [8] programs ARPROT[0] Note: Only DMA channels in the Secure state can program ARPROT[1] Low, that is, a secure access. If a DMA channel in the Non-secure state attempts to set ARPROT[1] Low, the DMA channel aborts.
www.xilinx.com
1159
Bits 7:4
Description For each burst, these bits program the number of data transfers that the DMAC performs when it reads the source data: 0000: 1 data transfer 0001: 2 data transfers ... 1111: 16 data transfers. The total number of bytes that the DMAC reads into the MFIFO when it executes a DMALD instruction is the product of src_burst_len and src_burst_size. Note: These bits control the state of ARLEN[3:0].
src_burst_size
3:1
0x0
For each beat within a burst, it programs the number of bytes that the DMAC reads from the source: 000: reads 1 byte per beat 001: reads 2 bytes per beat 010: reads 4 bytes per beat 011: reads 8 bytes per beat 100: reads 16 bytes per beat 101 to 111: reserved. The total number of bytes that the DMAC reads into the MFIFO when it executes a DMALD instruction is the product of src_burst_len and src_burst_size. Note: These bits control the state of ARSIZE[2:0].
src_inc
0x0
Programs the burst type that the DMAC performs when it reads the source data: 0: Fixed-address burst, DMAC signal ARBURST[0] driven Low. 1: Incrementing-address burst, DMAC signal ARBURST[0] driven High.
www.xilinx.com
1160
Description
www.xilinx.com
1161
www.xilinx.com
1162
www.xilinx.com
1163
Bits 21:18
Description For each burst, these bits program the number of data transfers that the DMAC performs when it writes the destination data: 0000: 1 data transfer 0001: 2 data transfers 0010: 3 data transfers ... 1111: 16 data transfers. The total number of bytes that the DMAC writes out of the MFIFO when it executes a DMAST instruction is the product of dst_burst_len and dst_burst_size. Note: These bits control the state of AWLEN[3:0].
dst_burst_size
17:15
0x0
For each beat within a burst, it programs the number of bytes that the DMAC writes to the destination: 000: writes 1 byte per beat 001: writes 2 bytes per beat 010: writes 4 bytes per beat 011: writes 8 bytes per beat 100: writes 16 bytes per beat 101 to 111: reserved. The total number of bytes that the DMAC writes out of the MFIFO when it executes a DMAST instruction is the product of dst_burst_len and dst_burst_size. Note: These bits control the state of AWSIZE[2:0].
dst_inc
14
0x0
Programs the burst type that the DMAC performs when it writes the destination data: 0: Fixed-address burst. The DMAC signals AWBURST[0] Low. 1: Incrementing-address burst. The DMAC signals AWBURST[0] HIgh.
src_cache_ctrl
13:11
0x0
Programs the AXI ARCACHE signals that are used for DMA reads of the source data (0: Low, 1: High): Bit [13] programs ARCACHE[2] Bit [12] programs ARCACHE[1] Bit [11] programs ARCACHE[0] Note: The DMAC ties ARCACHE[3] Low. Setting ARCACHE[2:1]= b10 violates the AXI protocol.
www.xilinx.com
1164
Bits 10:8
Description Programs the AXI ARPROT signals that are used for DMA reads of the source data (0: Low, 1: High): Bit [10] programs ARPROT[2] Bit [9] programs ARPROT[1] Bit [8] programs ARPROT[0] Note: Only DMA channels in the Secure state can program ARPROT[1] Low, that is, a secure access. If a DMA channel in the Non-secure state attempts to set ARPROT[1] Low, the DMA channel aborts.
src_burst_len
7:4
0x0
For each burst, these bits program the number of data transfers that the DMAC performs when it reads the source data: 0000: 1 data transfer 0001: 2 data transfers ... 1111: 16 data transfers. The total number of bytes that the DMAC reads into the MFIFO when it executes a DMALD instruction is the product of src_burst_len and src_burst_size. Note: These bits control the state of ARLEN[3:0].
src_burst_size
3:1
0x0
For each beat within a burst, it programs the number of bytes that the DMAC reads from the source: 000: reads 1 byte per beat 001: reads 2 bytes per beat 010: reads 4 bytes per beat 011: reads 8 bytes per beat 100: reads 16 bytes per beat 101 to 111: reserved. The total number of bytes that the DMAC reads into the MFIFO when it executes a DMALD instruction is the product of src_burst_len and src_burst_size. Note: These bits control the state of ARSIZE[2:0].
src_inc
0x0
Programs the burst type that the DMAC performs when it reads the source data: 0: Fixed-address burst, DMAC signal ARBURST[0] driven Low. 1: Incrementing-address burst, DMAC signal ARBURST[0] driven High.
www.xilinx.com
1165
www.xilinx.com
1166
www.xilinx.com
1167
www.xilinx.com
1168
Bits 24:22
Description Programs the AWPROT signals that are used when the DMAC writes the destination data (0: Low, 1: High): Bit [24] programs AWPROT[2] Bit [23] programs AWPROT[1] Bit [22] programs AWPROT[0] Note: Only DMA channels in the Secure state can program AWPROT[1] Low, that is, a secure access. If a DMA channel in the Non-secure state attempts to set AWPROT[1] Low, then the DMA channel aborts.
dst_burst_len
21:18
0x0
For each burst, these bits program the number of data transfers that the DMAC performs when it writes the destination data: 0000: 1 data transfer 0001: 2 data transfers 0010: 3 data transfers ... 1111: 16 data transfers. The total number of bytes that the DMAC writes out of the MFIFO when it executes a DMAST instruction is the product of dst_burst_len and dst_burst_size. Note: These bits control the state of AWLEN[3:0].
dst_burst_size
17:15
0x0
For each beat within a burst, it programs the number of bytes that the DMAC writes to the destination: 000: writes 1 byte per beat 001: writes 2 bytes per beat 010: writes 4 bytes per beat 011: writes 8 bytes per beat 100: writes 16 bytes per beat 101 to 111: reserved. The total number of bytes that the DMAC writes out of the MFIFO when it executes a DMAST instruction is the product of dst_burst_len and dst_burst_size. Note: These bits control the state of AWSIZE[2:0].
dst_inc
14
0x0
Programs the burst type that the DMAC performs when it writes the destination data: 0: Fixed-address burst. The DMAC signals AWBURST[0] Low. 1: Incrementing-address burst. The DMAC signals AWBURST[0] HIgh.
www.xilinx.com
1169
Bits 13:11
Description Programs the AXI ARCACHE signals that are used for DMA reads of the source data (0: Low, 1: High): Bit [13] programs ARCACHE[2] Bit [12] programs ARCACHE[1] Bit [11] programs ARCACHE[0] Note: The DMAC ties ARCACHE[3] Low. Setting ARCACHE[2:1]= b10 violates the AXI protocol.
src_prot_ctrl
10:8
Programs the AXI ARPROT signals that are used for DMA reads of the source data (0: Low, 1: High): Bit [10] programs ARPROT[2] Bit [9] programs ARPROT[1] Bit [8] programs ARPROT[0] Note: Only DMA channels in the Secure state can program ARPROT[1] Low, that is, a secure access. If a DMA channel in the Non-secure state attempts to set ARPROT[1] Low, the DMA channel aborts.
src_burst_len
7:4
0x0
For each burst, these bits program the number of data transfers that the DMAC performs when it reads the source data: 0000: 1 data transfer 0001: 2 data transfers ... 1111: 16 data transfers. The total number of bytes that the DMAC reads into the MFIFO when it executes a DMALD instruction is the product of src_burst_len and src_burst_size. Note: These bits control the state of ARLEN[3:0].
www.xilinx.com
1170
Bits 3:1
Description For each beat within a burst, it programs the number of bytes that the DMAC reads from the source: 000: reads 1 byte per beat 001: reads 2 bytes per beat 010: reads 4 bytes per beat 011: reads 8 bytes per beat 100: reads 16 bytes per beat 101 to 111: reserved. The total number of bytes that the DMAC reads into the MFIFO when it executes a DMALD instruction is the product of src_burst_len and src_burst_size. Note: These bits control the state of ARSIZE[2:0].
src_inc
0x0
Programs the burst type that the DMAC performs when it reads the source data: 0: Fixed-address burst, DMAC signal ARBURST[0] driven Low. 1: Incrementing-address burst, DMAC signal ARBURST[0] driven High.
www.xilinx.com
1171
www.xilinx.com
1172
www.xilinx.com
1173
www.xilinx.com
1174
Bits 17:15
Description For each beat within a burst, it programs the number of bytes that the DMAC writes to the destination: 000: writes 1 byte per beat 001: writes 2 bytes per beat 010: writes 4 bytes per beat 011: writes 8 bytes per beat 100: writes 16 bytes per beat 101 to 111: reserved. The total number of bytes that the DMAC writes out of the MFIFO when it executes a DMAST instruction is the product of dst_burst_len and dst_burst_size. Note: These bits control the state of AWSIZE[2:0].
dst_inc
14
0x0
Programs the burst type that the DMAC performs when it writes the destination data: 0: Fixed-address burst. The DMAC signals AWBURST[0] Low. 1: Incrementing-address burst. The DMAC signals AWBURST[0] HIgh.
src_cache_ctrl
13:11
0x0
Programs the AXI ARCACHE signals that are used for DMA reads of the source data (0: Low, 1: High): Bit [13] programs ARCACHE[2] Bit [12] programs ARCACHE[1] Bit [11] programs ARCACHE[0] Note: The DMAC ties ARCACHE[3] Low. Setting ARCACHE[2:1]= b10 violates the AXI protocol.
src_prot_ctrl
10:8
Programs the AXI ARPROT signals that are used for DMA reads of the source data (0: Low, 1: High): Bit [10] programs ARPROT[2] Bit [9] programs ARPROT[1] Bit [8] programs ARPROT[0] Note: Only DMA channels in the Secure state can program ARPROT[1] Low, that is, a secure access. If a DMA channel in the Non-secure state attempts to set ARPROT[1] Low, the DMA channel aborts.
www.xilinx.com
1175
Bits 7:4
Description For each burst, these bits program the number of data transfers that the DMAC performs when it reads the source data: 0000: 1 data transfer 0001: 2 data transfers ... 1111: 16 data transfers. The total number of bytes that the DMAC reads into the MFIFO when it executes a DMALD instruction is the product of src_burst_len and src_burst_size. Note: These bits control the state of ARLEN[3:0].
src_burst_size
3:1
0x0
For each beat within a burst, it programs the number of bytes that the DMAC reads from the source: 000: reads 1 byte per beat 001: reads 2 bytes per beat 010: reads 4 bytes per beat 011: reads 8 bytes per beat 100: reads 16 bytes per beat 101 to 111: reserved. The total number of bytes that the DMAC reads into the MFIFO when it executes a DMALD instruction is the product of src_burst_len and src_burst_size. Note: These bits control the state of ARSIZE[2:0].
src_inc
0x0
Programs the burst type that the DMAC performs when it reads the source data: 0: Fixed-address burst, DMAC signal ARBURST[0] driven Low. 1: Incrementing-address burst, DMAC signal ARBURST[0] driven High.
www.xilinx.com
1176
Description
www.xilinx.com
1177
www.xilinx.com
1178
www.xilinx.com
1179
Bits 21:18
Description For each burst, these bits program the number of data transfers that the DMAC performs when it writes the destination data: 0000: 1 data transfer 0001: 2 data transfers 0010: 3 data transfers ... 1111: 16 data transfers. The total number of bytes that the DMAC writes out of the MFIFO when it executes a DMAST instruction is the product of dst_burst_len and dst_burst_size. Note: These bits control the state of AWLEN[3:0].
dst_burst_size
17:15
0x0
For each beat within a burst, it programs the number of bytes that the DMAC writes to the destination: 000: writes 1 byte per beat 001: writes 2 bytes per beat 010: writes 4 bytes per beat 011: writes 8 bytes per beat 100: writes 16 bytes per beat 101 to 111: reserved. The total number of bytes that the DMAC writes out of the MFIFO when it executes a DMAST instruction is the product of dst_burst_len and dst_burst_size. Note: These bits control the state of AWSIZE[2:0].
dst_inc
14
0x0
Programs the burst type that the DMAC performs when it writes the destination data: 0: Fixed-address burst. The DMAC signals AWBURST[0] Low. 1: Incrementing-address burst. The DMAC signals AWBURST[0] HIgh.
src_cache_ctrl
13:11
0x0
Programs the AXI ARCACHE signals that are used for DMA reads of the source data (0: Low, 1: High): Bit [13] programs ARCACHE[2] Bit [12] programs ARCACHE[1] Bit [11] programs ARCACHE[0] Note: The DMAC ties ARCACHE[3] Low. Setting ARCACHE[2:1]= b10 violates the AXI protocol.
www.xilinx.com
1180
Bits 10:8
Description Programs the AXI ARPROT signals that are used for DMA reads of the source data (0: Low, 1: High): Bit [10] programs ARPROT[2] Bit [9] programs ARPROT[1] Bit [8] programs ARPROT[0] Note: Only DMA channels in the Secure state can program ARPROT[1] Low, that is, a secure access. If a DMA channel in the Non-secure state attempts to set ARPROT[1] Low, the DMA channel aborts.
src_burst_len
7:4
0x0
For each burst, these bits program the number of data transfers that the DMAC performs when it reads the source data: 0000: 1 data transfer 0001: 2 data transfers ... 1111: 16 data transfers. The total number of bytes that the DMAC reads into the MFIFO when it executes a DMALD instruction is the product of src_burst_len and src_burst_size. Note: These bits control the state of ARLEN[3:0].
src_burst_size
3:1
0x0
For each beat within a burst, it programs the number of bytes that the DMAC reads from the source: 000: reads 1 byte per beat 001: reads 2 bytes per beat 010: reads 4 bytes per beat 011: reads 8 bytes per beat 100: reads 16 bytes per beat 101 to 111: reserved. The total number of bytes that the DMAC reads into the MFIFO when it executes a DMALD instruction is the product of src_burst_len and src_burst_size. Note: These bits control the state of ARSIZE[2:0].
src_inc
0x0
Programs the burst type that the DMAC performs when it reads the source data: 0: Fixed-address burst, DMAC signal ARBURST[0] driven Low. 1: Incrementing-address burst, DMAC signal ARBURST[0] driven High.
www.xilinx.com
1181
www.xilinx.com
1182
www.xilinx.com
1183
www.xilinx.com
1184
Bits 24:22
Description Programs the AWPROT signals that are used when the DMAC writes the destination data (0: Low, 1: High): Bit [24] programs AWPROT[2] Bit [23] programs AWPROT[1] Bit [22] programs AWPROT[0] Note: Only DMA channels in the Secure state can program AWPROT[1] Low, that is, a secure access. If a DMA channel in the Non-secure state attempts to set AWPROT[1] Low, then the DMA channel aborts.
dst_burst_len
21:18
0x0
For each burst, these bits program the number of data transfers that the DMAC performs when it writes the destination data: 0000: 1 data transfer 0001: 2 data transfers 0010: 3 data transfers ... 1111: 16 data transfers. The total number of bytes that the DMAC writes out of the MFIFO when it executes a DMAST instruction is the product of dst_burst_len and dst_burst_size. Note: These bits control the state of AWLEN[3:0].
dst_burst_size
17:15
0x0
For each beat within a burst, it programs the number of bytes that the DMAC writes to the destination: 000: writes 1 byte per beat 001: writes 2 bytes per beat 010: writes 4 bytes per beat 011: writes 8 bytes per beat 100: writes 16 bytes per beat 101 to 111: reserved. The total number of bytes that the DMAC writes out of the MFIFO when it executes a DMAST instruction is the product of dst_burst_len and dst_burst_size. Note: These bits control the state of AWSIZE[2:0].
dst_inc
14
0x0
Programs the burst type that the DMAC performs when it writes the destination data: 0: Fixed-address burst. The DMAC signals AWBURST[0] Low. 1: Incrementing-address burst. The DMAC signals AWBURST[0] HIgh.
www.xilinx.com
1185
Bits 13:11
Description Programs the AXI ARCACHE signals that are used for DMA reads of the source data (0: Low, 1: High): Bit [13] programs ARCACHE[2] Bit [12] programs ARCACHE[1] Bit [11] programs ARCACHE[0] Note: The DMAC ties ARCACHE[3] Low. Setting ARCACHE[2:1]= b10 violates the AXI protocol.
src_prot_ctrl
10:8
Programs the AXI ARPROT signals that are used for DMA reads of the source data (0: Low, 1: High): Bit [10] programs ARPROT[2] Bit [9] programs ARPROT[1] Bit [8] programs ARPROT[0] Note: Only DMA channels in the Secure state can program ARPROT[1] Low, that is, a secure access. If a DMA channel in the Non-secure state attempts to set ARPROT[1] Low, the DMA channel aborts.
src_burst_len
7:4
0x0
For each burst, these bits program the number of data transfers that the DMAC performs when it reads the source data: 0000: 1 data transfer 0001: 2 data transfers ... 1111: 16 data transfers. The total number of bytes that the DMAC reads into the MFIFO when it executes a DMALD instruction is the product of src_burst_len and src_burst_size. Note: These bits control the state of ARLEN[3:0].
www.xilinx.com
1186
Bits 3:1
Description For each beat within a burst, it programs the number of bytes that the DMAC reads from the source: 000: reads 1 byte per beat 001: reads 2 bytes per beat 010: reads 4 bytes per beat 011: reads 8 bytes per beat 100: reads 16 bytes per beat 101 to 111: reserved. The total number of bytes that the DMAC reads into the MFIFO when it executes a DMALD instruction is the product of src_burst_len and src_burst_size. Note: These bits control the state of ARSIZE[2:0].
src_inc
0x0
Programs the burst type that the DMAC performs when it reads the source data: 0: Fixed-address burst, DMAC signal ARBURST[0] driven Low. 1: Incrementing-address burst, DMAC signal ARBURST[0] driven High.
www.xilinx.com
1187
www.xilinx.com
1188
www.xilinx.com
1189
www.xilinx.com
1190
Bits 17:15
Description For each beat within a burst, it programs the number of bytes that the DMAC writes to the destination: 000: writes 1 byte per beat 001: writes 2 bytes per beat 010: writes 4 bytes per beat 011: writes 8 bytes per beat 100: writes 16 bytes per beat 101 to 111: reserved. The total number of bytes that the DMAC writes out of the MFIFO when it executes a DMAST instruction is the product of dst_burst_len and dst_burst_size. Note: These bits control the state of AWSIZE[2:0].
dst_inc
14
0x0
Programs the burst type that the DMAC performs when it writes the destination data: 0: Fixed-address burst. The DMAC signals AWBURST[0] Low. 1: Incrementing-address burst. The DMAC signals AWBURST[0] HIgh.
src_cache_ctrl
13:11
0x0
Programs the AXI ARCACHE signals that are used for DMA reads of the source data (0: Low, 1: High): Bit [13] programs ARCACHE[2] Bit [12] programs ARCACHE[1] Bit [11] programs ARCACHE[0] Note: The DMAC ties ARCACHE[3] Low. Setting ARCACHE[2:1]= b10 violates the AXI protocol.
src_prot_ctrl
10:8
Programs the AXI ARPROT signals that are used for DMA reads of the source data (0: Low, 1: High): Bit [10] programs ARPROT[2] Bit [9] programs ARPROT[1] Bit [8] programs ARPROT[0] Note: Only DMA channels in the Secure state can program ARPROT[1] Low, that is, a secure access. If a DMA channel in the Non-secure state attempts to set ARPROT[1] Low, the DMA channel aborts.
www.xilinx.com
1191
Bits 7:4
Description For each burst, these bits program the number of data transfers that the DMAC performs when it reads the source data: 0000: 1 data transfer 0001: 2 data transfers ... 1111: 16 data transfers. The total number of bytes that the DMAC reads into the MFIFO when it executes a DMALD instruction is the product of src_burst_len and src_burst_size. Note: These bits control the state of ARLEN[3:0].
src_burst_size
3:1
0x0
For each beat within a burst, it programs the number of bytes that the DMAC reads from the source: 000: reads 1 byte per beat 001: reads 2 bytes per beat 010: reads 4 bytes per beat 011: reads 8 bytes per beat 100: reads 16 bytes per beat 101 to 111: reserved. The total number of bytes that the DMAC reads into the MFIFO when it executes a DMALD instruction is the product of src_burst_len and src_burst_size. Note: These bits control the state of ARSIZE[2:0].
src_inc
0x0
Programs the burst type that the DMAC performs when it reads the source data: 0: Fixed-address burst, DMAC signal ARBURST[0] driven Low. 1: Incrementing-address burst, DMAC signal ARBURST[0] driven High.
www.xilinx.com
1192
Description
www.xilinx.com
1193
www.xilinx.com
1194
Description
instruction_byte0
23:16
0x0
instruction byte 0
reserved channel_num
15:11 10:8
0x0 0x0
reserved, write as 0 DMA channel number: 000: DMA channel 0 001: DMA channel 1 010: DMA channel 2 ... 111: DMA channel 7
reserved debug_thread
7:1 0
0x0 0x0
reserved, write as 0 The debug thread encoding is as folLows: 0: DMA manager thread 1: DMA channel. Note: When set to 1, the Channel number field selects the DMA channel to debug.
www.xilinx.com
1195
instruction_byte4
23:16
0x0
instruction byte 4
instruction_byte3
15:8
0x0
instruction byte 3
instruction_byte2
7:0
0x0
instruction byte 2
num_periph_req
16:12
reserved
11:7
www.xilinx.com
1196
Bits 6:4
Description The DMA Controller supports eight channel threads. This register always reads 00111 (7d). read undefined Indicates the status of the slcr.TZ_DMA_NS bit when the DMAC exits from reset: 0: TZ_DMA_NS was Low 1: TZ_DMA_NS was HIgh
reserved mgr_ns_at_rst
3 2
boot_en
0x0
Indicates the status of the boot_from_pc signal when the DMAC exited from reset: 0 = boot_from_pc was LOW 1 = boot_from_pc was HIGH.
periph_req
reserved icache_len
3 2:0
www.xilinx.com
1197
www.xilinx.com
1198
dmac0_ns: 0xF8004E10 dmac0_s: 0xF8003E10 32 bits mixed 0x00000000 Config 4, Security of Periph Interfaces
rd_q_dep
19:16
reserved
15
www.xilinx.com
1199
Bits 14:12
Type sro,ns sraz,n snsro sro,ns sraz,n snsro rud sro,ns sraz,n snsro rud sro,ns sraz,n snsro
Reset Value dmac0_ns: 0x0 dmac0_s: 0x7 dmac0_ns: 0x0 dmac0_s: 0xF 0x0 dmac0_ns: 0x0 dmac0_s: 0x7 0x0 dmac0_ns: 0x0 dmac0_s: 0x3
Description The number of possible outstanding Read Transactions is hardwired at 8. The depth of the Write Queue is hardwired at 16 lines. read undefined The number of outstanding Write Transactions is is hardwired at 8. read undefined The data width of the AXI master interface 64 bits.
wr_q_dep
11:8
reserved wr_cap
7 6:4
reserved data_width
3 2:0
Register (dmac) WD
Name Relative Address Absolute Address Width Access Type Reset Value Description WD 0x00000E80 dmac0_ns: 0xF8004E80 dmac0_s: 0xF8003E80 32 bits mixed 0x00000000 Watchdog Timer
Register WD Details
Field Name reserved wd_irq_only Bits 31:1 0 Type rud sro,ns sraz,n snsro Reset Value 0x0 0x0 read undefined When a lock-up is detected, the DMAC aborts the DMA channel thread and asserts the Abort interrupt. Description
www.xilinx.com
1200
dmac0_ns: 0xF8004FE0 dmac0_s: 0xF8003FE0 32 bits mixed dmac0_ns: 0x00000000 dmac0_s: 0x00000030 Peripheral Idenfication register 0
part_number_1
3:0
www.xilinx.com
1201
designer_1
3:0
www.xilinx.com
1202
www.xilinx.com
1203
Description
www.xilinx.com
1204
www.xilinx.com
1205
Register Summary
Register Name net_ctrl net_cfg net_status user_io dma_cfg tx_status rx_qbar tx_qbar rx_status intr_status intr_en intr_dis intr_mask phy_maint rx_pauseq tx_pauseq hash_bot hash_top spec_addr1_bot spec_addr1_top spec_addr2_bot spec_addr2_top Address 0x00000000 0x00000004 0x00000008 0x0000000C 0x00000010 0x00000014 0x00000018 0x0000001C 0x00000020 0x00000024 0x00000028 0x0000002C 0x00000030 0x00000034 0x00000038 0x0000003C 0x00000080 0x00000084 0x00000088 0x0000008C 0x00000090 0x00000094 Width 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 Type mixed rw ro mixed mixed mixed mixed mixed mixed mixed wo wo mixed rw ro rw rw rw rw mixed rw mixed Reset Value 0x00000000 0x00080000 x x 0x00020784 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 x x x 0x00000000 0x00000000 0x0000FFFF 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 Description Network Control Network Configuration Network Status User Input/Output DMA Configuration Transmit Status Receive Buffer Queue Base Address Transmit Buffer Queue Base Address Receive Status Interrupt Status Interrupt Enable Interrupt Disable Interrupt Mask Status PHY Maintenance Received Pause Quantum Transmit Pause Quantum Hash Register Bottom [31:0] Hash Register Top [63:32] Specific Address 1 Bottom [31:0] Specific Address 1 Top [47:32] Specific Address 2 Bottom [31:0] Specific Address 2 Top [47:32]
www.xilinx.com
1206
Register Name spec_addr3_bot spec_addr3_top spec_addr4_bot spec_addr4_top type_id_match1 type_id_match2 type_id_match3 type_id_match4 wake_on_lan ipg_stretch stacked_vlan tx_pfc_pause spec_addr1_mask_bot spec_addr1_mask_top module_id octets_tx_bot octets_tx_top frames_tx broadcast_frames_tx multi_frames_tx pause_frames_tx frames_64b_tx frames_65to127b_tx frames_128to255b_tx frames_256to511b_tx frames_512to1023b_tx frames_1024to1518b_tx tx_under_runs single_collisn_frames
Address 0x00000098 0x0000009C 0x000000A0 0x000000A4 0x000000A8 0x000000AC 0x000000B0 0x000000B4 0x000000B8 0x000000BC 0x000000C0 0x000000C4 0x000000C8 0x000000CC 0x000000FC 0x00000100 0x00000104 0x00000108 0x0000010C 0x00000110 0x00000114 0x00000118 0x0000011C 0x00000120 0x00000124 0x00000128 0x0000012C 0x00000134 0x00000138
Width 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32
Type rw mixed rw mixed mixed mixed mixed mixed mixed mixed mixed mixed rw mixed ro ro ro ro ro ro ro ro ro ro ro ro ro ro ro
Reset Value 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00020118 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
Description Specific Address 3 Bottom [31:0] Specific Address 3 Top [47:32] Specific Address 4 Bottom [31:0] Specific Address 4 Top [47:32] Type ID Match 1 Type ID Match 2 Type ID Match 3 Type ID Match 4 Wake on LAN Register IPG stretch register Stacked VLAN Register Transmit PFC Pause Register Specific Address Mask 1 Bottom [31:0] Specific Address Mask 1 Top [47:32] Module ID Octets transmitted [31:0] (in frames without error) Octets transmitted [47:32] (in frames without error) Frames Transmitted Broadcast frames Tx Multicast frames Tx Pause frames Tx Frames Tx, 64-byte length Frames Tx, 65 to 127-byte length Frames Tx, 128 to 255-byte length Frames Tx, 256 to 511-byte length Frames Tx, 512 to 1023-byte length Frame Tx, 1024 to 1518-byte length Transmit under runs Single Collision Frames
www.xilinx.com
1207
Register Name multi_collisn_frames excessive_collisns late_collisns deferred_tx_frames carrier_sense_errs octets_rx_bot octets_rx_top frames_rx bdcast_fames_rx multi_frames_rx pause_rx frames_64b_rx frames_65to127b_rx frames_128to255b_rx frames_256to511b_rx frames_512to1023b_rx frames_1024to1518b_rx undersz_rx oversz_rx jab_rx fcs_errors length_field_errors rx_symbol_errors align_errors rx_resource_errors rx_overrun_errors ip_hdr_csum_errors tcp_csum_errors udp_csum_errors timer_strobe_s
Address 0x0000013C 0x00000140 0x00000144 0x00000148 0x0000014C 0x00000150 0x00000154 0x00000158 0x0000015C 0x00000160 0x00000164 0x00000168 0x0000016C 0x00000170 0x00000174 0x00000178 0x0000017C 0x00000184 0x00000188 0x0000018C 0x00000190 0x00000194 0x00000198 0x0000019C 0x000001A0 0x000001A4 0x000001A8 0x000001AC 0x000001B0 0x000001C8
Width 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32
Type ro ro ro ro ro ro ro ro ro ro ro ro ro ro ro ro ro ro ro ro ro ro ro ro ro ro ro ro ro rw
Reset Value 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
Description Multiple Collision Frames Excessive Collisions Late Collisions Deferred Transmission Frames Carrier Sense Errors. Octets Received [31:0] Octets Received [47:32] Frames Received Broadcast Frames Rx Multicast Frames Rx Pause Frames Rx Frames Rx, 64-byte length Frames Rx, 65 to 127-byte length Frames Rx, 128 to 255-byte length Frames Rx, 256 to 511-byte length Frames Rx, 512 to 1023-byte length Frames Rx, 1024 to 1518-byte length Undersize frames received Oversize frames received Jabbers received Frame check sequence errors Length field frame errors Receive symbol errors Alignment errors Receive resource errors Receive overrun errors IP header checksum errors TCP checksum errors UDP checksum error 1588 timer sync strobe seconds
www.xilinx.com
1208
Register Name timer_strobe_ns timer_s timer_ns timer_adjust timer_incr ptp_tx_s ptp_tx_ns ptp_rx_s ptp_rx_ns ptp_peer_tx_s ptp_peer_tx_ns ptp_peer_rx_s ptp_peer_rx_ns design_cfg2 design_cfg3 design_cfg4 design_cfg5
Address 0x000001CC 0x000001D0 0x000001D4 0x000001D8 0x000001DC 0x000001E0 0x000001E4 0x000001E8 0x000001EC 0x000001F0 0x000001F4 0x000001F8 0x000001FC 0x00000284 0x00000288 0x0000028C 0x00000290
Width 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32
Reset Value 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 x 0x00000000 0x00000000 x
Description 1588 timer sync strobe nanoseconds 1588 timer seconds 1588 timer nanoseconds 1588 timer adjust 1588 timer increment PTP event frame transmitted seconds PTP event frame transmitted nanoseconds PTP event frame received seconds PTP event frame received nanoseconds. PTP peer event frame transmitted seconds PTP peer event frame transmitted nanoseconds PTP peer event frame received seconds PTP peer event frame received nanoseconds. Design Configuration 2 Design Configuration 3 Design Configuration 4 Design Configuration 5
www.xilinx.com
1209
16
wo
0x0
reserved reserved tx_zeroq_pause_frame (ZEROPAUSETX) tx_pause_frame (PAUSETX) tx_halt (HALTTX) start_tx (STARTTX) back_pressure wren_stat_regs (STATWEN) incr_stat_regs (STATINC)
14 13 12
rw wo wo
11 10
wo wo
0x0 0x0
9 8 7
wo rw rw
wo
0x0
www.xilinx.com
1210
Bits 5 4
Type wo rw
Description Clear statistics registers - this bit is write only. Writing a one clears the statistics registers. Management port enable - set to one to enable the management port. When zero forces mdio to high impedance state and mdc low. Transmit enable - when set, it enables the GEM transmitter to send data. When reset transmission will stop immediately, the transmit pipeline and control registers will be cleared and the transmit queue pointer register will reset to point to the start of the transmit descriptor list. Receive enable - when set, it enables the GEM to receive data. When reset frame reception will stop immediately and the receive pipeline will be cleared. The receive queue pointer register is unaffected. Loop back local - asserts the loopback_local signal to the system clock generator. Also connects txd to rxd, tx_en to rx_dv and forces full duplex mode. Bit 11 of the network configuration register must be set low to disable TBI mode when in internal loopback. rx_clk and tx_clk may malfunction as the GEM is switched into and out of internal loop back. It is important that receive and transmit circuits have already been disabled when making the switch into and out of internal loop back. Local loopback functionality isn't available in the EP107 Zynq Emulation Platform, because the clocking doesn't map well into an FPGA. Reserved. Do not modify.
rw
0x0
rx_en (RXEN)
rw
0x0
loopback_local (LOOPEN)
rw
0x0
reserved
rw
0x0
www.xilinx.com
1211
ignore_ipg_rx_er
30
rw
0x0
29 28
rw rw
0x0 0x0
sgmii_en
27
rw
0x0
ignore_rx_fcs (FCSIGNORE)
26
rw
0x0
www.xilinx.com
1212
Bits 22:21
Type rw
Description Data bus width. Only valid bus widths may be written if the system is configured to a maximum width less than 128-bits. Zynq defines gem_dma_bus_width_def as 2'b00. 00: 32 bit AMBA AHB data bus width 01: 64 bit AMBA AHB data bus width 10: 128 bit AMBA AHB data bus width 11: 128 bit AMBA AHB data bus width
mdc_clk_div (MDCCLKDIV)
20:18
rw
0x2
MDC clock division - set according to cpu_1xclk speed. These three bits determine the number cpu_1xclk will be divided by to generate MDC. For conformance with the 802.3 specification, MDC must not exceed 2.5 MHz (MDC is only active during MDIO read and write operations). 000: divide cpu_1xclk by 8 (cpu_1xclk up to 20 MHz) 001: divide cpu_1xclk by 16 (cpu_1xclk up to 40 MHz) 010: divide cpu_1xclk by 32 (cpu_1xclk up to 80 MHz) 011: divide cpu_1xclk by 48 (cpu_1xclk up to 120MHz) 100: divide cpu_1xclk by 64 (cpu_1xclk up to 160 MHz) 101: divide cpu_1xclk by 96 (cpu_1xclk up to 240 MHz) 110: divide cpu_1xclk by 128 (cpu_1xclk up to 320 MHz) 111: divide cpu_1xclk by 224 (cpu_1xclk up to 540 MHz)
fcs_remove (FCSREM)
17
rw
0x0
FCS remove - setting this bit will cause received frames to be written to memory without their frame check sequence (last 4 bytes). The frame length indicated will be reduced by four bytes in this mode. Length field error frame discard - setting this bit causes frames with a measured length shorter than the extracted length field (as indicated by bytes 13 and 14 in a non-VLAN tagged frame) to be discarded. This only applies to frames with a length field less than 0x0600. Receive buffer offset - indicates the number of bytes by which the received data is offset from the start of the receive buffer.
len_err_frame_disc (LENGTHERRDSCRD)
16
rw
0x0
rx_buf_offset (RXOFFS)
15:14
rw
0x0
www.xilinx.com
1213
Bits 13
Type rw
Description Pause enable - when set, transmission will pause if a non zero 802.3 classic pause frame is received and PFC has not been negotiated. Retry test - must be set to zero for normal operation. If set to one the backoff between collisions will always be one slot time. Setting this bit to one helps test the too many retries condition. Also used in the pause frame tests to reduce the pause counter's decrement time from 512 bit times, to every rx_clk cycle.
12
rw
0x0
pcs_sel
11
rw
0x0
PCS select - selects between MII/GMII and TBI. Must be set for SGMII operation. 0: GMII/MII interface enabled, TBI disabled 1: TBI enabled, GMII/MII disabled
gige_en (1000)
10
rw
0x0
Gigabit mode enable - setting this bit configures the GEM for 1000 Mbps operation. 0: 10/100 operation using MII or TBI interface 1: Gigabit operation using GMII or TBI interface
rw
0x0
External address match enable - when set the external address match interface can be used to copy frames to memory. Receive 1536 byte frames - setting this bit means the GEM will accept frames up to 1536 bytes in length. Normally the GEM would reject any frame above 1518 bytes. Unicast hash enable - when set, unicast frames will be accepted when the 6 bit hash function of the destination address points to a bit that is set in the hash register. Multicast hash enable - when set, multicast frames will be accepted when the 6 bit hash function of the destination address points to a bit that is set in the hash register. No broadcast - when set to logic one, frames addressed to the broadcast address of all ones will not be accepted. Copy all frames - when set to logic one, all valid frames will be accepted. Reserved. Do not modify. Discard non-VLAN frames - when set only VLAN tagged frames will be passed to the address matching logic.
rw
0x0
uni_hash_en (UCASTHASHEN)
rw
0x0
multi_hash_en (MCASTHASHEN)
rw
0x0
rw
0x0
4 3 2
rw rw rw
www.xilinx.com
1214
Bits 1
Type rw
Description Full duplex - if set to logic one, the transmit block ignores the state of collision and carrier sense and allows receive while transmitting. Also controls the half-duplex pin. Speed - set to logic one to indicate 100Mbps operation, logic zero for 10Mbps. The value of this pin is reflected on the speed_mode[0] output pin.
speed (100)
rw
0x0
phy_mgmt_idle
ro
0x1
www.xilinx.com
1215
Bits 1 0
Type ro ro
Description Returns status of the mdio_in pin Returns status of PCS link state. If auto-negotiation is disabled this returns the synchronization status. If auto-negotiation is enabled it is set in the LINK_OK state as long as a compatible duplex mode is resolved, it is always set in the LINK_OK state in SGMII mode.
www.xilinx.com
1216
Bits 31:16
Type ro x
Reset Value
Description User programmable inputs - the upper 16 bits of this register are used to monitor the state of the user inputs. A logic one read from a bit in this range will correspond to the input being in a high state. A logic zero read from a bit in this range will correspond to the input being in a low state. Any unused bits will be read as zero. Writing to any bits in this range will have no functional effect. User programmable outputs - the lower 16 bits of this register are used to control the state of the user outputs. A logic one written to a bit in this range will cause the corresponding output to be set high. A logic zero written to a bit in this range shall cause the corresponding output to be forced low. Any unused bits will be read as logic zero. Writing to any unused bits in this range will have no functional effect.
user_out
15:0
rw
0x0
www.xilinx.com
1217
Bits 23:16
Type rw
Description DMA receive buffer size in AHB system memory. The value defined by these bits determines the size of buffer to use in main AHB system memory when writing received data. The value is defined in multiples of 64 bytes such that a value of 0x01 corresponds to buffers of 64 bytes, 0x02 corresponds to 128 bytes etc. For example: 0x02: 128 byte 0x18: 1536 byte (1*max length frame/buffer) 0xA0: 10240 byte (1*10k jumbo frame/buffer) Note that this value should never be written as zero.
15:12 11
ro rw
0x0 0x0
Reserved, read as zero, ignored on write. Transmitter IP, TCP and UDP checksum generation offload enable. When set, the transmitter checksum generation engine is enabled, to calculate and substitute checksums for transmit frames. When clear, frame data is unaffected. If the GEM is not configured to use the DMA packet buffer, this bit is not implemented and will be treated as reserved, read as zero, ignored on write. Zynq uses packet buffer.
tx_pktbuf_memsz_sel (TXSIZE)
10
rw
0x1
Transmitter packet buffer memory size select Having this bit at zero halves the amount of memory used for the transmit packet buffer. This reduces the amount of memory used by the GEM. It is important to set this bit to one if the full configured physical memory is available. The value in brackets below represents the size that would result for the default maximum configured memory size of 4 kB. 1: Use full configured addressable space (4 kB) 0: Do not use top address bit (2 kB) If the GEM is not configured to use the DMA packet buffer, this bit is not implemented and will be treated as reserved, read as zero, ignored on write. Zynq uses packet buffer.
www.xilinx.com
1218
Bits 9:8
Type rw
Description Receiver packet buffer memory size select Having these bits at less than 11 reduces the amount of memory used for the receive packet buffer. This reduces the amount of memory used by the GEM. It is important to set these bits both to one if the full configured physical memory is available. The value in brackets below represents the size that would result for the default maximum configured memory size of 8 kBs. 00: Do not use top three address bits (1 kB) 01: Do not use top two address bits (2 kB) 10: Do not use top address bit (4 kB) 11: Use full configured addressable space (8 kB) If the controller is not configured to use the DMA packet buffer, these bits are not implemented and will be treated as reserved, read as zero, ignored on write. Zynq uses packet buffer.
rw
0x1
AHB endian swap mode enable for packet data accesses - When set, selects swapped endianism for AHB transfers. When clear, selects little endian mode. AHB endian swap mode enable for management descriptor accesses - When set, selects swapped endianism for AHB transfers. When clear, selects little endian mode. Reserved, read as zero, ignored on write AHB fixed burst length for DMA data operations - Selects the burst length to attempt to use on the AHB when transferring frame data. Not used for DMA management operations and only used where space and data size allow. Otherwise SINGLE type AHB transfers are used. Upper bits become non-writeable if the configured DMA TX and RX FIFO sizes are smaller than required to support the selected burst size. One-hot priority encoding enforced automatically on register writes as follows, where 'x' represents don't care: 00001: Always use SINGLE AHB bursts 0001x: Always use SINGLE AHB bursts 001xx: Attempt to use INCR4 AHB bursts (default) 01xxx: Attempt to use INCR8 AHB bursts 1xxxx: Attempt to use INCR16 AHB bursts others: reserved
rw
0x0
5 4:0
rw rw
0x0 0x4
www.xilinx.com
1219
www.xilinx.com
1220
Bits 4
Type wtc
Description Transmit frame corruption due to AHB error - set if an error occurs whilst midway through reading transmit frame from the AHB, including HRESP errors and buffers exhausted mid frame (if the buffers run out during transmission of a frame then transmission stops, FCS shall be bad and tx_er asserted). Also set in DMA packet buffer mode if single frame is too large for configured packet buffer memory size. Cleared by writing a one to this bit.
tx_go (TXGO)
ro
0x0
Transmit go - if high transmit is active. When using the exposed FIFO interface, this bit represents bit 3 of the network control register. When using the DMA interface this bit represents the tx_go variable as specified in the transmit buffer description.
2 1
wtc wtc
0x0 0x0
Retry limit exceeded - cleared by writing a one to this bit. Collision occurred - set by the assertion of collision. Cleared by writing a one to this bit. When operating in 10/100 mode, this status indicates either a collision or a late collision. In gigabit mode, this status is not set for a late collision.
used_bit_read (USEDREAD)
wtc
0x0
Used bit read - set when a transmit buffer descriptor is read with its used bit set. Cleared by writing a one to this bit.
www.xilinx.com
1221
www.xilinx.com
1222
Type rw ro
Description Transmit buffer queue base address - written with the address of the start of the transmit queue. Reserved, read as 0, ignored on write.
www.xilinx.com
1223
Bits 1
Type wtc
Description Frame received - one or more frames have been received and placed in memory. Cleared by writing a one to this bit. Buffer not available - an attempt was made to get a new buffer and the pointer indicated that it was owned by the processor. The DMA will reread the pointer each time an end of frame is received until a valid pointer is found. This bit is set following each descriptor read attempt that fails, even if consecutive pointers are unsuccessful and software has in the mean time cleared the status flag. Cleared by writing a one to this bit.
wtc
0x0
www.xilinx.com
1224
Field Name pdelay_resp_rx (XEMACPS_IXR_PTPS TX) pdelay_req_rx (XEMACPS_IXR_PTP DRTX) sync_tx (XEMACPS_IXR_PTPP SRX) delay_req_tx (XEMACPS_IXR_PTPP DRRX) sync_rx (XEMACPS_IXR_PTPS RX) delay_req_rx (XEMACPS_IXR_PTP DRRX) partner_pg_rx
Bits 23
Type wtc
Description PTP pdelay_resp frame received - indicates a PTP pdelay_resp frame has been received. PTP pdelay_req frame received - indicates a PTP pdelay_req frame has been received. PTP sync frame transmitted - indicates a PTP sync frame has been transmitted. PTP delay_req frame transmitted - indicates a PTP delay_req frame has been transmitted. PTP sync frame received - indicates a PTP sync frame has been received. PTP delay_req frame received - indicates a PTP delay_req frame has been received. PCS link partner page received - set when a new base page or next page is received from the link partner. The first time this interrupt is received, it will indicate base page received and subsequent reads will indicate next pages. The next page and base page registers should only be read when this interrupt is signaled. For next pages, the link partner next page register should be read first to avoid the register being over written. This interrupt also indicates when the host should write a new page into the next page register. If further next page exchange is only required by the link partner, this register should be written with a null message page (0x2001). PCS auto-negotiation complete - set once the internal PCS layer has completed auto-negotiation. External interrupt - set when a rising edge has been detected on the ext_interrupt_in input pin. Pause frame transmitted - indicates a pause frame has been successfully transmitted after being initiated from the network control register or from the tx_pause control pin. Pause time zero - set when either the pause time register at address 0x38 decrements to zero, or when a valid pause frame is received with a zero pause quantum field.
22
wtc
0x0
21
wtc
0x0
20
wtc
0x0
19
wtc
0x0
18
wtc
0x0
17
wtc
0x0
autoneg_complete
16
wtc
0x0
15 14
wtc wtc
0x0 0x0
13
wtc
0x0
www.xilinx.com
1225
Field Name pause_nonzeroq_rx (XEMACPS_IXR_PAU SENZERO) hresp_not_ok (XEMACPS_IXR_HRE SPNOK) rx_overrun (XEMACPS_IXR_RXO VR) link_chng reserved tx_complete (XEMACPS_IXR_TXC OMPL) tx_corrupt_ahb_err (XEMACPS_IXR_TXEX H)
Bits 12
Type wtc
Description Pause frame with non-zero pause quantum received - indicates a valid pause has been received that has a non-zero pause quantum field. Hresp not OK - set when the DMA block sees hresp not OK. Receive overrun - set when the receive overrun status bit gets set. Link change - set when the state of the link detected by the internal PCS changes state. Reserved Transmit complete - set when a frame has been transmitted. Transmit frame corruption due to AHB error - set if an error occurs while midway through reading transmit frame from the AHB, including HRESP errors and buffers exhausted mid frame (if the buffers run out during transmission of a frame then transmission stops, FCS shall be bad and tx_er asserted). Also set in DMA packet buffer mode if single frame is too large for configured packet buffer memory size. Cleared on a read.
11
wtc
0x0
10
wtc
0x0
9 8 7
wtc ro wtc
clronr d
0x0
retry_ex_late_collisn (XEMACPS_IXR_RETR Y) reserved tx_used_read (XEMACPS_IXR_TXUS ED) rx_used_read (XEMACPS_IXR_RXU SED) rx_complete (XEMACPS_IXR_FRA MERX) mgmt_sent (XEMACPS_IXR_MG MNT)
wtc
0x0
Retry limit exceeded or late collision - transmit error. Late collision will only cause this status bit to be set in gigabit mode (as a retry is not attempted).
4 3
wtc wtc
0x0 0x0
Reserved. Do not modify. TX used bit read - set when a transmit buffer descriptor is read with its used bit set. RX used bit read - set when a receive buffer descriptor is read with its used bit set. Receive complete - a frame has been stored in memory. Management frame sent - the PHY maintenance register has completed its operation.
wtc
0x0
wtc
0x0
wtc
0x0
www.xilinx.com
1226
www.xilinx.com
1227
Field Name sync_rx (XEMACPS_IXR_PTPS RX) delay_req_rx (XEMACPS_IXR_PTP DRRX) partner_pg_rx autoneg_complete ext_intr pause_tx (XEMACPS_IXR_PAU SETX) pause_zero (XEMACPS_IXR_PAU SEZERO) pause_nonzeroq (XEMACPS_IXR_PAU SENZERO) hresp_not_ok (XEMACPS_IXR_HRE SPNOK) rx_overrun (XEMACPS_IXR_RXO VR) link_chng reserved tx_complete (XEMACPS_IXR_TXC OMPL) tx_corrupt_ahb_err (XEMACPS_IXR_TXEX H) retry_ex_late_collisn (XEMACPS_IXR_RETR Y) tx_underrun (XEMACPS_IXR_URU N) tx_used_read (XEMACPS_IXR_TXUS ED)
Bits 19
Type wo
Reset Value x
18
wo
17 16 15 14
wo wo wo wo
x x x x
Enable PCS link partner page received interrupt Enable PCS auto-negotiation complete interrupt Enable external interrupt Enable pause frame transmitted interrupt
13
wo
12
wo
Enable pause frame with non-zero pause quantum interrupt Enable hresp not OK interrupt
11
wo
10
wo
9 8 7
wo wo wo
x x x
Enable link change interrupt Not used Enable transmit complete interrupt
wo
Enable transmit frame corruption due to AHB error interrupt Enable retry limit exceeded or late collision interrupt Enable transmit buffer under run interrupt
wo
wo
wo
www.xilinx.com
1228
Field Name rx_used_read (XEMACPS_IXR_RXU SED) rx_complete (XEMACPS_IXR_FRA MERX) mgmt_done (XEMACPS_IXR_MG MNT)
Bits 2
Type wo
Reset Value x
wo
wo
www.xilinx.com
1229
Field Name pdelay_resp_rx (XEMACPS_IXR_PTPS TX) pdelay_req_rx (XEMACPS_IXR_PTP DRTX) sync_tx (XEMACPS_IXR_PTPP SRX) delay_req_tx (XEMACPS_IXR_PTPP DRRX) sync_rx (XEMACPS_IXR_PTPS RX) delay_req_rx (XEMACPS_IXR_PTP DRRX) partner_pg_rx autoneg_complete ext_intr pause_tx (XEMACPS_IXR_PAU SETX) pause_zero (XEMACPS_IXR_PAU SEZERO) pause_nonzeroq (XEMACPS_IXR_PAU SENZERO) hresp_not_ok (XEMACPS_IXR_HRE SPNOK) rx_overrun (XEMACPS_IXR_RXO VR) link_chng reserved tx_complete (XEMACPS_IXR_TXC OMPL)
Bits 23
Type wo
Reset Value x
22
wo
21
wo
20
wo
Disable PTP delay_req frame transmitted interrupt Disable PTP sync frame received interrupt
19
wo
18
wo
17 16 15 14
wo wo wo wo
x x x x
Disable PCS link partner page received interrupt Disable PCS auto-negotiation complete interrupt Disable external interrupt Disable pause frame transmitted interrupt
13
wo
12
wo
Disable pause frame with non-zero pause quantum interrupt Disable hresp not OK interrupt
11
wo
10
wo
9 8 7
wo wo wo
x x x
Disable link change interrupt Not used Disable transmit complete interrupt
www.xilinx.com
1230
Field Name tx_corrupt_ahb_err (XEMACPS_IXR_TXEX H) retry_ex_late_collisn (XEMACPS_IXR_RETR Y) tx_underrun (XEMACPS_IXR_URU N) tx_used_read (XEMACPS_IXR_TXUS ED) rx_used_read (XEMACPS_IXR_RXU SED) rx_complete (XEMACPS_IXR_FRA MERX) mgmt_done (XEMACPS_IXR_MG MNT)
Bits 6
Type wo
Reset Value x
Description Disable transmit frame corruption due to AHB error interrupt Disable retry limit exceeded or late collision interrupt Disable transmit buffer under run interrupt
wo
wo
wo
wo
wo
wo
www.xilinx.com
1231
For test purposes there is a write-only function to the interrupt mask register that allows the bits in the interrupt status register to be set or cleared, regardless of the state of the mask register.
Field Name reserved pdelay_resp_tx (XEMACPS_IXR_PTPP STX) pdelay_req_tx (XEMACPS_IXR_PTPP DRTX) pdelay_resp_rx (XEMACPS_IXR_PTPS TX) pdelay_req_rx (XEMACPS_IXR_PTP DRTX) sync_tx (XEMACPS_IXR_PTPP SRX) delay_req_tx (XEMACPS_IXR_PTPP DRRX) sync_rx (XEMACPS_IXR_PTPS RX) delay_req_rx (XEMACPS_IXR_PTP DRRX) partner_pg_rx autoneg_complete ext_intr pause_tx (XEMACPS_IXR_PAU SETX) pause_zero (XEMACPS_IXR_PAU SEZERO) pause_nonzeroq (XEMACPS_IXR_PAU SENZERO) 12 ro,wo 0x1 Pause frame with non-zero pause quantum interrupt mask. 13 ro,wo 0x1 Pause time zero interrupt mask. 17 16 15 14 ro,wo ro,wo ro,wo ro,wo x 0x1 0x1 0x1 PCS link partner page mask. PCS auto-negotiation complete interrupt mask. External interrupt mask. Pause frame transmitted interrupt mask. 18 ro,wo x PTP delay_req frame received mask. 19 ro,wo x PTP sync frame received mask. 20 ro,wo x PTP delay_req frame transmitted mask. 21 ro,wo x PTP sync frame transmitted mask. 22 ro,wo x PTP pdelay_req frame received mask. 23 ro,wo x PTP pdelay_resp frame received mask. 24 ro,wo x PTP pdelay_req frame transmitted mask. Bits 31:26 25 Type ro ro,wo Reset Value 0x0 x Reserved PTP pdelay_resp frame transmitted mask. Description
www.xilinx.com
1232
Field Name hresp_not_ok (XEMACPS_IXR_HRE SPNOK) rx_overrun (XEMACPS_IXR_RXO VR) link_chng reserved tx_complete (XEMACPS_IXR_TXC OMPL) tx_corrupt_ahb_err (XEMACPS_IXR_TXEX H) retry_ex_late_collisn (XEMACPS_IXR_RETR Y) tx_underrun (XEMACPS_IXR_URU N) tx_used_read (XEMACPS_IXR_TXUS ED) rx_used_read (XEMACPS_IXR_RXU SED) rx_complete (XEMACPS_IXR_FRA MERX) mgmt_done (XEMACPS_IXR_MG MNT)
Bits 11
Type ro,wo
10
ro,wo
0x1
9 8 7
Link change interrupt mask. Not used Transmit complete interrupt mask.
ro,wo
0x1
Transmit frame corruption due to AHB error interrupt Retry limit exceeded or late collision (gigabit mode only) Transmit buffer under run interrupt mask.
ro,wo
0x1
ro,wo
0x1
ro,wo
0x1
ro,wo
0x1
ro,wo
0x1
ro,wo
0x1
www.xilinx.com
1233
www.xilinx.com
1234
www.xilinx.com
1235
Description
www.xilinx.com
1236
www.xilinx.com
1237
www.xilinx.com
1238
www.xilinx.com
1239
www.xilinx.com
1240
www.xilinx.com
1241
Description
Type ID Match 3
www.xilinx.com
1242
spec_addr_reg1_en
18
rw
0x0
arp_req_en
17
rw
0x0
magic_pkt_en
16
rw
0x0
arp_req_ip_addr
15:0
rw
0x0
www.xilinx.com
1243
www.xilinx.com
1244
gem0: 0xE000B0C4 gem1: 0xE000C0C4 32 bits mixed 0x00000000 Transmit PFC Pause Register
pri_en_vec_val
7:0
rw
0x0
www.xilinx.com
1245
www.xilinx.com
1246
www.xilinx.com
1247
www.xilinx.com
1248
Field Name
Bits 31:0
Type ro
Description Frames transmitted without error. A 32 bit register counting the number of frames successfully transmitted, i.e., no under run and not too many retries. Excludes pause frames.
www.xilinx.com
1249
www.xilinx.com
1250
gem0: 0xE000B118 gem1: 0xE000C118 32 bits ro 0x00000000 Frames Tx, 64-byte length
www.xilinx.com
1251
www.xilinx.com
1252
Field Name
Bits 31:0
Type ro
Description 256 to 511 byte frames transmitted without error. A 32 bit register counting the number of 256 to 511 byte frames successfully transmitted without error, i.e., no under run and not too many retries.
www.xilinx.com
1253
www.xilinx.com
1254
Relative Address Absolute Address Width Access Type Reset Value Description
0x00000138 gem0: 0xE000B138 gem1: 0xE000C138 32 bits ro 0x00000000 Single Collision Frames
www.xilinx.com
1255
www.xilinx.com
1256
www.xilinx.com
1257
For test purposes, it may be written by setting bit 7 (Write Enable) in the network control register. Setting bit 6 (increment statistics) in the network control register causes all the statistics registers to increment by one, again for test purposes. Once a statistics register has been read, it is automatically cleared.
Field Name reserved deferred_tx Bits 31:18 17:0 Type ro ro Reset Value 0x0 0x0 Description Reserved, read as 0, ignored on write. Deferred transmission frames - an 18 bit register counting the number of frames experiencing deferral due to carrier sense being active on their first attempt at transmission. Frames involved in any collision are not counted nor are frames that experienced a transmit under run.
www.xilinx.com
1258
Type ro ro
Description Reserved, read as 0, ignored on write. Carrier sense errors - a 10 bit register counting the number of frames transmitted where carrier sense was not seen during transmission or where carrier sense was deasserted after being asserted in a transmit frame without collision (no under run). Only incremented in half duplex mode. The only effect of a carrier sense error is to increment this register. The behavior of the other statistics registers is unaffected by the detection of a carrier sense error.
www.xilinx.com
1259
www.xilinx.com
1260
Description
Frames Received
www.xilinx.com
1261
www.xilinx.com
1262
Type ro ro
Description Reserved, read as 0, ignored on write. Received pause frames - a 16 bit register counting the number of pause frames received without error.
www.xilinx.com
1263
Description
www.xilinx.com
1264
gem0: 0xE000B174 gem1: 0xE000C174 32 bits ro 0x00000000 Frames Rx, 256 to 511-byte length
www.xilinx.com
1265
www.xilinx.com
1266
www.xilinx.com
1267
www.xilinx.com
1268
Software Name Relative Address Absolute Address Width Access Type Reset Value Description
XEMACPS_RXLENGTHCNT 0x00000194 gem0: 0xE000B194 gem1: 0xE000C194 32 bits ro 0x00000000 Length field frame errors
www.xilinx.com
1269
www.xilinx.com
1270
www.xilinx.com
1271
Software Name Relative Address Absolute Address Width Access Type Reset Value Description
XEMACPS_RXIPCCNT 0x000001A8 gem0: 0xE000B1A8 gem1: 0xE000C1A8 32 bits ro 0x00000000 IP header checksum errors
www.xilinx.com
1272
www.xilinx.com
1273
www.xilinx.com
1274
www.xilinx.com
1275
Bits 30 29:0
Type ro wo
Description Reserved, read as 0, ignored on write. The number of nanoseconds to increment or decrement the 1588 timer nanoseconds register. If necessary, the 1588 seconds register will be incremented or decremented.
ns_delta
7:0
rw
0x0
www.xilinx.com
1276
www.xilinx.com
1277
Relative Address Absolute Address Width Access Type Reset Value Description
0x000001E8 gem0: 0xE000B1E8 gem1: 0xE000C1E8 32 bits ro 0x00000000 PTP event frame received seconds
www.xilinx.com
1278
www.xilinx.com
1279
www.xilinx.com
1280
www.xilinx.com
1281
Bits 25:22
Type ro
Description Takes the value of the `gem_rx_pbuf_addr DEFINE. Max address bits for Rx packet buffer (10-bits for maximum 4 kB buffer). Buffer size for Rx packet buffer mode will be 4kB. This will allow one standard packet to be received while another is transferred to system memory by the DMA interface.
gem_tx_pkt_buffer
21
ro
Takes the value of the `gem_tx_pkt_buffer DEFINE. Defined for Zynq. Includes the transmitter packet buffer Takes the value of the `gem_rx_pkt_buffer DEFINE. Defined for Zynq. Includes the receiver packet buffer. Takes the value of the `gem_hprot_value DEFINE. For Zynq, set the fixed AHB HPROT value used during transfers. Takes the value of the `gem_jumbo_max_length DEFINE. Maximum length of jumbo frames accepted by receiver. This is set to the size of the smallest of the two packet buffer, minus a margin for packet headers. However, Zynq will not support jumbo frames.
gem_rx_pkt_buffer
20
ro
gem_hprot_value
19:16
ro
0x1
gem_jumbo_max_lengt h
15:0
ro
0x3FFF
www.xilinx.com
1282
gem_rx_buffer_length_ def
27:20
ro
0x2
www.xilinx.com
1283
Bits 19
Type ro
Description Takes the value of the `gem_tx_pbuf_size_def DEFINE. Full 4 kB Tx packet buffer size dedicated memory resource in Zynq. Takes the value of the `gem_rx_pbuf_size_def DEFINE. Full 4 kB Rx packet buffer size - dedicated memory resource in Zynq.
gem_rx_pbuf_size_def
18:17
ro
0x3
gem_endian_swap_def
16:15
ro
0x2
Takes the value of the `gem_endian_swap_def DEFINE. Set to big endian data, little endian management descriptors in Zynq. Takes the value of the `gem_mdc_clock_div DEFINE. Set default MDC clock divisor (can still be programmed) in Zynq. Takes the value of the `gem_dma_bus_width_def DEFINE. Limit to 32-bit AHB bus in Zynq. Takes the value of the `gem_phy_ident DEFINE. Undefined in Zynq. Only used in PCS. Takes the value of the `gem_tsu DEFINE. Defined in Zynq. Include support for 1588 Time Stamp Unit. Takes the value of the `gem_tx_fifo_cnt_width DEFINE. Width for `gem_tx_fifo_size Takes the value of the `gem_rx_fifo_cnt_width DEFINE. Width for `gem_rx_fifo_size.
gem_mdc_clock_div
14:12
ro
0x2
11:10 9 8
ro ro ro
0x0 x x
gem_tx_fifo_cnt_width gem_rx_fifo_cnt_width
7:4 3:0
ro ro
0x4 0x5
www.xilinx.com
1284
Register Summary
Register Name MASK_DATA_0_LSW MASK_DATA_0_MSW MASK_DATA_1_LSW MASK_DATA_1_MSW MASK_DATA_2_LSW MASK_DATA_2_MSW MASK_DATA_3_LSW MASK_DATA_3_MSW DATA_0 DATA_1 DATA_2 DATA_3 DATA_0_RO DATA_1_RO DATA_2_RO DATA_3_RO Address 0x00000000 0x00000004 0x00000008 0x0000000C 0x00000010 0x00000014 0x00000018 0x0000001C 0x00000040 0x00000044 0x00000048 0x0000004C 0x00000060 0x00000064 0x00000068 0x0000006C Width 32 32 32 22 32 32 32 32 32 22 32 32 32 22 32 32 Type mixed mixed mixed mixed mixed mixed mixed mixed rw rw rw rw ro ro ro ro Reset Value x x x x 0x00000000 0x00000000 0x00000000 0x00000000 x x 0x00000000 0x00000000 x x 0x00000000 0x00000000 Description Maskable Output Data (GPIO Bank0, MIO, Lower 16bits) Maskable Output Data (GPIO Bank0, MIO, Upper 16bits) Maskable Output Data (GPIO Bank1, MIO, Lower 16bits) Maskable Output Data (GPIO Bank1, MIO, Upper 6bits) Maskable Output Data (GPIO Bank2, EMIO, Lower 16bits) Maskable Output Data (GPIO Bank2, EMIO, Upper 16bits) Maskable Output Data (GPIO Bank3, EMIO, Lower 16bits) Maskable Output Data (GPIO Bank3, EMIO, Upper 16bits) Output Data (GPIO Bank0, MIO) Output Data (GPIO Bank1, MIO) Output Data (GPIO Bank2, EMIO) Output Data (GPIO Bank3, EMIO) Input Data (GPIO Bank0, MIO) Input Data (GPIO Bank1, MIO) Input Data (GPIO Bank2, EMIO) Input Data (GPIO Bank3, EMIO)
www.xilinx.com
1285
Register Name DIRM_0 OEN_0 INT_MASK_0 INT_EN_0 INT_DIS_0 INT_STAT_0 INT_TYPE_0 INT_POLARITY_0 INT_ANY_0 DIRM_1 OEN_1 INT_MASK_1 INT_EN_1 INT_DIS_1 INT_STAT_1 INT_TYPE_1 INT_POLARITY_1 INT_ANY_1 DIRM_2 OEN_2
Address 0x00000204 0x00000208 0x0000020C 0x00000210 0x00000214 0x00000218 0x0000021C 0x00000220 0x00000224 0x00000244 0x00000248 0x0000024C 0x00000250 0x00000254 0x00000258 0x0000025C 0x00000260 0x00000264 0x00000284 0x00000288
Width 32 32 32 32 32 32 32 32 32 22 22 22 22 22 22 22 22 22 32 32
Reset Value 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0xFFFFFFFF 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x003FFFFF 0x00000000 0x00000000 0x00000000 0x00000000
Description Direction mode (GPIO Bank0, MIO) Output enable (GPIO Bank0, MIO) Interrupt Mask Status (GPIO Bank0, MIO) Interrupt Enable/Unmask (GPIO Bank0, MIO) Interrupt Disable/Mask (GPIO Bank0, MIO) Interrupt Status (GPIO Bank0, MIO) Interrupt Type (GPIO Bank0, MIO) Interrupt Polarity (GPIO Bank0, MIO) Interrupt Any Edge Sensitive (GPIO Bank0, MIO) Direction mode (GPIO Bank1, MIO) Output enable (GPIO Bank1, MIO) Interrupt Mask Status (GPIO Bank1, MIO) Interrupt Enable/Unmask (GPIO Bank1, MIO) Interrupt Disable/Mask (GPIO Bank1, MIO) Interrupt Status (GPIO Bank1, MIO) Interrupt Type (GPIO Bank1, MIO) Interrupt Polarity (GPIO Bank1, MIO) Interrupt Any Edge Sensitive (GPIO Bank1, MIO) Direction mode (GPIO Bank2, EMIO) Output enable (GPIO Bank2, EMIO)
www.xilinx.com
1286
Register Name INT_MASK_2 INT_EN_2 INT_DIS_2 INT_STAT_2 INT_TYPE_2 INT_POLARITY_2 INT_ANY_2 DIRM_3 OEN_3 INT_MASK_3 INT_EN_3 INT_DIS_3 INT_STAT_3 INT_TYPE_3 INT_POLARITY_3 INT_ANY_3
Address 0x0000028C 0x00000290 0x00000294 0x00000298 0x0000029C 0x000002A0 0x000002A4 0x000002C4 0x000002C8 0x000002CC 0x000002D0 0x000002D4 0x000002D8 0x000002DC 0x000002E0 0x000002E4
Width 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32
Reset Value 0x00000000 0x00000000 0x00000000 0x00000000 0xFFFFFFFF 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0xFFFFFFFF 0x00000000 0x00000000
Description Interrupt Mask Status (GPIO Bank2, EMIO) Interrupt Enable/Unmask (GPIO Bank2, EMIO) Interrupt Disable/Mask (GPIO Bank2, EMIO) Interrupt Status (GPIO Bank2, EMIO) Interrupt Type (GPIO Bank2, EMIO) Interrupt Polarity (GPIO Bank2, EMIO) Interrupt Any Edge Sensitive (GPIO Bank2, EMIO) Direction mode (GPIO Bank3, EMIO) Output enable (GPIO Bank3, EMIO) Interrupt Mask Status (GPIO Bank3, EMIO) Interrupt Enable/Unmask (GPIO Bank3, EMIO) Interrupt Disable/Mask (GPIO Bank3, EMIO) Interrupt Status (GPIO Bank3, EMIO) Interrupt Type (GPIO Bank3, EMIO) Interrupt Polarity (GPIO Bank3, EMIO) Interrupt Any Edge Sensitive (GPIO Bank3, EMIO)
www.xilinx.com
1287
www.xilinx.com
1288
Type wo rw
www.xilinx.com
1289
Type wo rw rw
Description Operation is the same as MASK_DATA_0_LSW[MASK_0_LSW] Not used, read back as zero Operation is the same as MASK_DATA_0_LSW[DATA_0_LSW]
www.xilinx.com
1290
Type wo rw
www.xilinx.com
1291
Type wo rw
www.xilinx.com
1292
www.xilinx.com
1293
www.xilinx.com
1294
www.xilinx.com
1295
www.xilinx.com
1296
Bits 31:0
Type rw
Description
Each bit configures the corresponding pin within the 32-bit bank
www.xilinx.com
1297
Description
www.xilinx.com
1298
Software Name Relative Address Absolute Address Width Access Type Reset Value Description
INTSTS 0x00000218 0xE000A218 32 bits wtc 0x00000000 Interrupt Status (GPIO Bank0, MIO)
www.xilinx.com
1299
Bits 31:0
Type rw
Description
Each bit configures the corresponding pin within the 32-bit bank
www.xilinx.com
1300
Description
www.xilinx.com
1301
Description
www.xilinx.com
1302
Bits 21:0
Type wo
www.xilinx.com
1303
www.xilinx.com
1304
0xE000A264 22 bits rw 0x00000000 Interrupt Any Edge Sensitive (GPIO Bank1, MIO)
www.xilinx.com
1305
Description
www.xilinx.com
1306
Bits 31:0
Type wo
www.xilinx.com
1307
www.xilinx.com
1308
0xE000A2A4 32 bits rw 0x00000000 Interrupt Any Edge Sensitive (GPIO Bank2, EMIO)
www.xilinx.com
1309
Description
www.xilinx.com
1310
Bits 31:0
Type wo
www.xilinx.com
1311
www.xilinx.com
1312
0xE000A2E4 32 bits rw 0x00000000 Interrupt Any Edge Sensitive (GPIO Bank3, EMIO)
www.xilinx.com
1313
Register Summary
Register Name qos_cntl Address 0x0000010C Width 32 Type rw Reset Value 0x00000000 Description The QoS control register contains the enable bits for all the regulators. Maximum number of outstanding transactions Maximum number of combined outstanding transactions AW channel peak rate AW channel burstiness allowance AW channel average rate AR channel peak rate AR channel burstiness allowance AR channel average rate
32 32 32 32 32 32 32 32
rw rw rw rw rw rw rw rw
www.xilinx.com
1314
Description
The QoS control register contains the enable bits for all the regulators.
www.xilinx.com
1315
A value of 0 for both the integer and fractional parts disables the programmable regulation so that the NIC-301 base product configuration limits apply. A value of 0 for the fractional part programs disables the regulation of fractional outstanding transactions. The AW and AR outstanding transaction limits are enabled when you set the corresponding en_aw_ot or en_ar_ot control bits of the QoS control register.
A value of 0 for both the integer and fractional parts disables the programmable regulation so that the configuration limits apply. A value of 0 for the fractional part programs disables the regulation of fractional outstanding transactions. The regulation of the combined outstanding transaction limit also requires that you set the en_awar_ot control bit of the QoS control register.
www.xilinx.com
1316
www.xilinx.com
1317
www.xilinx.com
1318
Usage Example: Peak = 2 (or 1 in 128) Burstiness = 5 Average = 10 (or 1 in 409) This allows an issuing rate of 1 in 128 until the burstiness allowance of 5 outstanding transactions is reached. Then the average issuing rate of 1 in 409 takes effect until the number of outstanding transactions drops below 5.
www.xilinx.com
1319
Register Summary
Register Name security_gp0_axi security_gp1_axi Address 0x0000001C 0x00000020 Width 1 1 Type wo wo Reset Value 0x00000000 0x00000000 Description M_AXI_GP0 security setting M_AXI_GP1 security setting
www.xilinx.com
1320
www.xilinx.com
1321
Register Summary
Register Name Control_reg0 Status_reg0 I2C_address_reg0 I2C_data_reg0 Interrupt_status_reg0 Transfer_size_reg0 Address 0x00000000 0x00000004 0x00000008 0x0000000C 0x00000010 0x00000014 Width 16 16 16 16 16 8 8 8 16 16 16 Type mixed ro mixed mixed mixed rw mixed rw ro mixed mixed Reset Value 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x0000001F 0x000002FF 0x00000000 0x00000000 Description Control Register Status register IIC Address register IIC data register IIC interrupt status register Transfer Size Register Slave Monitor Pause Register Time out register Interrupt mask register Interrupt Enable Register Interrupt Disable Register
Slave_mon_pause_reg0 0x00000018 Time_out_reg0 Intrpt_mask_reg0 Intrpt_enable_reg0 Intrpt_disable_reg0 0x0000001C 0x00000020 0x00000024 0x00000028
www.xilinx.com
1322
www.xilinx.com
1323
Relative Address Absolute Address Width Access Type Reset Value Description
www.xilinx.com
1324
www.xilinx.com
1325
SLV_RDY (IXR_SLV_RDY)
www.xilinx.com
1326
www.xilinx.com
1327
www.xilinx.com
1328
www.xilinx.com
1329
www.xilinx.com
1330
www.xilinx.com
1331
Bits 1
Type wo
Description Master Write or Slave Transmitter Master Read or Slave Receiver 1 = disable this interrupt
wo
0x0
Transfer complete Will be set when transfer is complete 1 = disable this interrupt
www.xilinx.com
1332
Register Summary
Register Name reg0_cache_id Address 0x00000000 Width 32 Type mixed Reset Value 0x410000C8 Description cache ID register, Returns the 32-bit device ID code it reads off the CACHEID input bus. The value is specified by the system integrator. Reset value: 0x410000c8 reg0_cache_type 0x00000004 32 mixed 0x9E300300 cache type register, Returns the 32-bit cache type. Reset value: 0x1c100100 control register, reset value: 0x0 auxilary control register, reset value: 0x02020000+H273 Configures Tag RAM latencies configures data RAM latencies Permits the event counters to be enabled and reset. Enables event counter 1 to be driven by a specific event. Counter 1 increments when the event occurs. reg2_ev_counter0_cfg 0x00000208 32 mixed 0x00000000 Enables event counter 0 to be driven by a specific event. Counter 0 increments when the event occurs.
32 32 32 32 32 32
www.xilinx.com
1333
Address 0x0000020C
Width 32
Type rw
Description Enable the programmer to read off the counter value. The counter counts an event as specified by the Counter Configuration Registers. The counter can be preloaded if counting is disabled and reset by the Event Counter Control Register.
reg2_ev_counter0
0x00000210
32
rw
0x00000000
Enable the programmer to read off the counter value. The counter counts an event as specified by the Counter Configuration Registers. The counter can be preloaded if counting is disabled and reset by the Event Counter Control Register.
reg2_int_mask
0x00000214
32
mixed
0x00000000
This register enables or masks interrupts from being triggered on the external pins of the cache controller. Figure 3-8 on page 3-17 shows the register bit assignments. The bit assignments enables the masking of the interrupts on both their individual outputs and the combined L2CCINTR line. Clearing a bit by writing a 0, disables the interrupt triggering on that pin. All bits are cleared by a reset. You must write to the register bits with a 1 to enable the generation of interrupts. 1 = Enabled. 0 = Masked. This is the default.
www.xilinx.com
1334
Address 0x00000218
Width 32
Type mixed
Description This register is a read-only.It returns the masked interrupt status. This register can be accessed by secure and non-secure operations. The register gives an AND function of the raw interrupt status with the values of the interrupt mask register. All the bits are cleared by a reset. A write to this register is ignored. Bits read can be HIGH or LOW: HIGH If the bits read HIGH, they reflect the status of the input lines triggering an interrupt. LOW If the bits read LOW, either no interrupt has been generated, or the interrupt is masked.
reg2_int_raw_status
0x0000021C
32
mixed
0x00000000
The Raw Interrupt Status Register enables the interrupt status that excludes the masking logic. Bits read can be HIGH or LOW: HIGH If the bits read HIGH, they reflect the status of the input lines triggering an interrupt. LOW If the bits read LOW, no interrupt has been generated.
reg2_int_clear
0x00000220
32
mixed
0x00000000
Clears the Raw Interrupt Status Register bits. When a bit is written as 1, it clears the corresponding bit in the Raw Interrupt Status Register. When a bit is written as 0, it has no effect
reg7_cache_sync
0x00000730
32
mixed
0x00000000
Drain the STB. Operation complete when all buffers, LRB, LFB, STB, and EB, are empty Invalidate Line by PA: Specific L2 cache line is marked as not valid
reg7_inv_pa
0x00000770
32
mixed
0x00000000
www.xilinx.com
1335
Address 0x0000077C
Width 32
Type mixed
Description Invalidate by Way Invalidate all data in specified ways, including dirty data. An Invalidate by way while selecting all cache ways is equivalent to invalidating all cache entries. Completes as a background task with the way, or ways, locked, preventing allocation.
reg7_clean_pa
0x000007B0
32
mixed
0x00000000
Clean Line by PA Write the specific L2 cache line to L3 main memory if the line is marked as valid and dirty. The line is marked as not dirty. The valid bit is unchanged
reg7_clean_index
0x000007B8
32
mixed
0x00000000
Clean Line by Set/Way Write the specific L2 cache line within the specified way to L3 main memory if the line is marked as valid and dirty. The line is marked as not dirty. The valid bit is unchanged
reg7_clean_way
0x000007BC
32
mixed
0x00000000
Clean by Way Writes each line of the specified L2 cache ways to L3 main memory if the line is marked as valid and dirty. The lines are marked as not dirty. The valid bits are unchanged. Completes as a background task with the way, or ways, locked, preventing allocation.
reg7_clean_inv_pa
0x000007F0
32
mixed
0x00000000
Clean and Invalidate Line by PA Write the specific L2 cache line to L3 main memory if the line is marked as valid and dirty. The line is marked as not valid Clean and Invalidate Line by Set/Way Write the specific L2 cache line within the specified way to L3 main memory if the line is marked as valid and dirty. The line is marked as not valid
reg7_clean_inv_index
0x000007F8
32
mixed
0x00000000
www.xilinx.com
1336
Address 0x000007FC
Width 32
Type mixed
Description Clean and Invalidate by Way Writes each line of the specified L2 cache ways to L3 main memory if the line is marked as valid and dirty. The lines are marked as not valid. Completes as a background task with the way, or ways, locked, preventing allocation.
reg9_d_lockdown0
0x00000900
32
mixed
0x00000000
These registers can prevent new addresses from being allocated and can also prevent data from being evicted out of the L2 cache. Such behavior can distinguish instructions from data transactions. To control the cache lockdown by way and the cache lockdown by master mechanisms see the tables from Table 3-20 to Table 3-35 on page 3-31. For these tables each bit has the following meaning: 0 allocation can occur in the corresponding way. 1 there is no allocation in the corresponding way.
reg9_i_lockdown0 reg9_d_lockdown1 reg9_i_lockdown1 reg9_d_lockdown2 reg9_i_lockdown2 reg9_d_lockdown3 reg9_i_lockdown3 reg9_d_lockdown4 reg9_i_lockdown4 reg9_d_lockdown5 reg9_i_lockdown5 reg9_d_lockdown6 reg9_i_lockdown6 reg9_d_lockdown7
0x00000904 0x00000908 0x0000090C 0x00000910 0x00000914 0x00000918 0x0000091C 0x00000920 0x00000924 0x00000928 0x0000092C 0x00000930 0x00000934 0x00000938
32 32 32 32 32 32 32 32 32 32 32 32 32 32
mixed mixed mixed mixed mixed mixed mixed mixed mixed mixed mixed mixed mixed mixed
0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
instruction lock down 0 data lock down 1 instruction lock down 1 data lock down 2 instruction lock down 2 data lock down 3 instruction lock down 3 data lock down 4 instruction lock down 4 data lock down 5 instruction lock down 5 data lock down 6 instruction lock down 6 data lock down 7
www.xilinx.com
1337
Width 32 32 32
Description instruction lock down 7 Lockdown by Line Enable Register. Cache lockdown by way To control the cache lockdown by way and the cache lockdown by master mechanisms see the tables from Table 3-20 to Table 3-35 on page 3-31. For these tables each bit has the following meaning: 0 allocation can occur in the corresponding way. 1 there is no allocation in the corresponding way.
reg12_addr_filtering_st art
0x00000C00
32
mixed
0x40000001
When two masters are implemented, you can redirect a whole address range to master 1 (M1). When address_filtering_enable is set, all accesses with address >= address_filtering_start and <address_filtering_end are automatically directed to M1. All other accesses are directed to M0. This feature is programmed using two registers.
reg12_addr_filtering_e nd
0x00000C04
32
mixed
0xFFF00000
When two masters are implemented, you can redirect a whole address range to master 1 (M1). When address_filtering_enable is set, all accesses with address >= address_filtering_start and <address_filtering_end are automatically directed to M1. All other accesses are directed to M0. This feature is programmed using two registers.
www.xilinx.com
1338
Address 0x00000F40
Width 32
Type mixed
Description The Debug Control Register forces specific cache behavior required for debug. This register has read-only, non-secure, or read and write, secure, permission. Any secure access and non-secure access can read this register. Only a secure access can write to this register. If a non-secure access tries to write to this register the register issues a DECERR response and does not update.
reg15_prefetch_ctrl
0x00000F60
32
mixed
0x00000000
Purpose Enables prefetch-related features that can improve system performance. Usage constraints This register has both read-only, non-secure, and read and write, secure, permissions. Any secure or non-secure access can read this register. Only a secure access can write to this register. If a non-secure access attempts to write to this register, the register
reg15_power_ctrl
0x00000F80
32
mixed
0x00000000
Purpose Controls the operating mode clock and power modes. Usage constraints There are no usage constraints.
www.xilinx.com
1339
Description
cache ID register, Returns the 32-bit device ID code it reads off the CACHEID input bus. The value is specified by the system integrator. Reset value: 0x410000c8
www.xilinx.com
1340
Field Name L2_assoc_D reserved l2cache_line_len_D Isize_11 Isize_mid Isize_7 L2_assoc_I reserved l2cache_line_len_I
Reset Value 0x0 0x0 0x0 0x0 0x3 0x0 0x0 0x0 0x0
Description Read from Auxiliary Control Register bit 16 reserved L2 cache line length - 00-32 bytes fixed to 0 L2 cache way size Read from Auxiliary Control Register[19:17] fixed to 0 Read from Auxiliary Control Register bit 16 reserved L2 cache line length - 00-32 bytes
www.xilinx.com
1341
www.xilinx.com
1342
Bits 24:23
Type rw
Description Force write allocate b00 = Use AWCACHE attributes for WA. This is the default. b01 = Force no allocate, set WA bit always 0. b10 = Override AWCACHE attributes, set WA bit always 1, all cacheable write misses become write allocated. b11 = Internally mapped to 00. See Cache operation on page 2-11 for more information.
shared_attr_override_e n
22
rw
0x0
Shared attribute override enable 0 = Treats shared accesses as specified in Shareable attribute on page 2-15. This is the default. 1 = Shared attribute internally ignored.
parity_en
21
rw
0x0
event_mon_bus_en
20
rw
0x0
way_size
19:17
rw
0x2
Way-size b000 = Reserved, internally mapped to 16KB. b001 = 16KB. b010 = 32KB. b011 = 64KB. b100 = 128KB. b101 = 256KB. b110 = 512KB. b111 = Reserved, internally mapped to 512 KB.
associativity
16
rw
0x1
reserved shared_attr_inva_en
15:14 13
waz,r az rw
0x0 0x0
reserved, reserved Shared Attribute Invalidate Enable 0 = Shared invalidate behavior disabled. This is the default. 1 = Shared invalidate behavior enabled, if Shared Attribute Override Enable bit not set. See Shareable attribute on page 2-15.
www.xilinx.com
1343
Bits 12
Type rw
store_buff_dev_lim_en
11
rw
0x0
Store buffer device limitation Enable 0 = Store buffer device limitation disabled. Device writes can take all slots in store buffer. This is the default. 1= Store buffer device limitation enabled. Device writes cannot take all slots in store buffer when connected to the Cortex-A9 MPCore processor. There is always one available slot to service Normal Memory
high_pr_so_dev_rd_en
10
rw
0x0
High Priority for SO and Dev Reads Enable 0 = Strongly Ordered and Device reads have lower priority than cacheable accesses when arbitrated in the L2CC (L2C-310) master ports. This is the default. 1 = Strongly Ordered and Device reads get the highest priority when arbitrated in the L2CC (L2C-310) master ports.
reserved full_line_zero_enable
9:1 0
waz,r az rw
0x0 0x0
reserved, reserved Full Line of Zero Enable 0 = Full line of write zero behavior disabled. This is the default. 1 = Full line of write zero behavior Enabled.
www.xilinx.com
1344
www.xilinx.com
1345
www.xilinx.com
1346
Bits 3 2:0
Type waz,r az rw
Description
RAM setup latency Default value depends on the value of pl310_DATA_SETUP_LAT b000 = 1 cycle of latency, there is no additional latency. b001 = 2 cycles of latency. b010 = 3 cycles of latency. b011 = 4 cycles of latency. b100 = 5 cycles of latency. b101 = 6 cycles of latency. b110 = 7 cycles of latency. b111 = 8 cycles of latency.
www.xilinx.com
1347
Relative Address Absolute Address Width Access Type Reset Value Description
0x00000204 0xF8F02204 32 bits mixed 0x00000000 Enables event counter 1 to be driven by a specific event. Counter 1 increments when the event occurs.
www.xilinx.com
1348
32 bits mixed 0x00000000 Enables event counter 0 to be driven by a specific event. Counter 0 increments when the event occurs.
www.xilinx.com
1349
Description
Enable the programmer to read off the counter value. The counter counts an event as specified by the Counter Configuration Registers. The counter can be preloaded if counting is disabled and reset by the Event Counter Control Register.
www.xilinx.com
1350
Description
This register enables or masks interrupts from being triggered on the external pins of the cache controller. Figure 3-8 on page 3-17 shows the register bit assignments. The bit assignments enables the masking of the interrupts on both their individual outputs and the combined L2CCINTR line. Clearing a bit by writing a 0, disables the interrupt triggering on that pin. All bits are cleared by a reset. You must write to the register bits with a 1 to enable the generation of interrupts. 1 = Enabled. 0 = Masked. This is the default.
www.xilinx.com
1351
Description
This register is a read-only.It returns the masked interrupt status. This register can be accessed by secure and non-secure operations. The register gives an AND function of the raw interrupt status with the values of the interrupt mask register. All the bits are cleared by a reset. A write to this register is ignored. Bits read can be HIGH or LOW: HIGH If the bits read HIGH, they reflect the status of the input lines triggering an interrupt. LOW If the bits read LOW, either no interrupt has been generated, or the interrupt is masked.
www.xilinx.com
1352
www.xilinx.com
1353
Bits 1 0
Description PARRT: Parity Error on L2 tag RAM, Read ECNTR: Event Counter1/0 Overflow Increment
www.xilinx.com
1354
Bits 4:1 0
Type waz rw
Description
When written must be 0. When read, indicates that a background operation is in progress
www.xilinx.com
1355
www.xilinx.com
1356
mixed 0x00000000 Clean by Way Writes each line of the specified L2 cache ways to L3 main memory if the line is marked as valid and dirty. The lines are marked as not dirty. The valid bits are unchanged. Completes as a background task with the way, or ways, locked, preventing allocation.
www.xilinx.com
1357
Relative Address Absolute Address Width Access Type Reset Value Description
0x000007F8 0xF8F027F8 32 bits mixed 0x00000000 Clean and Invalidate Line by Set/Way Write the specific L2 cache line within the specified way to L3 main memory if the line is marked as valid and dirty. The line is marked as not valid
www.xilinx.com
1358
www.xilinx.com
1359
www.xilinx.com
1360
www.xilinx.com
1361
www.xilinx.com
1362
www.xilinx.com
1363
www.xilinx.com
1364
www.xilinx.com
1365
www.xilinx.com
1366
www.xilinx.com
1367
0xFFF00000 When two masters are implemented, you can redirect a whole address range to master 1 (M1). When address_filtering_enable is set, all accesses with address >= address_filtering_start and <address_filtering_end are automatically directed to M1. All other accesses are directed to M0. This feature is programmed using two registers.
www.xilinx.com
1368
Bits 1
Type rw
Description DWB: Disable write-back, force WT 0 = Enable write-back behavior. This is the default. 1 = Force write-through behavior DCL: Disable cache linefill 0 = Enable cache linefills. This is the default. 1 = Disable cache linefills.
DCL
rw
0x0
www.xilinx.com
1369
Bits 28
Type rw
Description Data prefetch enable: You can set the following options for this register bit: 0 Data prefetching disabled. This is the default. 1 Data prefetching enabled.
double_linefill_on_wra pread_en
27
rw
0x0
Double linefill on WRAP read disable: You can set the following options for this register bit: 0 Double linefill on WRAP read enabled. This is the default. 1 Double linefill on WRAP read disabled
reserved pref_drop_en
26:25 24
waz,r az rw
0x0 0x0
reserved Prefetch drop enable: You can set the following options for this register bit: 0 The L2CC does not discard prefetch reads issued to L3. This is the default. 1 The L2CC discards prefetch reads issued to L3 when there is a resource conflict with explicit reads.
incr_double_linefill_en
23
rw
0x0
Incr double Linefill enable: You can set the following options for this register bit: 0 The L2CC does not issue INCR 8x64-bit read bursts to L3 on reads that miss in the L2 cache. This is the default. 1 The L2CC can issue INCR 8x64-bit read bursts to L3 on reads that miss in the L2 cache.
reserved
22
waz,r az rw
0x0 0x0
reserved Not same ID on exclusive sequence enable: You can set the following options for this register bit: 0 Read and write portions of a non-cacheable exclusive sequence have the same AXI ID when issued to L3. This is the default. 1 Read and write portions of a non-cacheable exclusive sequence do not have the same AXI ID when issued to L3.
not_same_id_on_excl_s 21 eq_en
reserved prefetch_offset
20:5 4:0
waz,r az rw
0x0 0x0
www.xilinx.com
1370
www.xilinx.com
1371
Register Summary
Register Name Address Width 32 32 32 32 Type rw ro rw rw Reset Value 0x00000002 0x00000501 0x00000000 0x00000000 Description SCU Control Register SCU Configuration Register SCU CPU Power Status Register SCU Invalidate All Registers in Secure State 0x00000040 0x00000044 0x00000050 32 32 32 32 rw rw rw ro 0x00100000 0x00000000 0x0000000F 0x00000000 Filtering Start Address Register Defined by FILTEREND input SCU Access Control (SAC) Register SCU Non-secure Access Control Register SNSAC ICCICR ICCPMR ICCBPR ICCIAR ICCEOIR ICCRPR ICCHPIR ICCABPR 0x00000100 0x00000104 0x00000108 0x0000010C 0x00000110 0x00000114 0x00000118 0x0000011C 32 32 32 32 32 32 32 32 rw rw rw rw rw rw rw rw 0x00000000 0x00000000 0x00000002 0x000003FF 0x00000000 0x000000FF 0x000003FF 0x00000003 CPU Interface Control Register Interrupt Priority Mask Register Binary Point Register Interrupt Acknowledge Register End Of Interrupt Register Running Priority Register Highest Pending Interrupt Register Aliased Non-secure Binary Point Register
SCU_CONTROL_REGI 0x00000000 STER SCU_CONFIGURATIO N_REGISTER SCU_CPU_Power_Stat us_Register SCU_Invalidate_All_R egisters_in_Secure_Stat e Filtering_Start_Addres s_Register Filtering_End_Address _Register SCU_Access_Control_ Register_SAC 0x00000004 0x00000008 0x0000000C
www.xilinx.com
1372
Width 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32
Type ro rw rw rw rw rw rw rw rw rw rw rw rw rw rw rw rw rw rw ro ro
Reset Value 0x3901243B 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000C22 0x0102043B
Description CPU Interface Implementer Identification Register Global Timer Counter Register 0 Global Timer Counter Register 1 Global Timer Control Register Global Timer Interrupt Status Register Comparator Value Register_0 Comparator Value Register_1 Auto-increment Register Private Timer Load Register Private Timer Counter Register Private Timer Control Register Private Timer Interrupt Status Register Watchdog Load Register Watchdog Counter Register Watchdog Control Register Watchdog Interrupt Status Register Watchdog Reset Status Register Watchdog Disable Register Distributor Control Register Interrupt Controller Type Register Distributor Implementer Identification Register
Global_Timer_Control_ 0x00000208 Register Global_Timer_Interrup t_Status_Register Comparator_Value_Re gister0 Comparator_Value_Re gister1 Auto_increment_Regis ter Private_Timer_Load_R egister 0x0000020C 0x00000210 0x00000214 0x00000218 0x00000600
Private_Timer_Counter 0x00000604 _Register Private_Timer_Control _Register Private_Timer_Interru pt_Status_Register Watchdog_Load_Regis ter Watchdog_Counter_Re gister Watchdog_Control_Re gister Watchdog_Interrupt_St atus_Register Watchdog_Reset_Statu s_Register Watchdog_Disable_Re gister ICDDCR ICDICTR ICDIIDR 0x00000608 0x0000060C 0x00000620 0x00000624 0x00000628 0x0000062C 0x00000630 0x00000634 0x00001000 0x00001004 0x00001008
www.xilinx.com
1373
Register Name ICDISR0 ICDISR1 ICDISR2 ICDISER0 ICDISER1 ICDISER2 ICDICER0 ICDICER1 ICDICER2 ICDISPR0 ICDISPR1 ICDISPR2 ICDICPR0 ICDICPR1 ICDICPR2 ICDABR0 ICDABR1 ICDABR2 ICDIPR0 ICDIPR1 ICDIPR2 ICDIPR3 ICDIPR4 ICDIPR5 ICDIPR6 ICDIPR7 ICDIPR8 ICDIPR9
Address 0x00001080 0x00001084 0x00001088 0x00001100 0x00001104 0x00001108 0x00001180 0x00001184 0x00001188 0x00001200 0x00001204 0x00001208 0x00001280 0x00001284 0x00001288 0x00001300 0x00001304 0x00001308 0x00001400 0x00001404 0x00001408 0x0000140C 0x00001410 0x00001414 0x00001418 0x0000141C 0x00001420 0x00001424
Width 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32
Type rw rw rw rw rw rw rw rw rw rw rw rw rw rw rw rw rw rw rw rw rw rw rw rw rw rw rw rw
Reset Value 0x00000000 0x00000000 0x00000000 0x0000FFFF 0x00000000 0x00000000 0x0000FFFF 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
Description Interrupt Security Register_0 Interrupt Security Register_1 Interrupt Security Register_2 Interrupt Set-enable Register 0 Interrupt Set-enable Register 1 Interrupt Set-enable Register 2 Interrupt Clear-Enable Register 0 Interrupt Clear-Enable Register 1 Interrupt Clear-Enable Register 2 Interrupt Set-pending Register_0 Interrupt Set-pending Register_1 Interrupt Set-pending Register_2 Interrupt Clear-Pending Register_0 Interrupt Clear-Pending Register_1 Interrupt Clear-Pending Register_2 Active Bit register_0 Active Bit register_1 Active Bit register_2 Interrupt Priority Register_0 Interrupt Priority Register_1 Interrupt Priority Register_2 Interrupt Priority Register_3 Interrupt Priority Register_4 Interrupt Priority Register_5 Interrupt Priority Register_6 Interrupt Priority Register_7 Interrupt Priority Register_8 Interrupt Priority Register_9
www.xilinx.com
1374
Register Name ICDIPR10 ICDIPR11 ICDIPR12 ICDIPR13 ICDIPR14 ICDIPR15 ICDIPR16 ICDIPR17 ICDIPR18 ICDIPR19 ICDIPR20 ICDIPR21 ICDIPR22 ICDIPR23 ICDIPTR0 ICDIPTR1 ICDIPTR2 ICDIPTR3 ICDIPTR4 ICDIPTR5 ICDIPTR6 ICDIPTR7 ICDIPTR8 ICDIPTR9 ICDIPTR10 ICDIPTR11
Address 0x00001428 0x0000142C 0x00001430 0x00001434 0x00001438 0x0000143C 0x00001440 0x00001444 0x00001448 0x0000144C 0x00001450 0x00001454 0x00001458 0x0000145C 0x00001800 0x00001804 0x00001808 0x0000180C 0x00001810 0x00001814 0x00001818 0x0000181C 0x00001820 0x00001824 0x00001828 0x0000182C
Width 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32
Type rw rw rw rw rw rw rw rw rw rw rw rw rw rw rw rw rw rw rw rw rw rw rw rw rw rw
Reset Value 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x01010101 0x01010101 0x01010101 0x01010101 0x01010101 0x01010101 0x01010101 0x01010101 0x01010101 0x01010101 0x01010101 0x01010101
Description Interrupt Priority Register_10 Interrupt Priority Register_11 Interrupt Priority Register_12 Interrupt Priority Register_13 Interrupt Priority Register_14 Interrupt Priority Register_15 Interrupt Priority Register_16 Interrupt Priority Register_17 Interrupt Priority Register_18 Interrupt Priority Register_19 Interrupt Priority Register_20 Interrupt Priority Register_21 Interrupt Priority Register_22 Interrupt Priority Register_23 Interrupt Processor Targets Register_0 Interrupt Processor Targets Register_1 Interrupt Processor Targets Register_2 Interrupt Processor Targets Register_3 Interrupt Processor Targets Register_4 Interrupt Processor Targets Register_5 Interrupt Processor Targets Register_6 Interrupt Processor Targets Register_7 Interrupt Processor Targets Register_8 Interrupt Processor Targets Register_9 Interrupt Processor Targets Register_10 Interrupt Processor Targets Register_11
www.xilinx.com
1375
Register Name ICDIPTR12 ICDIPTR13 ICDIPTR14 ICDIPTR15 ICDIPTR16 ICDIPTR17 ICDIPTR18 ICDIPTR19 ICDIPTR20 ICDIPTR21 ICDIPTR22 ICDIPTR23 ICDICFR0 ICDICFR1 ICDICFR2 ICDICFR3 ICDICFR4 ICDICFR5 ppi_status spi_status_0 spi_status_1 ICDSGIR
Address 0x00001830 0x00001834 0x00001838 0x0000183C 0x00001840 0x00001844 0x00001848 0x0000184C 0x00001850 0x00001854 0x00001858 0x0000185C 0x00001C00 0x00001C04 0x00001C08 0x00001C0C 0x00001C10 0x00001C14 0x00001D00 0x00001D04 0x00001D08 0x00001F00
Width 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32
Type rw rw rw rw rw rw rw rw rw rw rw rw rw rw rw rw rw rw ro ro ro rw
Reset Value 0x01010101 0x01010101 0x01010101 0x01010101 0x01010101 0x01010101 0x01010101 0x01010101 0x01010101 0x01010101 0x01010101 0x01010101 0xAAAAAAA A 0x7DC00000 0x55555555 0x55555555 0x55555555 0x55555555 0x00000000 0x00000000 0x00000000 0x00000000
Description Interrupt Processor Targets Register_12 Interrupt Processor Targets Register_13 Interrupt Processor Targets Register_14 Interrupt Processor Targets Register_15 Interrupt Processor Targets Register_16 Interrupt Processor Targets Register_17 Interrupt Processor Targets Register_18 Interrupt Processor Targets Register_19 Interrupt Processor Targets Register_20 Interrupt Processor Targets Register_21 Interrupt Processor Targets Register_22 Interrupt Processor Targets Register_23 Interrupt Configuration Register 0 Interrupt Configuration Register 1 Interrupt Configuration Register 2 Interrupt Configuration Register 3 Interrupt Configuration Register 4 Interrupt Configuration Register 5 PPI Status Register SPI Status Register 0 SPI Status Register 1 Software Generated Interrupt Register
www.xilinx.com
1376
Register Name ICPIDR4 ICPIDR5 ICPIDR6 ICPIDR7 ICPIDR0 ICPIDR1 ICPIDR2 ICPIDR3 ICCIDR0 ICCIDR1 ICCIDR2 ICCIDR3
Address 0x00001FD0 0x00001FD4 0x00001FD8 0x00001FDC 0x00001FE0 0x00001FE4 0x00001FE8 0x00001FEC 0x00001FF0 0x00001FF4 0x00001FF8 0x00001FFC
Width 32 32 32 32 32 32 32 32 32 32 32 32
Type rw rw rw rw rw rw rw rw rw rw rw rw
Reset Value 0x00000004 0x00000000 0x00000000 0x00000000 0x00000090 0x000000B3 0x0000001B 0x00000000 0x0000000D 0x000000F0 0x00000005 0x000000B1
Description Peripheral ID4 Peripheral ID5 Peripheral ID6 Peripheral ID7 Peripheral ID0 Peripheral ID1 Peripheral ID2 Peripheral ID3 Component ID0 Component ID1 Component ID2 Component ID3
www.xilinx.com
1377
Bits 5
Type rw
Description When set, SCU CLK is turned off when all processors are in WFI mode, there is no pending request on the ACP (if implemented), and there is no remaining activity in the SCU. When SCU CLK is off, ARREADYS, AWREADYS and WREADYS on the ACP are forced LOW. The clock is turned on when any processor leaves WFI mode, or if there is a new request on the ACP.
Force_all_Device_to_p ort0_enable
rw
0x0
When set, all requests from the ACP or processors with AxCACHE = NonCacheable Bufferable are forced to be issued on the AXI Master port M0.
SCU_Speculative_linefi lls_enable
rw
0x0
When set, coherent linefill requests are sent speculatively to the L2C-310 in parallel with the tag look-up. If the tag look-up misses, the confirmed linefill is sent to the L2C-310 and gets RDATA earlier because the data request was already initiated by the speculative request. This feature works only if the L2C-310 is present in the design.
SCU_RAMs_Parity_en able
rw
0x0
1 = Parity on. 0 = Parity off. This is the default setting. This bit is always zero if support for parity is not implemented.
Address_filtering_enab le
rw
0x1
1 = Addressing filtering on. 0 = Addressing filtering off. The default value is the value of FILTEREN sampled when nSCURESET is deasserted. This bit is always zero if the SCU is implemented in the single master port configuration.
SCU_enable
rw
0x0
www.xilinx.com
1378
Relative Address Absolute Address Width Access Type Reset Value Description
www.xilinx.com
1379
www.xilinx.com
1380
Description
www.xilinx.com
1381
www.xilinx.com
1382
Bits 2
Type rw
Description 0 = CPU2 cannot access the components. 1 = CPU2 can access the components. This is the default.
CPU1
rw
0x1
0 = CPU1 cannot access the components. 1 = CPU1 can access the components. This is the default.
CPU0
rw
0x1
0 = CPU0 cannot access the components. 1 = CPU0 can access the components. This is the default.
www.xilinx.com
1383
Bits 5 4
Type ro ro
Description
Non-secure access to the private timer and watchdog for CPU<n>. * <n> is 3 for bit[7] * <n> is 2 for bit[6]] * <n> is 1 for bit[5] * <n> is 0 for bit[4]. 0 = Secure accesses only. Non-secure reads return 0. This is the default value. 1 = Secure accesses and Non-secure accesses.
3 2 1 0
ro ro ro ro
same as above same as above same as above Non-secure access to the components for CPU<n>. * <n> is 3 for bit[3] * <n> is 2 for bit[2]] * <n> is 1 for bit[1] * <n> is 0 for bit[0]. 0 = CPU cannot write the components 1 = CPU can access the components.
www.xilinx.com
1384
www.xilinx.com
1385
www.xilinx.com
1386
EOIINTID (INTID)
9:0
rw
0x0
www.xilinx.com
1387
www.xilinx.com
1388
www.xilinx.com
1389
Note: This register is the first in an array of 2 identical registers listed in the table below. The details provided in this section apply to the entire array.
Name Global_Timer_Counter _Register0 Global_Timer_Counter _Register1 Address 0xf8f00200 0xf8f00204
www.xilinx.com
1390
www.xilinx.com
1391
Bits 1
Type rw
Description This bit is banked per Cortex-A9 processor. If set, it allows the comparison between the 64-bit Timer Counter and the related 64-bit Comparator Register.
Timer_Enable
rw
0x0
Timer enable 1'b0 = Timer is disabled and the counter does not increment. All registers can still be read and written 1'b1 = Timer is enabled and the counter increments normally
www.xilinx.com
1392
Note: This register is the first in an array of 2 identical registers listed in the table below. The details provided in this section apply to the entire array.
Name Comparator_Value_Re gister0 Comparator_Value_Re gister1 Address 0xf8f00210 0xf8f00214
www.xilinx.com
1393
www.xilinx.com
1394
www.xilinx.com
1395
Relative Address Absolute Address Width Access Type Reset Value Description
www.xilinx.com
1396
www.xilinx.com
1397
Software Name Relative Address Absolute Address Width Access Type Reset Value Description
www.xilinx.com
1398
www.xilinx.com
1399
www.xilinx.com
1400
www.xilinx.com
1401
www.xilinx.com
1402
www.xilinx.com
1403
Bits 1
Type rw
Description 0 = disables all Non-secure interrupts control bits in the distributor from changing state because of any external stimulus change that occurs on the corresponding SPI or PPI signals 1 = enables the distributor to update register locations for Non-secure interrupts FOR: ICDDCR_for_Non_secure_mode 31,1 --> Reserved. Writes are ignored, read data is always zero.
Enable_secure (GIC_EN_INT)
rw
0x0
0 = disables all Secure interrupt control bits in the distributor from changing state because of any external stimulus change that occurs on the corresponding SPI or PPI signals. 1 = enables the distributor to update register locations for Secure interrupts. FOR: ICDDCR_for_Non_secure_mode 0 --> Enable_Non_secure --> 0 = disables all Non-secure interrupts control bits in the distributor from changing state because of any external stimulus change that occurs on the corresponding SPI or PPI signals 1 = enables the distributor to update register locations for Non-secure interrupts
www.xilinx.com
1404
www.xilinx.com
1405
Note: This register is the first in an array of 3 identical registers listed in the table below. The details provided in this section apply to the entire array.
Name ICDISR0 ICDISR1 ICDISR2 Address 0xf8f01080 0xf8f01084 0xf8f01088
www.xilinx.com
1406
www.xilinx.com
1407
www.xilinx.com
1408
www.xilinx.com
1409
Note: This register is the first in an array of 3 identical registers listed in the table below. The details provided in this section apply to the entire array.
Name ICDISPR0 ICDISPR1 ICDISPR2 Address 0xf8f01200 0xf8f01204 0xf8f01208
www.xilinx.com
1410
Note: This register is the first in an array of 3 identical registers listed in the table below. The details provided in this section apply to the entire array.
Name ICDICPR0 ICDICPR1 ICDICPR2 Address 0xf8f01280 0xf8f01284 0xf8f01288
www.xilinx.com
1411
Note: This register is the first in an array of 3 identical registers listed in the table below. The details provided in this section apply to the entire array.
Name ICDABR0 ICDABR1 ICDABR2 Address 0xf8f01300 0xf8f01304 0xf8f01308
www.xilinx.com
1412
Note: This register is the first in an array of 24 identical registers listed in the table below. The details provided in this section apply to the entire array.
Name ICDIPR0 ICDIPR1 ICDIPR2 ICDIPR3 ICDIPR4 ICDIPR5 ICDIPR6 ICDIPR7 ICDIPR8 ICDIPR9 ICDIPR10 ICDIPR11 ICDIPR12 ICDIPR13 ICDIPR14 ICDIPR15 ICDIPR16 ICDIPR17 ICDIPR18 ICDIPR19 ICDIPR20 ICDIPR21 ICDIPR22 ICDIPR23 Address 0xf8f01400 0xf8f01404 0xf8f01408 0xf8f0140c 0xf8f01410 0xf8f01414 0xf8f01418 0xf8f0141c 0xf8f01420 0xf8f01424 0xf8f01428 0xf8f0142c 0xf8f01430 0xf8f01434 0xf8f01438 0xf8f0143c 0xf8f01440 0xf8f01444 0xf8f01448 0xf8f0144c 0xf8f01450 0xf8f01454 0xf8f01458 0xf8f0145c
www.xilinx.com
1413
Note: This register is the first in an array of 24 identical registers listed in the table below. The details provided in this section apply to the entire array.
Name ICDIPTR0 ICDIPTR1 ICDIPTR2 ICDIPTR3 ICDIPTR4 ICDIPTR5 ICDIPTR6 ICDIPTR7 ICDIPTR8 ICDIPTR9 ICDIPTR10 ICDIPTR11 ICDIPTR12 ICDIPTR13 ICDIPTR14 ICDIPTR15 ICDIPTR16 ICDIPTR17 ICDIPTR18 ICDIPTR19 ICDIPTR20 ICDIPTR21 Address 0xf8f01800 0xf8f01804 0xf8f01808 0xf8f0180c 0xf8f01810 0xf8f01814 0xf8f01818 0xf8f0181c 0xf8f01820 0xf8f01824 0xf8f01828 0xf8f0182c 0xf8f01830 0xf8f01834 0xf8f01838 0xf8f0183c 0xf8f01840 0xf8f01844 0xf8f01848 0xf8f0184c 0xf8f01850 0xf8f01854
www.xilinx.com
1414
www.xilinx.com
1415
www.xilinx.com
1416
Description
www.xilinx.com
1417
Relative Address Absolute Address Width Access Type Reset Value Description
www.xilinx.com
1418
www.xilinx.com
1419
www.xilinx.com
1420
www.xilinx.com
1421
www.xilinx.com
1422
Relative Address Absolute Address Width Access Type Reset Value Description
www.xilinx.com
1423
www.xilinx.com
1424
www.xilinx.com
1425
www.xilinx.com
1426
Register Summary
Register Name OCM_PARITY_CTRL OCM_PARITY_ERRA DDRESS Address 0x00000000 0x00000004 Width 32 32 Type mixed mixed Reset Value 0x00000000 0x00000000 Description Control fields for RAM parity operation Stores the first parity error access address. This register is sticky and will retain its value unless explicitly cleared (written with 1's) with an APB write access. The physical RAM address is logged. Status of OCM Interrupt Control fields for OCM
OCM_IRQ_STS OCM_CONTROL
0x00000008 0x0000000C
32 32
mixed mixed
0x00000000 0x00000000
www.xilinx.com
1427
www.xilinx.com
1428
mixed 0x00000000 Stores the first parity error access address. This register is sticky and will retain its value unless explicitly cleared (written with 1's) with an APB write access. The physical RAM address is logged.
www.xilinx.com
1429
Bits 1
Type wtc
Description Status of OCM multiple parity error. This is a sticky bit. Once set it can only be cleared by explicitly writing a 1 to this field. This field drives the interrupt pin. (Associated irq enable bit must be set) 0: Multiple OCM parity Errors have not occurred 1: Multiple OCM parity Errors have occurred
SingleParityErr
wtc
0x0
Status of OCM single parity error. This is a sticky bit. Once set it can only be cleared by explicitly writing a 1 to this field. This field drives the interrupt pin (Associated irq enable bit must be set) 0: Single OCM parity Error has not occurred 1: Single OCM parity Error has occurred
www.xilinx.com
1430
Register Summary
Register Name Config_reg Intr_status_REG Intrpt_en_REG Intrpt_dis_REG Intrpt_mask_REG En_REG Delay_REG TXD0 Address 0x00000000 0x00000004 0x00000008 0x0000000C 0x00000010 0x00000014 0x00000018 0x0000001C Width 32 32 32 32 32 32 32 32 Type mixed mixed mixed mixed ro mixed rw wo Reset Value x 0x00000004 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 Description SPI configuration register SPI interrupt status register Interrupt Enable register. Interrupt disable register. Interrupt mask register SPI_Enable Register Delay Register Transmit Data Register. Keyhole addresses for the Transmit data FIFO. See also TXD1-3. Receive Data Register Slave Idle Count Register TX_FIFO Threshold Register RX FIFO Threshold Register General Purpose Inputs and Outputs Register for the Quad-SPI Controller core Loopback Master Clock Delay Adjustment Register Transmit Data Register. Keyhole addresses for the Transmit data FIFO. Transmit Data Register. Keyhole addresses for the Transmit data FIFO.
32 32 32 32 32
ro mixed rw rw rw
LPBK_DLY_ADJ TXD1
0x00000038 0x00000080
32 32
rw wo
0x00000033 0x00000000
TXD2
0x00000084
32
wo
0x00000000
www.xilinx.com
1431
Address 0x00000088
Width 32
Type wo
Description Transmit Data Register. Keyhole addresses for the Transmit data FIFO. Configuration Register specifically for the Linear Quad-SPI Controller Status Register specifically for the Linear Quad-SPI Controller Module Identification register
LQSPI_CFG
0x000000A0
32
rw
LQSPI_STS MOD_ID
0x000000A4 0x000000FC
9 32
rw rw
0x00000000 0x01090101
www.xilinx.com
1432
Bits 26
Type rw
Description 0 for little endian format when writing to the transmit data register 0x1C or reading from the receive data register 0x20. 1 for big endian format when writing to the transmit data register 0x1C or reading from the receive data register 0x20.
reserved Holdb_dr
25:20 19
ro rw
0x0 0x0
Reserved, read as zero, ignored on write. If set, Holdb and WPn pins are actively driven by the qspi controller in 1-bit and 2-bit modes . If not set, then external pull up is required on HOLDb and WPn pins . Note that this bit doesn't affect the quad(4-bit) mode as Controller always drives these pins in quad mode. It is highly recommended to set this bit always(irrespective of mode of operation) while using QSPI
reserved reserved Man_start_com (MANSTRT) Man_start_en (MANSTRTEN) Manual_CS (SSFORCE) reserved PCS reserved REF_CLK FIFO_WIDTH
18 17 16
rw rw wo
0x0 x 0x0
Reserved Reserved, do not modify Manual Start Command 1: start transmission of data 0: don't care
15
rw
0x0
14
rw
0x0
13:11 10 9 8 7:6
rw rw rw rw rw
Reserved Peripheral chip select line, directly drive n_ss_out if Manual_C is set Reserved Reserved. Must be 0 FIFO width Must be set to 2'b11 (32bits). All other settings are not supported.
www.xilinx.com
1433
Bits 5:3
Type rw
Description Master mode baud rate divisor 000: divide by 2. This is the only baud rate setting that can be used if the loopback clock is enabled (USE_LPBK). This setting also works in non-loopback mode. 001: divide by 4 010: divide by 8 011: divide by 16 100: divide by 32 101: divide by 64 110: divide by 128 111: divide by 256
CLK_PH (CPHA)
rw
0x0
Clock phase 1: the SPI clock is inactive outside the word 0: the SPI clock is active outside the word Note : For {CLK_PH, CLK_POL}, only 2'b11 and 2'b00 are supported.
CLK_POL (CPOL)
rw
0x0
Clock polarity outside SPI word 1: The SPI clock is quiescent high 0: The SPI clock is quiescent low Note : For {CLK_PH, CLK_POL}, only 2'b11 and 2'b00 are supported.
MODE_SEL (MSTREN)
rw
0x0
Mode select 1: The SPI is in master mode 0: RESERVED In QSPI boot mode, ROM code will set this bit. In other boot modes, this bit must be set before using QSPI.
www.xilinx.com
1434
www.xilinx.com
1435
www.xilinx.com
1436
www.xilinx.com
1437
www.xilinx.com
1438
23:16
rw
0x0
15:8
rw
0x0
7:0
rw
0x0
www.xilinx.com
1439
www.xilinx.com
1440
Threshold_of_TX_FIFO 31:0
www.xilinx.com
1441
www.xilinx.com
1442
www.xilinx.com
1443
0xE000D084 32 bits wo 0x00000000 Transmit Data Register. Keyhole addresses for the Transmit data FIFO.
www.xilinx.com
1444
0xE000D0A0 32 bits rw x Configuration Register specifically for the Linear Quad-SPI Controller
www.xilinx.com
1445
Bits 24
Type rw
Description This bit is only relevant if bit 25 is set, else it is ignored. If this bit is set, instruction code is only sent for the very first read transfer. If this bit is clear, instruction code will be sent for all read transfers. This bit is configured in association with the MODE_BITS. For Winbond devices, this bit MUST BE SET if the MODE_BITS are 8'bxx10xxxx, else this bit MUST BE CLEAR.
MODE_BITS
23:16
rw
0xA0
These bits are only relevant if bit 25 is set, else it is ignored. If bit 25 is set, this value is required for both dual I/O read and quad I/O read. See vendor's datasheet for more information. For Winbond's device, the continuous read mode value is 8'bxx10xxxx to skip the instruction code for the next read transfer, else instruction code is sent for all read transfers. Bit 24 has to be configured accordingly with this value.
rw rw rw
x 0x2 0xEB
Reserved, value is undefined when read. Number of dummy bytes between address and return read data Read instruction code. The known read instruction codes are: 8'h03 - Read 8'h0B - Fast read 8'h3B - Fast read dual output 8'h6B - Fast read quad output 8'hBB - Fast read dual I/O 8'hEB - Fast read quad I/O
www.xilinx.com
1446
www.xilinx.com
1447
Register Summary
Register Name SDMA_system_addres s_register Block_Size_Block_Cou nt Argument Transfer_Mode_Comm and Response0 Response1 Response2 Response3 Buffer_Data_Port Present_State Host_control_Power_c ontrol_Block_Gap_Con trol_Wakeup_control Address 0x00000000 0x00000004 0x00000008 0x0000000C 0x00000010 0x00000014 0x00000018 0x0000001C 0x00000020 0x00000024 0x00000028 Width 32 32 32 32 32 32 32 32 32 25 32 Type rw mixed rw mixed ro ro ro ro rw ro mixed Reset Value 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x01F20000 0x00000000 Description System DMA Address Register Block size register Block count register Argument register Transfer mode register Command register Response register Response register Response register Response register Buffer data port register Present State register Host control register Power control register Block gap control register Wake-up control register Clock_Control_Timeou t_control_Software_res et 0x0000002C 27 mixed 0x00000000 Clock Control register Timeout control register Software reset register 30 mixed 0x00000000 Normal interrupt status register Error interrupt status register 30 mixed 0x00000000 Normal interrupt status enable register Error interrupt status enable register
www.xilinx.com
1448
Register Name Normal_interrupt_sign al_enable_Error_interr upt_signal_enable Auto_CMD12_error_st atus Capabilities Maximum_current_cap abilities Force_event_for_Auto Cmd12_Error_Status_F orce_event_register_for _error_interrupt_status ADMA_error_status ADMA_system_addres s Boot_Timeout_control Debug_Selection SPI_interrupt_support Slot_interrupt_status_ Host_controller_versio n
Address 0x00000038
Width 30
Type mixed
Description Normal interrupt signal enable register Error interrupt signal enable register
8 31 24 32
ro ro ro mixed
Auto CMD12 error status register Capabilities register Maximum current capabilities register Force event register for Auto CMD12 error status register Force event register for error interrupt status
3 32 32 1 8 32
mixed rw rw wo rw ro
ADMA error status register ADMA system address register Boot Timeout control register Debug Selection Register SPI interrupt support register Slot interrupt status register and Host controller version register
www.xilinx.com
1449
Buffer Size in the Block Size register. The Host Controller generates DMA Interrupt to request to update this register. The HD sets the next system address of the next data position to this register. When most upper byte of this register (003h) is written, the HC restart the DMA transfer. When restarting DMA by the resume command or by setting Continue Request in the Block Gap Control register, the HC shall start at the next contiguous address stored here in the System Address register
Field Name SDMA_System_Addre ss Bits 31:0 Type rw Reset Value 0x0 Description Watchdog enable - if set, the watchdog is enabled and can generate any signals that are enabled.
www.xilinx.com
1450
www.xilinx.com
1451
Bits 14:12
Type rw
Description To perform long DMA transfer, the System Address register shall be updated at every system boundary during a DMA transfer. These bits specify the size of contiguous buffer in the system memory. The DMA transfer shall wait at every boundary specified by these fields and the HC generates the DMA Interrupt to request the HD to update the System Address register. These bits shall support when the DMA Support in the Capabilities register is set to 1 and this function is active when the DMA Enable in the Transfer Mode register is set to 1. 000b - 4KB(Detects A11 Carry out) 001b - 8KB(Detects A12 Carry out) 010b - 16KB(Detects A13 Carry out) 011b - 32KB(Detects A14 Carry out) 100b - 64KB(Detects A15 Carry out) 101b -128KB(Detects A16 Carry out) 110b - 256KB(Detects A17 Carry out) 111b - 512KB(Detects A18 Carry out)
Transfer_Block_Size
11:0
rw
0x0
This register specifies the block size for block data transfers for CMD17, CMD18, CMD24, CMD25, and CMD53. It can be accessed only if no transaction is executing (i.e. after a transaction has stopped). Read operations during transfer return an invalid value and write operations shall be ignored. 0000h - No Data Transfer 0001h - 1 Byte 0002h - 2 Bytes 0003h - 3 Bytes 0004h - 4 Bytes --- --01FFh - 511 Bytes 0200h - 512 Bytes --- --0800h - 2048 Bytes
www.xilinx.com
1452
www.xilinx.com
1453
Bits 23:22
Type rw
Description There are three types of special commands. Suspend, Resume and Abort. These bits shall bet set to 00b for all other commands. Suspend Command If the Suspend command succeeds, the HC shall assume the SD Bus has been released and that it is possible to issue the next command which uses the DAT line. The HC shall de-assert Read Wait for read transactions and stop checking busy for write transactions. The Interrupt cycle shall start, in 4-bit mode. If the Suspend command fails, the HC shall maintain its current state. and the HD shall restart the transfer by setting Continue Request in the Block Gap Control Register. Resume Command The HD re-starts the data transfer by restoring the registers in the range of 000-00Dh. The HC shall check for busy before starting write transfers. Abort Command If this command is set when executing a read transfer, the HC shall stop reads to the buffer. If this command is set when executing a write transfer, the HC shall stop driving the DAT line. After issuing the Abort command, the HD should issue a software reset 00b - Normal 01b - Suspend 10b - Resume 11b - Abort
Data_Present_Select
21
rw
0x0
This bit is set to 1 to indicate that data is present and shall be transferred using the DAT line. If is set to 0 for the following: 1. Commands using only CMD line (ex. CMD52) 2. Commands with no data transfer but using busy signal on DAT[0] line (R1b or R5b ex. CMD38) 3. Resume Command 0 - No Data Present 1 - Data Present
Command_Index_Che ck_Enable
20
rw
0x0
If this bit is set to 1, the HC shall check the index field in the response to see if it has the same value as the command index. If it is not, it is reported as a Command Index Error. If this bit is set to 0, the Index field is not checked. 0 - Disable 1 - Enable
www.xilinx.com
1454
Bits 19
Type rw
Description If this bit is set to 1, the HC shall check the CRC field in the response. If an error is detected, it is reported as a Command CRC Error. If this bit is set to 0, the CRC field is not checked. 0 - Disable 1 - Enable
reserved Response_Type_Select
18 17:16
ro rw
0x0 0x0
Reserved Response Type Select 00 - No Response 01 - Response length 136 10 - Response length 48 11 - Response length 48 check Busy after response
reserved
15:6
ro rw
0x0 0x0
Reserved This bit enables multiple block DAT line data transfers. 0 - Single Block 1 - Multiple Block
Multi_Single_Block_Sel 5 ect
Data_Transfer_Directio n_Select
rw
0x0
This bit defines the direction of DAT line data transfers. 0 - Write (Host to Card) 1 - Read (Card to Host)
reserved Auto_CMD12_Enable
3 2
ro rw
0x0 0x0
Reserved Multiple block transfers for memory require CMD12 to stop the transaction. When this bit is set to 1, the HC shall issue CMD12 automatically when last block transfer is completed. The HD shall not set this bit to issue commands that do not require CMD12 to stop data transfer. 0 - Disable 1 - Enable
Block_Count_Enable
rw
0x0
This bit is used to enable the Block count register, which is only relevant for multiple block transfers. When this bit is 0, the Block Count register is disabled, which is useful in executing an infinite transfer. 0 - Disable 1 - Enable
DMA_Enable
rw
0x0
DMA can be enabled only if DMA Support bit in the Capabilities register is set. If this bit is set to 1, a DMA operation shall begin when the HD writes to the upper byte of Command register (00Fh). 0 - Disable 1 - Enable
www.xilinx.com
1455
Note: This register is the first in an array of 4 identical registers listed in the table below. The details provided in this section apply to the entire array.
Name Response0 Response1 Response2 Response3 Address 0xe0100010 0xe0100014 0xe0100018 0xe010001c
www.xilinx.com
1456
www.xilinx.com
1457
Bits 16
Type ro
Description This bit indicates whether a card has been inserted. Changing from 0 to 1 generates a Card Insertion interrupt in the Normal Interrupt Status register and changing from 1 to 0 generates a Card Removal Interrupt in the Normal Interrupt Status register. The Software Reset For All in the Software Reset register shall not affect this bit. If a Card is removed while its power is on and its clock is oscillating, the HC shall clear SD Bus Power in the Power Control register and SD Clock Enable in the Clock control register. In addition the HD should clear the HC by the Software Reset For All in Software register. The card detect is active regardless of the SD Bus Power. 0 - Reset or Debouncing or No Card 1 - Card Inserted
reserved Buffer_Read_Enable
15:12 11
ro ro
0x0 0x0
Reserved This status is used for non-DMA read transfers. This read only flag indicates that valid data exists in the host side buffer status. If this bit is 1, readable data exists in the buffer. A change of this bit from 1 to 0 occurs when all the block data is read from the buffer. A change of this bit from 0 to 1 occurs when all the block data is ready in the buffer and generates the Buffer Read Ready Interrupt. 0 - Read Disable 1 - Read Enable.
Buffer_Write_Enable
10
ro
0x0
This status is used for non-DMA write transfers. This read only flag indicates if space is available for write data. If this bit is 1, data can be written to the buffer. A change of this bit from 1 to 0 occurs when all the block data is written to the buffer. A change of this bit from 0 to 1 occurs when top of block data can be written to the buffer and generates the Buffer Write Ready Interrupt. 0 - Write Disable 1 - Write Enable.
www.xilinx.com
1458
Bits 9
Type ro
Description This status is used for detecting completion of a read transfer. This bit is set to 1 for either of the following conditions: 1. After the end bit of the read command 2. When writing a 1 to continue Request in the Block Gap Control register to restart a read transfer This bit is cleared to 0 for either of the following conditions: 1. When the last data block as specified by block length is transferred to the system. 2. When all valid data blocks have been transferred to the system and no current block transfers are being sent as a result of the Stop At Block Gap Request set to 1. A transfer complete interrupt is generated when this bit changes to 0. 1 - Transferring data 0 - No valid data
Write_Transfer_Active
ro
0x0
This status indicates a write transfer is active. If this bit is 0, it means no valid write data exists in the HC. This bit is set in either of the following cases: 1. After the end bit of the write command. 2. When writing a 1 to Continue Request in the Block Gap Control register to restart a write transfer. This bit is cleared in either of the following cases: 1. After getting the CRC status of the last data block as specified by the transfer count (Single or Multiple) 2. After getting a CRC status of any block where data transmission is about to be stopped by a Stop At Block Gap Request. During a write transaction, a Block Gap Event interrupt is generated when this bit is changed to 0, as a result of the Stop At Block Gap Request being set. This status is useful for the HD in determining when to issue commands during write busy. 1 - transferring data 0 - No valid data
reserved DAT_Line_Active
7:3 2
ro ro
0x0 0x0
Reserved This bit indicates whether one of the DAT line on SD bus is in use. 1 - DAT line active 0 - DAT line inactive
www.xilinx.com
1459
Bits 1
Type ro
Description This status bit is generated if either the DAT Line Active or the Read transfer Active is set to 1. If this bit is 0, it indicates the HC can issue the next SD command. Commands with busy signal belong to Command Inhibit (DAT) (ex. R1b, R5b type). Changing from 1 to 0 generates a Transfer Complete interrupt in the Normal interrupt status register. Note: The SD Host Driver can save registers in the range of 000-00Dh for a suspend transaction after this bit has changed from 1 to 0. 1 - cannot issue command which uses the DAT line 0 - Can issue command which uses the DAT line
Command_Inhibit_CM D
ro
0x0
If this bit is 0, it indicates the CMD line is not in use and the HC can issue a SD command using the CMD line. This bit is set immediately after the Command register (00Fh) is written. This bit is cleared when the command response is received. Even if the Command Inhibit (DAT) is set to 1, Commands using only the CMD line can be issued if this bit is 0. Changing from 1 to 0 generates a Command complete interrupt in the Normal Interrupt Status register. If the HC cannot issue the command because of a command conflict error or because of Command Not Issued By Auto CMD12 Error, this bit shall remain 1 and the Command Complete is not set. Status issuing Auto CMD12 is not read from this bit. Note: The SD host controller requires couple of clocks to update this register bit after the command is posted to command register.
www.xilinx.com
1460
Description
Host control register Power control register Block gap control register Wake-up control register
www.xilinx.com
1461
Bits 18
Type rw
Description The read wait function is optional for SDIO cards. If the card supports read wait, set this bit to enable use of the read wait protocol to stop read data using DAT[2] line. Otherwise the HC has to stop the SD clock to hold read data, which restricts commands generation. When the HD detects an SD card insertion, it shall set this bit according to the CCCR of the SDIO card. If the card does not support read wait, this bit shall never be set to 1 otherwise DAT line conflict may occur. If this bit is set to 0, Suspend / Resume cannot be supported 1 - Enable Read Wait Control 0 - Disable Read Wait Control
Continue_Request
17
rw
0x0
This bit is used to restart a transaction which was stopped using the Stop At Block Gap Request. To cancel stop at the block gap, set Stop At block Gap Request to 0 and set this bit to restart the transfer. The HC automatically clears this bit in either of the following cases: 1) In the case of a read transaction, the DAT Line Active changes from 0 to 1 as a read transaction restarts. 2) In the case of a write transaction, the Write transfer active changes from 0 to 1 as the write transaction restarts. Therefore it is not necessary for Host driver to set this bit to 0. If Stop At Block Gap Request is set to 1, any write to this bit is ignored. 1 - Restart 0 - Ignored
www.xilinx.com
1462
Bits 16
Type rw
Description This bit is used to stop executing a transaction at the next block gap for non- DMA,SDMA and ADMA transfers. Until the transfer complete is set to 1, indicating a transfer completion the HD shall leave this bit set to 1. Clearing both the Stop At Block Gap Request and Continue Request shall not cause the transaction to restart. Read Wait is used to stop the read transaction at the block gap. The HC shall honor Stop At Block Gap Request for write transfers, but for read transfers it requires that the SD card support Read Wait. Therefore the HD shall not set this bit during read transfers unless the SD card supports Read Wait and has set Read Wait Control to 1. In case of write transfers in which the HD writes data to the Buffer Data Port register, the HD shall set this bit after all block data is written. If this bit is set to 1, the HD shall not write data to Buffer data port register. This bit affects Read Transfer Active, Write Transfer Active, DAT line active and Command Inhibit (DAT) in the Present State register. 1 - Stop 0 - Transfer
reserved SD_Bus_Voltage_Select
15:12 11:9
ro rw
0x0 0x0
Reserved By setting these bits, the HD selects the voltage level for the SD card. Before setting this register, the HD shall check the voltage support bits in the capabilities register. If an unsupported voltage is selected, the Host System shall not supply SD bus voltage 111b - 3.3 Flattop.) 110b - 3.0 V(Typ.) 101b - 1.8 V(Typ.) 100b - 000b - Reserved
SD_Bus_Power
rw
0x0
Before setting this bit, the SD host driver shall set SD Bus Voltage Select. If the HC detects the No Card State, this bit shall be cleared. 1 - Power on 0 - Power off
Card_detect_signal_det 7 etction
rw
0x0
This bit selects source for card detection. 1- The card detect test level is selected 0 -SDCD# is selected (for normal use)
www.xilinx.com
1463
Field Name
Bits
Type rw
Description This bit is enabled while the Card Detect Signal Selection is set to 1 and it indicates card inserted or not. Generates (card ins or card removal) interrupt when the normal int sts enable bit is set. 1 - Card Inserted 0 - No Card
Card_Detect_Test_Leve 6 l
reserved DMA_Select
5 4:3
ro rw
0x0 0x0
Reserved One of supported DMA modes can be selected. The host driver shall check support of DMA modes by referring the Capabilities register. 00 - SDMA is selected 01 - 32-bit Address ADMA1 is selected 10 -32-bit Address ADMA2 is selected 11 - 64-bit Address ADMA2 is selected
High_Speed_Enable
rw
0x0
This bit is optional. Before setting this bit, the HD shall check the High Speed Support in the capabilities register. If this bit is set to 0 (default), the HC outputs CMD line and DAT lines at the falling edge of the SD clock (up to 25 MHz/20 MHz for MMC). If this bit is set to 1, the HC outputs CMD line and DAT lines at the rising edge of the SD clock (up to 50 MHz for SD/52 MHz for MMC) 1 - High Speed Mode 0 - Normal Speed Mode
Data_Transfer_Width_ SD1_or_SD4
rw
0x0
This bit selects the data width of the HC. The HD shall select it to match the data width of the SD card. 1 - 4 bit mode 0 - 1 bit mode
LED_Control
rw
0x0
This bit is used to caution the user not to remove the card while the SD card is being accessed. If the software is going to issue multiple SD commands, this bit can be set during all transactions. It is not necessary to change for each transaction. 1 - LED on 0 - LED off
www.xilinx.com
1464
sd0: 0xE010002C sd1: 0xE010102C 27 bits mixed 0x00000000 Clock Control register Timeout control register Software reset register
www.xilinx.com
1465
Field Name
Bits
Type rw
Description This reset affects the entire HC except for the card detection circuit. Register bits of type ROC, RW, RW1C, RWAC are cleared to 0. During its initialization, the HD shall set this bit to 1 to reset the HC. The HC shall reset this bit to 0 when capabilities registers are valid and the HD can read them. Additional use of Software Reset For All may not affect the value of the Capabilities registers. If this bit is set to 1, the SD card shall reset itself and must be re initialized by the HD. 1 - Reset 0 - Work
Software_Reset_for_All 24
reserved
23:20
ro rw
0x0 0x0
Reserved This value determines the interval by which DAT line time-outs are detected. Refer to the Data Timeout Error in the Error Interrupt Status register for information on factors that dictate Timeout generation. Timeout clock frequency will be generated by dividing the sdclockTMCLK by this value. When setting this register, prevent inadvertent Timeout events by clearing the Data Time-out Error Status Enable (in the Error Interrupt Status Enable register) 1111 - Reserved 1110 - TMCLK * 2^27 ----------------------------------------------------------0001 - TMCLK * 2^14 0000 - TMCLK * 2^13
www.xilinx.com
1466
Bits 15:8
Type rw
Description This register is used to select the frequency of the SDCLK pin. The frequency is not programmed directly; rather this register holds the divisor of the Base Clock Frequency For SD clock in the capabilities register. Only the following settings are allowed. 80h - base clock divided by 256 40h - base clock divided by 128 20h - base clock divided by 64 10h - base clock divided by 32 08h - base clock divided by 16 04h - base clock divided by 8 02h - base clock divided by 4 01h - base clock divided by 2 00h - base clock(10MHz-63MHz) Setting 00h specifies the highest frequency of the SD Clock. When setting multiple bits, the most significant bit is used as the divisor. But multiple bits should not be set. The two default divider values can be calculated by the frequency that is defined by the Base Clock Frequency For SD Clock in the Capabilities register. 1) 25 MHz divider value 2) 400 KHz divider value The frequency of the SDCLK is set by the following formula: Clock Frequency = (Baseclock) / divisor. Thus choose the smallest possible divisor which results in a clock frequency that is less than or equal to the target frequency. Maximum Frequency for SD = 50Mhz (base clock) Maximum Frequency for MMC = 52Mhz (base clock) Minimum Frequency = 195.3125Khz (50Mhz / 256), same calc for MMC also
reserved SD_Clock_Enable
7:3 2
ro rw
0x0 0x0
Reserved The HC shall stop SDCLK when writing this bit to 0. SDCLK frequency Select can be changed when this bit is 0. Then, the HC shall maintain the same clock frequency until SDCLK is stopped (Stop at SDCLK = 0). If the HC detects the No Card state, this bit shall be cleared. 1 - Enable 0 - Disable
www.xilinx.com
1467
Bits 1
Type ro
Description This bit is set to 1 when SD clock is stable after writing to Internal Clock Enable in this register to 1. The SD Host Driver shall wait to set SD Clock Enable until this bit is set to 1. Note: This is useful when using PLL for a clock oscillator that requires setup time. 1 - Ready 0 - Not Ready
Internal_Clock_Enable
rw
0x0
This bit is set to 0 when the HD is not using the HC or the HC awaits a wakeup event. The HC should stop its internal clock to go very low power state. Still, registers shall be able to be read and written. Clock starts to oscillate when this bit is set to 1. When clock oscillation is stable, the HC shall set Internal Clock Stable in this register to 1. This bit shall not affect card detection. 1 - Oscillate 0 - Stop
www.xilinx.com
1468
Bits 27:26 25
Type ro wtc
Description
This bit is set when the Host Controller detects errors during ADMA based data transfer. The state of the ADMA at an error occurrence is saved in the ADMA Error Status Register. 1- Error 0 -No error
Auto_CMD12_Error
24
wtc
0x0
Occurs when detecting that one of the bits in Auto CMD12 Error Status register has changed from 0 to 1. This bit is set to 1 also when Auto CMD12 is not executed due to the previous command error. 0 - No Error 1 - Error
Current_Limit_Error
23
wtc
0x0
By setting the SD Bus Power bit in the Power Control Register, the HC is requested to supply power for the SD Bus. If the HC supports the Current Limit Function, it can be protected from an Illegal card by stopping power supply to the card in which case this bit indicates a failure status. Reading 1 means the HC is not supplying power to SD card due to some failure. Reading 0 means that the HC is supplying power and no error has occurred. This bit shall always set to be 0, if the HC does not support this function. 0 - No Error 1 - Power Fail
Data_End_Bit_Error
22
wtc
0x0
Occurs when detecting 0 at the end bit position of read data which uses the DAT line or the end bit position of the CRC status. 0 - No Error 1 - Error
Data_CRC_Error
21
wtc
0x0
Occurs when detecting CRC error when transferring read data which uses the DAT line or when detecting the Write CRC Status having a value of other than '010'. 0 - No Error 1 - Error
Data_Timeout_Error
20
wtc
0x0
Occurs when detecting one of following timeout conditions. 1. Busy Timeout for R1b, R5b type. 2. Busy Timeout after Write CRC status 3. Write CRC status Timeout 4. Read Data Timeout 0 - No Error 1 - Timeout
www.xilinx.com
1469
Bits 19
Type wtc
Description Occurs if a Command Index error occurs in the Command Response. 0 - No Error 1 - Error
Command_End_Bit_Er ror
18
wtc
0x0
Occurs when detecting that the end bit of a command response is 0. 0 - No Error 1 - End Bit Error Generated
Command_CRC_Error
17
wtc
0x0
Command CRC Error is generated in two cases. 1. If a response is returned and the Command Timeout Error is set to 0, this bit is set to 1 when detecting a CRT error in the command response 2. The HC detects a CMD line conflict by monitoring the CMD line when a command is issued. If the HC drives the CMD line to 1 level, but detects 0 level on the CMD line at the next SDCLK edge, then the HC shall abort the command (Stop driving CMD line) and set this bit to 1. The Command Timeout Error shall also be set to 1 to distinguish CMD line conflict. 0 - No Error 1 - CRC Error Generated
Command_Timeout_Er 16 ror
wtc
0x0
Occurs only if the no response is returned within 64 SDCLK cycles from the end bit of the command. If the HC detects a CMD line conflict, in which case Command CRC Error shall also be set. This bit shall be set without waiting for 64 SDCLK cycles because the command will be aborted by the HC. 0 - No Error 1 - Timeout
Error_Interrupt
15
ro
0x0
If any of the bits in the Error Interrupt Status Register are set, then this bit is set. Therefore the HD can test for an error by checking this bit first. 0 - No Error. 1 - Error.
reserved
14:11
ro wtc
0x0 0x0
Reserved This status is set if the boot operation get terminated 0 - Boot operation is not terminated. 1 - Boot operation is terminated
Boot_terminate_Interru 10 pt
Boot_ack_rcv
wtc
0x0
This status is set if the boot acknowledge is received from device. 0 - Boot ack is not received. 1 - Boot ack is received.
www.xilinx.com
1470
Bits 8
Type ro
Description Writing this bit to 1 does not clear this bit. It is cleared by resetting the SD card interrupt factor. In 1-bit mode, the HC shall detect the Card Interrupt without SD Clock to support wakeup. In 4-bit mode, the card interrupt signal is sampled during the interrupt cycle, so there are some sample delays between the interrupt signal from the card and the interrupt to the Host system. when this status has been set and the HD needs to start this interrupt service, Card Interrupt Status Enable in the Normal Interrupt Status register shall be set to 0 in order to clear the card interrupt statuses latched in the HC and stop driving the Host System. After completion of the card interrupt service (the reset factor in the SD card and the interrupt signal may not be asserted), set Card Interrupt Status Enable to 1 and start sampling the interrupt signal again. 0 - No Card Interrupt 1 - Generate Card Interrupt
Card_Removal
wtc
0x0
This status is set if the Card Inserted in the Present State register changes from 1 to 0. When the HD writes this bit to 1 to clear this status the status of the Card Inserted in the Present State register should be confirmed. Because the card detect may possibly be changed when the HD clear this bit an Interrupt event may not be generated. 0 - Card State Stable or Debouncing 1 - Card Removed
Card_Insertion
wtc
0x0
This status is set if the Card Inserted in the Present State register changes from 0 to 1. When the HD writes this bit to 1 to clear this status the status of the Card Inserted in the Present State register should be confirmed. Because the card detect may possibly be changed when the HD clear this bit an Interrupt event may not be generated. 0 - Card State Stable or Debouncing 1 - Card Inserted
Buffer_Read_Ready
wtc
0x0
This status is set if the Buffer Read Enable changes from 0 to 1. 0 - Not Ready to read Buffer. 1 - Ready to read Buffer.
www.xilinx.com
1471
Bits 4
Type wtc
Description This status is set if the Buffer Write Enable changes from 0 to 1. 0 - Not Ready to Write Buffer. 1 - Ready to Write Buffer.
DMA_Interrupt
wtc
0x0
This status is set if the HC detects the Host DMA Buffer Boundary in the Block Size register. 0 - No DMA Interrupt 1 - DMA Interrupt is Generated
Block_Gap_Event
wtc
0x0
If the Stop At Block Gap Request in the Block Gap Control Register is set, this bit is set. Read Transaction: This bit is set at the falling edge of the DAT Line Active Status (When the transaction is stopped at SD Bus timing. The Read Wait must be supported in order to use this function). Write Transaction: This bit is set at the falling edge of Write Transfer Active Status (After getting CRC status at SD Bus timing). 0 - No Block Gap Event 1 - Transaction stopped at Block Gap
www.xilinx.com
1472
Bits 1
Type wtc
Description This bit is set when a read / write transaction is completed. Read Transaction: This bit is set at the falling edge of Read Transfer Active Status. There are two cases in which the Interrupt is generated. The first is when a data transfer is completed as specified by data length (After the last data has been read to the Host System). The second is when data has stopped at the block gap and completed the data transfer by setting the Stop At Block Gap Request in the Block Gap Control Register (After valid data has been read to the Host System). Write Transaction: This bit is set at the falling edge of the DAT Line Active Status. There are two cases in which the Interrupt is generated. The first is when the last data is written to the card as specified by data length and Busy signal is released. The second is when data transfers are stopped at the block gap by setting Stop At Block Gap Request in the Block Gap Control Register and data transfers completed. (After valid data is written to the SD card and the busy signal is released). Note: Transfer Complete has higher priority than Data Timeout Error. If both bits are set to 1, the data transfer can be considered complete 0 - No Data Transfer Complete 1 - Data Transfer Complete
Command_Complete
wtc
0x0
This bit is set when get the end bit of the command response (Except Auto CMD12). Note: Command Timeout Error has higher priority than Command Complete. If both are set to 1, it can be considered that the response was not received correctly. 0 - No Command Complete 1 - Command Complete
www.xilinx.com
1473
sd0: 0xE0100034 sd1: 0xE0101034 30 bits mixed 0x00000000 Normal interrupt status enable register Error interrupt status enable register
ADMA_Error_Status_E 25 nable Auto_CMD12_Error_St atus_Enable Current_Limit_Error_S tatus_Enable Data_End_Bit_Error_St atus_Enable Data_CRC_Error_Statu s_Enable Data_Timeout_Error_S tatus_Enable Command_Index_Erro r_Status_Enable Command_End_Bit_Er ror_Status_Enable Command_CRC_Error _Status_Enable 24
www.xilinx.com
1474
Field Name
Bits
Type rw rw rw
Description
If this bit is set to 0, the HC shall clear Interrupt request to the System. The Card Interrupt detection is stopped when this bit is cleared and restarted when this bit is set to 1. The HD should clear the Card Interrupt Status Enable before servicing the Card Interrupt and should set this bit again after all Interrupt requests from the card are cleared to prevent inadvertent Interrupts. 0 - Masked 1 - Enabled
Card_Removal_Status_ Enable Card_Insertion_Status_ Enable Buffer_Read_Ready_St atus_Enable Buffer_Write_Ready_St atus_Enable DMA_Interrupt_Status _Enable Block_Gap_Event_Stat us_Enable Transfer_Complete_Sta tus_Enable Command_Complete_ Status_Enable
7 6 5 4 3 2 1 0
rw rw rw rw rw rw rw rw
0 - Masked 1 - Enabled 0 - Masked 1 - Enabled 0 - Masked 1 - Enabled 0 - Masked 1 - Enabled 0 - Masked 1 - Enabled 0 - Masked 1 - Enabled 0 - Masked 1 - Enabled 0 - Masked 1 - Enabled
www.xilinx.com
1475
0x00000000 Normal interrupt signal enable register Error interrupt signal enable register
www.xilinx.com
1476
Bits 8 7
Type rw rw rw rw rw rw rw rw rw
Reset Value 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0 - Masked 1 - Enabled 0 - Masked 1 - Enabled 0 - Masked 1 - Enabled 0 - Masked 1 - Enabled 0 - Masked 1 - Enabled 0 - Masked 1 - Enabled 0 - Masked 1 - Enabled 0 - Masked 1 - Enabled 0 - Masked 1 - Enabled
Description
Card_Insertion_Signal_ 6 Enable Buffer_Read_Ready_Si gnal_Enable Buffer_Write_Ready_Si gnal_Enable DMA_Interrupt_Signal _Enable Block_Gap_Event_Sign al_Enable Transfer_Complete_Sig nal_Enable Command_Complete_ Signal_Enable 5 4 3 2 1 0
www.xilinx.com
1477
Bits 7
Type ro
Description Setting this bit to 1 means CMD_wo_DAT is not executed due to an Auto CMD12 error (D04 - D01) in this register. 0 - No Error 1 - Not Issued
6:5 4
ro ro
0x0 0x0
Reserved Occurs if the Command Index error occurs in response to a command. 0 - No Error 1 - Error
Auto_CMD12_End_Bit _Error
ro
0x0
Occurs when detecting that the end bit of command response is 0. 0 - No Error 1 - End Bit Error Generated
Auto_CMD12_CRC_Er ror
ro
0x0
Occurs when detecting a CRC error in the command response. 0 - No Error 1 - CRC Error Generated
Auto_CMD12_Timeout _Error
ro
0x0
Occurs if the no response is returned within 64 SDCLK cycles from the end bit of the command. If this bit is set to 1, the other error status bits (D04 D02) are meaningless. 0 - No Error 1 - Timeout
Auto_CMD12_not_Exe cuted
ro
0x0
If memory multiple block data transfer is not started due to command error, this bit is not set because it is not necessary to issue Auto CMD12. Setting this bit to 1 means the HC cannot issue Auto CMD12 to stop memory multiple block transfer due to some error. If this bit is set to 1, other error status bits (D04 - D01) are meaningless. 0 - Executed 1 - Not Executed
www.xilinx.com
1478
www.xilinx.com
1479
Bits 21
Type ro
Description This bit indicates whether the HC and the Host System support High Speed mode and they can supply SD Clock frequency from 25Mhz to 50 MHz (for SD)/ 20MHz to 52MHz (for MMC). 0 - High Speed Not Supported 1 - High Speed Supported
20 19 18
ro ro ro
Reserved 1 - ADMA2 support. 0 - ADMA2 not support This bit indicates whether the Host Controller is capable bus. 1 - Extended Media Bus Supported 0 - Extended Media Bus not Supported
Max_Block_Length
17:16
ro
0x0
This value indicates the maximum block size that the HD can read and write to the buffer in the HC. The buffer shall transfer this block size without wait cycles. Three sizes can be defined as indicated below. 00 - 512 byte 01 - 1024 byte 10 - 2048 byte 11 - 4096 byte
15:14 13:8 7
ro ro ro
Reserved Reserved. Do not modify. This bit shows the unit of base clock frequency used to detect Data Timeout Error. 0 - KHz 1 - MHz
reserved reserved
6 5:0
ro ro
0x0 0x0
www.xilinx.com
1480
Description
www.xilinx.com
1481
Bits 31:30
Type wo
Description Additional status bits can be defined in this register by the vendor. 1 - Interrupt is generated 0 - No interrupt
Force_Event_for_Ceata _error
29
wo
0x0
Force_event_for_Target _Response_error
28
wo
0x0
27:26 25
ro wo
0x0 0x0
Force_Event_for_Auto _CMD12_Error
24
wo
0x0
Force_Event_for_Curre nt_Limit_Error
23
wo
0x0
Force_Event_for_Data_ End_Bit_Error
22
wo
0x0
Force Event for Data End Bit Error 1 - Interrupt is generated 0 - No interrupt
Force_Event_for_Data_ CRC_Error
21
wo
0x0
Force_Event_for_Data_ _Timeout_Error
20
wo
0x0
Force_Event_for_Com mand_Index_Error
19
wo
0x0
Force_Event_for_Com mand_End_Bit_Error
18
wo
0x0
Force Event for Command End Bit Error 1 - Interrupt is generated 0 - No interrupt
Force_Event_for_Com mand_CRC_Error
17
wo
0x0
www.xilinx.com
1482
Bits 16
Type wo
Description Force Event for Command Timeout Error 1 - Interrupt is generated 0 - No interrupt
reserved Force_Event_for_com mand_not_issued_by_ Auto_CMD12_Error reserved Force_Event_for_Auto _CMD12_Index_Error Force_Event_for_Auto _CMD12_End_bit_Erro r Force_Event_for_Auto _CMD12_CRC_Error Force_Event_for_Auto _CMD12_timeout_Erro r Force_Event_for_Auto _CMD12_NOT_Execut ed
15:8 7
ro wo
0x0 0x0
6:5 4 3
ro wo wo
2 1
wo wo
0x0 0x0
wo
0x0
www.xilinx.com
1483
Bits 2
Type wtc
Description This error occurs in the following 2 cases. 1. While Block Count Enable being set, the total data length specified by the Descriptor table is different from that specified by the Block Count and Block Length. 2. Total data length can not be divided by the block length. 1 - Error 0 - No error
ADMA_Error_State
1:0
ro
0x0
This field indicates the state of ADMA when error is occurred during ADMA data transfer. This field never indicates "10" because ADMA never stops in this state. D01 - D00 : ADMA Error State when error is occurred Contents of SYS_SDR register 00 - ST_STOP (Stop DMA) Points next of the error descriptor 01 - ST_FDS (Fetch Descriptor) Points the error descriptor 10 - Never set this state (Not used) 11 - ST_TFR (Transfer Data) Points the next of the error descriptor
www.xilinx.com
1484
www.xilinx.com
1485
www.xilinx.com
1486
www.xilinx.com
1487
Type ro ro
Description
These status bit indicate the logical OR of Interrupt signal and Wakeup signal for each slot. A maximum of 8 slots can be defined. If one interrupt signal is associated with multiple slots. the HD can know which interrupt is generated by reading these status bits. By a power on reset or by Software Reset For All, the Interrupt signal shall be de asserted and this status shall read 00h. Bit 00 - Slot 1 Bit 01 - Slot 2 Bit 02 - Slot 3 ----- ----Bit 07 - Slot 8
www.xilinx.com
1488
Register Summary
Register Name SCL SLCR_LOCK SLCR_UNLOCK SLCR_LOCKSTA ARM_PLL_CTRL DDR_PLL_CTRL IO_PLL_CTRL PLL_STATUS ARM_PLL_CFG DDR_PLL_CFG IO_PLL_CFG ARM_CLK_CTRL DDR_CLK_CTRL DCI_CLK_CTRL APER_CLK_CTRL USB0_CLK_CTRL USB1_CLK_CTRL GEM0_RCLK_CTRL GEM1_RCLK_CTRL GEM0_CLK_CTRL GEM1_CLK_CTRL SMC_CLK_CTRL LQSPI_CLK_CTRL Address 0x00000000 0x00000004 0x00000008 0x0000000C 0x00000100 0x00000104 0x00000108 0x0000010C 0x00000110 0x00000114 0x00000118 0x00000120 0x00000124 0x00000128 0x0000012C 0x00000130 0x00000134 0x00000138 0x0000013C 0x00000140 0x00000144 0x00000148 0x0000014C Width 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 Type rw wo wo ro rw rw rw ro rw rw rw rw rw rw rw rw rw rw rw rw rw rw rw Reset Value 0x00000000 0x00000000 0x00000000 0x00000001 0x0001A008 0x0001A008 0x0001A008 0x0000003F 0x00177EA0 0x00177EA0 0x00177EA0 0x1F000400 0x18400003 0x01E03201 0x01FFCCCD 0x00101941 0x00101941 0x00000001 0x00000001 0x00003C01 0x00003C01 0x00003C21 0x00002821 Description Secure Configuration Lock SLCR Write Protection Lock SLCR Write Protection Unlock SLCR Write Protection Status ARM PLL Control DDR PLL Control IO PLL Control PLL Status ARM PLL Configuration DDR PLL Configuration IO PLL Configuration CPU Clock Control DDR Clock Control DCI clock control AMBA Peripheral Clock Control USB 0 ULPI Clock Control USB 1 ULPI Clock Control GigE 0 Rx Clock and Rx Signals Select GigE 1 Rx Clock and Rx Signals Select GigE 0 Ref Clock Control GigE 1 Ref Clock Control SMC Ref Clock Control Quad SPI Ref Clock Control
www.xilinx.com
1489
Register Name SDIO_CLK_CTRL UART_CLK_CTRL SPI_CLK_CTRL CAN_CLK_CTRL CAN_MIOCLK_CTRL DBG_CLK_CTRL PCAP_CLK_CTRL TOPSW_CLK_CTRL FPGA0_CLK_CTRL FPGA0_THR_CTRL FPGA0_THR_CNT FPGA0_THR_STA FPGA1_CLK_CTRL FPGA1_THR_CTRL FPGA1_THR_CNT FPGA1_THR_STA FPGA2_CLK_CTRL FPGA2_THR_CTRL FPGA2_THR_CNT FPGA2_THR_STA FPGA3_CLK_CTRL FPGA3_THR_CTRL FPGA3_THR_CNT FPGA3_THR_STA CLK_621_TRUE PSS_RST_CTRL DDR_RST_CTRL TOPSW_RST_CTRL DMAC_RST_CTRL USB_RST_CTRL
Address 0x00000150 0x00000154 0x00000158 0x0000015C 0x00000160 0x00000164 0x00000168 0x0000016C 0x00000170 0x00000174 0x00000178 0x0000017C 0x00000180 0x00000184 0x00000188 0x0000018C 0x00000190 0x00000194 0x00000198 0x0000019C 0x000001A0 0x000001A4 0x000001A8 0x000001AC 0x000001C4 0x00000200 0x00000204 0x00000208 0x0000020C 0x00000210
Width 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32
Type rw rw rw rw rw rw rw rw rw rw rw ro rw rw rw ro rw rw rw ro rw rw rw ro rw rw rw rw rw rw
Reset Value 0x00001E03 0x00003F03 0x00003F03 0x00501903 0x00000000 0x00000F03 0x00000F01 0x00000000 0x00101800 0x00000000 0x00000000 0x00010000 0x00101800 0x00000000 0x00000000 0x00010000 0x00101800 0x00000000 0x00000000 0x00010000 0x00101800 0x00000000 0x00000000 0x00010000 0x00000001 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
Description SDIO Ref Clock Control UART Ref Clock Control SPI Ref Clock Control CAN Ref Clock Control CAN MIO Clock Control SoC Debug Clock Control PCAP Clock Control Central Interconnect Clock Control PL Clock 0 Output control PL Clock 0 Throttle control PL Clock 0 Throttle Count control PL Clock 0 Throttle Status read PL Clock 1 Output control PL Clock 1 Throttle control PL Clock 1 Throttle Count PL Clock 1 Throttle Status control PL Clock 2 output control PL Clock 2 Throttle Control PL Clock 2 Throttle Count PL Clock 2 Throttle Status PL Clock 3 output control PL Clock 3 Throttle Control PL Clock 3 Throttle Count PL Clock 3 Throttle Status CPU Clock Ratio Mode select PS Software Reset Control DDR Software Reset Control Central Interconnect Reset Control DMAC Software Reset Control USB Software Reset Control
www.xilinx.com
1490
Register Name GEM_RST_CTRL SDIO_RST_CTRL SPI_RST_CTRL CAN_RST_CTRL I2C_RST_CTRL UART_RST_CTRL GPIO_RST_CTRL LQSPI_RST_CTRL SMC_RST_CTRL OCM_RST_CTRL FPGA_RST_CTRL A9_CPU_RST_CTRL RS_AWDT_CTRL REBOOT_STATUS BOOT_MODE APU_CTRL WDT_CLK_SEL PSS_IDCODE DDR_URGENT DDR_CAL_START DDR_REF_START DDR_CMD_STA DDR_URGENT_SEL DDR_DFI_STATUS MIO_PIN_00 MIO_PIN_01 MIO_PIN_02 MIO_PIN_03 MIO_PIN_04 MIO_PIN_05 MIO_PIN_06 MIO_PIN_07
Address 0x00000214 0x00000218 0x0000021C 0x00000220 0x00000224 0x00000228 0x0000022C 0x00000230 0x00000234 0x00000238 0x00000240 0x00000244 0x0000024C 0x00000258 0x0000025C 0x00000300 0x00000304 0x00000530 0x00000600 0x0000060C 0x00000614 0x00000618 0x0000061C 0x00000620 0x00000700 0x00000704 0x00000708 0x0000070C 0x00000710 0x00000714 0x00000718 0x0000071C
Width 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32
Reset Value 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x01F33F0F 0x00000000 0x00000000 0x00400000 x 0x00000000 0x00000000 x 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00001601 0x00001601 0x00000601 0x00000601 0x00000601 0x00000601 0x00000601 0x00000601
Description Gigabit Ethernet SW Reset Control SDIO Software Reset Control SPI Software Reset Control CAN Software Reset Control I2C Software Reset Control UART Software Reset Control GPIO Software Reset Control Quad SPI Software Reset Control SMC Software Reset Control OCM Software Reset Control FPGA Software Reset Control CPU Reset and Clock control Watchdog Timer Reset Control Reboot Status, persistent Boot Mode Strapping Pins APU Control SWDT clock source select PS IDCODE DDR Urgent Control DDR Calibration Start Triggers DDR Refresh Start Triggers DDR Command Store Status DDR Urgent Select DDR DFI status MIO Pin 0 Control MIO Pin 1 Control MIO Pin 2 Control MIO Pin 3 Control MIO Pin 4 Control MIO Pin 5 Control MIO Pin 6 Control MIO Pin 7 Control
www.xilinx.com
1491
Register Name MIO_PIN_08 MIO_PIN_09 MIO_PIN_10 MIO_PIN_11 MIO_PIN_12 MIO_PIN_13 MIO_PIN_14 MIO_PIN_15 MIO_PIN_16 MIO_PIN_17 MIO_PIN_18 MIO_PIN_19 MIO_PIN_20 MIO_PIN_21 MIO_PIN_22 MIO_PIN_23 MIO_PIN_24 MIO_PIN_25 MIO_PIN_26 MIO_PIN_27 MIO_PIN_28 MIO_PIN_29 MIO_PIN_30 MIO_PIN_31 MIO_PIN_32 MIO_PIN_33 MIO_PIN_34 MIO_PIN_35 MIO_PIN_36 MIO_PIN_37 MIO_PIN_38 MIO_PIN_39 MIO_PIN_40 MIO_PIN_41
Address 0x00000720 0x00000724 0x00000728 0x0000072C 0x00000730 0x00000734 0x00000738 0x0000073C 0x00000740 0x00000744 0x00000748 0x0000074C 0x00000750 0x00000754 0x00000758 0x0000075C 0x00000760 0x00000764 0x00000768 0x0000076C 0x00000770 0x00000774 0x00000778 0x0000077C 0x00000780 0x00000784 0x00000788 0x0000078C 0x00000790 0x00000794 0x00000798 0x0000079C 0x000007A0 0x000007A4
Width 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32
Type rw rw rw rw rw rw rw rw rw rw rw rw rw rw rw rw rw rw rw rw rw rw rw rw rw rw rw rw rw rw rw rw rw rw
Reset Value 0x00000601 0x00001601 0x00001601 0x00001601 0x00001601 0x00001601 0x00001601 0x00001601 0x00001601 0x00001601 0x00001601 0x00001601 0x00001601 0x00001601 0x00001601 0x00001601 0x00001601 0x00001601 0x00001601 0x00001601 0x00001601 0x00001601 0x00001601 0x00001601 0x00001601 0x00001601 0x00001601 0x00001601 0x00001601 0x00001601 0x00001601 0x00001601 0x00001601 0x00001601
Description MIO Pin 8 Control MIO Pin 9 Control MIO Pin 10 Control MIO Pin 11 Control MIO Pin 12 Control MIO Pin 13 Control MIO Pin 14 Control MIO Pin 15 Control MIO Pin 16 Control MIO Pin 17 Control MIO Pin 18 Control MIO Pin 19 Control MIO Pin 20 Control MIO Pin 21 Control MIO Pin 22 Control MIO Pin 23 Control MIO Pin 24 Control MIO Pin 25 Control MIO Pin 26 Control MIO Pin 27 Control MIO Pin 28 Control MIO Pin 29 Control MIO Pin 30 Control MIO Pin 31 Control MIO Pin 32 Control MIO Pin 33 Control MIO Pin 34 Control MIO Pin 35 Control MIO Pin 36 Control MIO Pin 37 Control MIO Pin 38 Control MIO Pin 39 Control MIO Pin 40 Control MIO Pin 41 Control
www.xilinx.com
1492
Register Name MIO_PIN_42 MIO_PIN_43 MIO_PIN_44 MIO_PIN_45 MIO_PIN_46 MIO_PIN_47 MIO_PIN_48 MIO_PIN_49 MIO_PIN_50 MIO_PIN_51 MIO_PIN_52 MIO_PIN_53 MIO_LOOPBACK MIO_MST_TRI0 MIO_MST_TRI1 SD0_WP_CD_SEL SD1_WP_CD_SEL LVL_SHFTR_EN OCM_CFG Reserved GPIOB_CTRL GPIOB_CFG_CMOS18 GPIOB_CFG_CMOS25 GPIOB_CFG_CMOS33 GPIOB_CFG_HSTL GPIOB_DRVR_BIAS_C TRL DDRIOB_ADDR0 DDRIOB_ADDR1
Address 0x000007A8 0x000007AC 0x000007B0 0x000007B4 0x000007B8 0x000007BC 0x000007C0 0x000007C4 0x000007C8 0x000007CC 0x000007D0 0x000007D4 0x00000804 0x0000080C 0x00000810 0x00000830 0x00000834 0x00000900 0x00000910 0x00000A1C 0x00000B00 0x00000B04 0x00000B08 0x00000B0C 0x00000B14 0x00000B18 0x00000B40 0x00000B44
Width 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32
Type rw rw rw rw rw rw rw rw rw rw rw rw rw rw rw rw rw rw rw rw rw rw rw rw rw mixed rw rw
Reset Value 0x00001601 0x00001601 0x00001601 0x00001601 0x00001601 0x00001601 0x00001601 0x00001601 0x00001601 0x00001601 0x00001601 0x00001601 0x00000000 0xFFFFFFFF 0x003FFFFF 0x00000000 0x00000000 0x00000000 0x00000000 0x00010101 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000800 0x00000800
Description MIO Pin 42 Control MIO Pin 43 Control MIO Pin 44 Control MIO Pin 45 Control MIO Pin 46 Control MIO Pin 47 Control MIO Pin 48 Control MIO Pin 49 Control MIO Pin 50 Control MIO Pin 51 Control MIO Pin 52 Control MIO Pin 53 Control Loopback function within MIO MIO pin Tri-state Enables, 31:0 MIO pin Tri-state Enables, 53:32 SDIO 0 WP CD select SDIO 1 WP CD select Level Shifters Enable OCM Address Mapping Reserved PS IO Buffer Control MIO GPIOB CMOS 1.8V config MIO GPIOB CMOS 2.5V config MIO GPIOB CMOS 3.3V config MIO GPIOB HSTL config MIO GPIOB Driver Bias Control DDR IOB Config for A[14:0], CKE and DRST_B DDR IOB Config for BA[2:0], ODT, CS_B, WE_B, RAS_B and CAS_B DDR IOB Config for Data 15:0 DDR IOB Config for Data 31:16 DDR IOB Config for DQS 1:0
32 32 32
rw rw rw
www.xilinx.com
1493
Register Name DDRIOB_DIFF1 DDRIOB_CLOCK DDRIOB_DRIVE_SLE W_ADDR DDRIOB_DRIVE_SLE W_DATA DDRIOB_DRIVE_SLE W_DIFF DDRIOB_DRIVE_SLE W_CLOCK DDRIOB_DDR_CTRL DDRIOB_DCI_CTRL DDRIOB_DCI_STATU S
Width 32 32 32
Type rw rw rw
Description DDR IOB Config for DQS 3:2 DDR IOB Config for Clock Output Drive and Slew controls for Address and Command pins of the DDR Interface Drive and Slew controls for DQ pins of the DDR Interface Drive and Slew controls for DQS pins of the DDR Interface Drive and Slew controls for Clock pins of the DDR Interface DDR IOB Buffer Control DDR IOB DCI Config DDR IO Buffer DCI Status
32 32 32 32 32 32
rw rw rw rw rw mixed
www.xilinx.com
1494
www.xilinx.com
1495
www.xilinx.com
1496
reserved PLL_BYPASS_FORCE
11:5 4
rw rw
0x0 0x0
www.xilinx.com
1497
Relative Address Absolute Address Width Access Type Reset Value Description
reserved PLL_BYPASS_FORCE
11:5 4
rw rw
0x0 0x0
www.xilinx.com
1498
reserved PLL_BYPASS_FORCE
11:5 4
rw rw
0x0 0x0
www.xilinx.com
1499
www.xilinx.com
1500
rw rw rw
rw rw rw
www.xilinx.com
1501
rw rw rw
www.xilinx.com
1502
Field Name CPU_1XCLKACT CPU_2XCLKACT CPU_3OR2XCLKACT CPU_6OR4XCLKACT reserved DIVISOR reserved SRCSEL
Type rw rw rw rw rw rw rw rw
Reset Value 0x1 0x1 0x1 0x1 0x0 0x4 0x0 0x0
Description CPU_1x Clock control: 0: disable, 1: enable CPU_2x Clock control: 0: disable, 1: enable CPU_3x2x Clock control: 0: disable, 1: enable CPU_6x4x Clock control: 0: disable, 1: enable Reserved. Writes are ignored, read data is zero. Frequency divisor for the CPU clock source. (When PLL is being used, 1&3 are illegal values) Reserved. Writes are ignored, read data is zero. Select the source used to generate the CPU clock: 0x: ARM PLL 10: DDR PLL 11: IO PLL This field is reset by POR only.
reserved
3:0
rw
0x0
www.xilinx.com
1503
Bits 19:2 1 0
Type rw rw rw
Description Reserved. Writes are ignored, read data is zero. DDR_2x Clock control: 0: disable, 1: enable DDR_3x Clock control: 0: disable, 1: enable
reserved DIVISOR0
19:14 13:8
rw rw
0x0 0x32
reserved CLKACT
7:1 0
rw rw
0x0 0x1
www.xilinx.com
1504
www.xilinx.com
1505
Field Name GEM1_CPU_1XCLKA CT GEM0_CPU_1XCLKA CT reserved reserved USB1_CPU_1XCLKAC T USB0_CPU_1XCLKAC T reserved DMA_CPU_2XCLKAC T
Bits 7 6 5 4 3 2 1 0
Type rw rw rw rw rw rw rw rw
Reset Value 0x1 0x1 0x0 0x0 0x1 0x1 0x0 0x1
Description Gigabit Ethernet 1 AMBA Clock control 0: disable, 1: enable Gigabit Ethernet 0 AMBA Clock control 0: disable, 1: enable Reserved. Writes are ignored, read data is zero. Reserved. Writes are ignored, read data is zero. USB controller 1 AMBA Clock control 0: disable, 1: enable USB controller 0 AMBA Clock control 0: disable, 1: enable Reserved. Writes are ignored, read data is zero. DMA controller AMBA Clock control 0: disable, 1: enable
www.xilinx.com
1506
Bits 3:1 0
Type rw rw
Description Reserved. Writes are ignored, read data is zero. Reserved. Do not modify.
www.xilinx.com
1507
www.xilinx.com
1508
www.xilinx.com
1509
Type rw rw rw
Description First divisor for Ethernet controller 1 source clock. Reserved. Writes are ignored, read data is zero. Selects the source to generate the reference clock 00x: IO PLL. 010: ARM PLL. 011: DDR PLL 1xx: Ethernet controller 1 EMIO clock
reserved CLKACT
3:1 0
rw rw
0x0 0x1
Reserved. Writes are ignored, read data is zero. Ethernet Controller 1 Reference Clock control 0: disable, 1: enable
www.xilinx.com
1510
reserved
7:6
rw
0x0
www.xilinx.com
1511
Bits 5:4
Type rw
Description Select the source used to generate the clock. 0x: Source for generated clock is IO PLL. 10: Source for generated clock is ARM PLL. 11: Source for generated clock is DDR PLL.
3:2 1 0
rw rw rw
Reserved. Writes are ignored, read data is zero. SDIO Controller 1 Clock control. 0: disable, 1: enable SDIO Controller 0 Clock control. 0: disable, 1: enable
www.xilinx.com
1512
reserved SRCSEL
7:6 5:4
rw rw
0x0 0x0
www.xilinx.com
1513
reserved DIVISOR0
19:14 13:8
rw rw
0x0 0x19
reserved SRCSEL
7:6 5:4
rw rw
0x0 0x0
www.xilinx.com
1514
Bits 21:16
Type rw
Description CAN 1 mux selection for MIO. Setting this to zero will select MIO[0] as the clock source. Only values 0-53 are valid. Reserved. Writes are ignored, read data is zero. CAN 0 Reference Clock selection: 0: From internal PLL 1: From MIO based on the next field
reserved CAN0_REF_SEL
15:7 6
rw rw
0x0 0x0
CAN0_MUX
5:0
rw
0x0
CAN 0 mux selection for MIO. Setting this to zero will select MIO[0] as the clock source. Only values 0-53 are valid.
reserved SRCSEL
7 6:4
rw rw
0x0 0x0
www.xilinx.com
1515
Bits 1
Type rw
Description
CPU 1x Clock active. 0 - Clocks are disabled. 1 Clocks are enabled CLKACT_TRC 0 rw 0x1 Debug Trace Clock active: 0: Clock is disabled 1: Clock is enabled
reserved SRCSEL
7:6 5:4
rw rw
0x0 0x0
www.xilinx.com
1516
reserved DIVISOR0
19:14 13:8
rw rw
0x0 0x18
reserved SRCSEL
7:6 5:4
rw rw
0x0 0x0
www.xilinx.com
1517
www.xilinx.com
1518
www.xilinx.com
1519
Description
reserved DIVISOR0
19:14 13:8
rw rw
0x0 0x18
reserved SRCSEL
7:6 5:4
rw rw
0x0 0x0
www.xilinx.com
1520
Bits 1
Type rw
Description Reset clock throttle counter when in halt state: 0: No effect 1: Causes counter to be reset once HALT state is entered
CPU_START
rw
0x0
Start or restart count on detection of 0 to 1 transition in the value of this bit. A read will return the written value. (Reminder that bits 2&3 must be programmed according to description.) 0: No effect 1: Start count or restart count if previous value was 0
www.xilinx.com
1521
Description
reserved DIVISOR0
19:14 13:8
rw rw
0x0 0x18
reserved SRCSEL
7:6 5:4
rw rw
0x0 0x0
www.xilinx.com
1522
www.xilinx.com
1523
www.xilinx.com
1524
Description
reserved DIVISOR0
19:14 13:8
rw rw
0x0 0x18
reserved SRCSEL
7:6 5:4
rw rw
0x0 0x0
www.xilinx.com
1525
Bits 1
Type rw
Description Reset clock throttle counter when in halt state: 0: No effect 1: Causes counter to be reset once HALT state is entered
CPU_START
rw
0x0
Start or restart count on detection of 0 to 1 transition in the value of this bit. A read will return the written value. (Reminder that bits 2&3 must be programmed according to description.) 0: No effect 1: Start count or restart count if previous value was 0
www.xilinx.com
1526
Description
www.xilinx.com
1527
www.xilinx.com
1528
Description
www.xilinx.com
1529
Description
www.xilinx.com
1530
Bits 5
Type rw
Description Gigabit Ethernet 1 Rx clock domain reset: 0: de-assert (no reset) 1: assert (held in reset)
GEM0_RX_RST
rw
0x0
Gigabit Ethernet 0 Rx clock domain reset: 0: de-assert (no reset) 1: assert (held in reset)
reserved GEM1_CPU1X_RST
3:2 1
rw rw
0x0 0x0
Reserved. Writes are ignored, read data is zero. Gigabit Ethernet 1 CPU_1x clock domain reset: 0: de-assert (no reset) 1: assert (held in reset)
GEM0_CPU1X_RST
rw
0x0
Gigabit Ethernet 0 CPU_1x clock domain reset: 0: de-assert (no reset) 1: assert (held in reset)
www.xilinx.com
1531
Bits 1
Type rw
Description SDIO 1 master and slave AMBA interfaces reset: 0: de-assert (no reset) 1: assert (held in reset)
SDIO0_CPU1X_RST
rw
0x0
SDIO 0 master and slave AMBA interfaces reset: 0: de-assert (no reset) 1: assert (held in reset)
www.xilinx.com
1532
Bits 1
Type rw
Description SPI 1 AMBA software reset. On assertion of this reset, the AMBA clock portion of the SPI 1 subsystem will be reset. 0: No reset 1: AMBA clock portion of SPI 1 subsytem held in reset
SPI0_CPU1X_RST
rw
0x0
SPI 0 AMBA software reset. On assertion of this reset, the AMBA clock portion of the SPI 0 subsystem will be reset. 0: No reset 1: AMBA clock portion of SPI 0 subsytem held in reset
www.xilinx.com
1533
Bits 1
Type rw
Description CAN 1 AMBA software reset. On assertion of this reset, the AMBA clock portion of the CAN 1 subsystem will be reset. 0: No reset 1: AMBA clock portion of CAN 1 subsytem held in reset
CAN0_CPU1X_RST
rw
0x0
CAN 0 AMBA software reset. On assertion of this reset, the AMBA clock portion of the CAN 0 subsystem will be reset. 0: No reset 1: AMBA clock portion of CAN 0 subsytem held in reset
www.xilinx.com
1534
www.xilinx.com
1535
Description
www.xilinx.com
1536
Relative Address Absolute Address Width Access Type Reset Value Description
www.xilinx.com
1537
www.xilinx.com
1538
Bits 7:4 3
Type rw rw
Description Reserved. Writes are ignored, read data is zero. PL Reset 3 (FCLKRESETN3 output signal). Refer to the PS7 wrapper in EDK for possible signal inversion. Logic level on the FCLKRESETN3 signal: 0: De-assert reset (High logic level). 1: Assert Reset (Low logic state)
FPGA2_OUT_RST
rw
0x1
PL Reset 2 (FCLKRESETN2 output signal). Refer to the PS7 wrapper in EDK for possible signal inversion. Logic level on the FCLKRESETN2 signal: 0: De-assert reset (High logic level). 1: Assert Reset (Low logic state)
FPGA1_OUT_RST
rw
0x1
PL Reset 1 (FCLKRESETN1 output signal). Refer to the PS7 wrapper in EDK for possible signal inversion. Logic level on the FCLKRESETN1 signal: 0: De-assert reset (High logic level). 1: Assert Reset (Low logic state)
FPGA0_OUT_RST
rw
0x1
PL Reset 0 (FCLKRESETN0 output signal). Refer to the PS7 wrapper in EDK for possible signal inversion. Logic level on the FCLKRESETN0 signal: 0: De-assert reset (High logic level). 1: Assert Reset (Low logic state)
www.xilinx.com
1539
www.xilinx.com
1540
Bits 1
Type rw
Description Select the target for the APU watchdog timer 1 reset signal. Route the WDT reset to: 0: the same system level as PS_SRST_B 1: the CPU associated with the watchdog timer
CTRL0
rw
0x0
Select the target for the APU watchdog timer 0 reset signal. Route the WDT reset to: 0: the same system level as PS_SRST_B 1: the CPU associated with the watchdog timer
www.xilinx.com
1541
Bits 17
Type rw
Description Last reset was due to APU watchdog timer 0, if set. This field is written by ROM code Last reset was due to system watchdog timeout, if set (see watchdog status for more details). This field is written by ROM code This field is written by the BootROM to describe errors that occur during the boot proceess. Refer to the BootROM debug status section in the Zynq-7000 Technical Reference Manual, UG585.
SWDT_RST
16
rw
0x0
BOOTROM_ERROR_C ODE
15:0
rw
0x0
www.xilinx.com
1542
www.xilinx.com
1543
www.xilinx.com
1544
www.xilinx.com
1545
www.xilinx.com
1546
www.xilinx.com
1547
www.xilinx.com
1548
Bits 11:10
Type rw
Description Selects between the AXI port s1_arqos[3], fabric signal or static register to drive the DDRC urgent bit. 00: DDRC s1_arurgent bit is driven from the 'S1_ARURGENT' field of the DDR_URGENT_VAL register. 01: DDRC s1_arurgent bit is driven from the s1_arqos bit. 10: DDRC s1_arurgent bit is driven from the fabric ddr_arb[1] input. 11: undefined.
S0_ARQOS_MODE
9:8
rw
0x0
Selects between the fabric signal or static register to drive the DDRC urgent bit. 00: DDRC s0_arurgent bit is driven from the 'S0_ARURGENT' field of the DDR_URGENT_VAL register. x1: undefined 10: DDRC s0_arurgent bit is driven from the fabric ddr_arb[0] input. 11: undefined
S3_AWQOS_MODE
7:6
rw
0x0
Selects between the AXI port s3_awqos[3], fabric signal or static register to drive the DDRC urgent bit. 00: DDRC s3_awurgent bit is driven from the 'S3_AWURGENT' field of the DDR_URGENT_VAL register. 01: DDRC s3_awurgent bit is driven from the s3_awqos bit. 10: DDRC s3_awurgent bit is driven from the fabric ddr_arb[3] input. 11: undefined
S2_AWQOS_MODE
5:4
rw
0x0
Selects between the AXI port s2_awqos[3], fabric signal or static register to drive the DDRC urgent bit. 00: DDRC s2_awurgent bit is driven from the 'S2_AWURGENT' field of the DDR_URGENT_VAL register. 01: DDRC s2_awurgent bit is driven from the s2_awqos bit. 10: DDRC s2_awurgent bit is driven from the fabric ddr_arb[2] input. 11: undefined
www.xilinx.com
1549
Bits 3:2
Type rw
Description Selects between the AXI port s1_awqos[3], fabric signal or static register to drive the DDRC urgent bit. 00: DDRC s1_awurgent bit is driven from the 'S1_AWURGENT' field of the DDR_URGENT_VAL register. 01: DDRC s1_awurgent bit is driven from the s1_awqos bit. 10: DDRC s1_awurgent bit is driven from the fabric ddr_arb[1] input. 11: undefined
S0_AWQOS_MODE
1:0
rw
0x0
Selects between the fabric signal or static register to drive the DDRC urgent bit. 00: The DDRC s0_awurgent bit is driven from the 'S0_AWURGENT' field of the DDR_URGENT_VAL register. x1: undefined 10: The DDRC s0_awurgent bit is driven from the fabric ddr_arb[0] input. 11: undefined
www.xilinx.com
1550
Relative Address Absolute Address Width Access Type Reset Value Description
www.xilinx.com
1551
Bits 2
Type rw
L0_SEL
rw
0x0
Level 0 Mux Select 0: Level 1 Mux 1: Quad SPI 1 chip select, Output
TRI_ENABLE
rw
0x1
www.xilinx.com
1552
Bits 2
Type rw
L0_SEL
rw
0x0
Level 0 Mux Select 0: Level 1 Mux 1: Quad SPI 0 Chip Select, Output
TRI_ENABLE
rw
0x1
www.xilinx.com
1553
Bits 1
Type rw
Description Level 0 Mux Select 0: Level 1 Mux 1: Quad SPI 0 IO Bit 0, Input/Output
TRI_ENABLE
rw
0x1
www.xilinx.com
1554
Bits 1
Type rw
Description Level 0 Mux Select 0: Level 1 Mux 1: Quad SPI 0 IO Bit 1, Input/Output
TRI_ENABLE
rw
0x1
www.xilinx.com
1555
Bits 1
Type rw
Description Level 0 Mux Select 0: Level 1 Mux 1: Quad SPI 0 IO Bit 2, Input/Output
TRI_ENABLE
rw
0x1
www.xilinx.com
1556
Bits 1
Type rw
Description Level 0 Mux Select 0: Level 1 Mux 1: Quad SPI 0 IO Bit 3, Input/Output
TRI_ENABLE
rw
0x1
www.xilinx.com
1557
Bits 1
Type rw
Description Level 0 Mux Select 0: Level 1 Mux 1: Quad SPI 0 Clock, Output
TRI_ENABLE
rw
0x1
www.xilinx.com
1558
Bits 1
Type rw
TRI_ENABLE
rw
0x1
www.xilinx.com
1559
Bits 1
Type rw
Description Level 0 Mux Select 0: Level 1 Mux 1: Quad SPI Feedback Clock, Output
TRI_ENABLE
rw
0x1
www.xilinx.com
1560
Bits 1
Type rw
Description Level 0 Mux Select 0: Level 1 Mux 1: Quad SPI 1 Flash Memory Clock, Output
TRI_ENABLE
rw
0x1
www.xilinx.com
1561
Bits 2
Type rw
Description Level 1 Mux Select 0: Level 2 Mux 1: Trace Port Data Bit 2, Output
L0_SEL
rw
0x0
TRI_ENABLE
rw
0x1
www.xilinx.com
1562
Bits 4:3
Type rw
Description Level 2 Mux Select 00: Level 3 Mux 01: SRAM/NOR Data Bit 4, Input/Output 10: NAND Flash IO Bit 6, Input/Output 11: SDIO 1 Power Control, Output
L1_SEL
rw
0x0
Level 1 Mux Select 0: Level 2 Mux 1: Trace Port Data Bit 3, Output
L0_SEL
rw
0x0
TRI_ENABLE
rw
0x1
www.xilinx.com
1563
Bits 7:5
Type rw
Description Level 3 Mux Select 000: GPIO 12 (bank 0), Input/Output 001: CAN 1 Tx, Output 010: I2C 1 Serial Clock, Input/Output 011: PJTAG TCK, Input 100: SDIO 1 Clock, Input/Output 101: SPI 1 Serial Clock, Input/Output 110: reserved 111: UART 1 TxD, Output
L2_SEL
4:3
rw
0x0
Level 2 Mux Select 00: Level 3 Mux 01: reserved 10: NAND Flash IO Bit 7, Input/Output 11: SDIO 0 Power Control, Output
L1_SEL
rw
0x0
L0_SEL
rw
0x0
TRI_ENABLE
rw
0x1
www.xilinx.com
1564
Type rw rw rw
Description Operates the same as MIO_PIN_00[IO_Type] Operates the same as MIO_PIN_00[Speed] Level 3 Mux Select 000: GPIO 13 (bank 0), Input/Output 001: CAN 1 Rx, Input 010: I2C 1 Serial Data, Input/Output 011: PJTAG TMS, Input 100: SDIO 1 IO Bit 1, Input/Output 101: SPI 1 Slave Select 0, Input/Output 110: reserved 111: UART 1 RxD, Input
L2_SEL
4:3
rw
0x0
Level 2 Mux Select 00: Level 3 Mux 01: SRAM/NOR Data Bit 5, Input/Output 10: NAND Flash IO Bit 3, Input/Output 11: SDIO 1 Power Control, Output
L1_SEL
rw
0x0
Level 1 Mux Select 0: Level 2 Mux 1: Trace Port Control Signal, Output
L0_SEL
rw
0x0
TRI_ENABLE
rw
0x1
www.xilinx.com
1565
www.xilinx.com
1566
www.xilinx.com
1567
www.xilinx.com
1568
www.xilinx.com
1569
www.xilinx.com
1570
www.xilinx.com
1571
www.xilinx.com
1572
www.xilinx.com
1573
www.xilinx.com
1574
www.xilinx.com
1575
www.xilinx.com
1576
www.xilinx.com
1577
www.xilinx.com
1578
www.xilinx.com
1579
www.xilinx.com
1580
www.xilinx.com
1581
www.xilinx.com
1582
www.xilinx.com
1583
www.xilinx.com
1584
www.xilinx.com
1585
www.xilinx.com
1586
www.xilinx.com
1587
www.xilinx.com
1588
Description
www.xilinx.com
1589
www.xilinx.com
1590
www.xilinx.com
1591
www.xilinx.com
1592
www.xilinx.com
1593
Relative Address Absolute Address Width Access Type Reset Value Description
www.xilinx.com
1594
www.xilinx.com
1595
www.xilinx.com
1596
www.xilinx.com
1597
www.xilinx.com
1598
www.xilinx.com
1599
www.xilinx.com
1600
www.xilinx.com
1601
www.xilinx.com
1602
www.xilinx.com
1603
www.xilinx.com
1604
www.xilinx.com
1605
www.xilinx.com
1606
www.xilinx.com
1607
Field Name PIN_08_TRI PIN_07_TRI PIN_06_TRI PIN_05_TRI PIN_04_TRI PIN_03_TRI PIN_02_TRI PIN_01_TRI PIN_00_TRI
Bits 8 7 6 5 4 3 2 1 0
Type rw rw rw rw rw rw rw rw rw
Reset Value 0x1 0x1 0x1 0x1 0x1 0x1 0x1 0x1 0x1
Description Master Tri-state Enable for pin 8, active high Master Tri-state Enable for pin 7, active high Master Tri-state Enable for pin 6, active high Master Tri-state Enable for pin 5, active high Master Tri-state Enable for pin 4, active high Master Tri-state Enable for pin 3, active high Master Tri-state Enable for pin 2, active high Master Tri-state Enable for pin 1, active high Master Tri-state Enable for pin 0, active high
www.xilinx.com
1608
Field Name PIN_43_TRI PIN_42_TRI PIN_41_TRI PIN_40_TRI PIN_39_TRI PIN_38_TRI PIN_37_TRI PIN_36_TRI PIN_35_TRI PIN_34_TRI PIN_33_TRI PIN_32_TRI
Bits 11 10 9 8 7 6 5 4 3 2 1 0
Type rw rw rw rw rw rw rw rw rw rw rw rw
Reset Value 0x1 0x1 0x1 0x1 0x1 0x1 0x1 0x1 0x1 0x1 0x1 0x1
Description Master Tri-state Enable for pin 43, active high Master Tri-state Enable for pin 42, active high Master Tri-state Enable for pin 41, active high Master Tri-state Enable for pin 40, active high Master Tri-state Enable for pin 39, active high Master Tri-state Enable for pin 38, active high Master Tri-state Enable for pin 37, active high Master Tri-state Enable for pin 36, active high Master Tri-state Enable for pin 35, active high Master Tri-state Enable for pin 34, active high Master Tri-state Enable for pin 33, active high Master Tri-state Enable for pin 32, active high
www.xilinx.com
1609
www.xilinx.com
1610
Bits 4 3:0
Type rw rw
Description Reserved. Do not modify. Level shifter enable to drive signals between PS and PL. 0x0 = disabled 0xF = enabled All other = reserved
www.xilinx.com
1611
0x00010101 Reserved
www.xilinx.com
1612
www.xilinx.com
1613
Type rw rw rw rw rw
Description Reserved. Do not modify. Reserved. Do not modify. Reserved. Do not modify. Reserved. Do not modify. Reserved. Do not modify.
www.xilinx.com
1614
www.xilinx.com
1615
Type rw rw rw rw rw rw
Description Reserved. Do not modify. Reserved. Do not modify. Reserved. Do not modify. Reserved. Do not modify. Reserved. Do not modify. Reserved. Do not modify.
www.xilinx.com
1616
www.xilinx.com
1617
Bits 2:1
Type rw
Description Input buffer control: 00: Input off (input signal to selected controller is driven Low). 01: Vref based differential receiver for SSTL, HSTL. 10: Differential input receiver. 11: LVCMOS receiver.
reserved
rw
0x0
www.xilinx.com
1618
Bits 7
Type rw
Description Use ibuf_disable_into control ibuf 0: ibuf is enabled 1: use ibuf_disable_in_to control enable NOTE: This must be 0 during DRAM init/training and can only be set to 1 after init/training completes.
DCI_TYPE
6:5
rw
0x0
DCI Mode Selection: 00: DCI Disabled (DDR2/3L ADDR and CLOCK) 01: DCI Drive (LPDDR2) 10: reserved 11: DCI Termination (DDR2/3/3L DATA and DIFF)
TERM_EN
rw
0x0
DCI_UPDATE_B
rw
0x0
INP_TYPE
2:1
rw
0x0
Input buffer control: 00: Input off (input signal to selected controller is driven Low). 01: Vref based differential receiver for SSTL, HSTL. 10: Differential input receiver. 11: LVCMOS receiver.
reserved
rw
0x0
www.xilinx.com
1619
www.xilinx.com
1620
Bits 2:1
Type rw
Description Input buffer control: 00: Input off (input signal to selected controller is driven Low). 01: Vref based differential receiver for SSTL, HSTL. 10: Differential input receiver. 11: LVCMOS receiver.
reserved
rw
0x0
www.xilinx.com
1621
Bits 7
Type rw
Description Use ibuf_disable_into control ibuf 0: ibuf is enabled 1: use ibuf_disable_in_to control enable NOTE: This must be 0 during DRAM init/training and can only be set to 1 after init/training completes.
DCI_TYPE
6:5
rw
0x0
DCI Mode Selection: 00: DCI Disabled (DDR2/3L ADDR and CLOCK) 01: DCI Drive (LPDDR2) 10: reserved 11: DCI Termination (DDR2/3/3L DATA and DIFF)
TERM_EN
rw
0x0
DCI_UPDATE_B
rw
0x0
INP_TYPE
2:1
rw
0x0
Input buffer control: 00: Input off (input signal to selected controller is driven Low). 01: Vref based differential receiver for SSTL, HSTL. 10: Differential input receiver. 11: LVCMOS receiver.
reserved
rw
0x0
www.xilinx.com
1622
www.xilinx.com
1623
Bits 2:1
Type rw
Description Input buffer control: 00: Input off (input signal to selected controller is driven Low). 01: Vref based differential receiver for SSTL, HSTL. 10: Differential input receiver. 11: LVCMOS receiver.
reserved
rw
0x0
www.xilinx.com
1624
Bits 7
Type rw
Description Use ibuf_disable_into control ibuf 0: ibuf is enabled 1: use ibuf_disable_in_to control enable NOTE: This must be 0 during DRAM init/training and can only be set to 1 after init/training completes.
DCI_TYPE
6:5
rw
0x0
DCI Mode Selection: 00: DCI Disabled (DDR2/3L ADDR and CLOCK) 01: DCI Drive (LPDDR2) 10: reserved 11: DCI Termination (DDR2/3/3L DATA and DIFF)
TERM_EN
rw
0x0
DCI_UPDATE_B
rw
0x0
INP_TYPE
2:1
rw
0x0
Input buffer control: 00: Input off (input signal to selected controller is driven Low). 01: Vref based differential receiver for SSTL, HSTL. 10: Differential input receiver. 11: LVCMOS receiver.
reserved
rw
0x0
www.xilinx.com
1625
www.xilinx.com
1626
Bits 2:1
Type rw
Description Input buffer control: 00: Input off (input signal to selected controller is driven Low). 01: Vref based differential receiver for SSTL, HSTL. 10: Differential input receiver. 11: LVCMOS receiver.
reserved
rw
0x0
www.xilinx.com
1627
rw 0x00000000 Drive and Slew controls for DQ pins of the DDR Interface
www.xilinx.com
1628
www.xilinx.com
1629
Bits 12 11:10 9
Type rw rw rw
Description Reserved. Do not modify. Reserved. Do not modify. Enables VRP,VRN 0: VRP/VRN not used 1: VRP/VRN used as refio
reserved VREF_EXT_EN
8:7 6:5
rw rw
0x0 0x0
Reserved. Do not modify. Enables External VREF input x0: Disable External VREF for lower 16 bits x1: Enable External VREF for lower 16 bits 0x: Disable External VREF for upper 16 bits 1x: Enable External VREF for upper 16 bits
VREF_SEL
4:1
rw
0x0
Specifies DDR IOB Vref generator output: 0001: VREF = 0.6V for LPDDR2 with 1.2V IO 0010: VREF = 0.675V for DDR3L with 1.35V IO 0100: VREF = 0.75V for DDR3 with 1.5V IO 1000: VREF = 0.90V for DDR2 with 1.8V IO
VREF_INT_EN
rw
0x0
www.xilinx.com
1630
Field Name reserved reserved UPDATE_CONTROL PREF_OPT2 reserved PREF_OPT1 NREF_OPT4 NREF_OPT2 NREF_OPT1 reserved reserved reserved reserved ENABLE
Type rw rw rw rw rw rw rw rw rw rw rw rw rw rw
Reset Value 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x1 0x0 0x0 0x0 0x0
Description Reserved. Do not modify. Reserved. Do not modify. DCI Update Mode. Use the values in the Calibration Table. DCI Calibration. Use the values in the Calibration Table. Reserved DCI Calibration. Use the values in the Calibration Table. DCI Calibration. Use the values in the Calibration Table. DCI Calibration. Use the values in the Calibration Table. DCI Calibration. Use the values in the Calibration Table. Reserved. Do not modify. Reserved. Do not modify. Reserved. Do not modify. Reserved. Do not modify. DCI System Enable. Set to 1 if any IOs in DDR IO Bank use DCI Termination. DDR2, DDR3, DDR3L and LPDDR2 (Silicon Revision 2.0+) configurations require this bit set to 1 At least toggle once to initialize flops in DCI system
RESET
rw
0x0
www.xilinx.com
1631
www.xilinx.com
1632
Register Summary
Register Name memc_status memif_cfg memc_cfg_set memc_cfg_clr direct_cmd set_cycles set_opmode refresh_period_0 refresh_period_1 sram_cycles0_0 opmode0_0 sram_cycles0_1 opmode0_1 nand_cycles1_0 opmode1_0 user_status user_config ecc_status_1 Address 0x00000000 0x00000004 0x00000008 0x0000000C 0x00000010 0x00000014 0x00000018 0x00000020 0x00000024 0x00000100 0x00000104 0x00000120 0x00000124 0x00000180 0x00000184 0x00000200 0x00000204 0x00000400 Width 13 18 7 7 26 24 16 4 4 21 32 21 32 24 32 8 8 30 Type ro ro wo wo wo wo mixed rw rw ro ro ro ro ro ro ro wo ro Reset Value 0x00000000 0x00011205 x x x x x 0x00000000 0x00000000 0x0002B3CC 0xE2FE0800 0x0002B3CC 0xE4FE0800 0x0024ABCC 0xE1FF0001 0x00000000 x 0x00000000 Description Operating and Interrupt Status SMC configuration information Enable interrupts and lower power state Disable interrupts and exit from low-power state Issue mem commands and register updates Stage a write to a Cycle register Stage a write to an OpMode register Idle cycles between read/write bursts Insert idle cycles between bursts SRAM/NOR chip select 0 timing, active SRAM/NOR chip select 0 OpCode, active SRAM/NOR chip select 1 timing, active SRAM/NOR chip select 1 OpCode, active NAND Flash timing, active NAND Flash OpCode, active User Status Register User Configuration Register ECC Status and Clear Register 1
www.xilinx.com
1633
Register Name ecc_memcfg_1 ecc_memcommand1_1 ecc_memcommand2_1 ecc_addr0_1 ecc_addr1_1 ecc_value0_1 ecc_value1_1 ecc_value2_1 ecc_value3_1
Address 0x00000404 0x00000408 0x0000040C 0x00000410 0x00000414 0x00000418 0x0000041C 0x00000420 0x00000424
Width 13 25 25 32 24 32 32 32 32
Type rw rw rw ro ro ro ro ro ro
Reset Value 0x00000043 0x01300080 0x01E00585 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
Description ECC Memory Configuation Register 1 ECC Memory Command 1 Register 1 ECC Memory Command 2 Register 1 ECC Address 0 Register 1 ECC Address 1 Register 1 ECC Value 0 Register 1 ECC Value 1 Register 1 ECC Value 2 Register 1 ECC Value 3 Register 1
www.xilinx.com
1634
Bits 8
Type ro
7 6
ro ro
0x0 0x0
Reserved. Do not modify. NAND Flash raw interrupt status before mask/enable: 0: Not asserted 1: Asserted
raw_int_status0 (RAW_INT_STATUS0)
ro
0x0
SRAM/NOR raw interrupt raw status before the mask/enable: 0: Not asserted 1: Asserted
int_status1 (INT_STATUS1)
ro
0x0
NAND Flash interrupt status after the mask/enable: 0: Not asserted 1: Asserted
int_status0 (INT_STATUS0)
ro
0x0
ro
0x0
ro
0x0
ro
0x0
www.xilinx.com
1635
Description
www.xilinx.com
1636
www.xilinx.com
1637
Field Name ecc_int_disable1 (ECC_INT_DISABLE1) reserved int_clr_1 (INT_CLR1) int_clr_0 (INT_CLR0) low_power_exit (LOW_POWER_EXIT)
Bits 6
Type wo
Reset Value x
5 4
wo wo
x x
Reserved. Do not modify. 0: No effect 1: Clear SMC Interrupt 1 as an alternative to an AXI read
wo
wo
Exit low-power mode. The affect takes place when memory interface goes idle: 0: No change 1: Exit from low-power state
wo
wo
www.xilinx.com
1638
Bits 25:23
Type wo
Reset Value x
Description Select register bank to update and enable chip mode register access based on CMD_TYPE: 000: SRAM/NOR chip select 0. 001: SRAM/NOR chip select 1. 100: NAND Flash. others: reserved.
cmd_type (TYPE)
22:21
wo
Select the command type: 00: UpdateRegs and AXI 01: ModeReg 10: UpdateRegs 11: ModeReg and UpdateRegs
20 19:0
wo wo
x x
Reserved. Do not modify. When cmd_type = UpdateRegs and AXI then: Bits [15:0] are used to match wdata[15:0] Bits [19:16] are reserved. Write as zero. When cmd_type = ModeReg or ModeReg and UpdateRegs, these bits map to the external memory address bits [19:0]. When cmd_type = UpdateRegs, these bits are reserved. Write as zero.
www.xilinx.com
1639
Bits 23:20
Type wo
Reset Value x
Description Timing parameter for SRAM/NOR, bit 20 only (other bits are ignored): o For asynchronous multiplexed transfers this bit controls when the SMC asserts we_n: 0: assert we_n two mclk cycles after asserting cs_n. 1: assert we_n and cs_n together. Timing parameter for NAND Flash, bits 23:20: o Busy to RE timing (t_rr), minimum permitted value = 0.
Set_t5 (SET_T5)
19:17
wo
Timing parameter for SRAM/NOR: o Turnaround time (t_ta), minimum value = 1. Timing parameter for NAND Flash: o ID read time (t_ar), mnimum value = 0.
Set_t4 (SET_T4)
16:14
wo
Timing parameter for SRAM/NOR: o Page cycle time (t_pc), minimum value = 1. Timing parameter for NAND Flash: o Page cycle time (t_clr), minimum value = 1.
Set_t3 (SET_T3)
13:11
wo
Timing parameter for SRAM/NOR: o Write Enable (t_wp) assertion delay, minimum value = 1. Timing parameter for NAND Flash: o Write Enable (t_wp) deassertion delay, minimum value = 1.
Set_t2 (SET_T2)
10:8
wo
Timing parameter for SRAM/NOR: o Output Enable (t_ceoe) assertion delay, minimum value = 1. Timing parameter for NAND Flash: o REA (t_rea) assertion delay, minimum value = 1.
7:4
wo
Timing parameter for SRAM/NOR and NAND Flash: Write cycle time, minimum value = 2. Timing parameter for SRAM/NOR and NAND Flash: Read cycle time, minimum value = 2.
3:0
wo
www.xilinx.com
1640
set_wr_bl (SET_WR_BL)
www.xilinx.com
1641
Bits 5:3
Type wo
Reset Value x
Description NAND Flash: reserved, write zero. SRAM/NOR: value written to opmode (rd_bl field). Memory Burst Length: 000: 1 beat 001: 4 beats 010: 8 beats 011: 16 beats 100: 32 beats 101: continuous others: reserved
2 1:0
wo wo
x x
Reserved. Do not modify. SRAM/NOR: mw= 00 (8-bit) NAND Flash: mw= 00 (8-bit) or 01 (16-bit)
www.xilinx.com
1642
Bits 3:0
Type rw
Description Set the number of consecutive memory bursts that are permitted, prior to the SMC deasserting chip select to enable the PSRAM to initiate a refresh cycle. The options are: b0000: disable the insertion of idle cycles between consecutive bursts b0001: an idle cycle occurs after each burst b0010: an idle cycle occurs after 2 consecutive bursts b0011: an idle cycle occurs after 3 consecutive bursts b0100: an idle cycle occurs after 4 consecutive bursts ... b1111: an idle cycle occurs after 15 consecutive bursts.
www.xilinx.com
1643
Bits 3:0
Type rw
Description Set the number of consecutive memory bursts that are permitted, prior to the SMC deasserting chip select to enable the PSRAM to initiate a refresh cycle. The options are: b0000: disable the insertion of idle cycles between consecutive bursts b0001: an idle cycle occurs after each burst b0010: an idle cycle occurs after 2 consecutive bursts b0011: an idle cycle occurs after 3 consecutive bursts b0100: an idle cycle occurs after 4 consecutive bursts ... b1111: an idle cycle occurs after 15 consecutive bursts.
www.xilinx.com
1644
Type ro ro
Description Write cycle time, refer to SET_CYCLES register. Read cycle time, refer to SET_CYCLES register.
reserved reserved reserved baa (BAA) wr_bl (WR_BL) reserved rd_bl (RD_BL) reserved mw (MW)
15:13 12 11 10
ro ro ro ro
ro ro ro ro ro
www.xilinx.com
1645
www.xilinx.com
1646
www.xilinx.com
1647
Description
ro ro ro ro
15:13 12 11
ro ro ro
www.xilinx.com
1648
Type ro ro ro ro ro ro
Description Reserved. Do not modify. Reserved. Do not modify. Reserved. Do not modify. Reserved. Do not modify. Reserved. Do not modify. Data bus width is 8 bits, see SET_OPMODE register.
www.xilinx.com
1649
www.xilinx.com
1650
Bits 29:25
Type ro
Description Read flags for ECC blocks. Indicate whether the stored ECC value for each block has been read from memory: 0: not read 1: read Bit [29] Extra block (if used). Bit [28] Block 3. Bit [27] Block 2. Bit [26] Block 1. Bit [25] Block 0.
ecc_can_correct (ECC_CAN_CORREC T)
24:20
ro
0x0
Correctable flag for each ECC block: 0: not correctable error 1: correctable error Bit [24] Extra block (if used). Bit [23] Block 3. Bit [22] Block 2. Bit [21] Block 1. Bit [20] Block 0.
19:15 14:10 9
ro ro ro
Pass/fail flag for each ECC block Valid flag for each ECC block. ECC calcuation type: 0: write 1: read
8:7
ro
0x0
Last ECC result is updated after completing the ECC calculation: 00: Completed successfully. 01: Unaligned Address, or out-of-range. 10: Data stop after incomplete block. 11: Data stopped but values not read/written because of ecc_jump value.
www.xilinx.com
1651
Bits 6
Type ro
5:0
ro
0x0
The interrupts are: Bit [5] Abort. Bit [4] Extra block (if used). Bit [3] Block 3. Bit [2] Block 2. Bit [1] Block 1. Bit [0] Block 0. To clear the interrupt, write a 1 to the bit.
www.xilinx.com
1652
Field Name ecc_int_abort (ECC_MEMCFG_ECC_ INT_ABORT) ecc_int_pass (ECC_MEMCFG_ECC_ INT_PASS) ecc_ignore_add_eight (ECC_MEMCFG_IGN ORE_ADD8) ecc_jump (ECC_MEMCFG_ECC_ JUMP)
Bits 9
Type rw
rw
0x0
Interrupt when a correct ECC value is read from memory: 0: don't assert 1: assert
rw
0x0
Use to indicate if A8 is output with the address, required to find the aligned start of blocks: 0: A8 is output 1: A8 is not output
6:5
rw
0x2
Indicate that the memory supports column change address commands: 00: no jumping, reads and writes only occur at end of page 01: jump using column change commands 10: jump using full command 11: reserved
rw
0x0
Indicate when ECC values are read from memory: 0: ECC value for a block must be read immediately after the block. Data access must stop on a 512 byte boundary. 1: ECC values for all blocks are read at the end of the page.
3:2
rw
0x0
Specify the mode of the ECC block: 00: bypassed 01: ECC values are calculated and made available on the APB interface. But they are not read to or written from memory. 10: ECC values and calculated and read/written to memory. For a read, the ECC value is checked and the result of the check is made available on the APB interface. 11: reserved
1:0
rw
0x3
The number of 512 byte blocks in a page: 00: No 512 byte blocks. Reserved if an ecc_extra_block is not configured and enabled. 01: One 512 byte block. 10: Two 512 byte blocks. 11: Four 512 byte blocks.
www.xilinx.com
1653
www.xilinx.com
1654
www.xilinx.com
1655
Relative Address Absolute Address Width Access Type Reset Value Description
www.xilinx.com
1656
Type ro ro
Description Reserved, read undefined ECC value of check result for block, depending on ECC configuration
www.xilinx.com
1657
www.xilinx.com
1658
Field Name ecc_int (ECC_VALUE_INT) ecc_valid (ECC_VALUE_VALID) ecc_read (ECC_VALUE_READ) ecc_fail (ECC_VALUE_FAIL) ecc_correct (ECC_VALUE_CORRE CT) reserved ecc_value (ECC_VALUE)
Bits 31 30 29 28 27
Type ro ro ro ro ro
Description Interrupt flag for this value Indicate if this value is valid Indicate if the ECC value has been read from memory Indicate if this value has failed Indicate if this block is correctable
26:24 23:0
ro ro
0x0 0x0
Reserved, read undefined ECC value of check result for block, depending on ECC configuration
www.xilinx.com
1659
Register Summary
Register Name Config_reg0 Intr_status_reg0 Intrpt_en_reg0 Intrpt_dis_reg0 Intrpt_mask_reg0 En_reg0 Delay_reg0 Tx_data_reg0 Rx_data_reg0 Slave_Idle_count_reg0 TX_thres_reg0 RX_thres_reg0 Mod_id_reg0 Address 0x00000000 0x00000004 0x00000008 0x0000000C 0x00000010 0x00000014 0x00000018 0x0000001C 0x00000020 0x00000024 0x00000028 0x0000002C 0x000000FC Width 32 32 32 32 32 32 32 32 32 32 32 32 32 Type mixed mixed mixed mixed ro mixed rw wo ro mixed rw rw ro Reset Value 0x00020000 0x00000004 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x000000FF 0x00000001 0x00000001 0x00090106 Description SPI configuration register SPI interrupt status register Interrupt Enable register Interrupt disable register Interrupt mask register SPI_Enable Register Delay Register Transmit Data Register. Receive Data Register Slave Idle Count Register TX_FIFO Threshold Register RX FIFO Threshold Register Module ID register
www.xilinx.com
1660
www.xilinx.com
1661
Bits 5:3
Type rw
Description Master mode baud rate divisor controls the amount the spi_ref_clk is divided inside the SPI block 000: not supported 001: divide by 4 010: divide by 8 011: divide by 16 100: divide by 32 101: divide by 64 110: divide by 128 111: divide by 256
rw
0x0
Clock phase 1: the SPI clock is inactive outside the word 0: the SPI clock is active outside the word
rw
0x0
Clock polarity outside SPI word 1: the SPI clock is quiescent high 0: the SPI clock is quiescent low
rw
0x0
Mode select 1: the SPI is in master mode 0: the SPI is in slave mode
www.xilinx.com
1662
www.xilinx.com
1663
spi0: 0xE0006008 spi1: 0xE0007008 32 bits mixed 0x00000000 Interrupt Enable register
www.xilinx.com
1664
www.xilinx.com
1665
Bits 1
Type wo
RX_OVERFLOW (IXR_RXOVR)
wo
0x0
www.xilinx.com
1666
Bits 3
Type ro
Description
1: interrupt is disabled 0: interrupt is enabled TX_FIFO_not_full (IXR_TXOW) 2 ro 0x0 TX FIFO not full enable 1: interrupt is disabled 0: interrupt is enabled MODE_FAIL (IXR_MODF) 1 ro 0x0 ModeFail interrupt enable 1: interrupt is disabled 0: interrupt is enabled RX_OVERFLOW (IXR_RXOVR) 0 ro 0x0 Receive Overflow interrupt enable 1: interrupt is disabled 0: interrupt is enabled
www.xilinx.com
1667
Software Name Relative Address Absolute Address Width Access Type Reset Value Description
www.xilinx.com
1668
www.xilinx.com
1669
Threshold_of_TX_FIFO 31:0
www.xilinx.com
1670
www.xilinx.com
1671
Register Summary
Register Name MODE CONTROL RESTART STATUS Address 0x00000000 0x00000004 0x00000008 0x0000000C Width 24 26 16 1 Type mixed mixed wo ro Reset Value 0x000001C2 0x03FFC3FC 0x00000000 0x00000000 Description WD zero mode register Counter Control Register Restart key register - this not a real register as no data is stored Status Register
reserved
11:9
waz
0x0
www.xilinx.com
1672
Bits 8:7
Type rw
Description Interrupt request length - selects the number of pclk cycles during which an interrupt request is held active after it is invoked: 00 = 4 01 = 8 10 = 16 11 = 32
RSTLN
6:4
rw
0x4
Reset length - selects the number of clock cycles (pclk) during which the internal system reset is held active after it is invoked: 000 = 2 001 = 4 010 = 8 011 = 16 100 = 32 101 = 64 110 = 128 111 = 256 Note: The minimum number of cycles required for an AMBA reset is two.
reserved IRQEN
3 2
waz rw
0x0 0x0
Should be zero (sbz) Interrupt request enable - if set, the watchdog will issue an interrupt request when the counter reaches zero, if WDEN = 1. Reset enable - if set, the watchdog will issue an internal reset when the counter reaches zero, if WDEN = 1. Watchdog enable - if set, the watchdog is enabled and can generate any signals that are enabled.
RSTEN
rw
0x1
WDEN
rw
0x0
www.xilinx.com
1673
CRV
13:2
rw
0xFF
CLKSEL
1:0
rw
0x0
www.xilinx.com
1674
www.xilinx.com
1675
Register Summary
Register Name Clock_Control_1 Clock_Control_2 Clock_Control_3 Counter_Control_1 Counter_Control_2 Counter_Control_3 Counter_Value_1 Counter_Value_2 Counter_Value_3 Interval_Counter_1 Interval_Counter_2 Interval_Counter_3 Match_1_Counter_1 Match_1_Counter_2 Match_1_Counter_3 Match_2_Counter_1 Match_2_Counter_2 Match_2_Counter_3 Match_3_Counter_1 Match_3_Counter_2 Match_3_Counter_3 Address 0x00000000 0x00000004 0x00000008 0x0000000C 0x00000010 0x00000014 0x00000018 0x0000001C 0x00000020 0x00000024 0x00000028 0x0000002C 0x00000030 0x00000034 0x00000038 0x0000003C 0x00000040 0x00000044 0x00000048 0x0000004C 0x00000050 Width 7 7 7 7 7 7 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 Type rw rw rw rw rw rw ro ro ro rw rw rw rw rw rw rw rw rw rw rw rw Reset Value 0x00000000 0x00000000 0x00000000 0x00000021 0x00000021 0x00000021 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 Description Clock Control register Clock Control register Clock Control register Operational mode and reset Operational mode and reset Operational mode and reset Current counter value Current counter value Current counter value Interval value Interval value Interval value Match value Match value Match value Match value Match value Match value Match value Match value Match value
www.xilinx.com
1676
Address 0x00000054
Width 6
Type ro
Description Counter 1 Interval, Match, Overflow and Event interrupts Counter 2 Interval, Match, Overflow and Event interrupts Counter 3 Interval, Match, Overflow and Event interrupts ANDed with corresponding Interrupt Register ANDed with corresponding Interrupt Register ANDed with corresponding Interrupt Register Enable, pulse and overflow Enable, pulse and overflow Enable, pulse and overflow pclk cycle count for event pclk cycle count for event pclk cycle count for event
6 6 6
ro ro rw
Interrupt_Enable_2
0x00000064
rw
0x00000000
Interrupt_Enable_3
0x00000068
rw
0x00000000
3 3 3 16 16 16
rw rw rw ro ro ro
www.xilinx.com
1677
www.xilinx.com
1678
www.xilinx.com
1679
5 4
rw rw
0x1 0x0
Match (MATCH)
rw
0x0
2 1
rw rw
0x0 0x0
DIS
rw
0x1
www.xilinx.com
1680
rw
0x1
rw
0x0
Setting this bit high resets the counter value and restarts counting; the RST bit is automatically cleared on restart. Register Match mode: when Match is set, an interrupt is generated when the count value matches one of the three match registers and the corresponding bit is set in the Interrupt Enable register. Decrement: when this bit is high the counter counts down. When this bit is high, the timer is in Interval Mode, and the counter generates interrupts at regular intervals; when low, the timer is in overflow mode. Disable counter: when this bit is high, the counter is stopped, holding its last value until reset, restarted or enabled again.
rw
0x0
2 1
rw rw
0x0 0x0
DIS (CNT_CNTRL_DIS)
rw
0x1
www.xilinx.com
1681
rw
0x1
rw
0x0
Setting this bit high resets the counter value and restarts counting; the RST bit is automatically cleared on restart. Register Match mode: when Match is set, an interrupt is generated when the count value matches one of the three match registers and the corresponding bit is set in the Interrupt Enable register. Decrement: when this bit is high the counter counts down. When this bit is high, the timer is in Interval Mode, and the counter generates interrupts at regular intervals; when low, the timer is in overflow mode. Disable counter: when this bit is high, the counter is stopped, holding its last value until reset, restarted or enabled again.
rw
0x0
2 1
rw rw
0x0 0x0
DIS (CNT_CNTRL_DIS)
rw
0x1
www.xilinx.com
1682
www.xilinx.com
1683
www.xilinx.com
1684
www.xilinx.com
1685
www.xilinx.com
1686
Description
Match value
www.xilinx.com
1687
www.xilinx.com
1688
www.xilinx.com
1689
www.xilinx.com
1690
www.xilinx.com
1691
www.xilinx.com
1692
E_Lo
rw
0x0
E_En
rw
0x0
www.xilinx.com
1693
E_Lo
rw
0x0
E_En
rw
0x0
E_Lo
rw
0x0
E_En
rw
0x0
www.xilinx.com
1694
ttc0: 0xF8001078 ttc1: 0xF8002078 16 bits ro 0x00000000 pclk cycle count for event
www.xilinx.com
1695
Description
www.xilinx.com
1696
Register Summary
Register Name Control_reg0 mode_reg0 Intrpt_en_reg0 Intrpt_dis_reg0 Intrpt_mask_reg0 Chnl_int_sts_reg0 Baud_rate_gen_reg0 Rcvr_timeout_reg0 Rcvr_FIFO_trigger_lev el0 Modem_ctrl_reg0 Modem_sts_reg0 Channel_sts_reg0 TX_RX_FIFO0 Baud_rate_divider_reg 0 Flow_delay_reg0 Tx_FIFO_trigger_level 0 Address 0x00000000 0x00000004 0x00000008 0x0000000C 0x00000010 0x00000014 0x00000018 0x0000001C 0x00000020 0x00000024 0x00000028 0x0000002C 0x00000030 0x00000034 0x00000038 0x00000044 Width 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 Type mixed mixed mixed mixed ro wtc mixed mixed mixed mixed mixed ro mixed mixed mixed mixed Reset Value 0x00000128 0x00000000 0x00000000 0x00000000 0x00000000 0x00000200 0x0000028B 0x00000000 0x00000020 0x00000000 x 0x00000000 0x00000000 0x0000000F 0x00000000 0x00000020 Description UART Control Register UART Mode Register Interrupt Enable Register Interrupt Disable Register Interrupt Mask Register Channel Interrupt Status Register Baud Rate Generator Register. Receiver Timeout Register Receiver FIFO Trigger Level Register Modem Control Register Modem Status Register Channel Status Register Transmit and Receive FIFO Baud Rate Divider Register Flow Control Delay Register Transmitter FIFO Trigger Level Register
www.xilinx.com
1697
Software Name Relative Address Absolute Address Width Access Type Reset Value Description
CR 0x00000000 uart0: 0xE0000000 uart1: 0xE0001000 32 bits mixed 0x00000128 UART Control Register
www.xilinx.com
1698
Bits 2
Type rw
Description
When set to one, the receiver logic is enabled, provided the RXDIS field is set to zero. TXRES (TXRST) 1 rw 0x0 Software reset for Tx data path: 0: no affect 1: transmitter logic is reset and all pending transmitter data is discarded This bit is self clearing once the reset has completed. RXRES (RXRST) 0 rw 0x0 Software reset for Rx data path: 0: no affect 1: receiver logic is reset and all pending receiver data is discarded. This bit is self clearing once the reset has completed.
www.xilinx.com
1699
Bits 9:8
Type rw
Description Channel mode: Defines the mode of operation of the UART. 00: normal 01: automatic echo 10: local loopback 11: remote loopback
NBSTOP
7:6
rw
0x0
Number of stop bits: Defines the number of stop bits to detect on receive and to generate on transmit. 00: 1 stop bit 01: 1.5 stop bits 10: 2 stop bits 11: reserved
PAR
5:3
rw
0x0
Parity type select: Defines the expected parity to check on receive and the parity to generate on transmit. 000: even parity 001: odd parity 010: forced to 0 parity (space) 011: forced to 1 parity (mark) 1xx: no parity
CHRL
2:1
rw
0x0
Character length select: Defines the number of bits in each character. 11: 6 bits 10: 7 bits 0x: 8 bits
CLKS (CLKSEL)
rw
0x0
Clock source select: This field defines whether a pre-scalar of 8 is applied to the baud rate generator input clock. 0: clock source is uart_ref_clk 1: clock source is uart_ref_clk/8
www.xilinx.com
1700
www.xilinx.com
1701
Bits 1
Type wo
wo
0x0
www.xilinx.com
1702
Field Name TIMEOUT (IXR_TOUT) PARE (IXR_PARITY) FRAME (IXR_FRAMING) ROVR (IXR_OVER) TFUL (IXR_TXFULL) TEMPTY (IXR_TXEMPTY) RFUL (IXR_RXFULL) REMPTY (IXR_RXEMPTY) RTRIG (IXR_RXOVR)
Bits 8
Type wo
wo
0x0
wo
0x0
wo
0x0
wo
0x0
wo
0x0
wo
0x0
wo
0x0
wo
0x0
www.xilinx.com
1703
Description
www.xilinx.com
1704
Bits 2
Type ro
Description Receiver FIFO Full interrupt mask status: 0: interrupt is disabled 1: interrupt is enabled
ro
0x0
Receiver FIFO Empty interrupt mask status: 0: interrupt is disabled 1: interrupt is enabled
ro
0x0
Receiver FIFO Trigger interrupt mask status: 0: interrupt is enabled 1: interrupt is enabled
www.xilinx.com
1705
Bits 11
Type wtc
Description Transmitter FIFO Nearly Full interrupt mask status: This event is triggered whenever a new word is pushed into the transmit FIFO causing the fill level to be such that there is not enough space for a further write of the number of bytes currently specified in the WSIZE bits in the Mode register. If this further write were currently attempted it would cause an overflow. Note that when WSIZE is 00, this assumes that a two byte write would be attempted and hence a single byte write is still possible without overflow by driving byte_sel low for the write. 0: no interrupt occurred 1: interrupt occurred
TTRIG
10
wtc
0x0
Transmitter FIFO Trigger interrupt mask status. This event is triggered whenever a new word is pushed into the transmit FIFO causing the fill level to become equal to the value defined by TTRIG. 0: no interrupt occurred 1: interrupt occurred
DMSI (IXR_DMS)
wtc
0x1
Delta Modem Status Indicator interrupt mask status: This event is triggered whenever the DCTS, DDSR, TERI, or DDCD in the modem status register are being set. 0: no interrupt occurred 1: interrupt occurred
TIMEOUT (IXR_TOUT)
wtc
0x0
Receiver Timeout Error interrupt mask status: This event is triggered whenever the receiver timeout counter has expired due to a long idle condition. 0: no interrupt occurred 1: interrupt occurred
PARE (IXR_PARITY)
wtc
0x0
Receiver Parity Error interrupt mask status: This event is triggered whenever the received parity bit does not match the expected value. 0: no interrupt occurred 1: interrupt occurred
FRAME (IXR_FRAMING)
wtc
0x0
Receiver Framing Error interrupt mask status: This event is triggered whenever the receiver fails to detect a valid stop bit. 0: no interrupt occurred 1: interrupt occurred
www.xilinx.com
1706
Bits 5
Type wtc
Description Receiver Overflow Error interrupt mask status: This event is triggered whenever the contents of the receiver shift register have not yet been transferred to the receiver FIFO and a new start bit is detected. This may be due to the FIFO being full, or due to excessive clock boundary delays. 0: no interrupt occurred 1: interrupt occurred
TFUL (IXR_TXFULL)
wtc
0x0
Transmitter FIFO Full interrupt mask status: This event is triggered whenever a new word is inserted into the transmit FIFO causing it to go from a non-full condition to a full condition. 0: no interrupt occurred 1: interrupt occurred
TEMPTY (IXR_TXEMPTY)
wtc
0x0
Transmitter FIFO Empty interrupt mask status: This event is triggered whenever the final word is removed from the transmit FIFO. 0: no interrupt occurred 1: interrupt occurred
RFUL (IXR_RXFULL)
wtc
0x0
Receiver FIFO Full interrupt mask status: This event is triggered whenever a new word is inserted into the receive FIFO causing it to go from a non-full condition to a full condition. 0: no interrupt occurred 1: interrupt occurred
REMPTY (IXR_RXEMPTY)
wtc
0x0
Receiver FIFO Empty interrupt mask status: This event is triggered upon exit of the final word from the receive FIFO. 0: no interrupt occurred 1: interrupt occurred
RTRIG (IXR_RXOVR)
wtc
0x0
Receiver FIFO Trigger interrupt mask status: This event is triggered whenever a new word is inserted into the receive FIFO . 0: no interrupt occurred 1: interrupt occurred
www.xilinx.com
1707
uart0: 0xE0000018 uart1: 0xE0001018 32 bits mixed 0x0000028B Baud Rate Generator Register.
www.xilinx.com
1708
www.xilinx.com
1709
Bits 31:6 5
Type ro rw
Description Reserved, read as zero, ignored on write. Automatic flow control mode: 0: disable Transmission is continuous regardless of the value of the EMIOUARTxCTSN input, and the EMIOUARTxRTSN output is driven completely under software control. 1: enable Transmission will only occur when the EMIOUARTxCTSN input is asserted low, and the EMIOUARTxRTSN output is driven using a compare of the RX FIFO fill level to the programmed FDEL value.
reserved RTS
4:2 1
ro rw
0x0 0x0
Reserved, read as zero, ignored on write. Request to send output control: This bit is ignored if automatic flow control mode is enabled by FCM being high. If FCM is low, the value of this bit is inverted when applied to the EMIOUARTxRTSN output. 0: EMIOUARTxRTSN output forced to logic 1 1: EMIOUARTxRTSN output forced to logic 0
DTR
rw
0x0
Data Terminal Ready: The value of this bit is inverted when applied to the EMIOUARTxDTRN output. 0: EMIOUARTxDTRN output forced to logic 1 1: EMIOUARTxDTRN output forced to logic 0
www.xilinx.com
1710
information. These bits are set to logic 1 whenever a control input from the modem changes state. In the default configuration, these delta bits are all cleared simultaneously when this register is read. This may be parameterised at compile time such that a one must be written to a bit in order to clear it and a read has no effect.
Field Name reserved FCMS Bits 31:9 8 Type ro rw x x Reset Value Description Reserved, read as zero, ignored on write. Flow Control Mode: 0: disabled 1: enabled DCD 7 ro x Data Carrier Detect (DCD) input signal from PL (EMIOUARTxDCDN) status: 0: input is high 1: input is low RI 6 ro x Ring Indicator (RI) input signal from PL (EMIOUARTxRIN) status: 0: input is high 1: input is low DSR 5 ro x Data Set Ready (DSR) input signal from PL (EMIOUARTxDSRN) status: 0: input is high 1: input is low CTS 4 ro x Clear to Send (CTS) input signal from PL (EMIOUARTxCTSN) status: 0: input is high 1: input is low DDCD (MEDEMSR_DCDX) 3 wtc x Delta Data Carrier Detect status: Indicates a change in state of the EMIOUARTxDCDN input since this bit was last cleared. 0: No change has occurred 1: Change has occurred TERI (MEDEMSR_RIX) 2 wtc x Trailing Edge Ring Indicator status: Indicates that the EMIOUARTxRIN input has change from high to low state since this bit was last cleared. 0: No trailing edge has occurred 1: Trailing edge has occurred
www.xilinx.com
1711
Bits 1
Type wtc
Reset Value x
Description Delta Data Set Ready status: Indicates a change in state of the EMIOUARTxDSRN input since this bit was last cleared. 0: No change has occurred 1: Change has occurred
DCTS (MEDEMSR_CTSX)
wtc
Delta Clear To Send status: Indicates a change in state of the EMIOUARTxCTSN input since this bit was last cleared. 0: No change has occurred 1: Change has occurred
www.xilinx.com
1712
Bits 31:15 14
Type ro ro
Description Reserved, read as zero, ignored on write. Transmitter FIFO Nearly Full continuous status: This indicates that there is not enough space for the number of bytes currently specified in the WSIZE bits in the Mode register. If a write were currently attempted it would cause an overflow. Note that when WSIZE is 00, this assumes that a two byte write would be attempted and hence a single byte write is still possible without overflow by driving byte_sel low for the write. 0: More than one byte is unused in the Tx FIFO 1: Only one byte is free in the Tx FIFO
TTRIG
13
ro
0x0
Transmitter FIFO Trigger continuous status: 0: Tx FIFO fill level is less than TTRIG 1: Tx FIFO fill level is greater than or equal to TTRIG
FDELT (FLOWDEL)
12
ro
0x0
Receiver flow delay trigger continuous status: 0: Rx FIFO fill level is less than FDEL 1: Rx FIFO fill level is greater than or equal to FDEL
TACTIVE
11
ro
0x0
RACTIVE
10
ro
0x0
reserved reserved reserved reserved reserved TFUL (TXFULL) TEMPTY (TXEMPTY) RFUL (RXFULL)
9 8 7 6 5 4
ro ro ro ro ro ro
Reserved. Do not modify. Reserved. Do not modify. Reserved. Do not modify. Reserved. Do not modify. Reserved. Do not modify. Transmitter FIFO Full continuous status: 0: Tx FIFO is not full 1: Tx FIFO is full
ro
0x0
Transmitter FIFO Empty continuous status: 0: Tx FIFO is not empty 1: Tx FIFO is empty
ro
0x0
Receiver FIFO Full continuous status: 1: Rx FIFO is full 0: Rx FIFO is not full
www.xilinx.com
1713
Bits 1
Type ro
Description Receiver FIFO Full continuous status: 0: Rx FIFO is not empty 1: Rx FIFO is empty
ro
0x0
Receiver FIFO Trigger continuous status: 0: Rx FIFO fill level is less than RTRIG 1: Rx FIFO fill level is greater than or equal to RTRIG
www.xilinx.com
1714
www.xilinx.com
1715
www.xilinx.com
1716
Register Summary
Register Name ID HWGENERAL HWHOST HWDEVICE HWTXBUF HWRXBUF GPTIMER0LD GPTIMER0CTRL GPTIMER1LD GPTIMER1CTRL SBUSCFG CAPLENGTH_HCIVE RSION HCSPARAMS HCCPARAMS DCIVERSION DCCPARAMS Address 0x00000000 0x00000004 0x00000008 0x0000000C 0x00000010 0x00000014 0x00000080 0x00000084 0x00000088 0x0000008C 0x00000090 0x00000100 0x00000104 0x00000108 0x00000120 0x00000124 Width 32 12 32 6 32 32 24 32 24 32 3 32 28 16 16 9 Type ro ro ro ro ro ro rw mixed rw mixed rw ro ro ro ro ro Reset Value 0xE441FA05 0x00000083 0x10020001 0x00000019 0x80060A10 0x00000A10 0x00000000 0x00000000 0x00000000 0x00000000 0x00000003 0x01000040 0x00010011 0x00000006 0x00000001 0x0000018C Description IP version and revision, read-only Misc IP config constants, read-only Host Mode IP config constants, read-only Device Mode IP config constants, read-only TxBuffer IP config constants, read-only IP constants, RX buffer constants, read-only GP Timer 0 Load Value GP Timer 1 Control GP Timer 1 Load Value GP Timer 1 Control DMA Master AHB Burst Mode EHCI Addr Space and HCI constants, read-only TT counts and EHCI HCS constants, read-only EHCI Host configuration constants Device Mode CI version constant EHCI, device and endpoint capabilities
www.xilinx.com
1717
Register Name USBCMD USBSTS USBINTR FRINDEX PERIODICLISTBASE_ DEVICEADDR ASYNCLISTADDR_E NDPOINTLISTADDR TTCTRL BURSTSIZE TXFILLTUNING TXTTFILLTUNING IC_USB ULPI_VIEWPORT ENDPTNAK ENDPTNAKEN CONFIGFLAG PORTSC1 OTGSC USBMODE ENDPTSETUPSTAT ENDPTPRIME ENDPTFLUSH ENDPTSTAT ENDPTCOMPLETE ENDPTCTRL0 ENDPTCTRL1 ENDPTCTRL2 ENDPTCTRL3 ENDPTCTRL4 ENDPTCTRL5
Address 0x00000140 0x00000144 0x00000148 0x0000014C 0x00000154 0x00000158 0x0000015C 0x00000160 0x00000164 0x00000168 0x0000016C 0x00000170 0x00000178 0x0000017C 0x00000180 0x00000184 0x000001A4 0x000001A8 0x000001AC 0x000001B0 0x000001B4 0x000001B8 0x000001BC 0x000001C0 0x000001C4 0x000001C8 0x000001CC 0x000001D0 0x000001D4
Width 24 26 26 14 32 32 32 17 22 13 32 32 32 32 32 32 32 32 16 32 32 32 32 24 24 24 24 24 24
Type mixed mixed mixed rw mixed mixed mixed rw mixed mixed mixed mixed wtc rw ro mixed mixed mixed wtc wtc wtc ro rw mixed mixed mixed mixed mixed mixed
Reset Value 0x00000B00 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00001010 0x00020000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000001 0x00000000 0x00000020 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00800080 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
Description USB Commands (EHCI extended) Interrupt/Raw Status (EHCI extended) (Host/Device) Interrrupts and Enables Frame List Index Host/Device Address dual-use Host/Device dual-use TT Control Burst Size TxFIFO Fill Tuning TT TX latency FIFO Low and Fast Speed Control constants ULPI Viewport Endpoint NAK (Device mode) Endpoint NAK (Device mode) reserved Port Status & Control OTG Status and Control USB Mode Selection Endpoint Status Setup (Device mode) Endpoint Primer (Device mode) Endpoint Flush (Device mode) Endpoint Buffer Ready Status (Device mode), RO Endpoint Tx Complete (Device mode) Endpoint 0 (Device mode) Endpoints 1 to 11 (Device mode) Endpoints 1 to 11 (Device mode) Endpoints 1 to 11 (Device mode) Endpoints 1 to 11 (Device mode) Endpoints 1 to 11 (Device mode)
www.xilinx.com
1718
Width 24 24 24 24 24 24
Description Endpoints 1 to 11 (Device mode) Endpoints 1 to 11 (Device mode) Endpoints 1 to 11 (Device mode) Endpoints 1 to 11 (Device mode) Endpoints 1 to 11 (Device mode) Endpoints 1 to 11 (Device mode)
Register (usb) ID
Name Relative Address Absolute Address Width Access Type Reset Value Description ID 0x00000000 usb0: 0xE0002000 usb1: 0xE0003000 32 bits ro 0xE441FA05 IP version and revision, read-only
Register ID Details
IP supplier controller identification (revision and synthesized configuration). Hardwired (constant value).
Field Name CIVERSION VERSION Bits 31:29 28:25 Type ro ro Reset Value 0x7 0x2 Description Reserved, reads 111. IP entire version code: [VERSION].[REVISION][TAG] refers to IP version 2.20a. Refer to [VERSION]. Refer to [VERSION]. reserved, writes ignored. Controller ID: Ones complement of [ID]. reserved, writes ignored. Controller ID: USB controller supports HS, On-the-Go, and FS/LS.
ro ro ro ro ro ro
www.xilinx.com
1719
Relative Address Absolute Address Width Access Type Reset Value Description
0x00000004 usb0: 0xE0002004 usb1: 0xE0003004 12 bits ro 0x00000083 Misc IP config constants, read-only
www.xilinx.com
1720
Description
www.xilinx.com
1721
www.xilinx.com
1722
www.xilinx.com
1723
Bits 31
Type rw
Description General Purpose Timer Enable. 0: disable. 1: enable. The setting of [GPTRUN] will not have an effect on the [GPTCNT] counter value.
GPTRST
30
wo
0x0
General Purpose Timer Reset. Write 1 to reload. 0: no affect. 1: Reload the [GPTCNT] with the value in [GPTLD].
29:25 GPTMODE 24
ro rw
0x0 0x0
reserved Select Countdown Timer mode. 0: One Shot (single timer countdown). The timer will count down to zero, generate an interrupt and stop until the counter is reset by software. 1: Repeat (looped countdown). The timer will count down to zero, generate an interrupt and automatically reload the counter to begin again.
GPTCNT
23:0
rw
0x0
www.xilinx.com
1724
www.xilinx.com
1725
www.xilinx.com
1726
Bits 11:8
Type ro
Description Ports supported by each Companion Controller (EHCI constant). 0: no companion controller hardware refer to the embeded Transaction Translator (TT).
7:5 4 3:0
ro ro ro
reserved VBUS Power Control (EHCI constant). 1: signal avaiable via EMIO, see PORTSC1 [PP]. Downstream ports (EHCI constant). 1: one downstream port.
www.xilinx.com
1727
Bits 1
Type ro
Description Programmable Frame List sizes (Host mode). Software can specify the size of the frame list for the periodic schedule. Configure the size using the usb.USBCMD [FS2] [FS0] Frame List Size field: 8, 16, 32, .... 512, 1024.
ADC
ro
0x0
www.xilinx.com
1728
Field Name HC DC
Bits 8 7 6:5
Type ro ro ro ro
Description 1: the controller supports EHCI compatible mode. 1: the controller supports Device mode. reserved Number of endpoints supported in Device mode. 1100: 12 endpoints; control EP0 plus EP {11:1}.
DEN
4:0
www.xilinx.com
1729
Bits 13
Type rw
Description Setup TripWire (Device mode). This semaphore is between the DCD and the hardware for extracting setup data from QH with out any corruption. Refer to the chapter text for usage.
reserved ASPE
12 11
ro rw
0x0 0x1
reserved Asynchronous Schedule Park Mode Enable (EHCI). This bit enables/disables the Asynchronous Schedule Park Mode if Asynchronous Park Capability bit in HCCPARAMS is one. Otherwise this bit is zero and Park Mode is disabled.
reserved ASP
10 9:8
ro rw
0x0 0x3
reserved Asynchronous Schudule Park Capability is supported (EHCI). The default is 3. Use any value between 1 and 3. The value 3 gives the maximum throughput in terms of number endpoint transactions compared to 1 or 2.
LR IAA
7 6
ro rw
0x0 0x0
Light Host/Device Controller Reset (EHCI). 0: not supported. Interrupt on Async Schedule Advance Doorbell (EHCI). 0: no affect 1: ring the doorbell when the controller advances the asynchronous schedule.
ASE
rw
0x0
Asyncronous Schedule Enable (EHCI) (Host mode). 0: disable Async Schedule processing (the current DMA transactions finishes). 1: enable Async Schedule processing (the memory address for the async schedule is programmed into usb.ASYNCLISTADDR).
PSE
rw
0x0
Periodic Schedule Enable (EHCI) (Host mode). 0: disable Periodic Schedule processing 1: enable Periodic Schedule Note: The memory address for the periodic schedule is programmed into usb.PERIODICLISTBASE.
www.xilinx.com
1730
Bits 3:2
Type rw
Description Frame List Size (EHCI extended). usb.USBCMD [15] [3] [2] bits: 000: 1024 elements (4096 bytes) 001: 512 elements (2048 bytes) ... 111: 8 elements (32 bytes)
RST RS
1 0
rw rw
0x0 0x0
Controller Reset and Status (ECHI) (Host and Device mode). Run/Stop (ECHI) (Host and Device modes). Device Mode: 0: the controller halts activity after the current packet transfer is complete. 1: the controller proceeds to execute the periodic and async schedules. Host Mode: 0: TBD 1: TBD
www.xilinx.com
1731
Bits 25 24
Type rw rw
Description GP timer 1 raw interrupt (Host/Device). Refer to [TI0] bit description. GP timer 0 raw interrupt status (Host/Device). Read -0: inactive. 1: active. Hardware sets this bit = 1 when the counter in the GPTIMER0CTRL register transitions to zero. Write -0: no effect. 1: clear this bit to 0.
23:20 19
ro rw
0x0 0x0
reserved Host Periodic raw interrupt status. (Host mode) Read -0: inactive. 1: active. Note: Hardware sets this bit = 1 when a periodic TD is completed with IOC = 1. Write -0: no effect. 1: clear the interrupt bit to 0.
UAI (IXR_UA)
18
rw
0x0
Host Async Schedule raw interrupt status. (Host mode) Read -0: inactive. 1: active. Note: Hardware sets this bit = 1 when an async TD is completed with IOC = 1. Write -0: no effect. 1: clear the interrupt bit to 0.
17 16
ro ro
0x0 0x0
RESERVED NAK Interrupt (Device mode), read-only. Read -0: inactive. 1: active. Note: Hardware sets this bit = 1 when the endpoint sends a NAK response and NAK bit is set. Write -0: no effect. 1: clear the interrupt bit to 0.
www.xilinx.com
1732
Bits 15
Type ro
Description Async Schedule Processing Status (EHCI) (Host mode), read-only. 0: inactive. 1: active, async schedule is enabled. Note: This status bit is used with the usb.USBCMD [ASE] enable bit. When the software sets usb.USBCMD [ASE], this bit reflects when HW really enabled processing async schedule.
PS (IXR_PS)
14
ro
0x0
Periodic Schedule Processing Status (EHCI) (Host mode), read-only. 0: inactive. 1: active, periodic schedule is enabled. Note: This status bit is used with the usb.USBCMD [PSE] enable bit. When the software sets usb.USBCMD [PSE], this bit reflects when HW really enabled processing periodic schedule.
13
ro
0x0
Reclamation (EHCI) (Host mode), read-only. 0: unprocessed async transactions. 1: empty async schedule.
12
ro
0x0
HCHaIted (EHCI) (Host mode). This bit is a zero whenever the Run/Stop bit is a one. The Controller sets this bit to one after it has stopped executing because of the Run/Stop bit being set to 0, either by software or by the Controller hardware (e.g. internal error).
11 10
ro rw
0x0 0x0
reserved ULPI Event Completion Interrupt (Host and Device mode). 0: not completed. 1: completed (write 1 to clear).
9 8
ro rw
0x0 0x0
reserved DCSuspend (Device mode). Write-to-clear. When the controller enters a suspend state from an active state, this bit will be set to a one. This bit is only cleared by software writing a 1 to it.
www.xilinx.com
1733
Bits 7
Type rw
Description SOF Received (Device and Host mode). Indicates start-of-frame detected. 0: not detected 1: SOF detected by hardware (write 1 to clear) Device mode -When the controller detects an SOF on the ULPI bus, this bit is set. This normally occurs at 1 ms or 125 us intervals. Host mode -The controller sets this bit every 125 us. Host software can use this tic for a time base.
URI (IXR_UR)
rw
0x0
USB Reset Received (Device mode). Indicates a USB reset detected by hardware on ULPI bus. 0: not detected 1: reset detected by hardware (write 1 to clear)
AAI (IXR_AA)
rw
0x0
Async Schedule Advance (EHCI) (Host mode). The async advance interrupt can be generated when the controller advances the async schedule. 0: no change 1: controller advanced (write 1 to clear) This event is primed using the async advance doorbell bit, usb.USBCMD [6].
SEI
rw
0x0
System Error (EHCI). AHB interconnect. 0: no error detected. 1: AHB error received (write 1 to clear)
FRI (IXR_FRE)
rw
0x0
Frame List Rollover (EHCI?). Write-to-clear. Read: 0: no rollover. 1: roll over to frame element 0. Write: 0: no effect. 1: clear bit to 0.
www.xilinx.com
1734
Bits 2
Type rw
Description Port Change Detect. The Controller in host mode sets this bit to a one when on any port a Connect Status occurs, a Port Enable/Disable Change occurs, or the Force Port Resume bit is set as the result of a J-K transition on the suspended port. The Controller in device mode sets this bit to a one when it detects resume signaling or the port controller enters the full or high-speed operational state. When the port controller exits the full or high-speed operation states due to Reset or Suspend events, the notification mechanisms are the USB Reset Received bit and the DCSuspend bits respectively.
rw
0x0
USB Error Interrupt. When completion of a USB transaction results in an error condition, this bit is set by the Controller USB Packet Interrupt on Completion (IOC). Write-to-clear. This bit is set by the hardware in situations: * after a transaction descriptor (TD or dTD) is finished and it's interrupt on complete (IOC) bit set. * a short packet is detected. A short packet is when the actual number of bytes received was less than expected.
rw
0x0
www.xilinx.com
1735
Bits 25
Type rw
Description GP Timer 1 Interrupt Enable (Host/Device). 0: disable. 1: enable. Refer to raw interrupt status: USBSTS [TI1].
TIE0 (IXR_TI0)
24
rw
0x0
GP Timer 0 Interrupt Enable (Host/Device). 0: disable. 1: enable. Refer to raw interrupt status: USBSTS [TI0].
23:20 19
ro rw
0x0 0x0
reserved Host Periodic Interrupt Enable (Host mode). 0: disable. 1: enable. Refer to raw interrupt status: USBSTS [UPI].
UAEI (IXR_UA)
18
rw
0x0
Host Async Interrupt Enable (Host mode). 0: disable. 1: enable. Refer to raw interrupt status: USBSTS [UAE].
17 16
ro ro
0x0 0x0
reserved NAK Interrupt Enable (Device mode). 0: disable. 1: enable. Refer to raw interrupt status: USBSTS [NAKI].
11 10
ro rw
0x0 0x0
reserved [15:11] ULPI Interrupt Enable (Host/Device). 0: disable. 1: enable. Refer to raw interrupt status: USBSTS [ULPII].
9 8
ro rw
0x0 0x0
reserved DCSuspend Interrupt Enable (Device mode). 0: disable. 1: enable. Refer to raw interrupt status: USBSTS [SLI].
SRE (IXR_SR)
rw
0x0
SOF Received Interrupt Enable (Device?). 0: disable. 1: enable. Refer to raw interrupt status: USBSTS [SRI].
www.xilinx.com
1736
Bits 6
Type rw
Description USB Reset Received Interrupt Enable (Device mode). 0: disable. 1: enable interrupt on receiving USB reset. Refer to raw interrupt status: USBSTS [URI].
AAE (IXR_AA)
rw
0x0
Async Advance Interrupt Enable (EHCI). 0: disable. 1: enable. Refer to raw interrupt status: USBSTS [AAI].
SEE
rw
0x0
System Error Interrupt Enable (EHCI). 0: disable. 1: enable. Refer to raw interrupt status: USBSTS [SEI].
FRE (IXR_FRE)
rw
0x0
Frame List Rollover Interrupt Enable (EHCI). 0: disable. 1: enable. Refer to raw interrupt status: USBSTS [FRI].
PCE (IXR_PC)
rw
0x0
Port Change Detect Interrupt Enable (EHCI). 0: disable. 1: enable. Refer to raw interrupt status: USBSTS [PCI].
UEE (IXR_UE)
wtc
0x0
USB Error Interrupt Enable (EHCI). 0: disable. 1: enable. Refer to raw interrupt status: USBSTS [UEI].
UE (IXR_UI)
rw
0x0
USB Interrupt Enable (EHCI). 0: disable. 1: enable. Refer to raw interrupt status: USBSTS [UI].
www.xilinx.com
1737
www.xilinx.com
1738
Bits 31:25
Type rw
Description Host mode ---- Periodic List Base Address. Memory address bits [31:25]. Device Mode ---- Device Address Advance. When this bit is '0b', any writes to USBADR are instantaneous. When this bit is written to a '1' at the same time or before USBADR is written, the write to the USBADR field is staged and held in a hidden register. After an IN occurs on endpoint 0 and is ACKed, USBADR will be loaded from the hidden register. Hardware will automatically clear this bit on the following conditions: 1) IN is ACKed to endpoint 0. (USBADR is updated from hidden register). 2) OUT/SETUP occur to endpoint 0. (USBADR is not updated). 3) Device Reset occurs (USBADR is reset to 0).
PERBASE_USBADR
24
rw
0x0
Host mode ---- Periodic List Base Address. Memory address bits [24]. Device Mode ----
PERBASE_Reserved
23:12
rw
0x0
Host mode ---- Periodic List Base Address. Memory address bits [23:12]. Device Mode ---Reserved.
reserved
11:0
ro
0x0
reserved
www.xilinx.com
1739
Bits 31:11
Type rw
Description Host mode -- Async List Base Address. Memory address bits [31:11] point to the Queue Heads (QH) . Refer to [ASYBASE} bit field for [10:5] address bits. Device Mode -- Endpoint List Base Address. Memory address bits [31:11] point to the Queue Heads (QH). There are unused memory locations. The stride for the base address is for a 16-endpoint model using both IN and OUT functions. However, twelve endpoints are implemented.
ASYBASE
10:5
rw
0x0
Host mode ---- Asynchronous List Base Address. Memory address bits [10:5]. Device Mode ---- Reserved.
reserved
4:0
ro
0x0
reserved
www.xilinx.com
1740
Bits 1
Type rw
Description Embedded TT Asynchronous Buffers Clear. This field will clear all pending transactions in the embedded TT Asynchronous Buffer(s). The clear will take as much time as necessary to clear buffer without interfering with a transaction in progress. TTAC will return to zero after being set by software only after the actual clear occurs. The TT supports up to two contexts. Embedded TT Async Buffers Status. This read only bit will be '1' if one or more transactions are being held in the embedded TT Asynchronous Buffers. When this bit is a zero, then all outstanding transactions in the embedded TT have been flushed.
TTAC
ro
0x0
www.xilinx.com
1741
Bits 16:8
Type rw
Description Programmable TX Burst Length. Default is the constant VUSB_HS_TX_BURST. This register represents the maximum length of a burst in 32-bit words while moving data from system memory to the USB bus. If field AHBBRST of register SBUSCFG is different from zero, this field TXPBURST will return the value of the INCRx length. Supported values are integer values from 4 to 128. It is recommended to set this value to a integer sub-multiple of VUSB_HS_TX_CHAN. Different values will not use all the available buffer space, preventing proper TX endpoint priming in stream disable mode (SDIS bit of USBMODE register set to '1').
RXPBURST (RX)
7:0
rw
0x10
Programmable RX Burst Length. Default is the constant VUSB_HS_RX_BURST. This register represents the maximum length of a burst in 32-bit words while moving data from the USB bus to system memory. If field AHBBRST of register SBUSCFG is different from zero, this field RXPBRUST will return the value of the INCRx length. The supported values are integer values from 4 to 128. It is recommended to set this value to a integer sub-multiple of VUSB_HS_RX_DEPTH.
www.xilinx.com
1742
Bits 21:16
Type rw
Description FIFO Burst Threshold: This register controls the number of data bursts that are posted to the TX latency FIFO in host mode before the packet begins on to the bus. The minimum value is 2 and this value should be a low as possible to maximize USB performance. A higher value can be used in systems with unpredictable latency and/or insufficient bandwidth, where the FIFO may under run because the data transferred from the latency FIFO to USB occurs before it can be replenished from system memory. This value is ignored if the Stream Disable bit in USBMODE register is set (SDIS).
15:13 12:8
ro rw
0x0 0x0
reserved Scheduler Health Counter. This register increments when the Controller fails to fill the TX latency FIFO to the level programmed by TXFIFOTHRES before running out of time to send the packet before the next Start-Of-Frame. This health counter measures the number of times this occurs to provide feedback to selecting a proper TXSCHOH. Writing to this register will clear the counter. This counter will max. at 31.
7 6:0
ro rw
0x0 0x0
RESERVED Scheduler Overhead. This register adds an additional fixed offset to the schedule time estimator described above as Tff. As an approximation, the value chosen for this register should limit the number of back-off events captured in the TXSCHHEALTH to less than 10 per second in a highly utilized bus. Choosing a value that is too high for this register is not desired as it can needlessly reduce USB utilization. The time unit represented in this register is 1.267us when a device is connected in High-Speed Mode for OTG(on the go) & SPH(single port host) implementations. The time unit represented in this register is 6.333us when a device is connected in Low/Full Speed Mode for OTG & SPH implementations. The time unit represented in this register is always 1.267us for the MPH implementation
www.xilinx.com
1743
www.xilinx.com
1744
Bits 31
Type ro
Description Inter-Chip transceiver enable 8. These bits enables the Inter-Chip transceiver for each port (for the MPH case). To enable the interface, the bits PTS must be set to '011b' in the PORTSC8. Writing a '1' to each bit selects the IC_USB interface for that port. Inter-Chip voltage selection 8 It selects which voltage is being supplied to the peripheral through each port This field is read-only and set to '000b' in case of device mode operation. This field is read-only and set to '000b' in case of Single port host controller.
IC_VDD8
30:28
ro
0x0
IC7
27
ro
0x0
Inter-Chip transceiver enable 7. These bits enables the Inter-Chip transceiver for each port (for the MPH case). To enable the interface, the bits PTS must be set to '011b' in the PORTSC7. Writing a '1' to each bit selects the IC_USB interface for that port. Inter-Chip voltage selection 7 It selects which voltage is being supplied to the peripheral through each port This field is read-only and set to '000b' in case of device mode operation. This field is read-only and set to '000b' in case of Single port host controller.
IC_VDD7
26:24
ro
0x0
IC6
23
ro
0x0
Inter-Chip transceiver enable 6. These bits enables the Inter-Chip transceiver for each port (for the MPH case). To enable the interface, the bits PTS must be set to '011b' in the PORTSC6. Writing a '1' to each bit selects the IC_USB interface for that port. Inter-Chip voltage selection 6 It selects which voltage is being supplied to the peripheral through each port This field is read-only and set to '000b' in case of device mode operation. This field is read-only and set to '000b' in case of Single port host controller.
IC_VDD6
22:20
ro
0x0
IC5
19
ro
0x0
Inter-Chip transceiver enable 5. These bits enables the Inter-Chip transceiver for each port (for the MPH case). To enable the interface, the bits PTS must be set to '011b' in the PORTSC5. Writing a '1' to each bit selects the IC_USB interface for that port.
www.xilinx.com
1745
Bits 18:16
Type ro
Description Inter-Chip voltage selection 5 It selects which voltage is being supplied to the peripheral through each port This field is read-only and set to '000b' in case of device mode operation. This field is read-only and set to '000b' in case of Single port host controller.
IC4
15
ro
0x0
Inter-Chip transceiver enable 4. These bits enables the Inter-Chip transceiver for each port (for the MPH case). To enable the interface, the bits PTS must be set to '011b' in the PORTSC4. Writing a '1' to each bit selects the IC_USB interface for that port. Inter-Chip voltage selection 4 It selects which voltage is being supplied to the peripheral through each port This field is read-only and set to '000b' in case of device mode operation. This field is read-only and set to '000b' in case of Single port host controller.
IC_VDD4
14:12
ro
0x0
IC3
11
ro
0x0
Inter-Chip transceiver enable 3. These bits enables the Inter-Chip transceiver for each port (for the MPH case). To enable the interface, the bits PTS must be set to '011b' in the PORTSC3. Writing a '1' to each bit selects the IC_USB interface for that port. Inter-Chip voltage selection 3 It selects which voltage is being supplied to the peripheral through each port. This field is read-only and set to '000b' in case of device mode operation. This field is read-only and set to '000b' in case of Single port host controller.
IC_VDD3
10:8
ro
0x0
IC2
ro
0x0
Inter-Chip transceiver enable 2. These bits enables the Inter-Chip transceiver for each port (for the MPH case). To enable the interface, the bits PTS must be set to '011b' in the PORTSC2. Writing a '1' to each bit selects the IC_USB interface for that port. Inter-Chip voltage selection 2 It selects which voltage is being supplied to the peripheral through each port. This field is read-only and set to '000b' in case of device mode operation. This field is read-only and set to '000b' in case of Single port host controller.
IC_VDD2
6:4
ro
0x0
www.xilinx.com
1746
Bits 3
Type rw
Description Inter-Chip transceiver enable 1. These bits enables the Inter-Chip transceiver for each port (for the MPH case). To enable the interface, the bits PTS must be set to '011b' in the PORTSC1. Writing a '1' to each bit selects the IC_USB interface for that port. If the Controller is not a MPH implementation, IC8 to IC2 will be '0' and Read-Only.
IC_VDD1
2:0
rw
0x0
Inter-Chip voltage selection 1 -- Host mode. Select the voltage being supplied to the peripheral: 000: No voltage 001: 1.0V 010: 1.2V 011: 1.5V 100: 1.8V 101: 3.0V 110, 111: reserved The voltage negotiation should happen between enabling port power (PP) in PORTSC1 register and asserting the run/stop bit in USBCMD register. Device Mode: Read-only and equals 000.
www.xilinx.com
1747
Bits 31
Type rw
Description ULPI Wake Up Operation. Write: 0: no affect. 1: execute the Wake Up operation (no undoing). Read: 0: operation complete. 1: operation in-progress. Note: Do not issue a ULPI Wake Up and ULPI Read/Write (via Viewport operation) with the same register write.
ULPIRUN (RUN)
30
rw
0x0
ULPI Viewport Transaction. Write: 0: no affect. 1: execute the ULPI viewport transaction (no undoing). Read: 0: transaction complete. 1: transaction in-progress. Note: Do not issue a ULPI Wake Up and Viewport operations with the same register write.
29
rw
0x0
28 27
ro ro
0x0 0x0
reserved ULPI Synchronous State 0: In another state (i.e. carkit, serial, low power). 1: Normal synchronous state. This bit represents the state of the ULPI interface. Before reading this bit, the ULPIPORT field should be set accordingly if used in a MPH implementation.
26:24 23:16
rw rw
0x0 0x0
Reserved, always write 0. ULPI Data Address. When a read or write operation is commanded, the address of the operation is written to this field. ULPI Data Read. After a read operation completes, the result is placed in this field.
15:8
ro
0x0
7:0
rw
0x0
ULPI Data Write. When a write operation is commanded, the data to be sent is written to this field
www.xilinx.com
1748
www.xilinx.com
1749
www.xilinx.com
1750
www.xilinx.com
1751
Bits 24
Type rw
Description Port Force Full Speed Connect -- Debug. 0: ???? (default) 1: write a 1 to force the port to only connect at Full Speed. Writing a 1 disables the chirp sequence that allows the port to identify itself as High Speed. This is useful for testing FS configurations with a HS host, hub or device.
PHCD (PORTSCR_PHCD)
23
ro
0x0
PHY Low Power Clock Disable - RW. Default = 0b. Writing this bit to a '1b' will disable the PHY clock. Writing a '0b' enables it. Reading this bit will indicate the status of the PHY clock. NOTE: The PHY clock cannot be disabled if it is being used as the system clock. In device mode, the PHY can be put into Low Power Clock Disable when the device is not running (USBCMD RS=0b) or the host has signaled suspend (PORTSCx SUSP=1b). Low Power Clock Disable will be cleared automatically when the host has signaled resume. Before forcing a resume from the device, the Controller driver must clear this bit. In host mode, the PHY can be put into Low Power Suspend Clock Disable when the downstream device has been put into suspend mode or when no downstream device is connected. Low Power Clock Disable is completely under the control of software.
WKOC (PORTSCR_WKOC)
22
ro
0x0
Wake on Over-current Enable Writing '1' to this bit enables the port to be sensitive to over-current conditions as wakeup events. This field is zero if Port Power (PP) is '0' or in device mode. This bit is output from the controller as signal pwrctl_wake_ovrcurr_en for use by an external power control circuit. Only used in host mode.
WKDS (PORTSCR_WKDS)
21
rw
0x0
Wake on Disconnect Enable (Host mode). 0: disable 1: enable In device mode, always set = 0.
WKCN (PORTSCR_WKCN)
20
rw
0x0
Wake on Connect Enable (Host mode). 0: disable 1: enable In device mode, always set = 0.
www.xilinx.com
1752
Bits 19:16
Type rw
Description
0000: Normal operation. All others are test modes: 0001: J_STATE 0010: K_STATE 0011: SE0 (host) / NAK (device) 0100: Packet 0101: FORCE_ENABLE_HS 0110: FORCE_ENABLE_FS 0111: FORCE_ENABLE_LS Others: reserved
PIC (PORTSCR_PIC)
15:14
rw
0x0
Port Indicator Control outputs (EHCI) (Host mode). 00: Port indicators are off. 01: Amber (PL output signal EMIOUSBxPORTINDCTL0 is driven High). 10: Green (PL output signal EMIOUSBxPORTINDCTL1 is driven High). 11: undefined. Refer to the USB Specification Revision 2.0 for a description on how these bits are to be used.
PO (PORTSCR_PO) PP (PORTSCR_PP)
13 12
ro rw
0x0 0x0
Port Owner hand off is not implemented. Hardwired to 0. Port Power enable (ECHI) (Host mode). Controls the PL output signal EMIOUSBxVBUSPWRSELECT. 0: disable, driven Low. 1: enable, driven High. This bit represents the current setting of the switch ('0'=off, '1'=on). When power is not available on a port (i.e. [PP] equals to '0'), the port is non-functional and will not report attaches, detaches, etc. When an over-current condition is detected on a powered port and [PPC] is a one, the [PP] bit in each affected port may be transitioned by the controller driver from '1' to '0'(removing power from the port).
LS (PORTSCR_LS)
11:10
ro
0x0
Line State: 00: SE0 01: J-state 10: K-state 11: undefined.
www.xilinx.com
1753
Bits 9
Type ro
Description High-Speed Port status (Host and Device mode). 0: LS or FS mode 1: HS mode Note: [HSP] is redundant with [PSPD].
PR (PORTSCR_PR)
rw
0x0
Port Reset - RW. Default = 0b. This field is zero if Port Power(PP) is '0'. Host mode: 1=Port is in Reset. 0=Port is not in Reset. Device Mode: This bit is a read only status bit. Device reset from the USB bus is also indicated in the USBSTS register
SUSP (PORTSCR_SUSP)
rw
0x0
Suspend Host mode: 1=Port in suspend state. 0=Port not in suspend state. Port Enabled bit and Suspend bit of this register define the port states as follows: Bits [Port Enabled, Suspend] Port State 0x Disable 10 Enable 11 Suspend Device mode: Read Only. 1=Port in suspend state. 0=Port not in suspend state. In device mode this bit is a read only status bit.
rw
0x0
Force Port Resume 1= Resume detected/driven on port. 0=No resume (K-state) detected/driven on port.
rw
0x0
Over-current Change This bit gets set to '1' when there is a change to Over-current Active. Software clears this bit by writing a '1' to this bit position. When in host mode implementations the user can provide over-current detection to the vbus_pwr_fault input for this condition. For device mode this bit shall always be '0'.
OCA (PORTSCR_OCA)
ro
0x0
Over-current Active Value Meaning'1b' -> This port currently has an over-current condition.'0b' -> This port does not have an over-current condition. This bit will automatically transition from '1' to '0' when the over current condition is removed. For host mode implementations the user can provide over-current detection to the vbus_pwr_fault input for this condition. For device mode implementations this bit shall always be '0'.
www.xilinx.com
1754
Bits 3
Type wtc
Description Port Enabled Change If set to '1' indicates a Port Enabled/Disabled status change. Host mode: For the root hub, this bit gets set to a '1' only when a port is disabled due to disconnect on the port or due to the appropriate conditions existing at the EOF2 point (See Chapter 11 of the USB Specification). Software clears this by writing a '1' to it. This field is '0' if Port Power(PP) is '0'. Device mode: The device port is always enabled. (This bit will be '0').
PE (PORTSCR_PE)
wtc
0x0
Port Enabled 1 -> Enable 0-> Disable Host mode: Ports can only be enabled by Controller as a part of the reset and enable. Software cannot enable a port by writing a '1' to this field. Ports can be disabled by either a fault condition (disconnect event or other fault condition) or by the software. This field is '0' if Port Power(PP) is '0' in host mode. Device mode: The device port is always enabled. (This bit will be always '1').
www.xilinx.com
1755
Bits 1
Type wtc
Description Connect Status Change If set to '1' indicates a change in Current Connect Status (CCS). Host mode: Indicates a change has occurred in the port's Current Connect Status. The Controller sets this bit for all changes to the port device connect status, even if system software has not cleared an existing connect status change. For example, the insertion status changes twice before system software has cleared the changed condition, hub hardware will be 'setting' an already-set bit (i.e., the bit will remain set). Software clears this bit by writing a '1' to it. This field is '0' if Port Power(PP) is '0' in host mode. Device mode: This bit is undefined in device mode.
CCS (PORTSCR_CCS)
ro
0x0
Current Connect Status. Host mode: 1 -> Device is present on port. 0 -> No device is present. Device mode: 1 -> Attached. 0 -> Not Attached.
www.xilinx.com
1756
* OTG Status inputs (Read Only) * OTG Controls (Read/Write) IP Config Note: The Controller implements one On-The-Go (OTG) Status and Control register.
Field Name reserved DPIE (OTGSC_DPIE) 1msE (OTGSC_1MSE) BSEIE (OTGSC_BSEE) BSVIE (OTGSC_BSVIE) ASVIE (OTGSC_ASVIE) AVVIE (OTGSC_AVVIE) IDIE (OTGSC_IDIE) reserved DPIS (OTGSC_DPIS) 23 22 ro wtc 0x0 0x0 24 rw 0x0 25 rw 0x0 26 rw 0x0 27 rw 0x0 28 rw 0x0 29 rw 0x0 Bits 31 30 Type ro rw Reset Value 0x0 0x0 reserved Data Pulse Interrupt Enable. 0: disable. 1: enable usb.OTGSC [DPIS] interrupt. 1 ms Timer Interrupt Enable. 0: disable. 1: enable usb.OTGSC [1msS] interrupt. B Session End Interrupt Enable. 0: disable. 1: enable usb.OTGSC [BSEIS] interrupt. B Session Valid Interrupt Enable. 0: disable. 1: enable usb.OTGSC [BSVIS] interrupt. A Session Valid Interrupt Enable. 0: disable. 1: enable usb.OTGSC [ASVIS] interrupt. Interrupt Enable. 0: disable. 1: enable usb.OTGSC [AVVIS] interrupt. USB ID Interrupt Enable. 0: disable. 1: enable usb.OTGSC [IDIS] interrupt. reserved Data Pulse Interrupt Status. 0: no pulses detected. 1: pulses detected. Write 1 to clear bit. The pulses being detected can be on DP or DM. Data bus pulsing is only detected when usb.USBMODE [CM] = 11 (Host mode) and usb.PORTSC0 [PP] = 0 (off). Non-latched status can be read using the [DPS] bit. 1msS (OTGSC_1MSS) 21 wtc 0x0 1 millisecond Timer Interrupt Status. 0: no timer alert. 1: timer alert. Write 1 to clear bit. The hardware sets this bit every 1 milliseconds (based on a timer using 60 MHz ULPI). Description
www.xilinx.com
1757
Bits 20
Type wtc
Description B Session End Interrupt Status. 0: no event detected. 1: event detected. Write 1 to clear bit. This bit is set when VBus has fallen below the B session end threshold.
BSVIS (OTGSC_BSVIS)
19
wtc
0x0
B Session Valid Interrupt Status. 0: no event detected. 1: event detected. Write 1 to clear bit. This bit is set when VBus has either risen above or fallen below the B session valid threshold (0.8 VDC).
ASVIS (OTGSC_ASVIS)
18
wtc
0x0
A Session Valid Interrupt Status. 0: no event detected. 1: event detected. Write 1 to clear bit. This bit is set when VBus has either risen above or fallen below the B session valid threshold (0.8 VDC).
AVVIS (OTGSC_AVVIS)
17
wtc
0x0
A Session End Interrupt Status. 0: no event detected. 1: event detected. Write 1 to clear bit. This bit is set when VBus has either risen above or fallen below the VBus valid threshold (4.4 VDC) on an A device.
IDIS (OTGSC_IDIS)
16
wtc
0x0
USB ID Interrupt Status. 0: no interrupt latched 1: interrupt detected. Write 1 to clear this bit. This bit is set when a change on the ID input has been detected.
15 14
ro ro
0x0 0x0
reserved Data Bus Pulsing Status, read-only. 0: no pulses being detected. 1: pulses are being detected. Note: refer to the [DPSI] bit for more information.
1msT (OTGSC_1MST)
13
ro
0x0
1 ms Timer High-Low Toggle, read-only. Software will usually read a 0. This bit toggles high-low every millisecond to set the [1msS] bit.
BSE (OTGSC_BSE)
12
ro
0x0
B Session End Status, read-only. 0: Vbus not below threshold. 1: Vbus below threshold.
www.xilinx.com
1758
Field Name BSV (OTGSC_BSV) ASV (OTGSC_ASV) AVV (OTGSC_AVV) ID (OTGSC_ID) HABA (OTGSC_HABA)
Bits 11
Type ro
Description
Indicates VBus is above the B session valid threshold. 10 ro 0x0 A Session Valid Indicates VBus is above the A session valid threshold. 9 ro 0x0 A VBus Valid. Indicates VBus is above the A VBus valid threshold. 8 7 ro rw 0x0 0x0 USB ID'0' = A device, '1' = B device. Hardware assisted B-Disconnect to A-connect. 0: disabled. 1: enable automatic B-Disconnect to A-Connect sequence.
rw
0x0
Hardware assisted Data-Pulse 0: disable 1: hardware assisted data pulsing sequence starts.
rw
0x1
ID Pullup. Control the ID Pullup resistor. 0: off (the ID input will not be sampled). 1: on.
rw
0x0
Data Pulsing enable. 0: 1: pullup on DP is asserted for data pulsing during SRP.
OT (OTGSC_OT)
rw
0x0
OTG Termination 0: 1: This bit must be set when the Controller is in device mode. It controls the pulldown on DM.
2 1
rw rw
0x0 0x0
Hardware Assist Auto-Reset'0' = Disabled, '1' = Enable automatic reset after connect on host port. VBUS Charge Setting this bit causes the VBus line to be charged. This is used for VBus pulsing during SRP.
rw
0x0
VBUS Discharge. Setting this bit causes VBus to discharge through a resistor.
www.xilinx.com
1759
Software Name Relative Address Absolute Address Width Access Type Reset Value Description
MODE 0x000001A8 usb0: 0xE00021A8 usb1: 0xE00031A8 32 bits mixed 0x00000000 USB Mode Selection
www.xilinx.com
1760
Field Name ES CM
Bits 2 1:0
Type ro rw
Description Reseverd, set = 0. (Endian Select) Controller Mode is defaulted to the proper mode for host only and device only implementations. For those designs that contain both host & device capability (OTG), the Controller will default to an idle state and will need to be initialized to the desired operating mode after reset. For combination host/device controllers, this register can only be written once after reset. If it is necessary to switch modes, software must reset the controller by writing to the RST bit in the USBCMD register before reprogramming this register.'00b' -> Idle (Default for combination host/device).'01b' -> Reserved.'10b' -> Controller in device mode (Default for device only controller).'11b' -> Controller in host mode (Default for host only controller).
www.xilinx.com
1761
www.xilinx.com
1762
www.xilinx.com
1763
Software Name Relative Address Absolute Address Width Access Type Reset Value Description
EPRDY 0x000001B8 usb0: 0xE00021B8 usb1: 0xE00031B8 32 bits ro 0x00000000 Endpoint Buffer Ready Status (Device mode), RO
www.xilinx.com
1764
Software Name Relative Address Absolute Address Width Access Type Reset Value Description
EPCOMPL 0x000001BC usb0: 0xE00021BC usb1: 0xE00031BC 32 bits rw 0x00000000 Endpoint Tx Complete (Device mode)
www.xilinx.com
1765
usb0: 0xE00021C0 usb1: 0xE00031C0 24 bits mixed 0x00800080 Endpoint 0 (Device mode)
www.xilinx.com
1766
Bits 1 0
Type ro rw
Description
RX Endpoint Stall. 0: Normal operation. 1: Force Stall handshake. Note: refer to the register description for more description.
Note: This register is the first in an array of 11 identical registers listed in the table below. The details provided in this section apply to the entire array.
Name ENDPTCTRL1 ENDPTCTRL2 ENDPTCTRL3 ENDPTCTRL4 ENDPTCTRL5 ENDPTCTRL6 ENDPTCTRL7 ENDPTCTRL8 ENDPTCTRL9 ENDPTCTRL10 ENDPTCTRL11 Address 0xe00021c4 0xe00021c8 0xe00021cc 0xe00021d0 0xe00021d4 0xe00021d8 0xe00021dc 0xe00021e0 0xe00021e4 0xe00021e8 0xe00021ec
www.xilinx.com
1767
www.xilinx.com
1768
Bits 4 3:2
Type rw rw
Description
RX Endpoint Type. 00: Control 01: Isochronous 10: Bulk 11: Interrupt
RXD
rw
0x0
RX Endpoint Data datapath. 0: dual-port memory buffer with a DMA Engine. Always write a 0.
RXS
rw
0x0
RX Endpoint Stall. 0: Normal operation. 1: Force Stall handshake. Note: refer to the ENDPTCTRL 0 register description for more description.
www.xilinx.com
1769
Access Type w0src w0t w1 w1crs w1src w1t waz wcrs wo wo1 woc wos wrc wrs ws wsrc wtc z
Description w: 1/0 no effect on/sets matching bit, r: clears all bits w: 1/0 no effect on/toggles matching bit, r: no effect w: first one after ~hard~ reset is as-is, other w have no effects, r: no effect w: 1/0 clears/no effect on matching bit, r: sets all bits w: 1/0 sets/no effect on matching bit, r: clears all bits w: 1/0 toggles/no effect on matching bit, r: no effect Write as zero w: clears all bits, r: sets all bits Write-only w: first one after ~hard~ reset is as-is, other w have no effects, r: error w: clears all bits, r: error w: sets all bits, r: error w: as-is, r: clears all bits w: as-is, r: sets all bits w: sets all bits, r: no effect w: sets all bits, r: clears all bits Readable, write a 1 to clear Access (read or write) as zero
www.xilinx.com
1770