Professional Documents
Culture Documents
RTL 2 GDS
RTL 2 GDS
Contents
1 RTL to GDS flow
1.1 Logic Synthesis
1.2 Logic Equivalence Checking
1.3 Physical Design
1.3.1 Initial Setup
1.3.2 Floorplanning
1.3.3 Power Planning
1.3.4 Placement
1.3.5 Clock Tree Synthesis
1.3.6 Routing
1.3.7 Basic Timing Analysis
1.3.8 Further Steps
1.3.9 Basic Physical Verification
1.3.10 Dumping
1.4 Synthesis to post-PnR LEC
1.5 Acronyms
1.6 Basic vim commands
Logic Synthesis
Synthesis is the process by which a behavioural RTL code is converted to a structural netlist, with the specified
area, power and performance constraints. The inputs to the synthesis flow are the RTL, the constraints (.sdc file)
and the timing libraries (.lib files). We would be using Cadence RTL Compiler (RC) as our synthesis tool.
tcsh
cd ~
scp smart@10.32.33.21:synth_pnr.tar.gz .
1 of 11 12/5/2018, 2:25 PM
IEP RTL to GDSII - Microwiki http://chips.ece.iisc.ernet.in/index.php/IEP_RTL_to_GDSII#RTL_to_G...
All the required files and directories would now be seen in the required directory structure.
Assignment - Vary the clock period and figure out (approximately) what the maximum synthesis
frequency for the design is. Please keep an uncertainty of 2ns in your runs. Your constraints file is called
constraints.tcl, where the clock definitions would be present.
Next, we have to initialize a few variables related to cadence tools. Run the following command.
source ~/cadence.cshrc
rc
Your design should get synthesized after this step if everything was done right.
To check the timing (setup) status of your design, run the following command
You'll find that there are a few directories written out in your work directory. One of them, called
reports_<timestamp>, will have your synthesis reports. You can go through the reports to see a few metrics of
your design, eg timing characteristics, area, power, gate count. Alternately, you can enter commands in the rc
shell after synthesis to view detailed information about your design.
The directory called outputs_<timestamp>, would have the output files after synthesis.
<your_top_module_name.v> is the synthesized netlist. You should have a look at this file. This is the netlist that
would be taken forward for PnR. This directory would also contain the generated sdc file
"top_chip_wrapper.sdc". It would also contain the lec dofiles which would be needed for running Conformal
2 of 11 12/5/2018, 2:25 PM
IEP RTL to GDSII - Microwiki http://chips.ece.iisc.ernet.in/index.php/IEP_RTL_to_GDSII#RTL_to_G...
Equivalence Checking.
Finally, close rc
rc:> exit
We would now vectorlessly (ie exhaustively) establish the equivalence between the RTL and the synthesized
netlist. This would establish the correctness of the synthesized design, provided, of course, that the RTL is
golden. The required dofiles are already generated as synthesis outputs. We would have to copy them out one
hierarchy to the main synthesis directory.
cp -rf outputs_<timestamp>/rtl2intermediate.lec.do .
cp -rf outputs_<timestamp>/intermediate2final.lec.do .
The LEC logs can be found inside the logs_<timestamp> directory. They would be called
rtl2intermediate.lec.log and intermediate2final.lec.log. You can view the lec result in these log files.
Physical Design
The process of converting a netlist into manufacturable geometrical structures having the desired functionality
and satisfying the various timing and design rule constraints can broadly be called as the activity of physical
design.
For the purposes of this lab, we would go through the very basic vanilla flow to convert our netlist to a GDS.
Physical Design can broadly be divided into the following sub-tasks, which are, in order
Partitioning
Floorplanning
Power Planning
Placement
Clock Tree Synthesis (CTS)
Routing
Physical Verification
Parasitic Extraction and Back Annotation
Timing Analysis & Closure
DFM, DFY and Tapeout
We would go through the tool flow of each of these steps without getting into theoretical details. Physical
Verification, extraction and sign-off timing analysis is beyond the scope of this lab, and might be covered in a
later session.
Initial Setup
3 of 11 12/5/2018, 2:25 PM
IEP RTL to GDSII - Microwiki http://chips.ece.iisc.ernet.in/index.php/IEP_RTL_to_GDSII#RTL_to_G...
cd ~/synth_pnr
cd pnr_new
ls -ltr
Next, we have to copy our synthesized netlist and constraints file from our synthesis output directory.
cp -rf ../outputs_<timestamp>/top_chip_wrapper.v .
cp -rf ../outputs_<timestamp>/top_chip_wrapper.sdc .
All required files are now present in your working directory. Before proceeding forward, make the following
changes.
Add the following power pads to the end of your synthesized verilog netlist "top_chip_wrapper.v"
Assignment
1. Add 2 more power pads for VDD_CORE and VSS_CORE. Hint: The format would be the same as the
first two power pads, but with different names. Name them pvdi_VDD_CORE_2 and pv0i_VSS_CORE_2
2. You now need to add these 2 pads to the IO assignment file called final.io. Open the IO assignment file
and go through the file structure. Figure out which two sides of the chip have 16 pads (the other two have
17) and add your pads to these sides, one each, in the same format as the other pads. Note : Few sides may
have cut cells called cut_*. These do not count as IO pads, so be careful while counting.
We need to make a few more changes to the netlist such that the VCO power domains are correctly specified.
4 of 11 12/5/2018, 2:25 PM
IEP RTL to GDSII - Microwiki http://chips.ece.iisc.ernet.in/index.php/IEP_RTL_to_GDSII#RTL_to_G...
Add the pins .VDDI(VDD_VCO), .GNDI(VSS_VCO) to the VCO module "VCO DUT1". Make sure that you do not make any syntax error
Browse to the end of the file and change the setup uncertainty to 0.0 and hold uncertainty to 1.0
Now we are ready to launch our PnR tool, Cadence SoC Encounter.
Invoke encounter
encounter
Under the "Verilog" tab, under "Files", enter the name of your netlist, top_chip_wrapper.v (or browse and select the file
Change the "Top Cell" to "Auto assign"
Under "Power", enter VDD_CORE as the power net and VSS_CORE as the ground net
Under "Analysis Configuration", add the design.view file in the MMMC View Definition File section.
Click OK
Click on the Floorplan View button, next to online help, on the top right corner of the screen.
Press f to fit everything on screen.
You should now see your initial setup ready with the standard cells shaded on the left of the estimated floorplan,
and the macros on the right.
Floorplanning
5 of 11 12/5/2018, 2:25 PM
IEP RTL to GDSII - Microwiki http://chips.ece.iisc.ernet.in/index.php/IEP_RTL_to_GDSII#RTL_to_G...
You should now see the floorplan with the area assigned for power rings on your screen.
Power Planning
You should now see the power rings around the core area.
You should now see the vertical metal stripes on your screen.
We now need to provide power to the standard cell rails by creating the M1 rails and dropping vias.
The standard cell rails have now been provided with VDD and VSS.
The Power and Ground connection between custom made macros and pads can be done
Define another power ring around the macro with same net name in which it needs to be connected.
Click on Power -> Power planning -> add ring
Under nets, browse and select both VDD_VCO and VSS_VCO, click add, and click OK.
Under "Ring Configuration", change Top and Bottom to M3 H; and Left and Right to TOP_M Vertical
Change width and spacing to 10 under each column.
Under "offset", click on "specify"
Click OK
6 of 11 12/5/2018, 2:25 PM
IEP RTL to GDSII - Microwiki http://chips.ece.iisc.ernet.in/index.php/IEP_RTL_to_GDSII#RTL_to_G...
Make sure in the top verilog netlist the power connection to pads and VCO(custom made analog blocks ) is
specified as
Similar way do power and Ground connection to VCO DUT also. Click on Route -> Special route
Tool will automatically route the Power connection to analog blocks and pads and pad rings also.
Placement
After the placement run is complete, click on Physical View button next to "online help" on the top right corner.
You should now see the standard cells placed in your design.
Routing
7 of 11 12/5/2018, 2:25 PM
IEP RTL to GDSII - Microwiki http://chips.ece.iisc.ernet.in/index.php/IEP_RTL_to_GDSII#RTL_to_G...
Check the reports on the terminal (or detailed reports in your work directory).
Check the setup reports in terms of FEP, WNS and TNS. In case there are any violations, you may run the
following command to make the tool try and optimize the design to fix these violations.
Check the reports on the terminal (or detailed reports in your work directory).
Check the hold reports in terms of FEP, WNS and TNS. There would most likely be a few hold violations. Use
the following command to fix the violations.
You might need to run it multiple times to clean all violations, or, you might have to manually fix the violations
(highly unlikely for this design).
Further Steps
Adding filler cells - Any unused area in your floorplan must be filled up with fillers to ensure well continuity
among other things. Do the following to add filler cells
Adding IO fillers
addIoFiller -cell {pfeed30000 pfeed10000 pfeed02000 pfeed01000 pfeed00540 pfeed00120 pfeed00040 pfeed00010} -prefix FILLE
Dumping
8 of 11 12/5/2018, 2:25 PM
IEP RTL to GDSII - Microwiki http://chips.ece.iisc.ernet.in/index.php/IEP_RTL_to_GDSII#RTL_to_G...
You need to provide logical power connections to all standard cells. You need to run global net connects for this
1. With pg pins
saveNetlist -includePowerGround top_chip_wrapper.pnr.pg.v
2. Without pg pins
saveNetlist top_chip_wrapper.pnr.v
As before, we need to ensure the logical equivalence between the synthesized netlist and the post-PnR netlist.
We'll copy the same dofile generated after synthesis and change appropriate pointers.
cp -rf ../intermediate2final.lec.do .
mv intermediate2final.lec.do synth2postpnr.lec.do
Open synth2postpnr.lec.do
Change line 7 to set log file lec.logs -replace
We need to change the golden and revised netlists. Golden should be the input netlist to the PnR tool and the
Revised netlist should be the non-pg netlist dumped by encounter.
Open synth2postpnr.lec.do
Change lines 34 & 37 to top_chip_wrapper.v
Change lines 46 & 49 to top_chip_wrapper.pnr.v
We need to give the list of LEF files as an input to the tool, as the pin info of the MACROs need to be captured.
9 of 11 12/5/2018, 2:25 PM
IEP RTL to GDSII - Microwiki http://chips.ece.iisc.ernet.in/index.php/IEP_RTL_to_GDSII#RTL_to_G...
Open synth2postpnr.lec.do
Add these lines after the library files are read in (near line 30)
read lef file -both \
~/synth_pnr/pnr_new/lef/tsl18fs120_scl.lef \
~/synth_pnr/pnr_new/lef/delaycell.lef \
~/synth_pnr/pnr_new/lef/top_4lm.lef \
~/synth_pnr/pnr_new/lef/VCO.lef \
~/synth_pnr/pnr_new/lef/tsl18cio150_4lm.lef \
~/synth_pnr/pnr_new/lef/tsl180l4.lef
Acronyms
Opening a file
vim <filename>
Vim has 2 modes, command mode and insert mode. Command mode is where you enter vim commands and
insert mode is where you type. By default, vim enters command mode on launch. To enter insert mode, press i
10 of 11 12/5/2018, 2:25 PM
IEP RTL to GDSII - Microwiki http://chips.ece.iisc.ernet.in/index.php/IEP_RTL_to_GDSII#RTL_to_G...
ESC
:w!
:q!
:wq!
:se nu
11 of 11 12/5/2018, 2:25 PM