DSP Builder ????;????;????;???;????? - PowerPoint PPT Presentation

1 / 105
About This Presentation
Title:

DSP Builder ????;????;????;???;?????

Description:

DSP Builder DSP Builder ... – PowerPoint PPT presentation

Number of Views:323
Avg rating:3.0/5.0
Slides: 106
Provided by: OneT8
Category:

less

Transcript and Presenter's Notes

Title: DSP Builder ????;????;????;???;?????


1
?????
  • ????
  • DSP Builder ????????????????????
  • ????
  • DSP Builder ???????Simulink??????MATLAB?????DSP
    Builder????,?????????????????????????

2
??(1)
  • ???? DSP Builder??
  • DSP Builder??
  • DSP Builder??
  • DSP Builder????
  • DSP Builder????
  • ??

3
??(2)
  • ???? Altera DSP Builder???
  • AltLab?
  • ???
  • ?????
  • ??????
  • Rate Change???
  • ??????
  • ???(Storage)???
  • MegaCore????
  • ???

4
Implementing DSP Designs in FPGA
  • Overview

5
The Programmable Solutions Company
6
Agenda
  • Overview
  • Designing with DSP Builder Library Blocks
  • Simulating Debugging with DSP Builder
  • Intellectual Property (IP) Implementation
  • FIR, NCO and FFT IP Functions
  • Appendix
  • Introduction to Altera Devices
  • Hardware Acceleration Using Nios II

7
What Is a DSP Processor?
  • Microprocessor With Specialized Instructions
    Hardware for DSP Applications
  • Optimized For High-Performance, Repetitive and
    Numerically Intensive Tasks
  • Hardware
  • Fixed Floating Point Multipliers
  • Co-Processors
  • Special Memory Structures
  • Multiple Access Memories For Faster Computations
  • Run Arithmetic Calculations Faster than General
    Processors

8
What Is an FPGA?
  • Field Programmable Gate Array
  • Device that Has a Regular Architecture (Set of
    Blocks) that Can Be Programmed for Various
    Functions
  • Glue Logic
  • Customizable Hardware Solution
  • Configurable Processors

9
DSP Processors vs. FPGAs
High Speed DSP Processor
High Level of Parallel Processing in FPGA
  • 1-8 Multipliers
  • Needs looping for more than 8 multiplications
  • Needs multiple clock cycles because of serial
    computation
  • 200 Tap FIR Filter would need 25 clock cycles
    per sample with an 8 MAC unit processor
  • Can implement hundreds of MAC functions in an
    FPGA
  • Parallel implementation allows for faster
    throughput
  • 200 Tap FIR Filter would need 1 clock cycle per
    sample

10
Extending Range of Altera Reconfigurable DSP
Solutions
New!
600 -
Performance (MMACs/sec)
100 -
Complete Hardware Implementation
Embedded Processors
Embedded Processors Hardware Acceleration
11
FPGA / DSP Challenges
  • Designing With FPGAs Is Different!!
  • Different Set of Tools
  • C-Code vs. VHDL / Verilog
  • System-Level Development Verification
  • Software/Hardware Co-Development
  • Software Design Optimization

12
Addressing Challenges
  • 1) System-level Development Verification
  • DSP Builder Tool
  • System Integration
  • Bit-true Cycle Accurate Models
  • Automatic Translation into Hardware
  • 2) Hardware/Software Integration
  • SOPC Builder Tool Nios II Processor
  • 3) Design Optimization
  • Hardware Acceleration
  • Flexibility in System Partitioning

13
Implementing DSP Designs in FPGAs
  • Matlab Simulink
  • Overview

14
The Mathworks
  • Headquarters in Natick, near Boston
  • Founded in 1984, Privately Held
  • Over 1000 employees
  • Direct Offices in UK, France, Italy, Germany,
    Switzerland, Spain, Benelux
  • Distributors in 20 Countries

15
The Mathworks Product Family
DAQ cards Instruments
Slide Courtesy of The MathWorks
16
The Mathworks Design Environment
  • Top-Down Design
  • Design Test System Behavior Early in the Design
    Process
  • Create Validated Reference Design
  • Detect Design Flaws Early
  • Reduced Design Risk Cost
  • Reduced Time-to-Market

17
MATLAB Environment
Current Working Directory
Simulink
Variables
Results of Commands Errors, etc.
Command History
18
Simulink
  • Hierarchical Block Diagram Design Simulation
    Tool
  • Digital, Analog/Mixed Signal Event Driven
  • Visualize Signals
  • Integrated with MATLAB

19
Simulink Blockset Libraries
  • Simulink
  • Sources
  • Sinks
  • Continuous
  • Discrete
  • Non-Linear
  • Math
  • Fixed-Point Blockset
  • DSP Blockset
  • Communications Blockset
  • SimPowerSystems Blockset
  • Others

Altera DSP Builder
20
Matlab / Simulink Model Created with Altera DSP
Builder Libraries
21
Design Flow with DSP Builder
(???)
22
What Is DSP Builder?
  • Links MATLAB/Simulink Design Environment to
  • Quartus II Development Tool for Altera FPGAs
  • Automatic HDL Code Generation from Simulink Model
    Generated by DSP Builder Libraries
  • Generates Bit Cycle Accurate Models for DSP
    Functions
  • Automatic Generation of HDL Testbench
  • Integrated Intellectual Property (IP) Library
    Support
  • Enables Rapid Prototyping with Altera DSP
    Development Board
  • Facilitates Integration of Complex DSP Functions

23
DSP Builder Overview
24
Altera DSP Builder Libraries
  • AltLab
  • Arithmetic
  • Boards
  • Complex Type
  • Gate Control
  • IO Bus
  • Rate Change
  • SOPC Builder Links
  • State Machine Functions
  • Storage
  • MegaCore Functions
  • Video and Image Processing

25
Design Flow Overview
  1. Create Design in Simulink Using Altera Libraries
  2. Simulate in Simulink
  3. Add Signal Compiler to Model
  4. Create HDL Code Generate Testbench
  5. Perform RTL Simulation
  6. Synthesize HDL Code Place Route
  7. Program Device
  8. Signal Tap II Logic Analyzer

26
Step 1- Create Design in Simulink Using Altera
Libraries
  • Drag Drop Library Blocks into Simulink Design
    Parameterize Each Block

27
Parameterization of IP Megacores
28
Step 2 - Simulate in Simulink
29
Step 3 - Add Signal Compiler to Model to
Generate HDL code
30
Step 4 - Create HDL Code Generate Testbench
altrfir32.mdl
31
HDL Code Generation
32
DSP Builder Report File
  • Lists All Converted Blocks
  • Port Widths
  • Sampling Frequencies
  • Warnings Messages

33
Step 5 Perform RTL Simulation
( ModelSim )
  1. Set working directory (File gt Change Directory)
  2. Run TCL file (Tools gt Execute Macro)

34
Perform Verification
35
Step 6 - Synthesize HDL Place Route
36
Step 7 Program Device
37
Step 8 - SignalTap II Logic Analyzer
  • Embedded Logic Analyzer
  • Downloads into Device with Design
  • Captures State of Internal Nodes
  • Uses JTAG for Communication

38
SignalTap II Logic Analyzer
Imported Data
Imported Plot
39
Design Flow Review with DSP Builder
  1. Create Design in Simulink Using Altera Libraries
  2. Simulate in Simulink
  3. Add Signal Compiler to Model
  4. Create HDL Code Generate Testbench
  5. Perform RTL Simulation
  6. Synthesize HDL Code Place Route
  7. Program Device
  8. Signal Tap II Logic Analyzer

40
Quartus II Assignments Settings
41
Stratix II DSP Development Board
42
Stratix II DSP Board Block Diagram
43
(No Transcript)
44
Demos Provided with DSP Builder
45
??? Altera DSP Builder???
  • AltLab?
  • ???
  • ?????
  • ??????
  • Rate Change???
  • ??????
  • ???(Storage)???
  • MegaCore????
  • ??

46
Altera DSP Builder Libraries
  • AltLab
  • Arithmetic
  • Boards
  • Complex Type
  • Gate Control
  • IO Bus
  • Rate Change
  • SOPC Builder Links
  • State Machine Functions
  • Storage
  • MegaCore Functions
  • Video and Image Processing

47
1?AltLab?(1)
  • AltLab?????????????,???????????RTL??VHDL???

48
AltLab Library
  • Signal Compiler
  • HDL SubSystem
  • Build Hierarchical System
  • HDL Import
  • SignalTap II Block
  • SignalTap II Analysis
  • BP Bus Probe
  • Device programmer
  • HIL
  • Quartus II Global Project Assignment
  • Quartus II Pinout Assignment
  • VcdSink
  • SubSystem Builder
  • Creates Black-Box

49
1?AltLab?(2)
  • SignalCompiler??
  • SignalCompiler???DSP Builder?????,
  • ??????
  • ?Simulink?????????RTL VHDL
  • ??VHDL testbenches
  • ??Verilog testbenches
  • ??Quartus II??Verilog HDL????
  • ?Simulink?????VHDL testbench???txt???????
  • ??Tcl ????Quartus II???
  • ?????LeonardoSpectrum?Precision RTL
    Synthesis?Synplify?ModelSim?????Tcl??
  • ??Quartus II???????
  • ??PTF????,??????SOPC Builder
  • ????SignalTap II (.stp) ??
  • ??Quartus II??????(.bsf) ?

50
1?AltLab?(3)
  • SignalCompiler??
  • ???Simulink???????Simulink????,?????????VHDL???,??
    ?SignalCompiler??????sc_altera??????????

Update DiagramSignalCompiler?????Simulink????????
???DSP Builder?????? AnalyzeSignalCompiler??????
?????mdl??,?????????????DSP Builder???????????????
???????????? Skip Analyze???????
51
1?AltLab?(4)
  • ????????????????????????????????????????????????
    ???????????reset?????????SignalTap
    II???????????????????SOPC ptf???????Verilog???
  • ?????????????Signal Compiler???????,
    ???????,?MDL???VHDL,?????Tcl????
    ?????VHDL????????Quartus II???????????DSP???????
    ???????DSP?????
  • ???Project Info??????????Report
    File???SignalCompiler?????????

52
AltLab HDL SubSystem
  • Create Hierarchical Design
  • Separate HDL Code for Each Subsystem

53
AltLab HDL SubSystem (cont.)
54
2????
  • ?????????????????,??????????????Use Dedicated
    Circuitry????,?????????Altera tratix II?Stratix?
    Stratix GX?Cyclone II????DSP??????

55
Arithmetic Library
  • Comparator
  • Divide
  • Gain
  • Increment Decrement
  • Magnitude
  • Multiply Accumulate
  • Multiply Add
  • Parallel Adder Subtractor
  • Product
  • Sum of Partial Products
  • Integrator
  • Differentiator

56
Arithmetic Library Multiply Add
57
Arithmetic LibraryDifferentiator Integrator
BlocksEx CIC Filter(????????? )
58
Arithmetic LibraryAdder Gain BlocksEx IIR
Filter(????????? )
59
3?I/O????????
  • ?????????????????????bit ?????????????

60
Bus Manipulation AltBus
61
AltBus Modes
  • Input Output Port
  • Defines Hardware Boundaries
  • Converts Floating-Point to Fixed-Point
  • Internal Node
  • Defines Internal Hardware Node Widths
  • Converts SBF Formats
  • Constant
  • Implements Constants in Hardware
  • Black Box
  • Defined Later

62
Bus Manipulation Bus Conversion
63
IO Bus Library (cont.)Ex Floating Point
Operation
64
Ex Floating Point Operationwith IO Bus
Library Blocks (Cont.)
65
BP Bus Probe
66
4???????
67
Complex Signals Library
  • Butterfly
  • Complex Multiplexer
  • Complex Conjugate
  • Complex Delay
  • Complex Product
  • Complex AddSub
  • Complex Constant
  • Complex to Real-imag
  • Real-imag to Complex

68
ButterFly
  • Implement Decimation in Time FFT Butterfly
  • a,b,W,A,B Are Complex Number (Signed Integer)
  • axjX byjY W vjV
  • A abW B a-bW
  • A (xyv)YV j(XYv-yV)
  • B (x-yv)-YV j(X-YvyV)

69
Complex Real-Imag to Complex
  • X a Bj
  • Conjugate
  • Conjugate(X) a - Bj
  • Invert
  • Invert(X) -a - Bj
  • X a Bj
  • Y C Dj
  • Multiply
  • X Y (AC BD) (AD BC)j

70
Gate Control Library
  • Case Statement
  • If Statement
  • Logical Bit Operator
  • Logical Bus Operator
  • Single Pulse
  • LUT
  • N-to-1 Multiplexer
  • 1-to-N Demux
  • Decoder
  • Bitwise Logical Bus Operator

71
Gate Control LibraryEx Convolutional
Interleaver
72
5????(Storage)???
73
Storage Library
  • Delay
  • Down Sampling
  • Dual-port RAM
  • FIFO
  • LFSR Sequence
  • LUT
  • Parallel to Serial
  • Pattern
  • ROM EAB
  • Serial to Parallel
  • Shift Taps
  • Up Sampling

74
Storage Shift Taps
75
ROM EAB Shift Taps BlocksEx Polyphase Filter
76
Memory Delay BlockEx 2D Filter
77
6?Rate Change???(1)
  • ????????DSP Builder???Delay?Increment
    Decrement?????????Simulink?VHDL????????????Simulin
    k?Solver,??????
  • ??Fixed-step
  • ??discrete
  • (no continuous state)
  • ??Single Tasking??

78
6?Rate Change???(2)
  • ClockAltr?? ????????????????
  • PLL?? ????????????????????
  • Multi-Rate DFF?? ?????????
  • Tsamp ?? ??????????????

79
6?Rate Change???(3)
80
Rate Change Multi-Rate DFF
  • Synchronize data path intersections
  • involving multiple rates

81
Rate Change Tsamp PLL BlocksEx Polyphase
Filter
82
7?SOPC Builder Link(1)
  • Nios II???????????????????????????,??????????????
    ????Nios II????????RISC CPU????????Cygnus?Red
    Hat??GNUPro???
  • ??????SOPC???????????????????,??SOPC
    Builder????SOPC Builder???????????????
  • ??Avalon?????
  • ??Nios II????????????????????

83
7?SOPC Builder Link(2)
  • ?????????VHDL?,SignalCompiler????class.ptf???Quart
    us II???????????SOPC Builder? ???DSP Builder
    SOPC Builder?????

84
SOPC Builder Library DSP Acceleration
  • Custom Peripheral
  • Interface to Nios Through Avalon Bus
  • Custom Instruction
  • Adds Customized Logic to Nios ALU

85
What is SOPC Builder?
86
SOPC Builder LibraryCustom Instruction
  1. Add Custom Instruction Blocks to Simulink Model

87
SOPC Builder Library Custom Peripheral
  1. Add Avalon Ports to Simulink Model

88
SOPC Builder Library Avalon Blocks
89
SOPC Builder Library Avalon Blocks
90
8?DSP????
91
Board Library
92
9??????
93
10?MegaCore ????
  • Altera ?MegaCore???Altera?PLD???????????????,???M
    egaCore???????Altera?MegaWizard Plug-In
    Manager???????
  • OpenCore Plus??????????????????????,??????????????
    ???,?????MegaCore???????
  • DSP Builder??????IP?
  • FIR Compiler
  • IIR Compiler
  • Reed-Solomon Compiler
  • Viterbi Compiler
  • FFT Compiler
  • NCO Compiler

94
Alteras IP Megafunctions
  • Shrink-Wrapped Functions Customers can Drop into
    Altera FPGA Designs
  • Optimized for Altera Architectures
  • Easily Parameterized through MegaWizard Plug-in
    Manager

95
Megacore IP in DSP Builder
DSP IP Type
FIR Compiler Filtering
FFT/IFFT Compiler Transforms
NCO Compiler Signal Generation
Reed-Solomon Compiler Error Detection/ Correction
Viterbi Compiler Error Detection / Correction
96
FIR Compiler
1.Generate Floating-Point Coefficients based on
Filter Parameters 2. Scale Coefficients to
Fixed-Point Values 3. Select Input/Output
Specifications 4. Determine Filter
Architecture 5. Select Output Simulation Files
97
Numerically Controlled Oscillators (NCO)
  • Purpose
  • To Generate a Discrete-Time, Discrete-Value
    Waveform Approximating a Continuous Waveform to a
    Defined Precision
  • Primary Application Area
  • Direct Digital Synthesis (DDS) of Sinusoidal
    Waveforms
  • - I-Q Modulation
  • - Carrier Recovery
  • - Pilot Generation.

98
Advanced Features
  • Black Boxing
  • Modelling Guidelines
  • - Clock Design Rules
  • - Multi-Rate Designs
  • - Data Width Propagation
  • - Automatic Sign Extension
  • - Word Growth

99
Black-Boxing
  • What is a black-box and why is it used?
  • Module or Group of Blocks Left Unprocessed by DSP
    Builder
  • Surrounding Blocks Still Converted to HDL
  • Allows HDL Code to Be Added to Simulink Design
  • Use Blocks, C-Based Model or M-File for Simulink
    Simulation
  • Output Netlist Includes Port Connections to
    Black-Box
  • Black-Box Code is Inserted by Quartus II
  • Uses Altbus Blocks in Block Box Input Output Mode

100
Replace With Black Box
101
Looking Under Black Box
102
AltBus Black Box Mode
  • Black Box Input Output Port
  • Creates Black Box
  • Not Converted to HDL
  • Port Connections Remain

103
???(?)
  • ?????????????????

104
???(?)
  • ??????DTMF????

105
????
  • ? ? !
Write a Comment
User Comments (0)
About PowerShow.com