Cyclone® V Hard Processor System Technical Reference Manual
                    
                        ID
                        683126
                    
                
                
                    Date
                    12/03/2024
                
                
                    Public
                
            
                
                    
                    
                        1. Cyclone® V Hard Processor System Technical Reference Manual Revision History
                    
                
                    
                        2. Introduction to the Hard Processor System
                    
                    
                
                    
                        3. Clock Manager
                    
                    
                
                    
                        4. Reset Manager
                    
                    
                
                    
                        5. FPGA Manager
                    
                    
                
                    
                        6. System Manager
                    
                    
                
                    
                        7. Scan Manager
                    
                    
                
                    
                        8. System Interconnect
                    
                    
                
                    
                        9. HPS-FPGA Bridges
                    
                    
                
                    
                        10. Cortex®-A9 Microprocessor Unit Subsystem
                    
                    
                
                    
                        11. CoreSight* Debug and Trace
                    
                    
                
                    
                        12. SDRAM Controller Subsystem
                    
                    
                
                    
                        13. On-Chip Memory
                    
                    
                
                    
                        14. NAND Flash Controller
                    
                    
                
                    
                        15. SD/MMC Controller
                    
                    
                
                    
                        16. Quad SPI Flash Controller
                    
                    
                
                    
                        17. DMA Controller
                    
                    
                
                    
                        18. Ethernet Media Access Controller
                    
                    
                
                    
                        19. USB 2.0 OTG Controller
                    
                    
                
                    
                        20. SPI Controller
                    
                    
                
                    
                        21. I2C Controller
                    
                    
                
                    
                        22. UART Controller
                    
                    
                
                    
                        23. General-Purpose I/O Interface
                    
                    
                
                    
                        24. Timer
                    
                    
                
                    
                        25. Watchdog Timer
                    
                    
                
                    
                        26. CAN Controller
                    
                    
                
                    
                        27. Introduction to the HPS Component
                    
                    
                
                    
                        28. Instantiating the HPS Component
                    
                    
                
                    
                        29. HPS Component Interfaces
                    
                    
                
                    
                        30. Simulating the HPS Component
                    
                    
                
                    
                        31. Register Address Map for Cyclone V HPS
                    
                    
                
                    
                        A. Booting and Configuration
                    
                    
                
            
        
                                    
                                    
                                        
                                        
                                            8.3.1. Master to Slave Connectivity Matrix
                                        
                                        
                                    
                                        
                                            8.3.2. System Interconnect Address Spaces
                                        
                                        
                                        
                                    
                                        
                                        
                                            8.3.3. Master Caching and Buffering Overrides
                                        
                                        
                                    
                                        
                                            8.3.4. Security
                                        
                                        
                                        
                                    
                                        
                                        
                                            8.3.5. Configuring the Quality of Service Logic
                                        
                                        
                                    
                                        
                                            8.3.6. Cyclic Dependency Avoidance Schemes
                                        
                                        
                                        
                                    
                                        
                                        
                                            8.3.7. System Interconnect Master Properties
                                        
                                        
                                    
                                        
                                        
                                            8.3.8. Interconnect Slave Properties
                                        
                                        
                                    
                                        
                                            8.3.9. Upsizing Data Width Function
                                        
                                        
                                        
                                    
                                        
                                            8.3.10. Downsizing Data Width Function
                                        
                                        
                                        
                                    
                                        
                                        
                                            8.3.11. Lock Support
                                        
                                        
                                    
                                        
                                            8.3.12. FIFO Buffers and Clock Crossing
                                        
                                        
                                        
                                    
                                        
                                        
                                            8.3.13. System Interconnect Resets
                                        
                                        
                                    
                                
                            
                                    
                                    
                                        
                                        
                                            10.3.1. Functional Description
                                        
                                        
                                    
                                        
                                        
                                            10.3.2. Implementation Details
                                        
                                        
                                    
                                        
                                            10.3.3. Cortex®-A9 Processor
                                        
                                        
                                        
                                    
                                        
                                        
                                            10.3.4. Interactive Debugging Features
                                        
                                        
                                    
                                        
                                            10.3.5. L1 Caches
                                        
                                        
                                        
                                    
                                        
                                        
                                            10.3.6. Preload Engine
                                        
                                        
                                    
                                        
                                        
                                            10.3.7. Floating Point Unit
                                        
                                        
                                    
                                        
                                            10.3.8. NEON* Multimedia Processing Engine
                                        
                                        
                                        
                                    
                                        
                                            10.3.9. Memory Management Unit
                                        
                                        
                                        
                                    
                                        
                                        
                                            10.3.10. Performance Monitoring Unit
                                        
                                        
                                    
                                        
                                            10.3.11. Arm* Cortex* -A9 MPCore Timers
                                        
                                        
                                        
                                    
                                        
                                            10.3.12. Generic Interrupt Controller
                                        
                                        
                                        
                                    
                                        
                                            10.3.13. Global Timer
                                        
                                        
                                        
                                    
                                        
                                            10.3.14. Snoop Control Unit
                                        
                                        
                                        
                                    
                                        
                                            10.3.15. Accelerator Coherency Port
                                        
                                        
                                        
                                    
                                
                            
                        
                        
                            
                            
                                11.1. Features of CoreSight* Debug and Trace
                            
                        
                            
                            
                                11.2. Arm* CoreSight* Documentation
                            
                        
                            
                            
                                11.3. CoreSight Debug and Trace Block Diagram and System Integration
                            
                        
                            
                                11.4. Functional Description of CoreSight Debug and Trace
                            
                            
                        
                            
                                11.5. CoreSight* Debug and Trace Programming Model
                            
                            
                        
                            
                            
                                11.6. CoreSight Debug and Trace Address Map and Register Definitions
                            
                        
                    
                
                                    
                                    
                                        
                                        
                                            11.4.1. Debug Access Port
                                        
                                        
                                    
                                        
                                        
                                            11.4.2. System Trace Macrocell
                                        
                                        
                                    
                                        
                                        
                                            11.4.3. Trace Funnel
                                        
                                        
                                    
                                        
                                            11.4.4. CoreSight Trace Memory Controller
                                        
                                        
                                        
                                    
                                        
                                        
                                            11.4.5. AMBA* Trace Bus Replicator
                                        
                                        
                                    
                                        
                                        
                                            11.4.6. Trace Port Interface Unit
                                        
                                        
                                    
                                        
                                            11.4.7. Embedded Cross Trigger System
                                        
                                        
                                        
                                    
                                        
                                        
                                            11.4.8. Program Trace Macrocell
                                        
                                        
                                    
                                        
                                        
                                            11.4.9. HPS Debug APB* Interface
                                        
                                        
                                    
                                        
                                            11.4.10. FPGA Interface
                                        
                                        
                                        
                                    
                                        
                                        
                                            11.4.11. Debug Clocks
                                        
                                        
                                    
                                        
                                        
                                            11.4.12. Debug Resets
                                        
                                        
                                    
                                
                            
                        
                        
                            
                            
                                12.1. Features of the SDRAM Controller Subsystem
                            
                        
                            
                            
                                12.2. SDRAM Controller Subsystem Block Diagram
                            
                        
                            
                            
                                12.3. SDRAM Controller Memory Options
                            
                        
                            
                                12.4. SDRAM Controller Subsystem Interfaces
                            
                            
                        
                            
                                12.5. Memory Controller Architecture
                            
                            
                        
                            
                                12.6. Functional Description of the SDRAM Controller Subsystem
                            
                            
                        
                            
                            
                                12.7. SDRAM Power Management
                            
                        
                            
                                12.8. DDR PHY
                            
                            
                        
                            
                            
                                12.9. Clocks
                            
                        
                            
                                12.10. Resets
                            
                            
                        
                            
                            
                                12.11. Port Mappings
                            
                        
                            
                                12.12. Initialization
                            
                            
                        
                            
                                12.13. SDRAM Controller Subsystem Programming Model
                            
                            
                        
                            
                                12.14. Debugging HPS SDRAM in the Preloader
                            
                            
                        
                            
                            
                                12.15. SDRAM Controller Address Map and Register Definitions
                            
                        
                    
                
                        
                        
                            
                            
                                14.1. NAND Flash Controller Features
                            
                        
                            
                            
                                14.2. NAND Flash Controller Block Diagram and System Integration
                            
                        
                            
                            
                                14.3. NAND Flash Controller Signal Descriptions
                            
                        
                            
                                14.4. Functional Description of the NAND Flash Controller
                            
                            
                        
                            
                            
                                14.5. NAND Flash Controller Programming Model
                            
                        
                            
                            
                                14.6. NAND Flash Controller Address Map and Register Definitions
                            
                        
                    
                
                        
                        
                            
                                15.1. Features of the SD/MMC Controller
                            
                            
                        
                            
                            
                                15.2. SD/MMC Controller Block Diagram and System Integration
                            
                        
                            
                            
                                15.3. SD/MMC Controller Signal Description
                            
                        
                            
                            
                                15.4. Functional Description of the SD/MMC Controller
                            
                        
                            
                            
                                15.5. SD/MMC Controller Programming Model
                            
                        
                            
                            
                                15.6. SD/MMC Controller Address Map and Register Definitions
                            
                        
                    
                
                        
                        
                            
                            
                                16.1. Features of the Quad SPI Flash Controller
                            
                        
                            
                            
                                16.2. Quad SPI Flash Controller Block Diagram and System Integration
                            
                        
                            
                            
                                16.3. Interface Signals
                            
                        
                            
                                16.4. Functional Description of the Quad SPI Flash Controller
                            
                            
                        
                            
                                16.5. Quad SPI Flash Controller Programming Model
                            
                            
                        
                            
                            
                                16.6. Quad SPI Flash Controller Address Map and Register Definitions
                            
                        
                    
                
                                    
                                    
                                        
                                        
                                            16.4.1. Overview
                                        
                                        
                                    
                                        
                                            16.4.2. Data Slave Interface
                                        
                                        
                                        
                                    
                                        
                                        
                                            16.4.3. SPI Legacy Mode
                                        
                                        
                                    
                                        
                                            16.4.4. Register Slave Interface
                                        
                                        
                                        
                                    
                                        
                                        
                                            16.4.5. Local Memory Buffer
                                        
                                        
                                    
                                        
                                        
                                            16.4.6. DMA Peripheral Request Controller
                                        
                                        
                                    
                                        
                                        
                                            16.4.7. Arbitration between Direct/Indirect Access Controller and STIG
                                        
                                        
                                    
                                        
                                            16.4.8. Configuring the Flash Device
                                        
                                        
                                        
                                    
                                        
                                        
                                            16.4.9. XIP Mode
                                        
                                        
                                    
                                        
                                        
                                            16.4.10. Write Protection
                                        
                                        
                                    
                                        
                                        
                                            16.4.11. Data Slave Sequential Access Detection
                                        
                                        
                                    
                                        
                                        
                                            16.4.12. Clocks
                                        
                                        
                                    
                                        
                                            16.4.13. Resets
                                        
                                        
                                        
                                    
                                        
                                        
                                            16.4.14. Interrupts
                                        
                                        
                                    
                                
                            
                                    
                                    
                                        
                                        
                                            18.6.1. System Level EMAC Configuration Registers
                                        
                                        
                                    
                                        
                                        
                                            18.6.2. EMAC FPGA Interface Initialization
                                        
                                        
                                    
                                        
                                        
                                            18.6.3. EMAC HPS Interface Initialization
                                        
                                        
                                    
                                        
                                        
                                            18.6.4. DMA Initialization
                                        
                                        
                                    
                                        
                                        
                                            18.6.5. EMAC Initialization and Configuration
                                        
                                        
                                    
                                        
                                        
                                            18.6.6. Performing Normal Receive and Transmit Operation
                                        
                                        
                                    
                                        
                                        
                                            18.6.7. Stopping and Starting Transmission
                                        
                                        
                                    
                                        
                                            18.6.8. Programming Guidelines for Energy Efficient Ethernet
                                        
                                        
                                        
                                    
                                        
                                            18.6.9. Programming Guidelines for Flexible Pulse-Per-Second (PPS) Output
                                        
                                        
                                        
                                    
                                
                            
                        
                        
                            
                                19.1. Features of the USB OTG Controller
                            
                            
                        
                            
                            
                                19.2. USB OTG Controller Block Diagram and System Integration
                            
                        
                            
                            
                                19.3. USB 2.0 ULPI PHY Signal Description
                            
                        
                            
                                19.4. Functional Description of the USB OTG Controller
                            
                            
                        
                            
                                19.5. USB OTG Controller Programming Model
                            
                            
                        
                            
                                19.6. USB 2.0 OTG Controller Address Map and Register Definitions
                            
                            
                        
                    
                
                                                            
                                                            
                                                                
                                                                
                                                                    26.3.1.1.1. Message Valid (MsgVal)
                                                                
                                                                
                                                            
                                                                
                                                                
                                                                    26.3.1.1.2. New Data (NewDat)
                                                                
                                                                
                                                            
                                                                
                                                                
                                                                    26.3.1.1.3. Message Lost (MsgLst)
                                                                
                                                                
                                                            
                                                                
                                                                
                                                                    26.3.1.1.4. Interrupt Pending (IntPnd)
                                                                
                                                                
                                                            
                                                                
                                                                
                                                                    26.3.1.1.5. Transmit Interrupt Enable (TxIE)
                                                                
                                                                
                                                            
                                                                
                                                                
                                                                    26.3.1.1.6. Receive Interrupt Enable (RxIE)
                                                                
                                                                
                                                            
                                                                
                                                                
                                                                    26.3.1.1.7. Remote Enable (RmtEn)
                                                                
                                                                
                                                            
                                                                
                                                                
                                                                    26.3.1.1.8. Transmit Request (TxRqst)
                                                                
                                                                
                                                            
                                                                
                                                                
                                                                    26.3.1.1.9. End of Block (EoB)
                                                                
                                                                
                                                            
                                                        
                                                    
                        
                        
                            
                                30.1. Simulation Flows
                            
                            
                        
                            
                                30.2. Clock and Reset Interfaces
                            
                            
                        
                            
                            
                                30.3. FPGA-to-HPS AXI Slave Interface
                            
                        
                            
                            
                                30.4. HPS-to-FPGA AXI Master Interface
                            
                        
                            
                            
                                30.5. Lightweight HPS-to-FPGA AXI Master Interface
                            
                        
                            
                                30.6. FPGA-to-HPS SDRAM Interface
                            
                            
                        
                            
                            
                                30.7. HPS-to-FPGA MPU Event Interface
                            
                        
                            
                            
                                30.8. Interrupts Interface
                            
                        
                            
                            
                                30.9. HPS-to-FPGA Debug APB* Interface
                            
                        
                            
                            
                                30.10. FPGA-to-HPS System Trace Macrocell Hardware Event Interface
                            
                        
                            
                            
                                30.11. HPS-to-FPGA Cross-Trigger Interface
                            
                        
                            
                            
                                30.12. HPS-to-FPGA Trace Port Interface
                            
                        
                            
                            
                                30.13. FPGA-to-HPS DMA Handshake Interface
                            
                        
                            
                            
                                30.14. Boot from FPGA Interface
                            
                        
                            
                            
                                30.15. General Purpose Input Interface
                            
                        
                    
                12.14.3.1. Analysis of Debug Report
 The following analysis helps you interpret the debug report.  
  
 
  
- The Read Deskew and Write Deskew results shown in the debug report are before calibration. (Before calibration results are actually from the window seen during calibration, and are most useful for debugging.)
 - For each DQ group, the Write Deskew, Read Deskew, DM Deskew, and Read after Write results map to the before-calibration margins reported in the EMIF Debug Toolkit. 
     Note: The Write Deskew, Read Deskew, DM Deskew, and Read after Write results are reported in delay steps (nominally 25ps, in Arria V and Cyclone V devices), not in picoseconds.
 - DQS Enable calibration is reported as a VFIFO setting (in one clock period steps), a phase tap (in one-eighth clock period steps), and a delay chain step (in 25ps steps). 
SEQ.C: DQS Enable ; Group 0 ; Rank 0 ; Start VFIFO 5 ; Phase 6 ; Delay 4 SEQ.C: DQS Enable ; Group 0 ; Rank 0 ; End VFIFO 6 ; Phase 5 ; Delay 9 SEQ.C: DQS Enable ; Group 0 ; Rank 0 ; Center VFIFO 6 ; Phase 2 ; Delay 1
Analysis of DQS Enable results: A VFIFO tap is 1 clock period, a phase is 1/8 clock period (45 degrees) and delay is nominally 25ps per tap. The DQSen window is the difference between the start and end—for the above example, assuming a frequency of 400 MHz (2500ps), that calculates as follows: start is 5*2500 + 6*2500/8 +4*25 = 14475ps. By the same calculation, the end is 16788ps. Consequently, the DQSen window is 2313ps. - The size of a read window or write window is equal to (left edge + right edge) * delay chain step size. Both the left edge and the right edge can be negative or positive.: 
SEQ.C: Read Deskew ; DQ 0 ; Rank 0 ; Left edge 18 ; Right edge 27 ; DQ delay 0 ; DQS delay 8 SEQ.C: Write Deskew ; DQ 0 ; Rank 0 ; Left edge 30 ; Right edge 17 ; DQ delay 6 ; DQS delay 4
Analysis of DQ and DQS delay results: The DQ and DQS output delay (write) is the D5 delay chain. The DQ input delay (read) is the D1 delay chain, the DQS input delay (read) is the D4 delay chain. - Consider the following example of latency results: 
SEQ.C: LFIFO Calibration ; Latency 10
Analysis of latency results: This is the calibrated PHY read latency. The EMIF Debug Toolkit does not report this figure. This latency is reported in clock cycles. - Consider the following example of FOM results: 
SEQ.C: FOM IN = 83 SEQ.C: FOM OUT = 91
Analysis of FOM results: The FOM IN value is a measure of the health of the read interface; it is calculated as the sum over all groups of the minimum margin on DQ plus the margin on DQS, divided by 2. The FOM OUT is a measure of the health of the write interface; it is calculated as the sum over all groups of the minimum margin on DQ plus the margin on DQS, divided by 2. You may refer to these values as indicators of improvement when you are experimenting with various termination schemes, assuming there are no individual misbehaving DQ pins. - The debug report does not provide delay chain step size values. The delay chain step size varies with device speed grade. Refer to your device data sheet for exact incremental delay values for delay chains.
 
   Related Information