RTL Synthesis Tutorial VLSI
RTL Synthesis Tutorial VLSI
This tutorial is adapted from the tutorial created by Mircea R. Stan from the University of Virginia and has been
modified for the ECE484 class in fall 2010.
The following Cadence CAD tools will be used in this tutorial: RTL Compiler Ultra for logic synthesis
Please revisit the Simulation Tutorial before doing this new tutorial.
Running the Cadence logic synthesis tools
First you need to log on to arda and set your project to ece484. Issue the following commands
Before lunching the RTL Compiler you need to write a tcl script, so type
gedit
Open a new file using gedit once again and type in the following code
#
# Set the time unit
#
set_time_unit -nanoseconds
#
# Create a clock and use it to drive the clk pin
#
create_clock -name {clk} -period 20.0 -waveform {0.0 10.0} [get_ports {clk}]
#
# Don't optimize the reset
#
set_false_path -from [get_ports {reset}]
The command synth starts RTL Compiler and you should get the rc startup window:
Unlike other GUI interfaces, the console this time is the initial window from which you launched rc (that's why it had to be
launched in the foreground). Please try to familiarize yourself with the main window, click on the menus, etc. For more
information on the various Cadence tools I encourage you to read the corresponding user manuals.
Now we need to run the script that you wrote so go to File -> Source Script from the File menu of the Menu Bar.
Click on accu.tcl, then OK.
Your console should run for a brief time and you should get a success message:
Now your GUI window should show a netlist on the right side, and if you click on HDL, the source code on the left side.
Notice that if you run the script again, another file with appear under the original file name (accu_2).
To remove that file, type rm accu_2 in the GUI window (the terminal window) without closing the rc startup window.
Notice that you are driving the accumulator with a clock running at 50MHz (see the accu.sdc file).
create_clock -name {clk} -period 20.0 -waveform {0.0 10.0} [get_ports {clk}])
You can check the timing report by going to Report -> Timing -> Worst Path:
Notice that the Slack time is 17328 ps. Since it is positive, the tool is telling you that the signal arrives at the register
on the right much earlier than is needed. This means that the circuit can work with a much higher
clock frequency.
For the area report, go to Report -> Netlist -> Area:
Check the total area. As we ask the synthesis tool to produce a faster circuit, this value is likely to increase.
Now run the accumulator with a 500MHz clock by editing the accu.sdc file:
create_clock -name {clk} -period 2.0 -waveform {0.0 1.0} [get_ports {clk}])
check the timing report by going to Report -> Timing -> Worst Path:
and the area report by going to Report -> Netlist -> Area:
Notice that the slack time has decreased from 17328ps to 559ps but the accumulator is running 10 times faster.
Also, notice that the number of cells has increased from 32 cells to 65 cells thus an increase in the area occupied
(from 4401 to 5490).
Conclusion: The accumulator is running faster but occupies more area.. Thats the price we pay for speed!!!
Now try to run the accumulator even faster: use a 1GHz clock. Edit the accu.sdc file:
create_clock -name {clk} -period 1.0 -waveform {0.0 0.5} [get_ports {clk}])
You will notice that the slack time becomes negative and the circuit does not meet timing. The synthesis
Is telling you that the circuit will not run at 1 GHz. (It actually may run at 1 GHz but the tool is pessimistic.)
Try to find the maximum clock frequency that can run the accumulator (its between 500MHz and 1GHz).
Finally, you can close the GUI by going to File -> Exit and you can now analyze the result of the synthesis in the file
accu_synth.v that you can use for simulating the netlist and for subsequent place and route using Encounter:
Adding constraints:
Open the accu.tcl file for editing, add this constraint line:
This constraint is telling the tool to not use the Full Adder cells during the synthesis but instead use gates to
build the full adder.
Save and Close
After the synthesis, you will notice that the new schematic does not contain the full adder cell and the number of cells has
increased.
Click on the + sign in front of the verilog.src directory to expand its contents, then select accu_synth.v,
right click and open it for edit
In the edit window, add the following line at the beginning of the verilog code:
`timescale 1ns/10ps
Save and close the file, then click on the compile button
Now you need to elaborate, Click on the + sign in front of the worklib, select accu_tb and then click on the
Elaborate button in the Menu (immediately to the right of the VLOG button).
You will notice that the Console Window (bottom) is showing some errors which you need to fix!!!!!
To do so, go the OSUstdcellLibs/tsmc025/lib library, select the osu025_stdcells.v file, and then click on the
compile button. This will compile the Verilog descriptions for all of the standard cells. The descriptions
include propagation delay information for each of the cells.
Elaborate accu_tb.
Check the Console Window for errors.
To simulate, click on the + sign in front of the Snapshots library to expand its contents, then select
worklib.accu_tb:module and click on Simulate (next to the right of elaborate).
The signal waveforms display should look like this:
Notice that if you zoom in the waveforms, you will see that the transition of the output from one value to another doesnt occur
at the positive edge of the clock, this delay in introduced by the cells.