Skip to content

Repo for 5 day(10-14 Oct 2022) VSD-IAT Workshop: Physical Verification using SKY130

Notifications You must be signed in to change notification settings

Priyanshu-1012/VSD-Physical-Verification-using-SKY130

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 

Repository files navigation

VSD-Physical-Verification-using-SKY130

FINAL_VSDOpen 2022_PV1

Repo for 5 day(10-14 Oct 2022) VSD-IAT Workshop: Physical Verification using SKY130.

Day-1

Installing Sky130 PDK to local machine

git clone https://github.com/RTimothyEdwards/open_pdks
cd open_pdks
configure --enable-sky130-pdk
make
sudo make install 

Tools supported by open_pdks

  • Magic: It does extraction, DRC, handles .def .gds .lef
  • Klayout: Alternate layout editor and viewer(also do DRC)
  • Openlane: Synthesis & PnR package based on Openroad tools
  • Xschem: Schematic editing tool
  • Netgen: LVS tool
  • Ngspice: Analog simulation tool
  • Xcircuit: alt. schematic capture tool
  • IRsim: Switch level simulation and power analyzer
  • qflow: alt. digital synthesis flow
  • Iverilog: Verilog simulation and synthesis tool

Links to tools

Tool links
Magic http://opencircuitdesign.com/magic
Klayout https://www.klayout.de
Openlane https://github.com/efabless/openlane
Xschem https://github.com/StefanSchippers/xschem
Netgen http://opencircuitdesign.com/netgen
iverilog https://iverilog.icarus.com
qflow http://opencircuitdesign.com/qflow
IRSIM http://opencircuitdesign.com/irsim
Xcircuit http://opencircuitdesign.com/xcircuit

LAB for Day-1(INVERTER)

Getting started...

  • Check the installation by simply typing the name of the tool
  • Making a directory inverter
  • Creating folders mag,xschem,ngspice

Checking installations

2022-10-13 (5)

Making directories and files...Setting up

2022-10-13 (7)

Setup Commands

ln -s /usr/share/pdk/sky130A/libs.tech/xschem/xschemrc

ln -s /usr/share/pdk/sky130A/libs.tech/ngspice/spinit .spiceinit

ln -s /usr/share/pdk/sky130A/libs.tech/magic/sky130A.magicrc .magicrc

ln -s /usr/share/pdk/sky130A/libs.tech/netgen/sky130A_setup.tcl setup.tcl

Xschem

2022-10-13 (8)

Commands

cd ../xschem
xschem

Magic

2022-10-13 (10)

2022-10-13 (18)

2022-10-13 (17)

Commands

cd ../mag
magic

Making Inverter Schematic on Xschem

Making a New Schematic

2022-10-13 (20)

Press Insert key to open the insert symbol dialog box

2022-10-13 (21)

Insert the pfet3 , nfet, ipin, iopins, opin and join them with wire(W key)

2022-10-13 (33)

2022-10-13 (26)

Also change the W/L and number of fingers for the pfet and nfet by right clicking on the symbol

2022-10-13 (37)

Now go to symbol>make symbol from new schematic
then go to File>New Schematic

2022-10-13 (38)

Create New Schematic by adding inverter symbol, voltage sources, opins, GND and connect them with wires.

Add the voltage value for Vdd, input pulse, code for transient analysis and add the lib

2022-10-13 (48)

".lib /usr/share/pdk/sky130A/libs.tech/ngspice/sky130.lib.spice tt"

".control tran 1n 1u plot V(in) V(out) .endc"

Generate netlist, Save the Schematic as inverter_tb, and simulate!

2022-10-13 (49)

The result came out as expected! >> Now lets go to making the layout for inverter

Importing Schematic to layout

cd ../mag
magic -d XR

then go File >> import SPICE >> inverter.spice

2022-10-13 (55)

2022-10-13 (56)

Change the top, bottom guard rings; Source, drain coverage

For pfet select top guard ring via coverage and type 100. source via coverage =+40 drain via coverage = -40

and for nfet bottom guard ring via coverage = 100 source via covergae = +40 drain via coverage = -40

2022-10-13 (65)

2022-10-13 (63)

Now complete the layout

Screenshot (3)

Now click Save >> Autowrite

In Command window type following commands extraction, generate a spice netlist and then quit

extract do local
extract all
ext2spice lvs
ext2spice
quit

Screenshot (4)

Now for LVS..

cd ../netgen
netgen -batch lvs "../mag/inverter.spice inverter" "../xschem/inverter.spice inverter"

Screenshot (5)

Due to some error my netlist didnt match...working on it(will update here once done)

Screenshot (6)


Day-2

DRC & LVS

Basics

  • DRC : ensure the design meet all the fab rules for the mask
  • LVS : ensure the layout matches the design schematic or any other similar form that define the design spec
  • Data Formats : .cif, .GDSII(industry standard), OASIS
  • Extraction : 2 step process(LAYOUT .mag file >> INTERMEDIATE .ext file >> NETLIST .spice file)
  • Extraction options in magic
ext2spice lvs
ext2spice cthresh value
ext2spice scale on|off
ext2spice hierarchy on|off
ext2spice subcircuit top on|off
ext2spice global on|off
ext2spicemerge on|off

LAB DAY-2

Create a proj directory

Screenshot (7)

cif styles in magic

Screenshot (8)

see the available top level cell useing cellname top

Screenshot (9)

or by navigating Options >> Cell manager

Screenshot (10)

Then choose and2_1

Screenshot (11)

we load the layout

Screenshot (12)

use cif istyle sky130(vendor) & then read gds file from lib (labels are blue coz they're being traeated as ports)

Screenshot (13)

Screenshot (15)

Ports & Index

To enquire about ports use port index for more enquiry about say port with index 1... use port first then..

port 1 name
port 1 class
port 1 use

Screenshot (18)

and2_1 subckt definition

Screenshot (19) Screenshot (20)

Abstract views

read lef lib using lef read /usr/share/pdk/sky130A/libs.ref/sky130_fd_sc_hd/lef/sky130_fd_sc_hd.lef . Load and2_1 from cell manager, and the abstract view is shown...

Screenshot (26)

port order metadate isnt present

Screenshot (27)

use load test & instantiate the cell with command getcell sky130_fd_sc_hd__and2_1 ....the abstract view is shown

Screenshot (28)

we see layout....

Screenshot (29) Screenshot (30) Screenshot (31)

start new session..

Screenshot (32)

cell edited is from skywater pdks...check using path

Screenshot (33)

write into gds file

Screenshot (34)

LVS

  mkdir netgen 
  cd netgen
  cp /usr/share/pdk/sky130A/libs.tech/netgen/sky130A_setup.tcl ./setup.tcl
  cd ../mag
  magic -d XR sky130_fd_sc_hd__and2_1
  ext2spice lvs
  ext2spice lvs
  ext2spice
  quit
  cd ../netgen
  netgen -batch lvs "../mag/sky130_fd_sc_hd__and2_1.spice sky130_fd_sc_hd__and2_1" "/usr/share/pdk/sky130A/libs.ref/sky130_fd_sc_hd/spice/sky130_fd_sc_hd.spice sky130_fd_sc_hd__and2_1"

Setup the XOR

  cd ../mag
magic -d XR
load sky130_fd_sc_hd__and2_1
save altered
load altered
erase li
flatten -nolabels xor_test
load sky130_fd_sc_hd__and2_1
xor -nolabels xor_test
load xor_test
quit
magic -d XR
load test3
flatten -nolabels xor_test
xor -nolabels xor_test
load xor_test

Screenshot (191) Screenshot (192) Screenshot (193)



Day-3 (About DRC)

Rules:

1.Backend metal layer rules

  • Width rule
  • Spacing rule
  • Wide spacing rule
  • Notch rule
  • Min & max area rules
  • Min hole area rule
  • Contact cut rules

2.LI rules

3.Frontend rules

4.Wells, Taps and Net Rules

5.Deeps N-Well and High Voltage Rules

6.Device Rules(R,C,Diodes)

7.Miscellaneous Rules and Latch-up, Antenna and Stress Rules

8.Density rules

9.Recomm manufac. and ERC rules

  • Width rules
  • Spacing (notch) rules
  • Minimum area rules
  • Overlap (surround) rules
  • Extension rules
  • Angle and off-grid rules
  • Density rules (acceptable, rarely)

ERC

  • ELectromigration
  • Overvoltage conditions

Lab DAY-3

Exercise-1

Getting started... Screenshot (35) Screenshot (36)

Select and hit '?' on keyboard to get DRC report Screenshot (37) Screenshot (38)

Press 'B' to check dimensions of the cursor box. Here the width was 0.06um but the min width should be 0.14 microns. To increase the width of the metal layer, we can either manually set the cursor box to the size required, then paint it using the middle mouse button/hover to the layer and hit 'P' on keyboard. Or we can do it with console commands by typing...

box width 0.14um

paint m2

Screenshot (41) Screenshot (42)

Exercise 1b....DRC report

Screenshot (43)

Its a spacing error...it can be resolved by moving either of the rectangles away. Select a rectangles, and move it using 2-4-6-8 num keys (can also be done using the command move e 0.14um ...it moves the box 0.14um towards east>>)

Screenshot (44)

Exercise 1c...check the error

Screenshot (45)

Resolve this by increasing the seperation to by 0.4um either manually or by commands...your call

Screenshot (47)

Another width rule example(Notch rule)....resolve this my selecting half part('A') and stretching it(shift+num key)...increasing the width Another way to do it is with stretch command..... stretch <direction> <measure>

Screenshot (49)

Exercise-2

2a. Via size error. Can be solved by simply stretching the via both horiz and vert.

Screenshot (195) Screenshot (53)

2b. We got a large via with an array of contact cuts. To see the contact cuts >> run cif see xxx to check the cif layer names. To see MCON(li for metal1), by using cif see MCON

Screenshot (54)

Use feedback why to get info about cif layer, and feedback clear to stop viewing the contact cuts.

2c. We got an overlap error. Fix by selecting the layer then use the box grow <direction> <measure> command as shown {'c' -> centre}.Then paint in a layer of metal1 to fix the overlap error.

Screenshot (59)

Now fix the size error by growing the box in e and w direction and paint it with m1

Screenshot (60) Screenshot (61)

2d. Generate via automatically >> use the wiring tool (spacebar). By SHIFT+ left click >> we can move up a metal layer till metal5. Similarly, we can move down layers with the SHIFT+right click until the metal interconnect. To see vias use...

Cif see MCON
Cif see VIA1
Cif see VIA2
Cif see VIA3
Cif see VIA4

Screenshot (62)

Exercise-3

3a.Min area rule... simply stretch to fix it

Screenshot (63) Screenshot (64) Screenshot (65)

3b. Min. hole area rule...To see this error >> run Magic in the full DRC mode(menu button DRC >> DRC complete). Then run a DRC report.

Screenshot (67)

Fix this by manually erasing sections of metal till the hole is big enough to pass DRC.

Screenshot (68)

Exercise-4

4a. Its a well error(the wells don't have taps). N-well shows an error coz its floating(the P-well doesn't since p-wells aren't actually considered... unless they're in deep n-wells(instead treated as psub).

Screenshot (69)

fix this by adding n-type material(nsubstratendiff) into the n-well. Then connect a layer of local interconnect to tap(nsubstratencontact).

Screenshot (70)

Leads to new errors..solve these overlap and surround errors by stretching, adding li.

Screenshot (71)

4b. The p well has to be connected to a contact if it has a tap. Add psubstratepcontact, some li, and adjust the areas of the layers, we get a DRC correct layout.

Screenshot (196) Screenshot (72)

4c. Error in deep n-well

Screenshot (73)

Grow the deep n-well >> move it away from the n-well(4b) {its interacting with it}. Add an n-well overlap around the deep n-well(wire tool) >> add in a tap layer with an interconnect.

Screenshot (75) Screenshot (76)

Also for deep n-wells >> add a full setup with guard rings (Devices 1 >> deep n-well region)

Screenshot (76)

Exercise-5

Screenshot (77) Screenshot (78) Screenshot (79) Screenshot (80) Screenshot (81) Screenshot (82) Screenshot (83) Screenshot (84) Screenshot (85) Screenshot (86) Screenshot (87) Screenshot (88) Screenshot (89) Screenshot (90) Screenshot (91) Screenshot (92) Screenshot (93) Screenshot (94) Screenshot (95) Screenshot (97) Screenshot (98) Screenshot (99) Screenshot (101) Screenshot (100) Screenshot (102) Screenshot (103) Screenshot (104) Screenshot (105) Screenshot (106) Screenshot (107) Screenshot (108) Screenshot (109) Screenshot (110) Screenshot (111) Screenshot (112) Screenshot (113) Screenshot (114) Screenshot (115) Screenshot (116)

LAB DAY-5

Screenshot (117) Screenshot (118) Screenshot (119) Screenshot (120) Screenshot (121) Screenshot (122) Screenshot (123) Screenshot (124) Screenshot (125) Screenshot (126) Screenshot (127) Screenshot (128) Screenshot (129) Screenshot (130) Screenshot (131) Screenshot (132) Screenshot (133) Screenshot (134) Screenshot (135) Screenshot (136) Screenshot (137) Screenshot (138) Screenshot (139) Screenshot (140) Screenshot (141) Screenshot (142) Screenshot (143) Screenshot (144) Screenshot (145) Screenshot (147) Screenshot (148) Screenshot (149) Screenshot (150) Screenshot (151) Screenshot (152) Screenshot (153) Screenshot (154) Screenshot (155) Screenshot (156) Screenshot (157) Screenshot (158) Screenshot (159) Screenshot (160) Screenshot (161) Screenshot (162) Screenshot (163) Screenshot (164) Screenshot (165) Screenshot (166) Screenshot (167) Screenshot (168) Screenshot (169) Screenshot (170) Screenshot (171) Screenshot (172) Screenshot (173) Screenshot (174) Screenshot (175) Screenshot (176) Screenshot (177) Screenshot (178) Screenshot (179) Screenshot (180) Screenshot (181) Screenshot (182) Screenshot (183) Screenshot (184) Screenshot (185) Screenshot (186) Screenshot (187) Screenshot (188) Screenshot (189) Screenshot (180) Screenshot (181) Screenshot (182) Screenshot (183) Screenshot (184) Screenshot (185) Screenshot (186) Screenshot (187) Screenshot (188) ![Screenshot (189)](https://user-images.![Screenshot (190)](https://user-images.githubusercontent.com/39450902/196172038-53547c5b-9e2c-4aaa-a2b4-99c28cd87cbf.png) githubusercontent.com/39450902/196172009-012b44a0-cc21-47f0-8f13-41431394a662.png)

About

Repo for 5 day(10-14 Oct 2022) VSD-IAT Workshop: Physical Verification using SKY130

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published