Interfacing IGLOO2 FPGA with External LPDDR Memory through MDDR Controller - Libero SoC v11.5 Su pe rs ed ed DG0534 Demo Guide Interfacing IGLOO2 FPGA with External LPDDR Memory through MDDR Controller - Libero SoC v11.5 Revision History Date Revision Change 3 Third Release August 11, 2014 2 Second Release March 20, 2014 1 First Release March 3, 2015 Confidentiality Status Su pe rs ed ed This document is a Non-Confidential. Interfacing IGLOO2 FPGA with External LPDDR Memory through MDDR Controller - Libero SoC v11.5 Table of Contents Preface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 About this document . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 Intended Audience . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 ed Microsemi Publications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 Interfacing IGLOO2 FPGA with External LPDDR Memory through MDDR Controller . . . . . . . . . . . . . . . . 5 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 Design Requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 Demo Design . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 Demo Design Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 rs ed Demo Design Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 Running the Demo using Simulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 Simulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 Running the Simulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 Setting up the Hardware Demo . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 Programming the Demo Design . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 Setting up the Device . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Programming the Device . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Steps to Run GUI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Performing Single Data Transfer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Performing Burst Data Transfer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 21 22 23 25 pe Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 Appendix A: Configuring MDDR Controller . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 MDDR Configuration Tab . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 Appendix B: Finding Correct COM Port Number when Using USB 3.0 . . . . . . . . . . . . . . . . . . . . . . . . . . 32 Su Appendix C: Performing Write/Read Operation when Non 64-bit Aligned Address is Provided . . . . . . . 34 A List of Changes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36 A Product Support . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37 Customer Service . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Customer Technical Support Center . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Technical Support . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Website . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Contacting the Customer Technical Support Center . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37 37 37 37 37 Email . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37 My Cases . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38 Outside the U.S. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38 ITAR Technical Support . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38 Revision 3 3 Preface About this document This demo guide is for IGLOO®2 field programmable gate array (FPGA) devices. It provides instructions on how to use the corresponding reference design. The following designers using the IGLOO2 devices: • FPGA designers • System-level designers rs ed References ed Intended Audience Microsemi Publications • IGLOO2 FPGA High Speed DDR Interfaces User Guide • IGLOO2 FPGA High Performance Memory Subsystem User Guide • IGLOO2 System Builder User Guide • IGLOO2 Evaluation Kit User Guide • CoreUART Handbook Su pe Refer to the following web page for a complete and up-to-date listing of IGLOO2 device documentation: http://www.microsemi.com/index.php?option=com_content&id=2034&lang=en&view=article#documents. Revision 3 5 Interfacing IGLOO2 FPGA with External LPDDR Memory through MDDR Controller Introduction This demo shows that the high performance memory subsystem (HPMS) DDR controller accessing the external DDR SDRAM memories in the IGLOO2 devices. • Demo using simulation • Demo using the IGLOO2 Evaluation Kit ed The demo has two parts: rs ed In the demo design, the AXI Master in the FPGA Fabric accesses the low power DDR (LPDDR) memory present in the IGLOO2 Evaluation Kit board using the MDDR Controller. A utility, IGL2_MDDR_Demo is provided along with the demo deliverables. Using the utility, you can drive the AXI Master logic. The AXI Master converts the commands from the utility to AXI transactions for the MDDR Controller to perform the read/write operations on the LPDDR memory. Design Requirements Table 1 shows the design requirements. Table 1 • Design Requirements Design Requirements Hardware Requirements IGLOO2 Evaluation Kit: FlashPro4 programmer • 12 V adapter • USB A to Mini-B cable Rev C or later pe • Description Host PC or Laptop Any 64-bit Windows Operating System Software Requirements Su Libero® System-on-Chip (SoC) FlashPro programming software v11.5 v11.5 Microsoft .NET Framework 4 - Host PC Drivers USB to UART drivers Revision 3 5 Interfacing IGLOO2 FPGA with External LPDDR Memory through MDDR Controller Demo Design Introduction The demo design files are available for download from the following path in the Microsemi® website: http://soc.microsemi.com/download/rsc/?f=m2gl_dg0534_liberov11p5_df Design files include: • Demo_Utility • Libero_project • Programming_file • Source_files • readme.txt IGL2_MDDR_Demo ed – Figure 1 shows the top level structure of the design files. For further details, refer to the readme.txt file. rs ed <download_folder> IGLOO2_MDDR_Demo_DF Demo_Utility Libero_project IGL2_MDDR_Demo Programming_file Source_file readme.txt pe Figure 1 • Demo Design Files Top Level Structure Figure 2 on page 7 shows the top level view of demo design. Su In the demo design, the AXI Master implemented in the FPGA Fabric accesses the LPDDR memory present in the IGLOO2 Evaluation Kit board using the MDDR Controller. The AXI Master logic communicates to the MDDR controller through CoreAXI interface and the DDR_FIC interface.The read/write operations initiated by the IGL2_MDDR_Demo utility are sent to the UART_IF block using the UART protocol. The AXI Master receives the address and data from the UART_IF block. During a write operation, the UART_IF block sends the address and data to the AXI Master logic. During a read operation, the UART_IF block sends the address to the AXI Master and stores the read data in TPSRAM. When the read operation is complete, the read data is sent to the Host PC through UART. 6 R e vi s i o n 3 Interfacing IGLOO2 FPGA with External LPDDR Memory through MDDR Controller - Libero SoC v11.5 LPDDR SDRAM MDDR DDR Controller I O AXI Transaction Controller eNVM DDR_FIC APB Config Reg AHB Bus Matrix ed D D R D D R P H Y FIC_2 AHB CoreConfigMaster CoreConfigP rs ed HPMS FIC_0 CoreAXI UART_IF_FSM TPSRAM AXI Master COREUART Legend: pe FPGA FABRIC Su UART Communication Protocol Data and Control Path - UART_IF and AXI_Master Data and Control Path – AXI_Master and LPDDR UART_IF IGLOO2 UART Communication User GUI Interface Host PC Figure 2 • IGLOO2 MDDR Demo Block Diagram In this demo design, different blocks are configured as shown below: • MDDR Controller is configured for LPDDR memory available in the IGLOO2 Evaluation Kit board. The LPDDR memory is a Micron DRAM (Part Number: MT46H32M16LF). • DDR_FIC is configured for AXI bus interface. • AXI clock is configured for 80 MHz and LPDDR clock is configured for 160 MHz. Revision 3 7 Interfacing IGLOO2 FPGA with External LPDDR Memory through MDDR Controller • • CoreUART IP has the following configuration: – Baud Rate: 115200 – Data Bits: 8 – Parity: None TPSRAM IP has the following configuration: – Write port depth: 256 – Write port width: 64 – Read port depth: 2048 – Read port width: 8 Demo Design Features ed Refer to "Appendix A: Configuring MDDR Controller" on page 28 for information on how to configure the DDR controller. The IGLOO2 MDDR demo design has the following features: Single AXI read/write transactions • 16-beat burst AXI read/write transactions • LPDDR memory model simulation using SmartDesign testbench • Design validation using the IGLOO2 Evaluation Kit board that has the LPDDR memory • Initiation of the read/write transactions using IGL2_MDDR_Demo utility rs ed • Demo Design Description The demo design consists of the following SmartDesign components: • MDDR_Demo_top_0: This SmartDesign handles the data transactions between the MDDR controller and LPDDR SDRAM. • UART_IF_0: This SmartDesign handles the communication between the Host PC and the IGLOO2 Evaluation Kit Board. Su pe Figure 3 shows the MDDR_Demo_top_0 and UART_IF_0 connection. Figure 3 • IGL2_MDDR_Demo SmartDesign 8 R e vi s i o n 3 Interfacing IGLOO2 FPGA with External LPDDR Memory through MDDR Controller - Libero SoC v11.5 MDDR_Demo_top_0 This consists of the MDDR_Demo_0 subsystem generated using the System Builder and the AXI_IF_0 master logic. The AXI_IF_0 master logic is an RTL code that implements the AXI read and write transactions. It receives the read/write operations, burst length (RLEN and WLEN), address and data as inputs. Based on inputs received, it communicates with the LPDDR memory through the MDDR controller. Su pe rs ed ed Figure 4 shows the MDDR_Demo_top_0 SmartDesign component. Figure 4 • MDDR_Demo_top_0 SmartDesign Component Revision 3 9 Interfacing IGLOO2 FPGA with External LPDDR Memory through MDDR Controller UART_IF_0 The UART_IF_0 SmartDesign component handles the UART communication between Host PC demo utility and the AXI Master logic. The COREUART_0 IP receives the UART signals from Host PC user interface. The UART_IF_FSM_0 is a wrapper for the COREUART_0, collects the data from the COREUART_0 IP and converts the data to the relevant AXI_IF_0 master signals. For a single write operation, the UART_IF_FSM_0 wrapper receives the address and data from the demo utility. For a burst write operation, the address and data are received from the demo utility and the subsequent incremental data are provided by the UART_IF_FSM_0 wrapper. For a burst read operation, UART_IF_FSM_0 collects the address from the demo utility and sends that to the AXI_IF_0 master logic. It then receives the read data from the AXI_IF_0 master logic and stores it in the TPSRAM_0. After completion of the read burst transactions, the UART_IF_FSM_0 wrapper fetches the stored data from the TPSRAM_0 and sends it to the COREUART IP. pe rs ed ed Figure 5 shows the UART_IF_0 SmartDesign component. Su Figure 5 • UART_IF_0 SmartDesign Component 10 R e visio n 3 Interfacing IGLOO2 FPGA with External LPDDR Memory through MDDR Controller - Libero SoC v11.5 Running the Demo using Simulation The demo design can be simulated using SmartDesign Testbench and LPDDR memory model (MT46H32M16LF with 512 Mb density). The simulation is set to run the following: • Single AXI write and read operation • 16-beat AXI burst write and read operation Su pe rs ed ed Figure 6 shows the AXI_LPDDR_Simulation SmartDesign Testbench. The AXI_testbench provides the read/write operations, burst length, address, and data to the MDDR_Demo_top_0 SmartDesign component. Figure 6 • AXI_LPDDR_Simulation SmartDesign Testbench Revision 3 11 Interfacing IGLOO2 FPGA with External LPDDR Memory through MDDR Controller To run the simulation, ensure that the following files are present in the Libero SoC project: • dram.v • dram_parameters.vh • AXI_testbench.v The default location of the files is: <Download folder>\IGLOO2_MDDR_Demo_DF\Libero_project\IGL2_MDDR_Demo\stimulus Simulation Simulation setup configuration can be set properly by using the following steps: 1. Launch the Libero SoC software. 2. Browse the IGL2_MDDR_Demo project provided in the design file. ed 3. Go to Project > Project Settings > Simulation Options. Su pe rs ed 4. Ensure that the DO File tab has the configuration as shown in Figure 7 Figure 7 • DO File Settings 12 R e visio n 3 Interfacing IGLOO2 FPGA with External LPDDR Memory through MDDR Controller - Libero SoC v11.5 Su pe Figure 8 • Waveforms Settings rs ed ed 5. Ensure that the Waveforms tab has the configuration as shown in Figure 8. Revision 3 13 Interfacing IGLOO2 FPGA with External LPDDR Memory through MDDR Controller 6. Go to Design Flow tab. rs ed ed 7. Right-click Simulate under Verify Pre-Synthesized Design and select Organize Input Files > Organize Stimulus Files..., as shown in Figure 9. Figure 9 • Invoking Organize Stimulus Files Window Su pe 8. Ensure that the Organize Stimulus files window has the configuration as shown in Figure 10. Figure 10 • Organize Stimulus Files Window 14 R e visio n 3 Interfacing IGLOO2 FPGA with External LPDDR Memory through MDDR Controller - Libero SoC v11.5 Running the Simulation The following steps describe how to run the simulation: 1. Right-click Simulate under Verify Pre-Synthesized Design. 2. Click Open Interactively. 3. Simulation run time is 900us,as shown in Figure 7 on page 12. pe rs ed ed Figure 11 shows the transcript window of the simulation. Su Figure 11 • Transcript Window Revision 3 15 Interfacing IGLOO2 FPGA with External LPDDR Memory through MDDR Controller rs ed ed Figure 12 shows the single AXI write and AXI read operation. Figure 12 • Single Write and Read Operation Su pe Figure 13 shows the 16-beat AXI burst write and read operation. Figure 13 • 16-Beat AXI Burst Write and Read 16 R e visio n 3 Interfacing IGLOO2 FPGA with External LPDDR Memory through MDDR Controller - Libero SoC v11.5 Setting up the Hardware Demo The following steps describe how to setup the hardware demo: 1. Connect the jumpers on the IGLOO2 Evaluation Kit as shown in Table 2. Table 2 • IGLOO2 FPGA Evaluation Kit Jumper Settings Pin (from) Pin (to) Comments J22 1 2 default J23 1 2 default J24 1 2 default J8 1 2 default J3 1 2 default ed Jumper CAUTION: Ensure that the power supply switch SW7 is switched off while connecting the jumpers. 2. Connect the Power supply to the J6 connector, switch on the power supply switch, SW7. 3. Connect the FlashPro4 programmer to the J5 connector of the IGLOO2 Evaluation Kit. rs ed 4. Connect the Host PC USB port to the IGLOO2 Evaluation Kit board’s J18 USB connector using the USB mini-B cable. Su pe Figure 14 shows the board setup for running the IGLOO2 MDDR demo on the IGLOO2 Evaluation Kit. Figure 14 • IGLOO2 Evaluation Kit Revision 3 17 Interfacing IGLOO2 FPGA with External LPDDR Memory through MDDR Controller pe rs ed ed 5. Ensure that the USB to UART bridge drivers are automatically detected. This can be verified in the Device Manager of the Host PC. The FTDI USB to UART converter enumerates four COM ports. For USB 2.0, note down the USB Serial Converter D COM port number to use it in the GUI. Figure 15 shows the USB 2.0 Serial port properties. As shown in Figure 15, COM10 is connected to USB Serial Converter D. Refer to "Appendix B: Finding Correct COM Port Number when Using USB 3.0" on page 32 for finding the correct COM port in USB 3.0. Figure 15 • USB Serial 2.0 Port Properties Su 6. If the USB to UART bridge drivers are not installed, download and install the drivers from www.microsemi.com/soc/documents/CDM_2.08.24_WHQL_Certified.zip. 18 R e visio n 3 Interfacing IGLOO2 FPGA with External LPDDR Memory through MDDR Controller - Libero SoC v11.5 Programming the Demo Design The following steps describe how to program the demo design: 1. Download the demo design from the following link: http://soc.microsemi.com/download/rsc/?f=m2gl_dg0534_liberov11p5_df 2. Switch ON the power supply switch SW7. 3. Launch the FlashPro software. 4. Click New Project. 5. In the New Project window, type the project name as IGL2_MDDR_Demo. 6. Click Browse and navigate to the location where you want to save the project. 7. Select Single device as the Programming mode. Su pe rs ed ed 8. Click OK to save the project. Figure 16 • FlashPro New Project Revision 3 19 Interfacing IGLOO2 FPGA with External LPDDR Memory through MDDR Controller Setting up the Device The following steps describe how to configure the device: 1. Click Configure Device on the FlashPro GUI. 2. Click Browse and navigate to the location where IGL2_MDDR_Demo.stp file is located, and select the file. The default location is: <download_folder>\IGLOO2_MDDR_Demo_DF\Programming_file\. Su pe rs ed ed 3. Click Open. The required programming file is selected and is ready to be programmed in the device. Figure 17 • FlashPro Project Configuration 20 R e visio n 3 Interfacing IGLOO2 FPGA with External LPDDR Memory through MDDR Controller - Libero SoC v11.5 Programming the Device Su pe rs ed ed Click PROGRAM to start programming the device. Wait until the Programmer Status is changed to RUN PASSED. Figure 18 • FlashPro Program Passed Revision 3 21 Interfacing IGLOO2 FPGA with External LPDDR Memory through MDDR Controller Running the Hardware Demo The IGLOO2 MDDR demo comes with utility, IGL2_MDDR_Demo that runs on the Host PC to communicate with the IGLOO2 Evaluation Kit. The UART protocol is used as the underlying communication protocol between the Host PC and the IGLOO2 Evaluation Kit. rs ed ed Figure 19 shows initial screen of the IGL2_MDDR_Demo utility. Figure 19 • IGL2_MDDR_Demo Utility The IGL2_MDDR_Demo utility consists of following sections: Serial Port Configuration: Displays the serial port. Baud rate is fixed at 115200. • Data Transfer Type: Single or Burst. • LPDDR SDRAM: Provides Address and Data. • LPDDR Burst Read: Displays the Burst Read Values for the corresponding address. • C: Clears the existing data. Su pe • Steps to Run GUI The following steps describe how to run the GUI: 1. Launch the utility. The default location is: <download_folder>\\IGLOO2_MDDR_Demo_DF\Demo_Utility\IGL2_MDDR_Demo.exe. 2. Select the appropriate COM port from drop down menu. In this case, it is COM 10. 3. Click Connect. The connection status along with the COM Port and Baud rate is shown in the left bottom corner of the screen. 22 R e visio n 3 Interfacing IGLOO2 FPGA with External LPDDR Memory through MDDR Controller - Libero SoC v11.5 rs ed ed Figure 20 shows the connection status of the utility. Figure 20 • IGL2_MDDR_Demo- Connection Status Performing Single Data Transfer pe For a single write or read operation, the AXI Master logic is configured to transfer a burst length of 1 (that is, 8 bytes). For a write operation, the utility sends a 32-bit address and 64-bit (8 bytes) data. The data is then written to the LPDDR SDRAM. For a read operation, the utility sends a 32-bit address and receives 64-bit data from LPDDR and is displayed in the utility. The following steps describe how to perform a single data transfer: 1. Select Single (8-bytes) as Data Transfer Type. Su 2. A 64-bit aligned address is required in the address field. Enter a 32-bit HEX Address in the range 0x00000000 - 0x03FFFFF8. When a non 64-bit aligned address is provided, the GUI converts it to 64-bit aligned address and performs the write/read. Refer to "Appendix C: Performing Write/Read Operation when Non 64-bit Aligned Address is Provided" on page 34 to perform write/read when non 64-bit aligned address is provided. 3. In the Data field, enter a 64-bit data in HEX format. 4. Click Write. The entered data is written to the LPDDR memory. Revision 3 23 Interfacing IGLOO2 FPGA with External LPDDR Memory through MDDR Controller rs ed ed Figure 21 shows the Address and Data values entered for a Single Write operation. Figure 21 • Single Write Operation 5. To verify the write operation, perform a read operation to the same address where the data is written. Su pe 6. Press C to clear the data present in the Data field. Figure 22 highlights the Clear button, C. Figure 22 • Clear Data Field 7. Click Read to read the data from the LPDDR SDRAM. 24 R e visio n 3 Interfacing IGLOO2 FPGA with External LPDDR Memory through MDDR Controller - Libero SoC v11.5 rs ed ed Figure 23 shows the data read from the LPDDR SDRAM. Figure 23 • Single Read Operation 8. Compare the read and write data. The write and read data being same establishes that the write and read operations to the LPDDR SDRAM were successful. Performing Burst Data Transfer pe For a burst write or read operation, the AXI Master logic is configured to transfer a burst length of 16 (that is, 128 bytes). In this demo, 16 transfers of 16-beat burst operations are implemented (16 transfers x 16beat burst data = 2048 bytes data). For a write operation, the utility sends a 32-bit initial address and 64bit (8 bytes) initial data. After the initial write operation, incremental data is written. For a read operation, the utility sends a 32-bit address and receives 2048 bytes of data from the LPDDR SDRAM and the data is displayed in the utility. The following steps describe how to perform a burst data transfer: Su 1. Select Burst (2048-bytes) as Data Transfer Type. 2. A 64-bit aligned address is required in the address field. Enter a 32-bit HEX Address in the range 0x00000000 - 0x03FFF7F8. When a non 64-bit aligned address is provided, the GUI converts it into 64-bit aligned address and performs the write/read operation. Refer to "Appendix C: Performing Write/Read Operation when Non 64-bit Aligned Address is Provided" on page 34 to perform write/read when non 64-bit aligned address is provided. 3. In the Data field, enter a 64-bit data in HEX format. 4. Click Write. The entered data is written to the Address location specified in the Address filed and then the data is incremented by 1 and written to the next address location. This is repeated 256 times to write all the 2048 bytes of data. Revision 3 25 Interfacing IGLOO2 FPGA with External LPDDR Memory through MDDR Controller rs ed ed Figure 24 shows the Address and Data values entered for a Burst Write operation. Figure 24 • Burst Write Operation 5. To verify the write operation, perform a read operation to the same address where the data is written. 6. Click Read. All the 2048 bytes of data written to the LPDDR is read, and the read data is displayed on the LPDDR Burst Read panel. Su pe Figure 25 shows the burst read data. Figure 25 • Burst Read Operation 26 R e visio n 3 Interfacing IGLOO2 FPGA with External LPDDR Memory through MDDR Controller - Libero SoC v11.5 7. Click Exit to exit the utility. Conclusion Su pe rs ed ed This demo shows how to perform Read/Write operations to LPDDR SDRAM using IGLOO2 MDDR controller. Options are provided to simulate the design using a SmartDesign testbench and validate the design on the IGLOO2 Evaluation Kit using a GUI interface. Revision 3 27 Appendix A: Configuring MDDR Controller Appendix A: Configuring MDDR Controller This section describes how to configure the MDDR Controller registers using Libero SoC. Configuration options for MDDR are available at the MDDR tab of the Memories tab in System Builder. Figure 26 shows the MDDR tab. The IGLOO2 Evaluation Kit has the LPDDR memory from Micron. All values provided here are from the Micron datasheet, part number, MT46H32M16LF. pe rs ed ed Note: The Automotive Mobile Low-Power DDR SDRAM datasheet is available for download from Micron website. Su Figure 26 • System Builder - Memories - MDDR Tab MDDR Configuration Tab When using an external memory, the memory controller must wait for the memory to initialize (settling time) before accessing it. The IGLOO2 Evaluation Kit uses the LPDDR memory. Therefore, the DDR Controller has to wait at least 200us. Provide 200 as the value for the field, DDR memory settling time (us). Note: All the values provided here are from the Micron datasheet. The parameters can be configured according to the user’s requirements. 28 R e visio n 3 Interfacing IGLOO2 FPGA with External LPDDR Memory through MDDR Controller - Libero SoC v11.5 General This section shows the configurations of the General tab. • Memory Type: LPDDR • Data Width: 16 pe rs ed ed Figure 27 shows the General tab after configuration parameters are set. Su Figure 27 • System Builder MDDR Configuration – General Tab Revision 3 29 Appendix A: Configuring MDDR Controller Memory Initialization • Burst length: 8 • Burst Order: Sequential • Timing Mode: 1T • CAS Latency: 3 • Self Refresh Enabled: NO • Auto Refresh Burst Count: 8 • Power Down Enabled: YES • Stop the clock: NO • Deep Power Down enabled: NO • No Activity clocks for Entry: 320 ed This section shows the configurations of the Memory Initialization tab. Su pe rs ed Figure 28 shows the Memory Initialization tab after configuration parameters are set. Figure 28 • System Builder MDDR Configuration – Memory Initialization Tab 30 R e visio n 3 Interfacing IGLOO2 FPGA with External LPDDR Memory through MDDR Controller - Libero SoC v11.5 Memory Timing This section shows the configurations of the Memory Timing tab. Time To Hold Reset Before INIT – 0 clks • MRD: 4 Clks • RAS (Min): 8 Clks • RAS (Max): 8192 Clks • RCD: 6 Clks • RP: 7 Clks • REFI: 3104 Clks • RC: 3 Clks • XP: 3 Clks • CKE: 3 Clks • RFC: 79 Clks • FAW: 0 Clks ed • Su pe rs ed Figure 29 shows the Memory Timing tab after configuration parameters are set. Figure 29 • System Builder MDDR Configuration – Memory Timing Tab Revision 3 31 Appendix B: Finding Correct COM Port Number when Using USB 3.0 Appendix B: Finding Correct COM Port Number when Using USB 3.0 pe rs ed ed FTDI USB to UART converter enumerates the four COM ports. In USB 3.0, the four available COM ports are in Location 0. Figure 30 shows the USB 3.0 Serial port properties. Su Figure 30 • USB 3.0 Serial Port Properties 32 R e visio n 3 Interfacing IGLOO2 FPGA with External LPDDR Memory through MDDR Controller - Libero SoC v11.5 Su pe Figure 31 • Read Error rs ed ed To find out the correct COM port, program the IGLOO2 Evaluation Kit board with provided programming file. Connect each available COM port and click Write. If wrong COM port is selected, the GUI displays the read error. Try with all four available COM ports until this message disappears. Figure 31 shows the read error message. Revision 3 33 Appendix C: Performing Write/Read Operation when Non 64-bit Aligned Address is Provided Appendix C: Performing Write/Read Operation when Non 64-bit Aligned Address is Provided When a non 64-bit aligned address is provided in the GUI, the GUI converts it into the 64-bit aligned address (0, 8,10,18,20,28,30,38 …) and performs the write/read operation. 1. Enter the non 64-bit aligned 32-bit address in HEX format. 2. Enter the 64-bit data in HEX format. pe rs ed ed Figure 32 shows the non 64-bit aligned address entered in the GUI. Su Figure 32 • Non 64-bit Aligned Address 34 R e visio n 3 Interfacing IGLOO2 FPGA with External LPDDR Memory through MDDR Controller - Libero SoC v11.5 3. Click Write to perform write operation. GUI converts the address into 64-bit aligned address and performs the write operation. rs ed ed Figure 33 shows the GUI pop up information message and converted 64-bit aligned address. Su pe Figure 33 • Converted 64-bit Aligned Address Revision 3 35 A – List of Changes The following table shows important changes made in this document for each revision. Date Changes Page Updated the document for Libero SoC v11.5 (SAR 65209). NA Revision 2 (August 2014) Updated the document for Libero SoC v11.4 NA Revision 1 (March 2014) Initial release NA Su pe rs ed ed Revision 3 (March 2015) Revision 3 36 Product Support Microsemi SoC Products Group backs its products with various support services, including Customer Service, Customer Technical Support Center, a website, electronic mail, and worldwide sales offices. This appendix contains information about contacting Microsemi SoC Products Group and using these support services. Customer Service From North America, call 800.262.1060 From the rest of the world, call 650.318.4460 Fax, from anywhere in the world, 408.643.6913 ed Contact Customer Service for non-technical product support, such as product pricing, product upgrades, update information, order status, and authorization. rs ed Customer Technical Support Center Microsemi SoC Products Group staffs its Customer Technical Support Center with highly skilled engineers who can help answer your hardware, software, and design questions about Microsemi SoC Products. The Customer Technical Support Center spends a great deal of time creating application notes, answers to common design cycle questions, documentation of known issues, and various FAQs. So, before you contact us, please visit our online resources. It is very likely we have already answered your questions. Technical Support For Microsemi SoC Products Support, visit pe http://www.microsemi.com/products/fpga-soc/designsupport/fpga-soc-support Website Su You can browse a variety of technical and non-technical information on the SoC home page, at www.microsemi.com/soc. Contacting the Customer Technical Support Center Highly skilled engineers staff the Technical Support Center. The Technical Support Center can be contacted by email or through the Microsemi SoC Products Group website. Email You can communicate your technical questions to our email address and receive answers back by email, fax, or phone. Also, if you have design problems, you can email your design files to receive assistance. We constantly monitor the email account throughout the day. When sending your request to us, please be sure to include your full name, company name, and your contact information for efficient processing of your request. The technical support email address is [email protected]. Revision 3 37 Product Support My Cases Microsemi SoC Products Group customers may submit and track technical cases online by going to My Cases. Outside the U.S. Customers needing assistance outside the US time zones can either contact technical support via email ([email protected]) or contact a local sales office. Sales office listings can be found at www.microsemi.com/soc/company/contact/default.aspx. ITAR Technical Support Su pe rs ed ed For technical support on RH and RT FPGAs that are regulated by International Traffic in Arms Regulations (ITAR), contact us via [email protected]. Alternatively, within My Cases, select Yes in the ITAR drop-down list. For a complete list of ITAR-regulated Microsemi FPGAs, visit the ITAR web page. 38 R e visio n 3 ed rs ed pe Su Microsemi Corporation (Nasdaq: MSCC) offers a comprehensive portfolio of semiconductor and system solutions for communications, defense & security, aerospace and industrial markets. Products include high-performance and radiation-hardened analog mixed-signal integrated circuits, FPGAs, SoCs and ASICs; power management products; timing and synchronization devices and precise time solutions, setting the world’s standard for time; voice processing devices; RF solutions; discrete components; security technologies and scalable anti-tamper products; Power-over-Ethernet ICs and midspans; as well as custom design capabilities and services. Microsemi is headquartered in Aliso Viejo, Calif., and has approximately 3,400 employees globally. Learn more at www.microsemi.com. Microsemi Corporate Headquarters One Enterprise, Aliso Viejo, CA 92656 USA Within the USA: +1 (800) 713-4113 Outside the USA: +1 (949) 380-6100 Sales: +1 (949) 380-6136 Fax: +1 (949) 215-4996 E-mail: [email protected] © 2015 Microsemi Corporation. All rights reserved. Microsemi and the Microsemi logo are trademarks of Microsemi Corporation. All other trademarks and service marks are the property of their respective owners. Microsemi makes no warranty, representation, or guarantee regarding the information contained herein or the suitability of its products and services for any particular purpose, nor does Microsemi assume any liability whatsoever arising out of the application or use of any product or circuit. The products sold hereunder and any other products sold by Microsemi have been subject to limited testing and should not be used in conjunction with mission-critical equipment or applications. Any performance specifications are believed to be reliable but are not verified, and Buyer must conduct and complete all performance and other testing of the products, alone and together with, or installed in, any end-products. Buyer shall not rely on any data and performance specifications or parameters provided by Microsemi. It is the Buyer's responsibility to independently determine suitability of any products and to test and verify the same. The information provided by Microsemi hereunder is provided "as is, where is" and with all faults, and the entire risk associated with such information is entirely with the Buyer. Microsemi does not grant, explicitly or implicitly, to any party any patent rights, licenses, or any other IP rights, whether with regard to such information itself or anything described by such information. Information provided in this document is proprietary to Microsemi, and Microsemi reserves the right to make any changes to the information in this document or to any products and services at any time without notice. 50200534-3/03.15