Discussion 6: RTL Synthesis With Synopsys Design Compiler
Discussion 6: RTL Synthesis With Synopsys Design Compiler
Discussion 6: RTL Synthesis With Synopsys Design Compiler
• You will learn how to synthesize an RTL Verilog model using Synopsys Design Compiler
• You will generate timing, area, and power estimates for the synthesized design
In this tutorial, you will learn how to use Synopsys Design Compiler (DC) to synthesize a digital circuit
that has been described at the register-transfer-level (RTL) using a hardware description language (HDL).
As learned in the previous tutorial, an RTL description of your hardware greatly simplifies digital VLSI
design. Take, for example, the adder module, Add.v that we used in the previous tutorial. In order to
describe an addition operation, you simply had to use the addition + operator, without (i) having to think
the adder type you would like to use (ripple carry adder, carry skip adder, tree adder, etc.) or (ii) writing
your adder in terms of logic gates (e.g., using INVs, NANDs, NORs, XORs, etc.).
However, as you have learned in this class, implementing a real VLSI design involves multiple steps.
First, you need to come up with a design and describe it using a gate-level schematic. Second, you have
to create standard-cells for the used logic gates. Third, you have to size the individual standard cells to
optimize the circuit for timing, area, or power specifications. Fortunately, with commercial standard cell
libraries, the cells have been properly designed and characterized (in terms of timing, area, and power),
which enables the synthesis tool to automatically create a circuit that meets the desired specifications. In
addition, the synthesis tool also generates area, delay, and power estimates for your final circuit. It is
important to note that, after synthesis, only the standard cells to be used (and their sizing) are known.
However, they have not been placed and routed. Hence, the characteristics of your final layout may vary
from the ones reported by synthesis. Other computer-aided-design (CAD) tools exist to automatically
resize, place, and route (connect) the standard cells. Such tools also generate more accurate estimates of
timing, area, and power. This tutorial, however, will only focus on synthesis.
• Analysis: In this step, your RTL HDL code is converted into an intermediate representation that is
stored in a design library. Once you have added a module into the design library, other designs can
refer to it, instantiate such module, and connect to it.
• Elaboration: In this step, a design from the design library is loaded into the Synopsys DC program
memory. In case your design instantiates other designs, these will be brought into the memory as
well. In this step, it is important to note that you can overwrite the default value of the parameters
in your RTL code. In such case, the design name will change to specify the new parameter value.
1
Fall 2019 ECE 5746 – Applied Digital ASIC Design
If we take our Verilog adder source code as an example, you could elaborate the RegisteredAdd.v
module with DATA WIDTH=16. In this case, the design in Synopsys DC will be assigned the internal
name RegisteredAdd DATA WIDTH16. If you do not specify any value for the DATA WIDTH parameter,
then your design in Synopsys DC will simply be named RegisteredAdd, and it will use the default
parameter value of 12 for the DATA WIDTH parameter.
• Compilation: In this step, the analyzed and elaborated design will be mapped to the available
standard cells (with appropriate sizes to meet your constraints). During compilation, Synopsys
DC starts by mapping high-level descriptions (e.g., the addition + operator and the behavioral
description of the flip-flop FF.v module) into generic logic. Then, the design tool proceeds to apply
Boolean logic optimization. Finally, the circuit gets mapped into the available standard cells. The
synthesis tool tries to optimize your design by using the best possible available logic gates (e.g., a
full-adder cell). At the end, design rules (such as fanout, capacitive load, etc.) are checked to see
whether there are violations (which are then fixed). During the entire process, Synopsys DC will
be trying to meet the timing constraints that you define. After that, the tool will perform an area
recovery step, where it tries to reduce the circuit’s area without creating additional timing violations.
2 Starting Synopsys DC
Let us now start Synopsys DC. In the vip-brg server, change directory to the syn folder that you just set
up, and enter the following command:
dc shell-xg-t -output log file dc syn.log
This will start Synopsys DC, which will continuously write to a log file dc syn.log that contains every-
thing that happens while using Synopsys DC. Note that inside the syn folder, there is a .synopsys dc.setup
file. This file will always be executed by Synopsys DC at start-up. In our case, this file simply sources
the syn/scripts/syn setup.tcl script, which is loading the standard cell library files (so that you do
not have to do this manually). For this tutorial, we use the Synopsys Armenia Educational Department
(SAED) 90 nm library. Note that this is a standard-cell library designed only for educational purposes —
You cannot really fabricate an integrated circuit with it. If our project is successful, we will fabricate our
circuit in a 65 nm technology which you cannot access as it requires signing a non-disclosure agreement.
2
Fall 2019 ECE 5746 – Applied Digital ASIC Design
3.2 Elaboration
We have now finished the analysis step. It is time to move on to the elaboration step. Elaborate your
top-module design, by entering the following command in the Synopsys DC shell:
elaborate RegisteredAdd -library work
With this command, you have elaborated the RegisteredAdd module from the work design library
using the default value of 12 for the DATA WIDTH parameter. You can verify this by reading carefully
through the messages that Synopsys DC printed on the shell. While reading these messages, also note that
there is a message that reads “Inferred memory devices in process,” after which a table appears. This table
summarizes that the FF.v file was synthesized into a flip-flop with asynchronous reset (AR). You should
always read these messages to verify that your memory elements got correctly inferred as the device you
intended them to be; e.g., make sure that Synopsys DC infers a flip-flop (and not a latch) whenever you
wanted to have a flip-flop; the same applies to asynchronous reset. We recommend always using flip-flops
with asynchronous reset.
Now, you can list the available designs by typing the following command in the Synopsys DC shell:
list designs
This command will print all the designs that are currently in the program’s memory (i.e., all the designs
that have been elaborated). Note that, as expected, the RegisteredAdd design is there, but there are some
others as well. Remember that the elaboration step also elaborates all the other designs that are used by
your top-level module, and this is why we can see the Add and FF designs here as well. Note that each
design (except the top-level one) is followed by the value used for their DATA WIDTH parameter.
3
Fall 2019 ECE 5746 – Applied Digital ASIC Design
Execute the list designs command again. How is the list different now? How can you
differentiate between the 12-bit and 16-bit versions of the RegisteredAdd design?
You may have noticed that the output of the list designs command printed out an asterisk (*) next
to one of the designs. This asterisk marks the currently selected design that will be synthesized once
you go into the compilation step. So, before going on, let us make sure that the 16-bit RegisteredAdd
design is the current design by typing the following command into the shell:
current design RegisteredAdd DATA WIDTH16
3.4 Compilation
After defining all the constraints for your design, we are finally ready to compile it! In Synopsys DC,
compilation is started by executing the compile ultra command. However, this command has many
different flags that you can use according to your design’s needs. Let us take a look at some of these flags
before compiling our design.
4
Fall 2019 ECE 5746 – Applied Digital ASIC Design
Now that we understand what the -no autoungroup flag is doing, start your design’s compilation by
executing the following command in the Synopsys DC shell:
compile ultra -no autoungroup
As we are using a very relaxed timing constraint of 6 ns, this compilation step will not be that exciting.
However, later in the tutorial you will synthesize your design for tighter timing constraints, in which case
you will see how Synopsys DC will be optimizing your design to reduce the worst negative slack until it
reaches a value of 0 ns. You will also note that, besides the delay optimization stage, there are stages for
optimizing the area and leakage power of your design as well.
Once the compilation is finished, we can check our design’s consistency with the command:
check design
In this case, our design is so simple that there are no warnings. You should always run this command
for every design you synthesize: You must ensure that there are no errors and that you can explain all the
warnings so that they are safe to ignore.
5
Fall 2019 ECE 5746 – Applied Digital ASIC Design
be non-negative. In case you have a positive slack for the most critical path, this means that your data
signal could get delayed (i.e., it could slack) for that amount of time, and it would still be sampled correctly
at the flip-flop. Then, in principle, you could reduce the clock period by exactly the slack of the most critical
path, and your circuit would still work. Finally, it is worth mentioning that, in these timing reports, the
first path reported is always the critical path!
As you know from class, while we are all excited about the setup checks because they define how fast a
circuit can work, there is another set of (often much more important) conditions that define if our circuit
will work: The hold conditions. In Synopsys DC, you can report these hold conditions with:
report timing -delay min -max paths 5 > ./reports/timing min.rpt
Note that the -delay min argument is what makes the report contain information about hold times.
Take a look at the generated report and be absolutely sure that all the hold conditions are met. You will
also notice that this hold-check timing report is very similar to the one for the setup checks. The only
difference is that now you want your data to change (data arrival time) a hold-time after the clock
signal’s rising edge (data required time). Then, for hold checks we want slack = data arrival time -
data required time (which is the negative of what is used for the setup checks) to be non-negative.
6
Fall 2019 ECE 5746 – Applied Digital ASIC Design
evince /work/global/brg/install/adk-pkgs/saed-90nm/pkgs/SAED_EDK90nm_01252011/
SAED_EDK90nm/Digital_Standard_cell_Library/doc/databook/
SAED_Digital_Standard_Cell_Library_Rev1_11_25.01.2011.pdf &
You can also visualize the gate-level netlist in a graphical way. To do so, start Synopsys DC’s graphical
user interface (GUI) by issuing the following command in the Synopsys DC shell:
start gui
In the Design Vision window, you will find a “Logical Hierarchy” panel on the left side of the screen.
Click the top-level module to select it. Then, go to “Schematic” → “New Schematic View”. This will open
a new window that contains a block diagram of the top-level module. Double-click on the block to show
its contents. You can double-click again to keep descending in the design hierarchy. Once you reach a
standard-cell and cannot descend anymore, you can right click on the cell and go to “Properties”. In the
new window, search for the “ref name” field to determine which cell this is.
We have finished RTL synthesis with Synopsys DC. Exit Synopsys DC by entering exit in its shell.
The next step of the process will be to take your synthesized Verilog gate-level netlist and use another
CAD tool that will automatically place and route the standard cells according to your gate-level netlist.
7
Fall 2019 ECE 5746 – Applied Digital ASIC Design