Synopsys FPGA Synthesis: Synplify Pro Tutorial
Synopsys FPGA Synthesis: Synplify Pro Tutorial
http://www.solvnet.com
Disclaimer of Warranty
Synopsys, Inc. makes no representations or warranties, either expressed or
implied, by or with respect to anything in this manual, and shall not be liable
for any implied warranties of merchantability or fitness for a particular
purpose of for any indirect, special or consequential damages.
Copyright Notice
Copyright © 2010 Synopsys, Inc. All Rights Reserved.
Trademarks
Trademarks (™)
AFGen, Apollo, Astro-Rail, Astro-Xtalk, Aurora, AvanWaves, BEST, Columbia,
Columbia-CE, Confirma, Cosmos,
LO CosmosLE, CosmosScope, CRITIC, DC
Expert, DC Professional, DC Ultra, Design Analyzer, Design Vision, Design-
erHDL, DesignPower, Direct Silicon Access, Discovery, Eclypse, Encore,
EPIC, Galaxy, HANEX, HAPS, HapsTrak, HDL Compiler, Hercules, Hierar-
The tutorial shows you how to use the Synplify Pro software in the FPGA logic
design process. Information is organized into these topics:
The tutorial design is an 8-bit micro controller. After completing the tutorial,
you will be familiar with the tool and able to apply the knowledge you gained
to your own, more complicated designs.
If you do not see the Tcl Script and Messages window and Log Watch window,
select View->TCL Window and View->Watch Window or View->Output Window. For
your information, you can access commands in different ways: through the
main menu, popup menus, keyboard shortcuts, and icons. The tutorial uses
different methods to access the commands. For more information about the
interface, see the Synopsys FPGA Synthesis Reference Manual.
1. Logon to SolvNet.
2. Select the applicable release for the tutorial and download the
platform-specific version of the design files.
4. Copy the tutorial directory to your working area. Keep the directory
structure, because the tutorial is based on this structure. Refer to
Tutorial Directory Structure, on page 11. When you work on your own
designs, you can set up the structure as you want.
5. Make sure you have read and write privileges for the tutorial files.
LO
Note: This directory structure is used for the tutorial because it reflects
the way the tool structures the files in the Project view. However,
when you run the Synplify Pro software on your own, you can
create whatever directory structure works best for your design.
tutorial
Figure 2 shows the directory structure for the implementation results files,
using the default implementation name rev_1. You specify the location of the
results directory when you set implementation options for your project.
After you complete this exercise, the results directory typically contains the
file types shown below.
tutorial
rev_1
eight_bit_uc.edf
eight_bit_uc.ncf
eight_bit_uc.htm
eight_bit_uc.srm
eight_bit_uc.srr
eight_bit_uc.srs
Synthesis Files
This section briefly describes the files required to run synthesis and the files
generated during synthesis that are output to the user-specified implementa-
tion results directory.
Input Files
Here is a brief description of the input files:
• .v/.vhd—contains the HDL source files. The HDL source files can also
contain a mixture of VHDL and Verilog source files. eight_bit_uc.v is the
top-level module.
• constraint/tutorial.sdc—user-specified constraint file, contains the
timing constraints
The constraint file will be created using this tutorial. However, you can
use the .sdc file provided with the design, if preferred.
LO
• tutorial.prj—tutorial project file, contains all the information
required to complete a design. This file contains references to source
files, and specifications for the target device.
Output Files
Here is a brief description of the files that are typically output to the Implemen-
tation Results directory:
• .edf—Xilinx design netlist in the format of the supported target
place-and-route tool
• .htm—HTML format of the log file containing the synthesis results. See
the .srr file below for a description of its contents.
• .ncf—Xilinx netlist constraint file; contains all of the constraints for the
design
• .srm—output by the mapper stage of the process, contains the actual
technology-specific mapped design. This is the representation displayed
through the technology view in HDL Analyst.
• .srr—text format of the log file containing the synthesis results. The
project_name.srr file contains all warnings and errors encountered
during synthesis as well as performance information such as clock
frequency, critical paths and run times. There is also information on
area, cell usage and FSM extraction. To view this file, click on the View
Log button in the Project view.
• .srs—output by the compiler stage of the process, contains the RTL
level (schematic) view of the design. This is the representation displayed
through the RTL view in HDL Analyst.
Note: You can delete or rename the tutorial.sdc files in this directory
if you want to create your own as part of the tutorial exercises.
See Also
The tutorial does not cover all the possible tasks you could do. For additional
information, refer to the following sources:
LO
Xilinx Flow
Vendor Flow
Set Constraints
Run Logic
Synthesis
Analyze Logic
Synthesis Results
Improve Results
Implement FPGA
The remaining sections describe how to complete the tasks for this flow.
Create Project
The first step is to set up your project. A project is a file that defines the HDL
source files, implementation files and device option settings. This section
shows you how to set up a project file, handle messages, and do some typical
analysis operations with the HDL Analyst tool. This project information is
organized as follows:
• Setup Project and Add Design Files
• Compile Design and Check Log File
• Additional Analysis after Compile
1. In the project window, select File->Build Project to open the Select Files to Add
to Project dialog box. Navigate to your source files by selecting the
install_dir/tutorial directory.
LO
2. Open the vhdl folder. Make sure Files of type field is showing either All Files
(*) or VHDL Files (*.vhd).
For this exercise, add both VHDL files in the folder. Click on the <-Add All
button, then click OK.
– After clicking OK to add the files, you will return to the Project view.
LO
Figure 4: Newly Created Project File
4. Click on the Add File button in the Project view and change to the verilog
directory. Make sure Files of type field is showing either All Files (*) or Verilog
Files (*.v).
5. For this exercise, add all the Verilog files in the folder. Click on the <-Add
All button, then click OK.
– Drag the top-level Verilog file to the last position in the list of files to
manually rearrange them.
– The project window reflects your changes. Make sure that the
top-level file (eight_bit_uc.v) is the last in the list of files in the
Project window. The order of the remaining files does not matter.
6. Click on the Impl Options button and click on the Verilog tab. See Set
Device Options, on page 30 for more information.
7. Then select File->Save As, move up a directory level and type tutorial for the
name of the project, and click Save.
F7
3. If you prefer, review the messages in the Log file. You can perform any of
the following tasks:
– Enable the View Log File in HTML option under Options->Project View
Options. Click View Log to open the log file and click Compiler Report in
the left panel. Scroll through the log file messages on the right.
– Double-click on the log file in the Project view and press Ctrl-f to open
the Find dialog box. Enter @N as the search criteria, and click Find
Next. The pointer moves to the first note in the log file. Click Find Next
again until you find message number (CL134).
Review all messages and then click Cancel in the Find dialog box. If
needed, you can also enter the following search criteria: @I for
informational messages and @W for warnings.
– Single click the message number (CD134) in the HTML Log file, or
double-click the message number in the text-based Log file to open
an online help page with information about the message.
LO
4. Review all messages. For this exercise, all messages are valid.
Set Constraints
Design constraints are optional, but most designers use them to define
frequency goals and describe the environment for the design. For designs
without aggressive timing goals, you can just set the clock frequency.
You can set constraints in a text file that you can create with any text editor,
but it is easier to use the SCOPE (Synthesis Constraint Optimization
Environment) interface. The SCOPE interface consists of a spreadsheet where
you enter constraints.
The tutorial design uses basic constraints, which you enter as follows:
1. Start the SCOPE interface in the open project window by doing one of
the following:
– Click the New Constraint file (SCOPE) icon in the toolbar. ( )
– Select File->New, choose Constraint file (SCOPE) in the dialog box, specify
the file name (tutorial.sdc) and click OK.
The SCOPE window opens, with the most common constraints, clock
frequency and input/output delays initialized. The window consists of a
spreadsheet interface with tabs for different kinds of constraints.
– Enter 188 in the Frequency column to set the clock frequency and
press Enter.
This design has only one clock, so setting the clock frequency is the
same as setting a global frequency from the Project view. When you
press Enter, the software automatically sets the clock period and assigns
the clock to the default clock group.
4. For this exercise, set a false path constraint. Perform the following:
– Select the Delay Paths tab at the bottom of the SCOPE window.
– Select the check box in the Enabled column to enable the false path
constraint.
– In the Delay Type field of SCOPE, select False from the drop-down
menu.
– In the From field of SCOPE, select i:special_regs.status{7:0] from the
drop-down menu.
LO
5. Also for this exercise, you will set some attribute constraints. Perform
the following tasks:
– Select the Attributes tab at the bottom of the SCOPE window.
– Select the check box in the Enabled column to enable the attributes
specified below.
– From the Attributes field, select syn_forward_io_constraints from the
drop-down menu and press Enter. Leave the default setting for all
other fields of this attribute.
– From the Attributes field, select the syn_ramstyle attribute from the
drop-down menu. Then, select registers from the drop-down menu in
the Value field.
6. Click the Save ( ) icon or select File->Save and save the file as tutorial.sdc.
7. Click Yes in the dialog box that asks you if you want to add the file to
your project and close the SCOPE window.
You should now have the following files in the project:
– A Verilog folder that contains the source files
– A VHDL folder that contains the source files
– A Constraint folder with the constraint file (tutorial.sdc)
– An implementation folder (rev_1)
8. Close the SCOPE file.
2. This dialog box has many tabs, and opens with the Device tab displayed.
For this exercise:
– Technology should already be set to Xilinx Virtex6.
– Use the following technology defaults of: Part XC6VLX75T, Speed -1, and
Package FF484.
– Do not change the default settings for the Device Mapping Options.
LO
3. Click on the Options tab. For this exercise, do not change the default
optimization switches for:
– FSM Compiler
– Resource Sharing
– Pipelining
4. Click on the Constraints tab. Make sure the constraint file (tutorial.sdc) is
checked.
LO
6. Click on the Timing Report tab. Set Number of Critical Paths to 25.
This option determines the number of critical paths reported in the
timing report generated after synthesis.
LO
LO
9. Click on the Place and Route tab. You can ignore this option for this
exercise, since placement and routing will not be run.
LO
Note that the Implementation Results view lists the files that are gener-
ated as a result of synthesis.
1. To see the graphical results of your run, click the ( ) icon on the menu
bar to open the Technology view.
The Technology view contains a schematic of the design after technology
mapping with base cells that are directly mapped to the target
technology.
LO
F12
– Filter the selected component. To filter, click F12, the Filter icon, or
click the right mouse button and select Filter Schematic. You see just
the object selected.
– To see details of this object, select Options->HDL Analyst Options and
enable Show symbol name on the Text tab, and Show cell interior on the
General tab. Click OK. You see the interior of the cell. You can see any
properties attached to the pins, like fanout.
Pin properties
Check Timing
You can check timing results in the log file and in the Log Watch window.
– Select Worst Slack from the drop-down list. The software displays the
corresponding value.
– Use the same method to set clock - Estimated Frequency and clock -
Requested Frequency in subsequent cells. You can see that the design
does not meet timing because it has a negative slack value. Positive or
0 slack times indicate that you have met or are within the timing
constraint. Close the Log Watch window.
The following figure shows the values in the Log Watch window after the
run. If you are using a different release of the software, the values you
get when you run the tutorial might vary slightly, because of ongoing
optimizations within the synthesis tool.
To see detailed information about the critical paths, open the log file
(eight_bit_uc.srr) by clicking the View Log button. You see a window with the log
file.
• In the text-based log file window, scroll down to the Performance Summary
section to see details of the clock information. Scroll a little further to the
Worst Paths Information section. (You can also use Ctrl-f and search for Worst
Paths.) A table shows all the points on the critical path.
• In the HTML log file window, select Worst Path Information in the left table of
contents pane of the window.
The worst path doesn’t meet timing as indicated by the negative slack
value. You can now check the critical path in the Technology view.
LO
1. Open a Technology view window by clicking the and gate icon { ) in the
menu bar.
2. Select the Critical Path icon ( ) on the menu bar or right-click in the
Technology view window and select Show Critical Path.
3. In the HTML log window, select the View Worst Path in Analyst link at the
beginning of the Worst Path Information section.
The Technology view graphically displays the path described in the log file.
The critical path view is a filtered view that shows only the instances on the
critical path.
The following figure shows the critical path with transparent instances to
indicate the design hierarchy. To display the cell interiors, select Options->HDL
Analyst Options->General->Show cell interior.
You should see red numbers at the upper left corners of the instances. These
numbers provide timing information: the first value is the cumulative delay,
and the second value is the total slack time for the path. If the red timing
information is not displayed, enable HDL Analyst->Show Timing Information.
4. Zoom in to the timing information. You can see that the slack (second
number) is negative, which means that your design does not meet
timing.
5. You can now use other techniques to analyze your path and design
further. For example:
– Check the corresponding RTL code by double-clicking objects in the
Technology view.
– Filter and expand paths using the techniques described in Filter,
Expand, Hide, and Dissolve, on page 61.
– To return to the critical path view, click Back or click the Critical Path
icon. If Back is inactive (the path has been flattened), click the Critical
Path icon to return to the critical path view.
For this tutorial, you will reduce the delay on this critical path by adding
a two-cycle path constraint and resynthesizing the design. See the
Synopsys FPGA Synthesis Reference Manual for details about other
constraints and attributes you can add.
6. Leave the filtered critical path view open, and close any other open
Technology views.
Improve Results
This section guides you through the post-analysis phase, where you fine tune
your design by setting constraints, rerunning synthesis, and checking your
results.
2. Open the constraints file (tutorial.sdc) and select the Delay Paths tab.
3. Select the check box in the Enabled column to enable the false path
constraint.
4. In the Delay Type field of SCOPE, select Multicycle from the drop-down
menu.
5. Add a constraint from the start (From) point to the end (To) point using
these steps:
– Select the i:dmux.alubtmp[7:0] bus from the drop down menu in the From
column. This bus includes the first instance (dmux.alubtmp_fast[0]) in
the most critical path. Adding the constraint to the entire bus
eliminates the negative slack times in the remaining bus signals.
– With the critical path view open, select the ending point (i:uc_alu.aluz)
and drag it to the To column.
– Set Cycles to 2 and make sure the Enabled column is selected to apply
the constraint.
6. Save the constraint file and minimize or close the SCOPE window.
7. Click the Run button to rerun synthesis. You can now check your results
to see if you eliminated the negative slack on the path.
LO
Check Results
Check the results of the second synthesis run to make sure you achieved
your timing goals.
1. Check the results in the Log Watch window or the log file as described
previously in Check Timing, on page 42.
The first critical path (and several additional paths associated with the
bus) now meets the timing requirements. You see the next most critical
path listed as the most critical path. In a design, you would continue to
refine your design using constraints, attributes, and other optimizations
until you eliminate all the negative slack. For the tutorial, the next most
critical path is positive and synthesis is now complete.
1. Click the RTL View icon from the toolbar ( ) or select HDL Analyst ->
RTL -> Hierarchical View to open the RTL view.
To make your view look exactly like the one shown in the following
figure, select Options->HDL Analyst Options and on the Text tab, disable the
Show pin name option. If your design has more annotations, some of the
preferences (Options->HDLLOAnalyst Options) are set differently.
2. To view the design, use the sizing icons ( ) from the toolbar,
the mouse strokes (see Help->Mouse Stroke Tutor), or the corresponding
commands from the View menu.
– Zoom into the area shown in the following figure by clicking the Zoom
In icon ( ) over the area you want to zoom. Click as many times as
needed to get a magnification level that is comfortable. You can also
zoom by clicking and dragging the icon diagonally to specify a
rectangular area for zooming, or by pressing the right mouse button
and drawing a diagonal mouse stroke from upper right to lower left
over the area to be zoomed. See Help->Mouse Stroke Tutor for a complete
list of mouse strokes.
Zoom Methods
Press the right mouse button Use the Zoom tool and click in Use the Zoom tool and click and
and draw a stroke from upper the design to zoom in. drag a rectangle over part of the
right to lower left design to zoom in.
3. Select the Push/Pop Hierarchy icon ( ) or press F2. The cursor changes to
a double-headed arrow with a not sign through it when it is over areas of
the design without underlying hierarchy. When it is over a component
that has hierarchy below it, the cursor changes to an arrow pointing
downward.
LO
Push/Pop Cursors
– Click on the REGS block to push down into it. See the lower-level
hierarchy and how the software infers the RAM.
Push into
REGS to
see the
lower-level
hierarchy
Push into
PRGM_CNTR
to see the
lower-level
hierarchy
State machine
Large mux
Incrementor
1. With the top-level RTL view open, type Ctrl-f or select Edit->Find.
The Object Query dialog box opens. This dialog box is different from the
one that opens when you type Ctrl-f in the Text Editor window.
2. Click the Symbols tab and set the search range to Entire Design.
3. Scroll down in the Unhighlighted box to find the add symbol. Double-click
on add to move it to the Highlighted box on the right and click Close.
The software searches the entire design (all hierarchical levels) for the
add symbol. The schematic window changes to display lower-level
hierarchy (Prgm_Cntr), with the incrementor ( ) highlighted.
LO
– Close the source file window and use Push/Pop mode to return to the
top level.
LO
Figure 12:Selecting HDL Code Highlights the Logic in the RTL View
The Unhighlighted selection list is now shorter, and only lists instances
that match the search criteria. For details about using wildcards, see
the Analyzing with HDL Analyst and FSM Viewer chapter of the
Synopsys FPGA Synthesis User Guide.
– Click All-> to move the entire list to the Highlighted box and click Close
to close the Object Query dialog box. The schematic highlights the bit
decoder instances in red.
– With the bit decoder instances selected in the RTL view, put your
cursor over one of the selected instances and double-click. The
corresponding source code for the bit-decoder definition in the
data_mux.v file opens.
LO
7. Close the source code window and return to the top-level schematic
view.
– Select Options->HDL Analyst Options and click on the Visual Properties tab.
Then click an empty Property field, and add the new property to this
field and click OK.
LO
– Make sure that View->Visual Properties is enabled (checked). The new tag
appears on any new instance added to the filtered view by
subsequent operations.
– To see an expanded view of a pin, click on that pin, right-click to
display a menu, and select Expand. The next figure shows an example
of an expanded view of a pin.
New property
The software expands the connection to the next register and displays
it. Because this register is inside Ins_decode, the software indicates
hierarchy with a transparent hierarchical instance (a hollow
bounding box surrounding the lower-level logic connection).
– Select Options->HDL Analyst Options->Visual Properties and deselect
(uncheck) the Show checkbox next to the new property, and click OK.
Note, you can also use the shortcut keys Ctrl-q to toggle Visual Properties on
or off in the RTL or Technology view as described in the message below.
You see a small H in the lower left corner of the instance, which
indicates all lower-level hierarchy is “hidden” from certain operations
such as expanding.
LO
– Close the text window, exit Push/Pop mode, and click the Back button
( ) until you return to the top level.
5. Flatten hierarchy.
– In the top-level view, right-click and select Flatten Schematic from the
pop-up menu. The software flattens the entire design.
Note: You cannot use the Back button, because this is a flattened view,
not a filtered view. In a flattened view, there is no history, so Back
is not available.
The software flattens the hierarchy for Prgm_Cntr only, and displays a
flattened view with the internal logic. It retains the hierarchical
context of the rest of the design.
– Click the Back button ( ) until you return to the top level.
The Back button works because this is a filtered view, not a flattened
view. Filtered views have history.
7. You can minimize the RTL view if you choose or close it.
The rest of the tutorial varies slightly, depending on the technology used. If
you do not use the Xilinx vendor, you can follow the methodology used in this
flow and substitute device options specific to your vendor.
LO