User guide
4 www.xilinx.com System Generator for DSP User Guide
UG640 (v 12.2) July 23, 2010
A Step-by-Step Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75
Configurable Subsystems and System Generator . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83
Defining a Configurable Subsystem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83
Using a Configurable Subsystem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85
Deleting a Block from a Configurable Subsystem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86
Adding a Block to a Configurable Subsystem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86
Generating Hardware from Configurable Subsystems . . . . . . . . . . . . . . . . . . . . . . . . . 87
Notes for Higher Performance FPGA Design . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89
Review the Hardware Notes Included in Block Dialog Boxes . . . . . . . . . . . . . . . . . . . 89
Register the Inputs and Outputs of Your Design . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89
Insert Pipeline Registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89
Use Saturation Arithmetic and Rounding Only When Necessary . . . . . . . . . . . . . . . . 89
Use the System Generator Timing and Power Analysis Tools . . . . . . . . . . . . . . . . . . . 89
Set the Data Rate Option on All Gateway Blocks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89
Reduce the Clock Enable (CE) Fanout . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90
Processing a System Generator Design with FPGA Physical Design Tools. . . . 90
HDL Simulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90
Generating an FPGA Bitstream . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93
Resetting Auto-Generated Clock Enable Logic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96
ce_clr and Rate Changing Blocks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96
ce_clr Usage Recommendations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98
Design Styles for the DSP48 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99
About the DSP48 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99
Designs Using Standard Components . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100
Designs Using Synthesizable Mult, Mux and AddSub Blocks . . . . . . . . . . . . . . . . . . 100
Designs that Use DSP48 and DSP48 Macro Blocks . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101
DSP48 Design Techniques . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106
Using FDATool in Digital Filter Applications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109
Design Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110
Open and Generate the Coefficients for this FIR Filter . . . . . . . . . . . . . . . . . . . . . . . . 110
Parameterize the MAC-Based FIR Block . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111
Generate and Assign Coefficients for the FIR Filter . . . . . . . . . . . . . . . . . . . . . . . . . . . 112
Browse Through and Understand the Xilinx Filter Block . . . . . . . . . . . . . . . . . . . . . . 114
Run the Simulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115
Generating Multiple Cycle-True Islands for Distinct Clocks . . . . . . . . . . . . . . . . 118
Multiple Clock Applications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 118
Clock Domain Partitioning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119
Crossing Clock Domains . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 120
Netlisting Multiple Clock Designs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121
Step-by-Step Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 122
Creating a Top-Level Wrapper . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 126
Using ChipScope Pro Analyzer for Real-Time Hardware Debugging . . . . . . . . 130
ChipScope Pro Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 130
Tutorial Example: Using ChipScope in System Generator . . . . . . . . . . . . . . . . . . . . . 130
Real-Time Debug . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 135
Tutorial Example: Using ChipScope Pro Analyzer with JTAG Hardware Co-Simulation140
Chapter 2: Hardware/Software Co-Design
Hardware/Software Co-Design in System Generator . . . . . . . . . . . . . . . . . . . . . . . . 144
Black Box Block . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 144
PicoBlaze Block . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 144