Sie sind auf Seite 1von 12

Platform Studio

Adding an Embedded Module to ISE


Use Xilinx ISE Project Navigator to create or include an embedded module (Xilinx Microprocessor Project (XMP)) as a source in your top-level FPGA design. For complete information about using Project Navigator, refer to the Project Navigator online help. You can only add one embedded module source (XMP file) to an ISE project. The embedded module source can, in turn, contain multiple microprocessors. Note If the XMP file is the only source in your Project Navigator project, it becomes the toplevel source in your design hierarchy. If you add other Hardware Description Language (HDL) files as source files in Project Navigator, the embedded module is treated as a sub-module. In this case, make sure to set the correct top-level module by selecting Set As Top Module for the top-level HDL source. For the top-down design method, begin your design development in the ISE Project Navigator. Use the procedures in the following topics to create an embedded processor subsystem in your ISE design and begin designing in XPS: 1. Selecting an ISE Project in Project Navigator and Launching XPS 2. Developing Your Embedded Hardware Platform Design For the bottom-up design method, if you have already created an embedded module design using XPS as described in Creating an XPS Design as a Submodule, you can add the existing embedded module source (XMP file) to your top-level design. Refer to Adding an Embedded Module to Your Top-Level Design. The next step is Including an Embedded Module in Your Top-Level Design.

See Also
Selecting an ISE Project in Project Navigator and Launching XPS Developing Your Embedded Hardware Platform Design Adding an Embedded Module to Your Top-Level Design

Copyright 19952010, Xilinx Inc. All rights reserved.

Platform Studio

Base System Builder


The Base System Builder (BSB) automates basic hardware and software platform configuration tasks common to most processor designs. If you are targeting one of the supported embedded processor development boards available from Xilinx, or from one of our partners, the BSB lets you pick from the peripherals available on that board, automatically match the FPGA pinout to the board, and create a completed platform and test application ready to download and run on the board. If you are developing a design for a custom board, the BSB lets you select and interconnect one of the available processor cores (MicroBlaze or PowerPC processor, depending on your selected target FPGA device) with a variety of compatible, commonly used peripheral cores from the library. This gives you a hardware platform to use as a starting point from which you can add more processors and peripherals if needed, including custom peripherals, using the tools provided in XPS. BSB lets you select the following system attributes: Processor type (MicroBlaze or PowerPC processor, depending on your selected target FPGA device) Reference and processor-bus clock frequency (BSB automatically infers and configures a Digital Clock Manager (DCM) primitive when needed) Standard processor buses (all peripherals are automatically connected via appropriate buses) Debug interface Cache configuration Memory size and type (both on-chip block RAM and controllers for off-chip memory devices) Common peripherals (such as general purpose I/O, Universal Asynchronous ReceiverTransmitter (UART), and timer) Interrupt sources (from among the applicable selected peripherals) When targeting one of the supported embedded processor development boards, BSB narrows the choices of peripherals that control off-chip devices to those features provided on the board. Any deselected peripherals are omitted from the processor system design to minimize FPGA use. The BSB further provides the following board-specific services: Automatic selection of the on-board FPGA Selection of clock rates supported by the on-board oscillators Automatic setting of reset polarity Automatic generation of FPGA pinout to match the board connections, for the selected set of peripherals For each option, functional default values are pre-selected in XPS. Upon exit of the BSB, a Microprocessor Hardware Specification (MHS) file is created and loaded into your XPS project. You can further enhance the design in XPS or continue to implement the design using the Xilinx implementation tools. Optionally, the BSB can also create one or more software projects. Each project contains a sample application and linker script that can be compiled and run on the hardware on the target development board. Applications are designed to illustrate system aliveness and perform simple and basic testing of some hardware components. The contents of each test application might vary depending on what components are in your system. XPS supports multiple software projects for every hardware system, each of which contains its own source files and linker script.

See Also
XPS Design Checklist Using the Base System Builder Base System Builder Restrictions
1

Copyright 19952010, Xilinx Inc. All rights reserved.

Platform Studio

Creating a New Software Application Project Using XPS


To Create a New Software Application Project
1. In the Project Information area of the XPS Main Window, click the Applications tab. This opens a tree view showing software projects and their associated processors, executable files, compiler options, source files, and header files. 2. Double-click Add Software Application Project to create a new software project for the processor in the system. The Add Software Application Project window appears. 3. Type a name for the project and select a processor. 4. If you generated the Executable and Linkable Format (ELF) file for the project outside of XPS, select the Project is an ELF-only Project check box. 5. Click OK. This creates an empty new project and enables you to enter a name for the project. The tree view is then updated to show the new project. The next step is Creating and Adding Source and Header Files.

See Also
XPS Design Checklist

Copyright 19952010, Xilinx Inc. All rights reserved.

Platform Studio

Creating an XPS Design as an ISE Submodule


When creating and developing an embedded processor project using XPS and the project is to be included as a submodule in a Xilinx ISE design, observe the steps and guidelines described in this Help topic. If you use the Project > New Source command in Project Navigator to invoke XPS and create your embedded processor project, many of the following steps are completed automatically. To create an XPS design as an ISE submodule, do the following: 1. Create a project. To do this, in XPS, select File > New Project to open the New Project dialog box. The project name you select becomes the component name of the embedded submodule in your top-level ISE design. 2. Use the Base System Builder (BSB) to target a supported development board. Note the FPGA device type used on that board. The device, package, and speed grade are listed in the Project tab of the XPS window after you exit the BSB. You must specify that device again when creating your top-level ISE project. Note If you use the Project > New Source command in Project Navigator to create your embedded processor project, the BSB only allows you to select boards that contain the same FPGA device you specified for your top-level ISE project. You can target a custom board in the BSB. 3. Specify external ports. When specifying external ports in the Ports tab of the System Assembly view, include all signals to connect to the top-level ISE design, including those that connect to FPGA pins. You will specify the connection of your embedded system ports to FPGA pins in your toplevel ISE design. As a general guideline, specify only tristate or bidirectional ports for signals to connect directly to FPGA pins, not for on-chip connections to the top-level design. 4. After completing your hardware platform design, select Hardware > Generate Netlist to generate the netlist. Note At this point, you are ready to add the embedded submodule to your ISE project. 5. Select a Boot Application. Before generating a configuration bitstream in Project Navigator, make sure you select a software application to initialize into the on-chip block RAM memory for each processor using the Application tab in XPS. Project Navigator merges the selected software applications into the FPGA bitstream after design implementation. See Creating a New Software Application Project Using XPS for more information. If you have created an embedded processor source in Project Navigator before working in XPS, go on to Including an Embedded Module in Your Top-Level Design. Otherwise, see Adding an Embedded Module to ISE.

Copyright 19952010, Xilinx Inc. All rights reserved.

Platform Studio

Creating and Adding Source and Header Files


After creating an application, if you did not select the Project is an ELF-only Project check box when creating your project, you must add C or C++ source and header files to the project as described below. Alternately, if you generated the Executable and Linkable Format (ELF) file for the project outside of XPS, your next step is Downloading Bitstreams to an FPGA.

To Add Source Files to a Project


For information about adding source files to a project, refer to the following topics: Creating a Source File for a Project Adding an Existing Source File to a Project Adding a New Source File to a Project

To Add Header Files to a Project


For information about adding header files to a project, refer to Adding Header Files to a Project. The next step is Setting the Compiler Environment Variables.

Copyright 19952010, Xilinx Inc. All rights reserved.

Platform Studio

Developing Your Embedded Hardware Platform Design


This procedure follows Selecting an ISE Project in Project Navigator and Launching XPS for creating an embedded processor subsystem in your ISE design and beginning designing in XPS.

To Develop Your Embedded Hardware Platform Design


1. A prompt appears in XPS, asking whether you want to use the BSB. This is recommended, especially if you are using a development board supported by the BSB. Alternatively, you can capture your subsystem design outside of the BSB. 2. The BSB allows you to select only those boards that contain the same FPGA device you specified for your ISE project. Otherwise, you can target a custom board in BSB. 3. Proceed with development of your embedded hardware platform design in XPS. 4. Before returning to Project Navigator, Xilinx recommends that you do one of the following to identify and address any potential problems found in the embedded system: If you plan to simulate the design, run Simulation > Compile Simulation Libraries and Simulation > Generate Simulation HDL Files. If you plan to directly implement the design, run Hardware > Generate Netlist. 5. After returning to Project Navigator, if your embedded module is a portion of a larger design, you can instantiate and connect the embedded subsystem to your top-level FPGA design. If your embedded module represents the entire design, no further work is required. Note If your embedded module is a portion of a larger design, it appears under the ISE top-level Hardware Description Language (HDL) source in the hierarchy tree after you instantiate the submodule in your top-level source. You can select the XMP source and then run the "View HDL Instantiation Template" process to generate a sample HDL instantiation template. The HDL snippet in this instantiation template can be copied and pasted into your top-level HDL source file. If you must modify anything in your embedded submodule design, you can run the Manage Processor Design process in Project Navigator to reopen XPS with your embedded project loaded.

See Also
Adding an Embedded Module to ISE Selecting an ISE Project in Project Navigator and Launching XPS Adding an Embedded Module to Your Top-Level Design

Copyright 19952010, Xilinx Inc. All rights reserved.

Platform Studio

Downloading Bitstreams to an FPGA


If your embedded system is a submodule in a top-level Xilinx ISE design, use the Xilinx iMPACT tool in Project Navigator to connect to your target FPGA and download the bitstream. Otherwise, you can use XPS in stand-alone mode to run iMPACT for you. To download the design, you must first set up the board and the parallel cable as required. For instructions on cabling, see the Procedures > Configuring Devices section of the iMPACT Help.

To Download and Execute the Selected Design


When you select Device Configuration > Download Bitstream, XPS downloads the bitstream (download.bit file) onto the target board using iMPACT in batch mode. XPS uses the file etc/download.cmd for downloading the bitstream. Because XPS tools are makefile based, the download button calls on the makefile and executes the steps necessary to create the bitstream with the Executable and Linkable Format (ELF) file populated within the bitstream. Note The file system.bit, created after hardware generation (completion of Xflow), is an uninitialized bitstream and does not include the ELF file. It is only when you execute the command to download or update the bitstream that the system.bit and ELF files merge into download.bit. The XPS routine for generating the bitstream might vary, depending on where you are in the flow. For example, if Platgen has not been run, the download command runs all the tools (Platgen, Xflow, Libgen, GCC, and BitInit) to generate the bitstream. Or, if some tools have been run already, such as Platgen and Xflow, the download command runs only those tools needed to generate the bitstream. In general, the download command relies on the file etc/download.cmd, which is the iMPACT command to download a bitstream. The command calls the makefile and runs iMPACT from a command line to download the populated bitstream to the target board. Downloading the bitstream brings the processor out of reset and starts execution. The next step is Running an Application from External Memory.

See Also
Initializing Software Overview Initializing Bitstreams for Hardware Testing Initializing Bitstreams with Bootloops Initializing Bitstreams with XMDSTUB Specifying the JTAG Chain Running an Application from External Memory Programming Flash Memory

Copyright 19952010, Xilinx Inc. All rights reserved.

Platform Studio

Selecting an ISE Project in Project Navigator and Launching XPS


Begin your design development in Xilinx ISE Project Navigator. Use the following procedure to create an embedded processor subsystem in your ISE design and begin designing in XPS. 1. If necessary, open the ISE Project Navigator, and create or open an ISE project for your top-level FPGA design. 2. If you intend to target a specific development board in the Base System Builder (BSB), select the same Device, Package, and Speed Grade as is used on the targeted board. 3. Select Project > New Source. The New Source window appears. Note You might or might not already have a top-level Hardware Description Language (HDL) source file added to your ISE project at this time. 4. In the New Source window, select Embedded Processor as the source type. 5. In the File Name field, enter a name for your XPS project. This will also be the component name of the embedded submodule in your top-level design. By default, your XPS project is created in a subfolder of your ISE project, and the folder name is the same as the project name. 6. Click Next. 7. Review the specifications for the new source, then click Finish. ISE automatically launches XPS so you can create your new embedded processor project. The next step is Developing Your Embedded Hardware Platform Design.

See Also
Adding an Embedded Module to ISE Adding an Embedded Module to Your Top-Level Design

Copyright 19952010, Xilinx Inc. All rights reserved.

Platform Studio

Starting a New Project Using the ISE Software and XPS


To Start a New Project Using the ISE Software and XPS
1. Create the Xilinx ISE project for your top-level FPGA design, by doing the following in ISE: a. In the ISE software, select File > New Project. b. In the Project name and Project location fields, enter the project name and location, respectively. c. Select HDL or Schematic as the Top-level source type, and click Next. d. Select the device properties, such as device, synthesis and simulation tools, and preferred language, and click Next. e. Click New Source to add a new source file. If your FPGA design will contain only the embedded design: 1. Select Embedded Processor as the source type. 2. Type a name for the file and click Next. 3. Complete the remaining wizard pages. XPS opens and prompts you to begin using the Base System Builder (BSB). 4. Click Yes to start the BSB. If your FPGA design will include the embedded design as part of a larger overall design: 1. Select Verilog Module, VHDL Module, or Schematic as the source type. 2. Type a name for the file and click Next. 3. Complete the remaining wizard pages. The ISE project is created. 4. In Project Navigator, select Project > New Source and select the Embedded Processor source type. 2. Create an XPS project ("embedded processor source") in which to develop your embedded subsystem. This automatically invokes XPS. 3. Develop any non-processor custom logic in your FPGA design. 4. Specify design constraints for your FPGA design, such as pinouts. 5. Implement your FPGA design, including embedded subsystem, into configuration bitstream. 6. Optionally, verify your design using simulation. While working on your embedded subsystem in XPS, do the following: 1. Enter your embedded hardware platform design, including any custom peripherals you might wish to develop. 2. Specify and build your embedded software platform, including drivers and libraries. 3. Develop, compile, and debug your embedded software applications. This can be done using XPS, the Software Development Kit (SDK) or a compatible third-party MicroBlaze or PowerPC software development environment. For information about how to create an embedded subsystem as part of your ISE design, refer to Using ISE Project Navigator to Implement Your FPGA Design.

See Also
Starting a New Project Starting a New Project Using XPS Alone Starting Your XPS Design Process
1

Copyright 19952010, Xilinx Inc. All rights reserved.

Platform Studio

Using ISE Project Navigator to Implement Your FPGA Design


Xilinx ISE Design Suite Project Navigator provides access to many advanced FPGA implementation tools, such as Constraints Editor and Timing Closure Tools that you can use while implementing your embedded system module. Based on your application, your FPGA design will fall into one of the following two situations: Your FPGA design comprises a combination of an embedded processor subsystem and other logic, in which case you must use Project Navigator to develop the other logic portion of your design. Use Project Navigator to also integrate various modules (including embedded subsystem module) and implement the top-level FPGA design. Your FPGA design comprises an embedded processor system. In this case, it is still recommended to use Project Navigator for implementation, but you can implement the entire design from within XPS as well. Use the XPS and ISE tools to process your embedded module design as follows: Top-Down: Invoke ISE and create a top-level project. Then create a new embedded processor source to include in the top-level design. This automatically invokes XPS, where you develop your embedded module. This is the recommended flow. Bottom-Up: Invoke XPS and develop your embedded processor design. Later, invoke ISE and add the embedded module as a source to include in your ISE project. Note Only the Xilinx Microprocessor Project (XMP) file must be added as the source file. The Block RAM Memory Map (BMM) file and Executable and Linkable Format (ELF) files should not be added to the ISE project. Note Project Navigator also allows you to create a project with an embedded module (XMP) as the only source. In this case, the embedded module is essentially the top-level module in the Project Navigator design. Both methods let you access the same set of tools and capabilities, including the Base System Builder (BSB) and Xilinx Software Development Kit (SDK). In the top-down method, XPS automatically inherits the FPGA device selected in ISE; in the bottom-up method, you must select the same FPGA architecture in both XPS and ISE. For development of Embedded Software Platform and Applications, you can either do this in XPS or in SDK. Project Navigator allows you to export the embedded sub-module hardware platform to Xilinx SDK. The Export to SDK task behaves identically when run from either Project Navigator or from XPS. They export to the same directory and point to the same SDK workspace. Note The export location be changed through command line mode and stored in XMP, but not from the GUI. Next, do one of the following: To implement the top-down method, see Adding an Embedded Module to ISE. To implement the bottom-up method, see Creating an XPS Design as a Submodule.

See Also
XPS Design Checklist

Copyright 19952010, Xilinx Inc. All rights reserved.

Das könnte Ihnen auch gefallen