module5fpgadesign.pdf

(4487 KB) Pobierz
FPGA Design Basics
Altium Designer Training Module 
FPGA Design 
Document Version 1.2, February 2008 
Software, documentation and related materials: 
Copyright © 2008 Altium Limited. 
All rights reserved. You are permitted to print this document provided that (1) the use of such is for 
personal use only and will not be copied or posted on any network computer or broadcast in any 
media, and (2) no modifications of the document is made. Unauthorized duplication, in whole or part, 
of this document by any means, mechanical or electronic, including translation into another 
language, except for brief excerpts in published reviews, is prohibited without the express written 
permission of Altium Limited. Unauthorized duplication of this work may also be prohibited by local 
statute. Violators may be subject to both criminal and civil penalties, including fines and/or 
imprisonment. 
Altium, Altium Designer, Board Insight, CAMtastic, CircuitStudio, Design Explorer, DXP, LiveDesign, 
NanoBoard, NanoTalk, Nexar, nVisage, P­CAD, Protel, SimCode, Situs, TASKING, and Topological 
Autorouting and their respective logos are trademarks or registered trademarks of Altium Limited or 
its subsidiaries. 
Microsoft, Microsoft Windows and Microsoft Access are registered trademarks of Microsoft 
Corporation. OrCAD, OrCAD Capture, OrCAD Layout and SPECCTRA are registered trademarks of 
Cadence Design Systems Inc. AutoCAD is a registered trademark of AutoDesk Inc. HP­GL is a 
registered trademark of Hewlett Packard Corporation. PostScript is a registered trademark of Adobe 
Systems, Inc. All other registered or unregistered trademarks referenced herein are the property of 
their respective owners and no trademark rights to the same are claimed. 
Module 1
ii 
Altium Designer Training Module 
FPGA Design 
FPGA Design Basics 
FPGA Design......................................................................................................... 1­1 
1.1 
Learning objectives..................................................................................... 1­1 
1.2 
Topic outline............................................................................................... 1­1 
Introduction to FPGA Design ............................................................................... 1­2 
2.1 
FPGA basics .............................................................................................. 1­2 
Creating an FPGA project..................................................................................... 1­3 
3.1 
Overview.................................................................................................... 1­3 
3.2 
A quick word about projects and design workspaces................................... 1­3 
3.3 
FPGA project.............................................................................................. 1­4 
FPGA schematic connectivity.............................................................................. 1­5 
4.1 
Overview.................................................................................................... 1­5 
4.2 
Wiring the design........................................................................................ 1­5 
4.3 
Including HDL source files in a schematic................................................... 1­5 
4.4 
Establishing connectivity between documents............................................. 1­5 
4.5 
Using buses and bus joiners....................................................................... 1­6 
FPGA ready schematic components ................................................................... 1­9 
5.1 
Overview.................................................................................................... 1­9 
5.2 
Processor cores ......................................................................................... 1­9 
5.3 
Desktop NanoBoard port plugins .............................................................. 1­10 
5.4 
Peripheral Components ............................................................................ 1­10 
5.5 
Generic components ................................................................................ 1­10 
5.6 
Vendor macro and primitive libraries......................................................... 1­10 
5.7 
Exercise 1 – Create a PWM...................................................................... 1­11 
Targeting the design........................................................................................... 1­13 
6.1 
Constraint files ......................................................................................... 1­13 
6.2 
Configurations .......................................................................................... 1­14 
6.3 
NanoBoard constraint files........................................................................ 1­14 
6.4 
Configuration Manager ............................................................................. 1­14 
6.5 
Auto Configuring an FPGA project ............................................................ 1­15 
6.6 
Defining constraints manually ................................................................... 1­15 
6.7 
Editing a constraint file.............................................................................. 1­16 
6.8 
Exercise 2 – Configuring MyPWM............................................................. 1­17 
Running the design ............................................................................................ 1­19 
7.1 
Overview.................................................................................................. 1­19 
7.2 
Controlling the build process..................................................................... 1­19 
7.3 
Understanding the build process............................................................... 1­20 
7.4 
Button regions .......................................................................................... 1­20 
7.5 
Accessing stage reports / outputs ............................................................. 1­21 
7.6 
Build stages.............................................................................................. 1­21 
7.7 
Configuring a build stage .......................................................................... 1­24 
7.8 
How Altium Designer interacts with back­end vendor tools........................ 1­25 
7.9 
Exercise 3 – Run MyPWM on the NanoBoard........................................... 1­25 
Embedded instruments ...................................................................................... 1­26 
8.1 
Overview.................................................................................................. 1­26 
8.2 
On­Chip debugging .................................................................................. 1­26 
8.3 
CLKGEN .................................................................................................. 1­27 
8.4 
CROSSPOINT_SWITCH.......................................................................... 1­27 
8.5 
FRQCNT2 ................................................................................................ 1­27
Altium Designer Training Module 
FPGA Design 
8.6 
8.7 
8.8 
8.9 
8.10 
8.11 
8.12 
IOB_x....................................................................................................... 1­28 
DIGITAL_IO ............................................................................................. 1­28 
LAX_x ...................................................................................................... 1­29 
Terminal Console ..................................................................................... 1­31 
Exercise 4A – Using embedded instruments............................................. 1­31 
Where are the Instruments? ..................................................................... 1­35 
Enabling embedded instruments............................................................... 1­35 
Interacting with the NanoBoard ......................................................................... 1­37 
9.1 
Overview.................................................................................................. 1­37 
9.2 
NanoBoard communications..................................................................... 1­37 
9.3 
Technical background .............................................................................. 1­38 
9.4 
The NanoBoard controller......................................................................... 1­40 
9.5 
FPGA I/O view.......................................................................................... 1­41 
9.6 
Live cross probing .................................................................................... 1­42 
9.7 
Exercise 4B – View MyPWM on the NanoBoard ....................................... 1­42 
Creating a core component................................................................................ 1­43 
10.1  Core project.............................................................................................. 1­43 
10.2  Creating a core component from an FPGA project .................................... 1­43 
10.3  A word about EDIF ................................................................................... 1­44 
10.4  Setting up the core project ........................................................................ 1­44 
10.5  Constrain / configure ................................................................................ 1­45 
10.6  Creating a new constraint file.................................................................... 1­46 
10.7  Creating a configuration............................................................................ 1­47 
10.8  Synthesize ............................................................................................... 1­48 
10.9  Publish ..................................................................................................... 1­49 
10.10  Creating a core schematic symbol ............................................................ 1­49 
10.11  Using a core component........................................................................... 1­51 
10.12  Exercise 5 – Create a core component from MyPWM ............................... 1­52 
FPGA design simulation..................................................................................... 1­53 
11.1  Creating a testbench ................................................................................ 1­53 
11.2  Assigning the Testbench Document.......................................................... 1­53 
11.3  Initiating a simulation session ................................................................... 1­54 
11.4  Project compile order................................................................................ 1­54 
11.5  Setting up the simulation display............................................................... 1­55 
11.6  Running and debugging a simulation ........................................................ 1­56 
11.7  Exercise 6 – Create a testbench and simulate MyPWM ............................ 1­58 
Review................................................................................................................. 1­59
10 
11 
12 
ii 
Altium Designer Training Module 
FPGA Design 
1  FPGA Design 
The primary objective of this day of training is to make participants proficient in the process of 
developing, downloading and running an FPGA design on the Desktop NanoBoard.  We will go 
through the FPGA design framework and demonstrate just how simple FPGA design is with Altium 
Designer. 
1.1 
Learning objectives
·
To be competent in developing FPGA designs using standard FPGA­based libraries and the 
schematic capture environment
·
To understand and be able to make use of the FPGA build process
·
To be familiar with the peripheral capabilities of the Desktop NanoBoard and know how to 
incorporate their use in custom FPGA designs.
·
To appreciate the different communication mechanisms used by the software to control and probe 
a running FPGA design.
·
To be competent with the use of virtual instruments in an FPGA design. 
1.2 
Topic outline 
Core Topics
FPGA 
Project 
Creation 
FPGA 
Schematic 
Extensions 
FPGA Build 
Process 
FPGA design 
built and 
loaded onto 
NanoBoard 
NanoBoard 
Concepts 
FPGA 
Instruments 
Advanced Topics (Time Permitting) 
FPGA Core 
Components 
Digital 
Simulation 
Figure 1. Topic Outline for Part I – FPGA Design Basics. 
1 ­ 1 
Zgłoś jeśli naruszono regulamin