ml410 bsb ddr2 design creation - bdtic. · pdf filerefer to ml410_overview_setup.ppt for...
TRANSCRIPT
ML410 BSB DDR2 Design Creation Using 8.2i SP1 EDK Base System Builder (BSB)
April 2007
www.BDTIC.com/XILINX
Overview• Hardware Setup• Software Requirements• Create a BSB DDR2 System Build (BSB) in EDK• Generate a Bitstream • Transfer the Bitstream onto the FPGA• Loading a Bootloop into the Block RAM
www.BDTIC.com/XILINX
ML410 BSB DDR2 Hardware• The ML410 BSB DDR2 design
hardware includes:– 64 KB BRAM– DDR2 Interface (256 MB)– UART– Interrupt Controller– PLB2OPB Bridge– PLB and OPB Arbiters– Networking
www.BDTIC.com/XILINX
Additional Setup Details• Refer to ml410_overview_setup.ppt for details on:
– Software Requirements– ML410 Board Setup
• Equipment and Cables• Software• Network
– Terminal Programs• This presentation requires the
9600-8-N-1 Baud terminal setup
www.BDTIC.com/XILINX
Hardware Setup• Connect the Xilinx Parallel
Cable IV (PC4) to the ML410 board
• Connect the RS232 nullmodem cable to the ML410 board
www.BDTIC.com/XILINX
ISE Software Requirement• Xilinx ISE 8.2i SP2 software
www.BDTIC.com/XILINX
EDK Software Requirement• Xilinx EDK 8.2i SP1 software
www.BDTIC.com/XILINX
Software Setup• Start the Terminal Program:
www.BDTIC.com/XILINX
Run Xilinx Platform Studio• Open Xilinx Platform Studio• Select File →
New Project… (1)1
www.BDTIC.com/XILINX
Run Xilinx Platform Studio• Select Base System Builder wizard (1)
1
www.BDTIC.com/XILINX
Create Base System Build• Enter the path and file name:
C:\ml410_bsb_ddr2_design\ml410_bsb_ddr2.xmp (1)• Click OK (2)
1
2
www.BDTIC.com/XILINX
Create BaseSystem Build
• Create a new design (1) • Click Next (2)1
2
www.BDTIC.com/XILINX
Create BaseSystem Build
• Select (1):– Board Vendor: Xilinx– Board Name: ML410– Board Revision: B
• Click Next (2)
1
Note: This is also the correct setting for RevC and RevD boards
2
www.BDTIC.com/XILINX
Create BaseSystem Build
• Select the PowerPCprocessor (1)
• Click Next (2)1
2
www.BDTIC.com/XILINX
• Change the Processor Clock Frequency to 300 MHz (1)
• Click Next (2)
Create BaseSystem Build
2
1
www.BDTIC.com/XILINX
• De-select RS232_Uart_1 (1)• RS232_Uart_2
– Select OPB UART16550 Peripheral (2)
– Select Use Interrupt (3)• Click Next (4)
Create BaseSystem Build
4
2
1
3
www.BDTIC.com/XILINX
• Deselect– DDR_SDRAM_32Mx64 (1)– SPI_EEPROM (2)– LEDs_8Bit (3)– LCD_OPTIONAL (4)
• Click Next (5)
Create BaseSystem Build
5
3
1
2
4
www.BDTIC.com/XILINX
• Deselect:– pci_arbiter_0 (1)– PCI32_BRIDGE (2)– SysACE_CompactFlash (3)– IIC_BUS (4)
• Click Next (5)
Create BaseSystem Build
5
3
1
2
4
www.BDTIC.com/XILINX
• De-selectEthernet_MAC (1)
• TriMode_MAC_GMII (2)– Select Use Interrupt (3)
• Click Next (4)
Create BaseSystem Build
4
2
1
3
www.BDTIC.com/XILINX
• Select– DDR2_SRAM_32x64 (1)
• Click Next (2)
Create BaseSystem Build
2
1
www.BDTIC.com/XILINX
• PLB BRAM IF CNTLR– Change the memory
size from 16 KBto 64 KB (1)
• Click Next (2)
Create BaseSystem Build
2
1
www.BDTIC.com/XILINX
• Leave this window as is• Click Next (1)
Create BaseSystem Build
1
www.BDTIC.com/XILINX
• Leave this window as is• Click Next (1)
Create BaseSystem Build
1
www.BDTIC.com/XILINX
• Leave this window as is• Click Next (1)
Create BaseSystem Build
1
www.BDTIC.com/XILINX
• Create the Base System Build– Click Generate (1)
Create BaseSystem Build
1
www.BDTIC.com/XILINX
• Finalize the creation of the Base System Build– Click Finish (1)
Create BaseSystem Build
1
www.BDTIC.com/XILINX
Create Base System Build• Before generating
a bitstream the MHS file (1) must be updated 1
www.BDTIC.com/XILINX
Update MHS• Open ml410_bsb_ddr2_system.mhs• Add this parameter to the plb_v34 (1):
– PARAMETER C_NUM_OPBCLK_PLB2OPB_REARB = 100
1
www.BDTIC.com/XILINX
Update MHS• Add this parameter to the plb_ddr2 (1):
– PARAMETER C_INCLUDE_BURST_CACHELN_SUPPORT = 1
1
www.BDTIC.com/XILINX
Update TestApp• Open TestApp_Peripheral/src/xtemac_example.h• Change the PHY Address from 0 to 7
– #define TEMAC_PHY_ID 7
1
See Answer Record 24004 for detailswww.BDTIC.com/XILINX
Update TestApp• Open TestApp_Peripheral/src/xtemac_example_util.c• Add this line twice as shown here (1):
– usleep(1000000);
1
See Answer Record 24004 for detailswww.BDTIC.com/XILINX
Generate Bitstream• Generate the libraries
needed to create the bitstream– Select Software →
Generate Librariesand BSPs (1)
1
www.BDTIC.com/XILINX
Generate Bitstream• Compile the TestApp
project and create an executable (executable.elf)– Select Software →
Build All User Applications (1)
1
www.BDTIC.com/XILINX
Generate Bitstream• Create the
hardware design, ml410_bsb_system.bit, that is located in<project directory>/implementation– Select Hardware →
Generate Bitstream(1) (Takes roughly 40 minutes)
1
www.BDTIC.com/XILINX
Download the Bitstream• Initialize the compiled
TestApp project in the block RAM and download the new bitstream (download.bit)– Select Device
Configuration →Download Bitstream (1)
1
www.BDTIC.com/XILINX
Download the Bitstream • View the output of a successful bitstream download
in the terminal window
www.BDTIC.com/XILINX
Loading Bootloop into BRAM• A concatenated software/hardware file, known as
an ACE file, is useful for loading large programs, such as a Linux, VxWorks, or U-Boot into the external memory
• A bootloop program must be used to occupy the processor until the software is loaded into memory
• The following pages show how to initialize a bootloopprogram into block RAM and to test its existence
www.BDTIC.com/XILINX
Loading Bootloop into BRAM• Right-click the
TestApp_Memoryproject and de-select Mark to Initialize BRAMs (1)
• This will prevent the TestApp program from being inserted into the block RAM when the new bitstream is created
1
www.BDTIC.com/XILINX
Loading Bootloop into BRAM• Right-click the
ppc405_0_bootloop project and select Mark to InitializeBRAMs (1)
• Now the bootloop will be instantiated into block RAM rather than the TestApp_Memory project
1
www.BDTIC.com/XILINX
Loading Bootloop into BRAM• Update the bitstream
(download.bit) with a bootloop ELF file (ppc405_0.elf)– Select Device
Configuration →Update Bitstream (1)
1
www.BDTIC.com/XILINX
Loading Bootloop into BRAM• Load the new design
onto the FPGA and load the bootloopprogram into the blockRAM– Select Device
Configuration →Download Bitstream (1)
1
www.BDTIC.com/XILINX
Loading Bootloop into BRAM• A memory read can
be executed to test if bootloop was successfully loaded– Select Debug →
Launch XMD (1)– Select ppc405_0 (2)
2
1
www.BDTIC.com/XILINX
XMD Setup• The first time XMD runs
on a project, the options must be set– Click OK (1)– Click Save (2)
1
2
www.BDTIC.com/XILINX
Loading Bootloop into BRAM• XMD opens and connects to the processor, using the default
options
www.BDTIC.com/XILINX
Loading Bootloop into BRAM• To execute a memory read, type mrd 0xfffffffc• This will read the memory address at the reset vector; the
value should be 0x48000000 as shown below
www.BDTIC.com/XILINX
Loading Bootloop into BRAM• Make a copy of the updated bitstream (download.bit) and
rename it ml410_bsb_bootloop.bit• This bootloop bitstream will be used in future designs, such
as the Linux and VxWorks builds
www.BDTIC.com/XILINX
AppendixAdding the Null Tiles
www.BDTIC.com/XILINX
Null Tiles• AR 23410 – Needed to preserve unused MGTs for future
designs• Step 1 – Download the null tile pcore
– Unzip this to the <design dir>/pcores
www.BDTIC.com/XILINX
Null Tiles• Step 2 – Update the UCF file
– AR 23410 has the UCF File changes for the Virtex-4 FX60-FF1152– Paste these constraints into your <Design
dir>/data/ml410_bsb_system.ucf file:
www.BDTIC.com/XILINX
Null Tiles• Step 3 – Update the MHS file
– AR 23410 has the MHS file changes for the Virtex-4 FX60-FF1152– Paste these lines (ports and pcore instantiations) into your <Design
dir>/ml410_bsb_system.mhs file:
www.BDTIC.com/XILINX
Null Tiles• Step 4 –
Recompile the bitstream
1
www.BDTIC.com/XILINX
Available Documentation• Platform Studio Documentation
– Embedded Development Kit (EDK) Resourceshttp://www.xilinx.com/ise/embedded_design_prod/platform_studio.htm
– OS and Libraries Document Collectionhttp://www.xilinx.com/ise/embedded/oslib_rm.pdf
• ML410– ML410 User's Guide
http://www.xilinx.com/bvdocs/userguides/ug085.pdf– ML410 Overview
http://www.xilinx.com/ml410– ML410 Schematics
http://www.xilinx.com/products/boards/ml410/docs/ml410_revE.pdf
www.BDTIC.com/XILINX