52
ML410 BSB DDR2 Design Creation Using 8.2i SP1 EDK Base System Builder (BSB) April 2007 www.BDTIC.com/XILINX

ML410 BSB DDR2 Design Creation - bdtic. · PDF fileRefer to ml410_overview_setup.ppt for details on: ... as a Linux, VxWorks, or U-Boot into the external memory

Embed Size (px)

Citation preview

Page 1: ML410 BSB DDR2 Design Creation - bdtic. · PDF fileRefer to ml410_overview_setup.ppt for details on: ... as a Linux, VxWorks, or U-Boot into the external memory

ML410 BSB DDR2 Design Creation Using 8.2i SP1 EDK Base System Builder (BSB)

April 2007

www.BDTIC.com/XILINX

Page 2: ML410 BSB DDR2 Design Creation - bdtic. · PDF fileRefer to ml410_overview_setup.ppt for details on: ... as a Linux, VxWorks, or U-Boot into the external memory

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

Page 3: ML410 BSB DDR2 Design Creation - bdtic. · PDF fileRefer to ml410_overview_setup.ppt for details on: ... as a Linux, VxWorks, or U-Boot into the external memory

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

Page 4: ML410 BSB DDR2 Design Creation - bdtic. · PDF fileRefer to ml410_overview_setup.ppt for details on: ... as a Linux, VxWorks, or U-Boot into the external memory

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

Page 5: ML410 BSB DDR2 Design Creation - bdtic. · PDF fileRefer to ml410_overview_setup.ppt for details on: ... as a Linux, VxWorks, or U-Boot into the external memory

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

Page 6: ML410 BSB DDR2 Design Creation - bdtic. · PDF fileRefer to ml410_overview_setup.ppt for details on: ... as a Linux, VxWorks, or U-Boot into the external memory

ISE Software Requirement• Xilinx ISE 8.2i SP2 software

www.BDTIC.com/XILINX

Page 7: ML410 BSB DDR2 Design Creation - bdtic. · PDF fileRefer to ml410_overview_setup.ppt for details on: ... as a Linux, VxWorks, or U-Boot into the external memory

EDK Software Requirement• Xilinx EDK 8.2i SP1 software

www.BDTIC.com/XILINX

Page 8: ML410 BSB DDR2 Design Creation - bdtic. · PDF fileRefer to ml410_overview_setup.ppt for details on: ... as a Linux, VxWorks, or U-Boot into the external memory

Software Setup• Start the Terminal Program:

www.BDTIC.com/XILINX

Page 9: ML410 BSB DDR2 Design Creation - bdtic. · PDF fileRefer to ml410_overview_setup.ppt for details on: ... as a Linux, VxWorks, or U-Boot into the external memory

Run Xilinx Platform Studio• Open Xilinx Platform Studio• Select File →

New Project… (1)1

www.BDTIC.com/XILINX

Page 10: ML410 BSB DDR2 Design Creation - bdtic. · PDF fileRefer to ml410_overview_setup.ppt for details on: ... as a Linux, VxWorks, or U-Boot into the external memory

Run Xilinx Platform Studio• Select Base System Builder wizard (1)

1

www.BDTIC.com/XILINX

Page 11: ML410 BSB DDR2 Design Creation - bdtic. · PDF fileRefer to ml410_overview_setup.ppt for details on: ... as a Linux, VxWorks, or U-Boot into the external memory

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

Page 12: ML410 BSB DDR2 Design Creation - bdtic. · PDF fileRefer to ml410_overview_setup.ppt for details on: ... as a Linux, VxWorks, or U-Boot into the external memory

Create BaseSystem Build

• Create a new design (1) • Click Next (2)1

2

www.BDTIC.com/XILINX

Page 13: ML410 BSB DDR2 Design Creation - bdtic. · PDF fileRefer to ml410_overview_setup.ppt for details on: ... as a Linux, VxWorks, or U-Boot into the external memory

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

Page 14: ML410 BSB DDR2 Design Creation - bdtic. · PDF fileRefer to ml410_overview_setup.ppt for details on: ... as a Linux, VxWorks, or U-Boot into the external memory

Create BaseSystem Build

• Select the PowerPCprocessor (1)

• Click Next (2)1

2

www.BDTIC.com/XILINX

Page 15: ML410 BSB DDR2 Design Creation - bdtic. · PDF fileRefer to ml410_overview_setup.ppt for details on: ... as a Linux, VxWorks, or U-Boot into the external memory

• Change the Processor Clock Frequency to 300 MHz (1)

• Click Next (2)

Create BaseSystem Build

2

1

www.BDTIC.com/XILINX

Page 16: ML410 BSB DDR2 Design Creation - bdtic. · PDF fileRefer to ml410_overview_setup.ppt for details on: ... as a Linux, VxWorks, or U-Boot into the external memory

• 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

Page 17: ML410 BSB DDR2 Design Creation - bdtic. · PDF fileRefer to ml410_overview_setup.ppt for details on: ... as a Linux, VxWorks, or U-Boot into the external memory

• 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

Page 18: ML410 BSB DDR2 Design Creation - bdtic. · PDF fileRefer to ml410_overview_setup.ppt for details on: ... as a Linux, VxWorks, or U-Boot into the external memory

• 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

Page 19: ML410 BSB DDR2 Design Creation - bdtic. · PDF fileRefer to ml410_overview_setup.ppt for details on: ... as a Linux, VxWorks, or U-Boot into the external memory

• 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

Page 20: ML410 BSB DDR2 Design Creation - bdtic. · PDF fileRefer to ml410_overview_setup.ppt for details on: ... as a Linux, VxWorks, or U-Boot into the external memory

• Select– DDR2_SRAM_32x64 (1)

• Click Next (2)

Create BaseSystem Build

2

1

www.BDTIC.com/XILINX

Page 21: ML410 BSB DDR2 Design Creation - bdtic. · PDF fileRefer to ml410_overview_setup.ppt for details on: ... as a Linux, VxWorks, or U-Boot into the external memory

• 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

Page 22: ML410 BSB DDR2 Design Creation - bdtic. · PDF fileRefer to ml410_overview_setup.ppt for details on: ... as a Linux, VxWorks, or U-Boot into the external memory

• Leave this window as is• Click Next (1)

Create BaseSystem Build

1

www.BDTIC.com/XILINX

Page 23: ML410 BSB DDR2 Design Creation - bdtic. · PDF fileRefer to ml410_overview_setup.ppt for details on: ... as a Linux, VxWorks, or U-Boot into the external memory

• Leave this window as is• Click Next (1)

Create BaseSystem Build

1

www.BDTIC.com/XILINX

Page 24: ML410 BSB DDR2 Design Creation - bdtic. · PDF fileRefer to ml410_overview_setup.ppt for details on: ... as a Linux, VxWorks, or U-Boot into the external memory

• Leave this window as is• Click Next (1)

Create BaseSystem Build

1

www.BDTIC.com/XILINX

Page 25: ML410 BSB DDR2 Design Creation - bdtic. · PDF fileRefer to ml410_overview_setup.ppt for details on: ... as a Linux, VxWorks, or U-Boot into the external memory

• Create the Base System Build– Click Generate (1)

Create BaseSystem Build

1

www.BDTIC.com/XILINX

Page 26: ML410 BSB DDR2 Design Creation - bdtic. · PDF fileRefer to ml410_overview_setup.ppt for details on: ... as a Linux, VxWorks, or U-Boot into the external memory

• Finalize the creation of the Base System Build– Click Finish (1)

Create BaseSystem Build

1

www.BDTIC.com/XILINX

Page 27: ML410 BSB DDR2 Design Creation - bdtic. · PDF fileRefer to ml410_overview_setup.ppt for details on: ... as a Linux, VxWorks, or U-Boot into the external memory

Create Base System Build• Before generating

a bitstream the MHS file (1) must be updated 1

www.BDTIC.com/XILINX

Page 28: ML410 BSB DDR2 Design Creation - bdtic. · PDF fileRefer to ml410_overview_setup.ppt for details on: ... as a Linux, VxWorks, or U-Boot into the external memory

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

Page 29: ML410 BSB DDR2 Design Creation - bdtic. · PDF fileRefer to ml410_overview_setup.ppt for details on: ... as a Linux, VxWorks, or U-Boot into the external memory

Update MHS• Add this parameter to the plb_ddr2 (1):

– PARAMETER C_INCLUDE_BURST_CACHELN_SUPPORT = 1

1

www.BDTIC.com/XILINX

Page 30: ML410 BSB DDR2 Design Creation - bdtic. · PDF fileRefer to ml410_overview_setup.ppt for details on: ... as a Linux, VxWorks, or U-Boot into the external memory

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

Page 31: ML410 BSB DDR2 Design Creation - bdtic. · PDF fileRefer to ml410_overview_setup.ppt for details on: ... as a Linux, VxWorks, or U-Boot into the external memory

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

Page 32: ML410 BSB DDR2 Design Creation - bdtic. · PDF fileRefer to ml410_overview_setup.ppt for details on: ... as a Linux, VxWorks, or U-Boot into the external memory

Generate Bitstream• Generate the libraries

needed to create the bitstream– Select Software →

Generate Librariesand BSPs (1)

1

www.BDTIC.com/XILINX

Page 33: ML410 BSB DDR2 Design Creation - bdtic. · PDF fileRefer to ml410_overview_setup.ppt for details on: ... as a Linux, VxWorks, or U-Boot into the external memory

Generate Bitstream• Compile the TestApp

project and create an executable (executable.elf)– Select Software →

Build All User Applications (1)

1

www.BDTIC.com/XILINX

Page 34: ML410 BSB DDR2 Design Creation - bdtic. · PDF fileRefer to ml410_overview_setup.ppt for details on: ... as a Linux, VxWorks, or U-Boot into the external memory

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

Page 35: ML410 BSB DDR2 Design Creation - bdtic. · PDF fileRefer to ml410_overview_setup.ppt for details on: ... as a Linux, VxWorks, or U-Boot into the external memory

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

Page 36: ML410 BSB DDR2 Design Creation - bdtic. · PDF fileRefer to ml410_overview_setup.ppt for details on: ... as a Linux, VxWorks, or U-Boot into the external memory

Download the Bitstream • View the output of a successful bitstream download

in the terminal window

www.BDTIC.com/XILINX

Page 37: ML410 BSB DDR2 Design Creation - bdtic. · PDF fileRefer to ml410_overview_setup.ppt for details on: ... as a Linux, VxWorks, or U-Boot into the external memory

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

Page 38: ML410 BSB DDR2 Design Creation - bdtic. · PDF fileRefer to ml410_overview_setup.ppt for details on: ... as a Linux, VxWorks, or U-Boot into the external memory

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

Page 39: ML410 BSB DDR2 Design Creation - bdtic. · PDF fileRefer to ml410_overview_setup.ppt for details on: ... as a Linux, VxWorks, or U-Boot into the external memory

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

Page 40: ML410 BSB DDR2 Design Creation - bdtic. · PDF fileRefer to ml410_overview_setup.ppt for details on: ... as a Linux, VxWorks, or U-Boot into the external memory

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

Page 41: ML410 BSB DDR2 Design Creation - bdtic. · PDF fileRefer to ml410_overview_setup.ppt for details on: ... as a Linux, VxWorks, or U-Boot into the external memory

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

Page 42: ML410 BSB DDR2 Design Creation - bdtic. · PDF fileRefer to ml410_overview_setup.ppt for details on: ... as a Linux, VxWorks, or U-Boot into the external memory

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

Page 43: ML410 BSB DDR2 Design Creation - bdtic. · PDF fileRefer to ml410_overview_setup.ppt for details on: ... as a Linux, VxWorks, or U-Boot into the external memory

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

Page 44: ML410 BSB DDR2 Design Creation - bdtic. · PDF fileRefer to ml410_overview_setup.ppt for details on: ... as a Linux, VxWorks, or U-Boot into the external memory

Loading Bootloop into BRAM• XMD opens and connects to the processor, using the default

options

www.BDTIC.com/XILINX

Page 45: ML410 BSB DDR2 Design Creation - bdtic. · PDF fileRefer to ml410_overview_setup.ppt for details on: ... as a Linux, VxWorks, or U-Boot into the external memory

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

Page 46: ML410 BSB DDR2 Design Creation - bdtic. · PDF fileRefer to ml410_overview_setup.ppt for details on: ... as a Linux, VxWorks, or U-Boot into the external memory

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

Page 47: ML410 BSB DDR2 Design Creation - bdtic. · PDF fileRefer to ml410_overview_setup.ppt for details on: ... as a Linux, VxWorks, or U-Boot into the external memory

AppendixAdding the Null Tiles

www.BDTIC.com/XILINX

Page 48: ML410 BSB DDR2 Design Creation - bdtic. · PDF fileRefer to ml410_overview_setup.ppt for details on: ... as a Linux, VxWorks, or U-Boot into the external memory

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

Page 49: ML410 BSB DDR2 Design Creation - bdtic. · PDF fileRefer to ml410_overview_setup.ppt for details on: ... as a Linux, VxWorks, or U-Boot into the external memory

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

Page 50: ML410 BSB DDR2 Design Creation - bdtic. · PDF fileRefer to ml410_overview_setup.ppt for details on: ... as a Linux, VxWorks, or U-Boot into the external memory

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

Page 51: ML410 BSB DDR2 Design Creation - bdtic. · PDF fileRefer to ml410_overview_setup.ppt for details on: ... as a Linux, VxWorks, or U-Boot into the external memory

Null Tiles• Step 4 –

Recompile the bitstream

1

www.BDTIC.com/XILINX

Page 52: ML410 BSB DDR2 Design Creation - bdtic. · PDF fileRefer to ml410_overview_setup.ppt for details on: ... as a Linux, VxWorks, or U-Boot into the external memory

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