Synplify DSP Tut
Synplify DSP Tut
This tutorial gives you a quick introduction to working with the Synplify® DSP
software for FPGA technologies. It shows you how the Synplify DSP product
bridges the technology gap between MathWorks Simulink and the FPGA
synthesis product line from Synopsys.
The following topics first describe the flow and then describe the stages in the
Synplify DSP FPGA tutorial:
• Tutorial Design Flow, on page 8-2
• Create Algorithm Models, on page 8-3
• Set up for Verification, on page 8-11
• Analyze and Simulate, on page 8-15
• Synthesize Optimized Architectures, on page 8-24
• Verify RTL, on page 8-29
• Run Logic Synthesis, on page 8-29
• Refine Optimizations, on page 8-31
Analyze and Simulate Verify that the model works, while ignoring finite
word length effects.
Explore Quantization Define and simulate the fixed-point characteristics
Effects of the algorithm; analyze overflow effects.
DSP SYNTHESIS
Synthesize Optimized Determine a good optimization strategy based on
Architectures area and physical performance requirements.
LOGIC SYNTHESIS
Run Logic Synthesis Use Synplify Pro to synthesize the RTL created
with Synplify DSP.
LO
2. If required, specify the path to the Synplify Pro executable in the dialog
box that opens.
The tutorial looks for the Synplify Pro executable in the default installa-
tion folder. You only need to specify the path to the executable if it does
not find it at the default location.
LO
1. The demo first instantiates the Synplify DSP Port In and Port Out blocks
from the Synplify DSP Ports & Subsystems library.
The model window shows the Synplify DSP Port In and Port Out blocks
instantiated as x and y, respectively. Putting in these blocks satisfies the
first rule for Synplify DSP design (see Create Algorithm Models, on
page 8-3), which is to bound the design with these two blocks.
LO
2. The demo sets parameters for the FIR Low Pass Filter block. In particular,
note the following settings:
3. Next, the demo defines the FIR coefficients with the FIR Specification
(FDATool) block and the MathWorks Filter Design and Analysis Tool. Note the
following settings in the MathWorks tool window:
– Order: The default is 50.
– Frequency specifications wpass and wstop
– Magnitude specification: astop
This sets full-precision FIR coefficients. The FIR block quantizes these
coefficients. The FIR block icon reflects the settings, showing a 50th
order FIR filter with 51 taps, because the number of coefficients (taps)
specified was 50.
LO
5. Go to the next screen by closing the dialog boxes and tool windows and
double-clicking Next in the
LO model window.
1. It creates low and high frequency signals to the input (x) of the algorithm.
You see the following:
2.The demo than sets sine wave block parameters. Check the dialog boxes
of the Low Frequency and High Frequency blocks, and note the settings for
the following:
– Amplitude
– Frequency
3. Close the Low Frequency and High Frequency source blocks.
LO
– Note how they are connected to the input and output of the FIR
instance.
2. The demo sets scope parameters. You can view the settings by doing the
following:
– Double-click the x Time scope to open the scope window. Click the
Parameters icon to open the x Time parameters dialog box. Note that Data
History->Limit data points to last has been disabled.
LO
3. Click the right arrow in the toolbar of the model window to simulate the
design with the fixed-point settings.
You get the results shown below. The input scope (x Frequency) shows low
and high frequency spikes. For y Frequency, the high frequency has been
filtered.
LO
4. Double-click x Time and y Time and view the waveforms.
5. Close the toolbox window and scopes, and double-click Next in the model
window.
– The demo shows the following result for the time domain scopes:.
3. Double-click Next.
LO
4. Plot and compare the waveforms. In MATLAB 2008A, you have to store
the signals as reference signals to compare them.
5. Double-click Next.
1. The model window shows an instance of the SynDSPTool block from the
top-level Synplify DSP library. In the demo, it is renamed Implementation
Management.
tab. The selected target is also reflected in the Synplify DSP window,
just above the implementations.
4. Next, the demo automatically runs DSP synthesis and generates output
files. You do not need to do this because this has already been done, but
to replicate this step manually, you would select BASELINE in the
Synplify DSP window and click Run.
5. Click View Log in the Synplify DSP FPGA window to see a summary of the
DSP synthesis run. Close the log window.
The next step, to verify the RTL, is optional, and this tutorial does not do
this, but goes on to logic synthesis (Run Logic Synthesis, on page 8-29).
LO
Target
Implementation
Target
Frequency
Result Summary
LO
Verify RTL
This is an optional step, and the demo does not include it. For a detailed
procedure for verifying the RTL, see Verifying the RTL with a Test Bench, on
page 2-76.
As a result of DSP synthesis, the following files are generated for logic
synthesis in the <design_implementation>/vhdl or verilog subdirectory:
File Description
<design>.sdc Synopsys FPGA Design Constraints generated for the design.
1. The demo automatically ran Synplify Pro. Examine the results of logic
synthesis for the BASELINE implementation by doing the following:
– In the Synplify Pro project window, select the BASELINE
implementation.
– Note that logic synthesis was run with the same FPGA target you
selected. This figure shows an Actel implementation.
– Push down into the FIR module by clicking the icon and
selecting the FIR. View the implemented architecture.
The structure reflects a transposed implementation of the FIR filter:
the input goes to different multipliers with each multiplier feeding two
different adders (this is a linear phase filter with symmetric
coefficients , and the identical coefficients share a multiplier). The
adders are registered and accumulated for the final result.
– Close the RTL view.
3. Return to the main Synplify Pro window and check the results summary
in the Log Watch window at the lower right. Compare the results to the
target frequency.
Note that the results documented here may vary from your results if you
used another target or another version of Synplify Pro. The other imple-
mentations in the demo illustrate how you can use Synplify DSP optimi-
zations to produce better logic synthesis results. See Refine Optimiza-
tions, on page 8-31for details.
Refine Optimizations
The demo uses the other implementations to illustrate optimization strate-
gies. In your design cycle, you can iterate with different implementations to
fine-tune your design or try out different options and strategies.
This section describes the optimization strategies available and then walks
you through using some techniques to improve performance and area optimi-
zation in the tutorial design:
• Optimization Strategies, on page 8-32
• Using Retiming for Performance, on page 8-33
• Using Folding to Decrease Area, on page 8-34
Optimization Strategies
The Synplify DSP software offers the following optimization strategies:
• Retiming
Moves existing registers from non-critical to critical performance situa-
tions. Optional extra latency for the complete block adds extra register
resources for pipeline insertion. The tutorial illustrates this technique in
Using Retiming for Performance, on page 8-33.
• Multi-Channelization
Multiple data streams share hardware for area optimization. This
strategy requires the physical clock for the implementation to accommo-
date a clock rate equivalent to the sample rate of the individual data
streams multiplied by the number of streams sharing the hardware. The
tutorial does not illustrate this, but you can refer to Optimizing with
Multichannelization, on page 2-70.
• Folding
A single data stream shares hardware for area optimization. This
strategy requires the physical clock for the implementation to accommo-
date a clock rate equivalent to the sample rate of the data stream multi-
plied by the requested folding factor. Folding requires retiming (to bring
registers to the folding boundaries). The tutorial illustrates this
technique in Using Folding to Decrease Area, on page 8-34.
LO
LO
– When you check the Log Watch window in the lower right, you see that
the resources (number of cells) has been significantly reduced,
compared to the BASELINE and FOLDING implementations.
– When you examine the architecture in the RTL view (see Run Logic
Synthesis, on page 8-29 for details), you see that the structure still
reflects a direct-form, transposed implementation of the FIR filter, but
it now includes a counter, to manage the multiplexers over the
shared resources.
LO
3. Go to the Synplify Pro view and select the Folding implementation in that
window.
The window is updated with the relevant data after the logic synthesis
run for this implementation.