Skip to content

This workshop is based on how to RTL netlist into a tape-out. This workshop is organized by VLSI system design in collaboration with NASSCOM.

Notifications You must be signed in to change notification settings

chmvs/vsd_openlane_workshop

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 

Repository files navigation

vsd_openlane_workshop

This workshop is based on how to RTL netlist into a tape-out. This workshop is organized by VLSI system design in collaboration with NASSCOM.

Section 1 - Inception of open-source EDA, OpenLANE and Sky130 PDK

`Move to the directory where Openlane is Installed

cd Desktop/work/tools/openlane_working_dir/openlane

Start the Docker container and enter the OpenLANE shell:

docker

./flow.tcl -interactive`

Screenshot 2024-05-29 110933

Initilize the environment

package require openlane 0.9

The picorv32a Directory

prep -design picorv32a

Screenshot 2024-05-29 111058 Screenshot 2024-05-29 111211

Now we can see that there is a directory created(check timestamp) under which we could navigate to the runs directory where we can find the merged.lef Screenshot 2024-05-29 111306 Screenshot 2024-05-29 111334

We can see the specs about the vias metal layer cuts and the dimension

Synthesis

run_synthesis

Screenshot 2024-05-29 111509

After Running the synthesis command we can see the update inside the design directory of openlane where we have the picorv32a (check the modified date) /Desktop/work/tools/openlane_working_dir/openlane/designs/picorv32a/runs/12-05_11/results/synthesis

Screenshot 2024-05-29 111628

Screenshot 2024-05-29 111734

Screenshot 2024-05-29 111823

Screenshot 2024-05-29 111844

Screenshot 2024-05-29 111509

Synthesis results

Flop ratio = (Number of D flip flops)/(Total number of cells)

       = 1613/14876
       
       = 0.1084

DFF's percent = Flop ratio * 100 = 10.84%

Section 2 - Goodfloorplan vs bad floorplan and introduction to library cells

What's inside the README.md of Config files?

Screenshot 2024-05-29 112043

This gives a documentation the various settings are user can use by help of the switches we we can set in the ~/Desktop/work/tools/openlane_working_dir/openlane/configuration/floorplan.tcl

Inside the floorplan.tcl

Screenshot 2024-05-29 112122

In the openlane interactive mode

run_floorplan

Screenshot 2024-05-29 180857

floorplan.def was updated as shown in the below image

Screenshot 2024-05-29 180857

Reviewing the floorplan reports

~/Desktop/work/tools/openlane_working_dir/openlane/designs/picorv32a/runs/16-05_05-22/results/floorplan Screenshot 2024-05-29 181123

picorv32a.floorplan.def.png

Screenshot 2024-05-29 181344

Inside the picorv32a.floorplan.def

Screenshot 2024-05-29 181434

OBSERVATIONS FROM THE FLOORPLAN RESULTS

Given 1000 unit distance = 1 Micron

Die width = 660685 in unit distance = 660.685 microns

Die height = 671405 in unit distance = 671.405 microns

Area of the die = 660.685*671.405 = 443587.212425 sq microns.

Layout in Magic Tool

Inside the config.tcl

~/Desktop/work/tools/openlane_working_dir/openlane/designs/picorv32a/config.tcl Screenshot 2024-05-29 181542

We need a lef and def file along with pdk's techfile into order to map accordingly and view the floorplan in the Magic

magic -T /home/vsduser/Desktop/work/tools/openlane_working_dir/pdks/sky130A/libs.tech/magic/sky130A.tech lef read ../../tmp/merged.lef def read picorv32a.floorplan.def & Screenshot 2024-05-29 183709

Decap cells

Screenshot 2024-05-29 183809

An overview of decap tap cells

Screenshot 2024-05-29 183936

Click on any cell and select it, Then press "S" which will open a tkcon window and type "what" to get a brief note on the selected cell" Screenshot 2024-05-29 184023

Standard cells placed at the bottom of the layout

Screenshot 2024-05-29 184238

Complete layout

Screenshot 2024-05-29 182914 Right click on z to zoom

PLACEMENT

run_placement

Screenshot 2024-05-31 064147 Screenshot 2024-05-31 064217 Screenshot 2024-05-31 064039

PLACEMENT RESULTS

331088445-fa1278d2-0e85-4e23-a439-75d48a48f8e7

Change directory to path containing generated placement def

cd Desktop/work/tools/openlane_working_dir/openlane/designs/picorv32a/runs/17-03_12-06/results/placement/

Command to load the placement def in magic tool

magic -T /home/vsduser/Desktop/work/tools/openlane_working_dir/pdks/sky130A/libs.tech/magic/sky130A.tech lef read ../../tmp/merged.lef def read picorv32a.placement.def &

Screenshot of floorplan def in magic

Screenshot 2024-05-31 065220

Screenshot 2024-05-31 065427

Screenshot 2024-05-31 065311

Screenshot 2024-05-31 065345

TRYING DIFFERENT SWITCHES

With the default configuration

Screenshot 2024-05-31 073649

In the openlane interavtive window

set ::env(FP_IO_MODE) 2

inside the ~/Desktop/work/tools/openlane_working_dir/openlane/designs/picorv32a/runs/16-05_05-22/results/floorplan

magic -T /home/vsduser/Desktop/work/tools/openlane_working_dir/pdks/sky130A/libs.tech/magic/sky130A.tech lef read ../../tmp/merged.lef def read picorv32a.floorplan.def & Screenshot 2024-05-31 073726

Section 3 - Design library cell using Magic Layout and ngspice characterization

git clone https://github.com/nickson-jose/vsdstdcelldesign.git

We need to clone the working directory in the above github repo

To view th CMOS inverter layout use

magic -T sky130A.tech sky130_inv.mag &

Screenshot 2024-05-31 120331

DEFINING THE LAYERS

Screenshot 2024-05-31 142344

Screenshot 2024-05-31 142425

Screenshot 2024-05-31 142448

Extracting the SPICE netlist

Commands for spice extraction of the custom inverter layout to be used in tkcon window of magic

`# Check current directory pwd

Extraction command to extract to .ext format extract all

Before converting ext to spice this command enable the parasitic extraction also ext2spice cthresh 0 rthresh 0

Converting to ext to spice ext2spice

Inside the sky130_inv.ext We can witness the extracted netlist information

Screenshot 2024-05-31 151222

Actual extracted spice netlist

Screenshot 2024-05-31 151119

Modified extracted spice netlist

`.option scale=0.01u

.include ./libs/pshort.lib

.include ./libs/nshort.lib

//.subckt sky130_inv A Y VPWR VGND

M1001 Y A VGND VGND nshort_model.0 ad=1.44n pd=0.152m as=1.37n ps=0.148m w=35 l=23

M1000 Y A VPWR VPWR pshort_model.0 ad=1.44n pd=0.152m as=1.52n ps=0.156m w=37 l=23

VDD VPWR 0 3.3V

VSS VGND 0 0V

C6 Y 0 2fF

Va A VGND PULSE(0V 3.3V 0 0.1ns 0.1ns 2ns 4ns)

C0 A VPWR 0.0774fF

C1 Y VPWR 0.117fF

C2 A Y 0.07f4fF

C3 Y VGND 0.279fF

C4 A VGND 0.45f

C5 VPWR VGND 0.781f

//.ends

.tran 1n 20n

.control

run

.endc

.end`

SPICE SIMULATION RESULTS

Screenshot 2024-06-02 020215

RISE TIME

x0 = 2.16151e-09, y0 = 0.659639 x0 = 2.20386e-09, y0 = 2.63012

Rise time transition 20% to 80% - time value = 43ps

FALL TIME

x0 = 4.04043e-09, y0 = 0.264059 x0 = 4.06827e-09, y0 = 0.662766

Fall time transition 20% to 80% - time value = 28ps

CELL RISE DELAY Calculated at 50% of VDD = 35ps

    x0 = 2.15e-09, y0 = 1.65189  x0 = 2.185e-09, y0 = 1.65094

CELL FALL DELAY Calculated at 50% of VDD = 20ps

    x0 = 4.06051e-09, y0 = 1.65147  x0 = 4.05492e-09, y0 = 1.65

DRC ERRORS AND TECH FILE - AN OVERVIEW

Link to Sky130 Periphery rules: https://skywater-pdk.readthedocs.io/en/main/rules/periphery.html

Commands to download and view the corrupted skywater process magic tech file and associated files to perform drc corrections

Change to home directory cd

Command to download the lab files wget http://opencircuitdesign.com/open_pdks/archive/drc_tests.tgz

Since lab file is compressed command to extract it tar xfz drc_tests.tgz

Change directory into the lab folder cd drc_tests

List all files and directories present in the current directory ls -al

Command to view .magicrc file gvim .magicrc

Command to open magic tool in better graphics magic -d XR &

Scrrenshots of commands run

Screenshot 2024-06-01 114549

Screenshot of .magicrc file

Screenshot 2024-06-01 114638

open met3.mag in magic

Screenshot 2024-06-01 201655 Screenshot 2024-06-01 202926 Screenshot 2024-06-01 203023 Screenshot 2024-06-01 203228

Fixing poly.9 error in Sky 130 tech-file

open the plu.mag file

gvim sky130A.tech

2222

change to allpolynonres

Screenshot 2024-06-02 000729

Screenshot 2024-06-02 004438

implement poly resistor spacing to diffusion and tap

add this line--------------------- spacing xhrpoly,uhrpoly,xpc allpolynonres 480 touching illegal
"xhrpoly/uhrpoly resistor spacing to diffusion < %d (poly.9)"

Screenshot 2024-06-02 000827

Screenshot 2024-06-02 003108

Describing DRC error as Geometrical Construct

First we need to open nwell.mag

New commands inserted in sky130A.tech file to update drc Screenshot 2024-06-02 014141

Commands to run in tkcon window

Loading updated tech file tech load sky130A.tech

Change drc style to drc full drc style drc(full)

Must re-run drc check to see updated drc errors drc check

Selecting region displaying the new errors and getting the error messages drc why

After implementing the rules mentioned above Screenshot 2024-06-02 014238

Section 4 - Pre-layout timing analysis and importance of good clock tree

Change directory to vsdstdcelldesign

cd Desktop/work/tools/openlane_working_dir/openlane/vsdstdcelldesign

Command to open custom inverter layout in magic

magic -T sky130A.tech sky130_inv.mag &

Screenshot 2024-06-02 070722

Get syntax for grid command

help grid

Set grid values accordingly

grid 0.46um 0.34um 0.23um 0.17um

Screenshot 2024-06-02 070847

Checking the conditons

Screenshot 2024-06-02 070932

Horizontal track pitch = 0.46 um

Screenshot 2024-06-02 071829

Width of standard cell = 1.38 um = 0.46*3

Screenshot 2024-06-02 072018

Height of the standard cell = 2.72 um = 0.34*8

Next step is to save the finalized layout with custom name and open it

Command to save as

save sky130_vsdinv.mag

Command to open custom inverter layout in magic

magic -T sky130A.tech sky130_vsdinv.mag &

Screenshot 2024-06-02 072813

Screenshot of newly created lef file

Screenshot 2024-06-02 073311

Now the newly generated lef and associated required lib files to 'picorv32a' design 'src' directory

To Copy files to picorv32a design src directory

Copy lef file

cp sky130_vsdinv.lef ~/Desktop/work/tools/openlane_working_dir/openlane/designs/picorv32a/src/

List and check whether it's copied

ls ~/Desktop/work/tools/openlane_working_dir/openlane/designs/picorv32a/src/

Copy lib files

cp libs/sky130_fd_sc_hd__* ~/Desktop/work/tools/openlane_working_dir/openlane/designs/picorv32a/src/

List and check whether it's copied

ls ~/Desktop/work/tools/openlane_working_dir/openlane/designs/picorv32a/src/

Screenshot 2024-06-02 090233

Edit config.tcl

333

Running Openlane flow synthesis with newly inserted custom inverter cell

After running the commands

Screenshot 2024-06-02 092433

Screenshot 2024-06-02 094657

After running the synthesis we got,

Chip area for module '\picorv32a' : 147712.918400

tns -711.59

wns -23.89

Commands to view and change parameters to improve timing and run synthesis

Now once again we have to prep design so as to update variables

prep -design picorv32a -tag 29-05_12-20 -overwrite

Addiitional commands to include newly added lef to openlane flow merged.lef

set lefs [glob $::env(DESIGN_DIR)/src/*.lef]

add_lefs -src $lefs

Command to display current value of variable SYNTH_STRATEGY

echo $::env(SYNTH_STRATEGY)

Command to set new value for SYNTH_STRATEGY

set ::env(SYNTH_STRATEGY) "DELAY 3"

Command to display current value of variable SYNTH_BUFFERING to check whether it's enabled

echo $::env(SYNTH_BUFFERING)

Command to display current value of variable SYNTH_SIZING

echo $::env(SYNTH_SIZING)

Command to set new value for SYNTH_SIZING

set ::env(SYNTH_SIZING) 1

Command to display current value of variable SYNTH_DRIVING_CELL to check whether it's the proper cell or not

echo $::env(SYNTH_DRIVING_CELL)

Now that the design is prepped and ready, we can run synthesis using following command

run_synthesis

merged.lef in tmp directoy

Screenshot 2024-06-02 115104

After running the above commands

Screenshot 2024-06-02 114139

Now run the floorplan

Screenshot 2024-06-02 115454

As we are facing issues in run_floorplan command , we will use the below mentioned commands

Follwing commands are alltogather sourced in "run_floorplan" command

init_floorplan

place_io

tap_decap_or

Screenshot 2024-06-02 115713

Screenshot 2024-06-02 115808

Now run_placement

Screenshot 2024-06-02 120211

Commands to load placement def in magic in another terminal

Change directory to path containing generated placement def

cd Desktop/work/tools/openlane_working_dir/openlane/designs/picorv32a/runs/29-05_12-20/results/placement/

Command to load the placement def in magic tool

magic -T /home/vsduser/Desktop/work/tools/openlane_working_dir/pdks/sky130A/libs.tech/magic/sky130A.tech lef read ../../tmp/merged.lef def read picorv32a.placement.def &

Screenshot 2024-06-02 120824

Screenshot of the customer inverter interested in placemnt def with proper abutment

Screenshot 2024-06-02 121631

Command to view internal connectivity layers

expand

Screenshot 2024-06-02 121658

About

This workshop is based on how to RTL netlist into a tape-out. This workshop is organized by VLSI system design in collaboration with NASSCOM.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published