Skip to content

2 Week Advanced Physical Design using OpenLANE/Sky130 workshop with complete RTL2GDSII flow organised by VSD as part of Level-3 of Chip Design for High School Program in collaboration with Intel India

Notifications You must be signed in to change notification settings

fayizferosh/advanced-pd-using-openlane-sky130

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 

Repository files navigation

Advanced_Physical_Design_using_OpenLANE_Sky130 (1)

Advanced Physical Design using OpenLANE/Sky130

Static Badge Static Badge Static Badge GitHub last commit GitHub language count GitHub top language GitHub repo size GitHub code size in bytes GitHub repo file count (file type)

2 Week Advanced Physical Design using OpenLANE/Sky130 workshop with complete RTL2GDSII flow organised by VSD as part of Level-3 of Chip Design for High School organised in collaboration with Intel India

Section 1 - Inception of open-source EDA, OpenLANE and Sky130 PDK (18/03/2024 - 19/03/2024)

Theory

Expand or Collapse

Package

  • In any embedded board we have seen, the part of the board we consider as the chip is only the PACKAGE of the chip which is nothing but a protective layer or packet bound over the actual chip and the actual manufatured chip is usually present at the center of a package wherein, the connections from package is fed to the chip by WIRE BOUND method which is none other than basic wired connection.

image image image

Chip

  • Now, taking a look inside the chip, all the signals from the external world to the chip and vice versa is passed through PADS. The area bound by the pads is CORE where all the digital logic of the chip is placed. Both the core and pads make up the DIE which is the basic manufacturing unit in regards to semiconductor chips.

image

  • FOUNDRY is the place where the semiconductor chips are manufactured and FOUNDRY IP's are Intellectual Properties based on a specific foundry and these IP's require a specific level of intelligence to be produced whereas, repeatable digital logic blocks are called MACROS.

image

ISA (Intruction Set Architecture)

  • A C program which has to be run on a specific hardware layout which is the interior of a chip in your laptop, there is certain flow to be followed.
  • Initially, this particular C program is compiled in it's assembly language program which is nothing but RISC-V ISA (Reduced Instruction Set Compting - V Intruction Set Architecture).
  • Following this, the assembly language program is then converted to machine language program which is the binary language logic 0 and 1 which is understood by the hardware of the computer.
  • Directly after this, we've to implement this RISC-V specification using some RTL (a Hardware Description Language). Finally, from the RTL to Layout it is a standard PnR or RTL to GDSII flow.

Screenshot (278)

  • For an application software to be run on a hardware there are several processes taking place. To begin with, the apps enters into a block called system software and it converts the application program to binary language. There are various layers in system software in which the major layers or components are OS (Operating System), Compiler and Assembler.
  • At first the OS outputs are small function in C, C++, VB or Java language which are taken by the respective compiler and converted into instructions and the syntax of these instructions varies with the hardware architecture on which the system is implemented.
  • Then, the job of the assembler is to take these instructions and convert it into it's binary format which is basically called as a machine language program. Finally, this binary language is fed to the hardware and it understands the specific functions it has to perform based on the binary code it receives.

Screenshot (279)

  • For example, if we take a stopwatch app on RISC-V core, then the output of the OS could be a small C function which enters into the compiler and we get output RISC-V instructions following this, the output of the assembler will be the binary code which enters into your chip layout.

Screenshot (280)

  • For the above stopwatch the following are the input and output of the compiler and assembler.

Screenshot (281)

  • The output of the compiler are instructions and the output of the assembler is the binary pattern. Now, we need some RTL (a Hardware Description Language) which understands and implements the particular instructions. Then, this RTL is synthesised into a netlist in form of gates which is fabricated into the chip through a physical design implementation.

Screenshot (282)

  • There are mainly 3 different parts in this course. They are:
  1. RISC-V ISA
  2. RTL and synthesis of RISC-V based CPU core - picorv32
  3. Physical design implementation of picorv32

Screenshot (283)

Open-source Implementation

  • For open-source ASIC design implemantation, we require the following enablers to be readily available as open-source versions. They are:-
  1. RTL Designs
  2. EDA Tools
  3. PDK Data
  • Initially in the early ages, the design and fabrication of IC's were tightly coupled and were only practiced by very few companies like TI, Intel, etc.
  • In 1979, Lynn Conway and Carver Mead came up with an idea to saperate the design from the fabrication and to do this they inroduced structured design methodologies based on the λ-based design rules and published the first VLSI book "Introduction to VLSI System" which started the VLSI education.
  • This methodology resulted in the emergence of the design only companies or "Fabless Companies" and fabrication only companies that we usually refer to as "Pure Play Fabs".
  • The inteface between the designers and the fab by now became a set of data files and documents, that are reffered to as the "Process Design Kits (PDKs)".
  • The PDK include but not limited to Device Models, Technology Information, Design Rules, Digital Standard Cell Libraries, I/O Libraries and many more.
  • Since, the PDK contained variety of informations, and so they were distributed only under NDAs (Non-Disclosure Agreements) which made it in-accessible to the public.
  • Recently, Google worked out an agreement with skywater to open-source the PDK for the 130nm process by skywater Technology, as a result on 30 June 2020 Google released the first ever open-source PDK.

image

  • ASIC design is a complex step that involves tons of steps, various methodologies and respective EDA tools which are all required for successful ASIC implementation which is achieved though an ASIC flow which is nothing but a piece of software that pulls different tools togather to carry out the design process.

image

OpenLANE Open-source ASIC Design Implementation Flow

  • The main objective of the ASIC Design Flow is to take the design from the RTL (Register Transfer Level) all the way to the GDSII, which is the format used for the final fabrication layout.

image

  • Synthesis is the process of convertion or translation of design RTL into circuits made out of Standard Cell Libraries (SCL) the resultant circuit is described in HDL and is usually reffered to as the Gate-Level Netlist.
  • Gate-Level Netlist is functionally equivalent to the RTL.

image

  • The fundemental building blocks which are the standard cells have regular layouts.
  • Each cell has different views/models which are utilised by different EDA tools like liberty view with electrical models of the cells, HDL behavioral models, SPICE or CDL views of the cells, Layout view which include GDSII view which is the detailed view and LEF view which is the abstract view.

image

  • Chip Floor Planning

image

  • Macro Floor Planning

image

  • Power Planning typically uses upper metal layers for power distribution since thay are thicker than lower metal layers and so have lower resistance and PP is done to avoid electron migration and IR drops.

image

  • Placement

image

  • Global placement provide approximate locations for all cells based on connectivity but in this stage the cells may be overlapped on each other and in detailed placement the positions obtained from global placements are minimally altered to make it legal (non-overlapping and in site-rows)

image

  • Clock Tree Synthesis

image

  • Clock skew is the time difference in arrival of clock at different components.
  • Routing

image

  • skywater PDK has 6 routing layers in which the lowest layer is called the local interconnect layer which is a Titanium Nitride layer the following 5 layers are all Aluminium layers.

stackup

  • Global and Detailed Routing

image

  • Once done with the routing the final layout can be generated which undergoes various Sign-Off checks.
  • Design Rules Checking (DRC) which verifies that the final layout honours all design fabrication rules.
  • Layout Vs Schematic (LVS) which verifies that the final layout functionality matches the gate-level netlist that we started with.
  • Static Timing Analysis (STA) to verify that the design runs at the designated clock frequency.

image

Implementation

Section 1 tasks:-

  1. Run 'picorv32a' design synthesis using OpenLANE flow and generate necessary outputs.
  2. Calculate the flop ratio.
$$Flop\ Ratio = \frac{Number\ of\ D\ Flip\ Flops}{Total\ Number\ of\ Cells}$$ $$Percentage\ of\ DFF's = Flop\ Ratio * 100$$
  • All section 1 logs, reports and results can be found in following run folder:

Section 1 Run - 15-03_15-51

1. Run 'picorv32a' design synthesis using OpenLANE flow and generate necessary outputs.

Commands to invoke the OpenLANE flow and perform synthesis

# Change directory to openlane flow directory
cd Desktop/work/tools/openlane_working_dir/openlane

# alias docker='docker run -it -v $(pwd):/openLANE_flow -v $PDK_ROOT:$PDK_ROOT -e PDK_ROOT=$PDK_ROOT -u $(id -u $USER):$(id -g $USER) efabless/openlane:v0.21'
# Since we have aliased the long command to 'docker' we can invoke the OpenLANE flow docker sub-system by just running this command
docker
# Now that we have entered the OpenLANE flow contained docker sub-system we can invoke the OpenLANE flow in the Interactive mode using the following command
./flow.tcl -interactive

# Now that OpenLANE flow is open we have to input the required packages for proper functionality of the OpenLANE flow
package require openlane 0.9

# Now the OpenLANE flow is ready to run any design and initially we have to prep the design creating some necessary files and directories for running a specific design which in our case is 'picorv32a'
prep -design picorv32a

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

# Exit from OpenLANE flow
exit

# Exit from OpenLANE flow docker sub-system
exit

Screenshots of running each commands

1 2 3

2. Calculate the flop ratio.

Screenshots of synthesis statistics report file with required values highlighted

Screenshot from 2024-03-15 22-02-42 Screenshot from 2024-03-15 22-03-39

Calculation of Flop Ratio and DFF % from synthesis statistics report file

$$Flop\ Ratio = \frac{1613}{14876} = 0.108429685$$ $$Percentage\ of\ DFF's = 0.108429685 * 100 = 10.84296854\ \%$$

Section 2 - Good floorplan vs bad floorplan and introduction to library cells (20/03/2024 - 21/03/2024)

Theory

Implementation

Section 2 tasks:-

  1. Run 'picorv32a' design floorplan using OpenLANE flow and generate necessary outputs.
  2. Calculate the die area in microns from the values in floorplan def.
  3. Load generated floorplan def in magic tool and explore the floorplan.
  4. Run 'picorv32a' design congestion aware placement using OpenLANE flow and generate necessary outputs.
  5. Load generated placement def in magic tool and explore the placement.
$$Area\ of\ die\ in\ microns = Die\ width\ in\ microns * Die\ height\ in\ microns$$
  • All section 2 logs, reports and results can be found in following run folder:

Section 2 Run - 17-03_12-06

1. Run 'picorv32a' design floorplan using OpenLANE flow and generate necessary outputs.

Commands to invoke the OpenLANE flow and perform floorplan

# Change directory to openlane flow directory
cd Desktop/work/tools/openlane_working_dir/openlane

# alias docker='docker run -it -v $(pwd):/openLANE_flow -v $PDK_ROOT:$PDK_ROOT -e PDK_ROOT=$PDK_ROOT -u $(id -u $USER):$(id -g $USER) efabless/openlane:v0.21'
# Since we have aliased the long command to 'docker' we can invoke the OpenLANE flow docker sub-system by just running this command
docker
# Now that we have entered the OpenLANE flow contained docker sub-system we can invoke the OpenLANE flow in the Interactive mode using the following command
./flow.tcl -interactive

# Now that OpenLANE flow is open we have to input the required packages for proper functionality of the OpenLANE flow
package require openlane 0.9

# Now the OpenLANE flow is ready to run any design and initially we have to prep the design creating some necessary files and directories for running a specific design which in our case is 'picorv32a'
prep -design picorv32a

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

# Now we can run floorplan
run_floorplan

Screenshot of floorplan run

Screenshot from 2024-03-17 18-06-19 Screenshot from 2024-03-17 18-06-36

2. Calculate the die area in microns from the values in floorplan def.

Screenshot of contents of floorplan def

Screenshot from 2024-03-17 18-34-53

According to floorplan def

$$1000\ Unit\ Distance = 1\ Micron$$ $$Die\ width\ in\ unit\ distance = 660685 - 0 = 660685$$ $$Die\ height\ in\ unit\ distance = 671405 - 0 = 671405$$ $$Distance\ in\ microns = \frac{Value\ in\ Unit\ Distance}{1000}$$ $$Die\ width\ in\ microns = \frac{660685}{1000} = 660.685\ Microns$$ $$Die\ height\ in\ microns = \frac{671405}{1000} = 671.405\ Microns$$ $$Area\ of\ die\ in\ microns = 660.685 * 671.405 = 443587.212425\ Square\ Microns$$

3. Load generated floorplan def in magic tool and explore the floorplan.

Commands to load floorplan def in magic in another terminal

# Change directory to path containing generated floorplan def
cd Desktop/work/tools/openlane_working_dir/openlane/designs/picorv32a/runs/17-03_12-06/results/floorplan/

# Command to load the floorplan 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.floorplan.def &

Screenshots of floorplan def in magic

Screenshot from 2024-03-17 18-05-19

Equidistant placement of ports

Screenshot from 2024-03-17 18-14-28

Port layer as set through config.tcl

Screenshot from 2024-03-17 18-17-46 Screenshot from 2024-03-17 18-19-50

Decap Cells and Tap Cells

Screenshot from 2024-03-17 18-22-57

Diogonally equidistant Tap cells

Screenshot from 2024-03-17 18-25-28

Unplaced standard cells at the origin

Screenshot from 2024-03-17 18-31-41

4. Run 'picorv32a' design congestion aware placement using OpenLANE flow and generate necessary outputs.

Command to run placement

# Congestion aware placement by default
run_placement

Screenshots of placement run

Screenshot from 2024-03-17 22-44-17 Screenshot from 2024-03-17 22-46-27

5. Load generated placement def in magic tool and explore the placement.

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/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 &

Screenshots of floorplan def in magic

Screenshot from 2024-03-17 22-58-44

Standard cells legally placed

Screenshot from 2024-03-17 23-04-20

Commands to exit from current run

# Exit from OpenLANE flow
exit

# Exit from OpenLANE flow docker sub-system
exit

Section 3 - Design library cell using Magic Layout and ngspice characterization (22/03/2024 - 25/03/2024)

Theory

Implementation

  • Section 3 tasks:-
  1. Clone custom inverter standard cell design from github repository: Standard cell design and characterization using OpenLANE flow.
  2. Load the custom inverter layout in magic and explore.
  3. Spice extraction of inverter in magic.
  4. Editing the spice model file for analysis through simulation.
  5. Post-layout ngspice simulations.
  6. Find problem in the DRC section of the old magic tech file for the skywater process and fix them.
  • Section 3 - Tasks 1 to 5 files, reports and logs can be found in the following folder:

Section 3 - Tasks 1 to 5 (vsdstdcelldesign)

  • Section 3 - Task 6 files, reports and logs can be found in the following folder:

Section 3 - Task 6 (drc_tests)

1. Clone custom inverter standard cell design from github repository

# Change directory to openlane
cd Desktop/work/tools/openlane_working_dir/openlane

# Clone the repository with custom inverter design
git clone https://github.com/nickson-jose/vsdstdcelldesign

# Change into repository directory
cd vsdstdcelldesign

# Copy magic tech file to the repo directory for easy access
cp /home/vsduser/Desktop/work/tools/openlane_working_dir/pdks/sky130A/libs.tech/magic/sky130A.tech .

# Check contents whether everything is present
ls

# Command to open custom inverter layout in magic
magic -T sky130A.tech sky130_inv.mag &

Screenshot of commands run

Screenshot from 2024-03-19 00-22-27

2. Load the custom inverter layout in magic and explore.

Screenshot of custom inverter layout in magic

Screenshot from 2024-03-19 00-22-44

NMOS and PMOS identified

Screenshot from 2024-03-19 00-28-03 Screenshot from 2024-03-19 00-29-14

Output Y connectivity to PMOS and NMOS drain verified

Screenshot from 2024-03-19 00-31-17

PMOS source connectivity to VDD (here VPWR) verified

Screenshot from 2024-03-19 00-34-11

NMOS source connectivity to VSS (here VGND) verified

Screenshot from 2024-03-19 00-36-09

Deleting necessary layout part to see DRC error

Screenshot from 2024-03-19 01-10-28

3. Spice extraction of inverter in magic.

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

Screenshot of tkcon window after running above commands

Screenshot from 2024-03-19 01-24-17

Screenshot of created spice file

Screenshot from 2024-03-19 01-27-07

4. Editing the spice model file for analysis through simulation.

Measuring unit distance in layout grid

Screenshot from 2024-03-19 01-30-15

Final edited spice file ready for ngspice simulation

Screenshot from 2024-03-19 14-50-54 Screenshot from 2024-03-19 14-51-16

5. Post-layout ngspice simulations.

Commands for ngspice simulation

# Command to directly load spice file for simulation to ngspice
ngspice sky130_inv.spice

# Now that we have entered ngspice with the simulation spice file loaded we just have to load the plot
plot y vs time a

Screenshots of ngspice run

Screenshot from 2024-03-19 14-56-42 Screenshot from 2024-03-19 14-57-22

Screenshot of generated plot

Screenshot from 2024-03-19 14-58-55

Rise transition time calculation

$$Rise\ transition\ time = Time\ taken\ for\ output\ to\ rise\ to\ 80\% - Time\ taken\ for\ output\ to\ rise\ to\ 20\%$$ $$20\%\ of\ output = 660\ mV$$ $$80\%\ of\ output = 2.64\ V$$

20% Screenshots

Screenshot from 2024-03-19 15-15-02 Screenshot from 2024-03-19 15-20-04

80% Screenshots

Screenshot from 2024-03-19 15-23-34 Screenshot from 2024-03-19 15-24-13

$$Rise\ transition\ time = 2.24638 - 2.18242 = 0.06396\ ns = 63.96\ ps$$

Fall transition time calculation

$$Fall\ transition\ time = Time\ taken\ for\ output\ to\ fall\ to\ 20\% - Time\ taken\ for\ output\ to\ fall\ to\ 80\%$$ $$20\%\ of\ output = 660\ mV$$ $$80\%\ of\ output = 2.64\ V$$

20% Screenshots

Screenshot from 2024-03-19 15-34-22 Screenshot from 2024-03-19 15-34-34

80% Screenshots

Screenshot from 2024-03-19 15-36-29 Screenshot from 2024-03-19 15-36-41

$$Fall\ transition\ time = 4.0955 - 4.0536 = 0.0419\ ns = 41.9\ ps$$

Rise Cell Delay Calculation

$$Rise\ Cell\ Delay = Time\ taken\ for\ output\ to\ rise\ to\ 50\% - Time\ taken\ for\ input\ to\ fall\ to\ 50\%$$ $$50\%\ of\ 3.3\ V = 1.65\ V$$

50% Screenshots

Screenshot from 2024-03-19 16-02-35 Screenshot from 2024-03-19 16-03-46

$$Rise\ Cell\ Delay = 2.21144 - 2.15008 = 0.06136\ ns = 61.36\ ps$$

Fall Cell Delay Calculation

$$Fall\ Cell\ Delay = Time\ taken\ for\ output\ to\ fall\ to\ 50\% - Time\ taken\ for\ input\ to\ rise\ to\ 50\%$$ $$50\%\ of\ 3.3\ V = 1.65\ V$$

50% Screenshots

Screenshot from 2024-03-19 16-09-08 Screenshot from 2024-03-19 16-10-03

$$Fall\ Cell\ Delay = 4.07 - 4.05 = 0.02\ ns = 20\ ps$$

6. Find problem in the DRC section of the old magic tech file for the skywater process and fix them.

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 &

Screenshots of commands run

Screenshot from 2024-03-21 22-33-57 Screenshot from 2024-03-21 22-34-09

Screenshot of .magicrc file

Screenshot from 2024-03-21 22-35-58

Incorrectly implemented poly.9 simple rule correction

Screenshot of poly rules

Screenshot from 2024-03-21 22-54-49

Incorrectly implemented poly.9 rule no drc violation even though spacing < 0.48u

Screenshot from 2024-03-21 22-54-19 Screenshot from 2024-03-21 23-54-11

New commands inserted in sky130A.tech file to update drc

Screenshot from 2024-03-21 23-58-44 Screenshot from 2024-03-21 23-09-50

Commands to run in tkcon window

# Loading updated tech file
tech load sky130A.tech

# 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

Screenshot of magic window with rule implemented

Screenshot from 2024-03-21 23-13-11 Screenshot from 2024-03-22 00-00-40

Incorrectly implemented difftap.2 simple rule correction

Screenshot of difftap rules

Screenshot from 2024-03-22 00-14-47

Incorrectly implemented difftap.2 rule no drc violation even though spacing < 0.42u

Screenshot from 2024-03-22 00-14-36

New commands inserted in sky130A.tech file to update drc

Screenshot from 2024-03-22 00-26-43

Commands to run in tkcon window

# Loading updated tech file
tech load sky130A.tech

# 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

Screenshot of magic window with rule implemented

Screenshot from 2024-03-22 00-29-22

Incorrectly implemented nwell.4 complex rule correction

Screenshot of nwell rules

Screenshot from 2024-03-22 00-51-34

Incorrectly implemented nwell.4 rule no drc violation even though no tap present in nwell

Screenshot from 2024-03-22 00-52-51

New commands inserted in sky130A.tech file to update drc

Screenshot from 2024-03-22 01-03-42 Screenshot from 2024-03-22 01-04-04

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

Screenshot of magic window with rule implemented

Screenshot from 2024-03-22 01-10-25

Section 4 - Pre-layout timing analysis and importance of good clock tree (26/03/2024 - 28/03/2024)

Theory

Implementation

  • Section 4 tasks:-
  1. Fix up small DRC errors and verify the design is ready to be inserted into our flow.
  2. Save the finalized layout with custom name and open it.
  3. Generate lef from the layout.
  4. Copy the newly generated lef and associated required lib files to 'picorv32a' design 'src' directory.
  5. Edit 'config.tcl' to change lib file and add the new extra lef into the openlane flow.
  6. Run openlane flow synthesis with newly inserted custom inverter cell.
  7. Remove/reduce the newly introduced violations with the introduction of custom inverter cell by modifying design parameters.
  8. Once synthesis has accepted our custom inverter we can now run floorplan and placement and verify the cell is accepted in PnR flow.
  9. Do Post-Synthesis timing analysis with OpenSTA tool.
  10. Make timing ECO fixes to remove all violations.
  11. Replace the old netlist with the new netlist generated after timing ECO fix and implement the floorplan, placement and cts.
  12. Post-CTS OpenROAD timing analysis.
  13. Explore post-CTS OpenROAD timing analysis by removing 'sky130_fd_sc_hd__clkbuf_1' cell from clock buffer list variable 'CTS_CLK_BUFFER_LIST'.
  • Section 4 - Tasks 1 to 4 files, reports and logs can be found in the following folder:

Section 4 - Tasks 1 to 4 (vsdstdcelldesign)

  • Section 4 - Task 4 files, reports and logs can be found in the following folder:

Section 4 - Task 4 (src)

  • Section 4 - Task 5 files, reports and logs can be found in the following folder:

Section 4 - Task 5 (picorv32a)

  • Section 4 - Tasks 6 to 8 & 11 to 13 logs, reports and results can be found in following run folder:

Section 4 - Tasks 6 to 8 & 11 to 13 Run (24-03_10-03)

  • Section 4 - Tasks 9 to 11 logs, reports and results can be found in following run folder:

Section 4 - Tasks 9 to 11 Run (25-03_18-52)

1. Fix up small DRC errors and verify the design is ready to be inserted into our flow.

Conditions to be verified before moving forward with custom designed cell layout:

  • Condition 1: The input and output ports of the standard cell should lie on the intersection of the vertical and horizontal tracks.
  • Condition 2: Width of the standard cell should be odd multiples of the horizontal track pitch.
  • Condition 3: Height of the standard cell should be even multiples of the vertical track pitch.

Commands to open the custom inverter layout

# 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 of tracks.info of sky130_fd_sc_hd

Screenshot from 2024-03-24 13-38-09

Commands for tkcon window to set grid as tracks of locali layer

# Get syntax for grid command
help grid

# Set grid values accordingly
grid 0.46um 0.34um 0.23um 0.17um

Screenshot of commands run

Screenshot from 2024-03-24 13-49-55

Condition 1 verified

Screenshot from 2024-03-24 13-51-55

Condition 2 verified

$$Horizontal\ track\ pitch = 0.46\ um$$

Screenshot from 2024-03-24 13-55-07

$$Width\ of\ standard\ cell = 1.38\ um = 0.46 * 3$$

Condition 3 verified

$$Vertical\ track\ pitch = 0.34\ um$$

Screenshot from 2024-03-24 13-58-32

$$Height\ of\ standard\ cell = 2.72\ um = 0.34 * 8$$

2. Save the finalized layout with custom name and open it.

Command for tkcon window to save the layout with custom name

# Command to save as
save sky130_vsdinv.mag

Command to open the newly saved layout

# Command to open custom inverter layout in magic
magic -T sky130A.tech sky130_vsdinv.mag &

Screenshot of newly saved layout

Screenshot from 2024-03-24 14-33-20

3. Generate lef from the layout.

Command for tkcon window to write lef

# lef command
lef write

Screenshot of command run

Screenshot from 2024-03-24 14-35-55

Screenshot of newly created lef file

Screenshot from 2024-03-24 14-37-19

4. Copy the newly generated lef and associated required lib files to 'picorv32a' design 'src' directory.

Commands to copy necessary 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 of commands run

Screenshot from 2024-03-24 14-55-23

5. Edit 'config.tcl' to change lib file and add the new extra lef into the openlane flow.

Commands to be added to config.tcl to include our custom cell in the openlane flow

set ::env(LIB_SYNTH) "$::env(OPENLANE_ROOT)/designs/picorv32a/src/sky130_fd_sc_hd__typical.lib"
set ::env(LIB_FASTEST) "$::env(OPENLANE_ROOT)/designs/picorv32a/src/sky130_fd_sc_hd__fast.lib"
set ::env(LIB_SLOWEST) "$::env(OPENLANE_ROOT)/designs/picorv32a/src/sky130_fd_sc_hd__slow.lib"
set ::env(LIB_TYPICAL) "$::env(OPENLANE_ROOT)/designs/picorv32a/src/sky130_fd_sc_hd__typical.lib"

set ::env(EXTRA_LEFS) [glob $::env(OPENLANE_ROOT)/designs/$::env(DESIGN_NAME)/src/*.lef]

Edited config.tcl to include the added lef and change library to ones we added in src directory

Screenshot from 2024-03-24 15-29-56

6. Run openlane flow synthesis with newly inserted custom inverter cell.

Commands to invoke the OpenLANE flow include new lef and perform synthesis

# Change directory to openlane flow directory
cd Desktop/work/tools/openlane_working_dir/openlane

# alias docker='docker run -it -v $(pwd):/openLANE_flow -v $PDK_ROOT:$PDK_ROOT -e PDK_ROOT=$PDK_ROOT -u $(id -u $USER):$(id -g $USER) efabless/openlane:v0.21'
# Since we have aliased the long command to 'docker' we can invoke the OpenLANE flow docker sub-system by just running this command
docker
# Now that we have entered the OpenLANE flow contained docker sub-system we can invoke the OpenLANE flow in the Interactive mode using the following command
./flow.tcl -interactive

# Now that OpenLANE flow is open we have to input the required packages for proper functionality of the OpenLANE flow
package require openlane 0.9

# Now the OpenLANE flow is ready to run any design and initially we have to prep the design creating some necessary files and directories for running a specific design which in our case is 'picorv32a'
prep -design picorv32a

# Adiitional commands to include newly added lef to openlane flow
set lefs [glob $::env(DESIGN_DIR)/src/*.lef]
add_lefs -src $lefs

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

Screenshots of commands run

Screenshot from 2024-03-24 15-36-46 Screenshot from 2024-03-24 15-37-32 Screenshot from 2024-03-24 15-37-44 Screenshot from 2024-03-24 15-45-08

7. Remove/reduce the newly introduced violations with the introduction of custom inverter cell by modifying design parameters.

Noting down current design values generated before modifying parameters to improve timing

Screenshot from 2024-03-24 16-00-18 Screenshot from 2024-03-24 16-13-01

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 24-03_10-03 -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

Screenshot of merged.lef in tmp directory with our custom inverter as macro

Screenshot from 2024-03-24 23-46-25

Screenshots of commands run

Screenshot from 2024-03-24 17-09-04 Screenshot from 2024-03-24 17-09-19 Screenshot from 2024-03-24 17-10-46

Comparing to previously noted run values area has increased and worst negative slack has become 0

Screenshot from 2024-03-24 17-11-08 Screenshot from 2024-03-24 17-11-19

8. Once synthesis has accepted our custom inverter we can now run floorplan and placement and verify the cell is accepted in PnR flow.

Now that our custom inverter is properly accepted in synthesis we can now run floorplan using following command

# Now we can run floorplan
run_floorplan

Screenshots of command run

Screenshot from 2024-03-24 17-12-09 Screenshot from 2024-03-24 17-37-50

Since we are facing unexpected un-explainable error while using run_floorplan command, we can instead use the following set of commands available based on information from Desktop/work/tools/openlane_working_dir/openlane/scripts/tcl_commands/floorplan.tcl and also based on Floorplan Commands section in Desktop/work/tools/openlane_working_dir/openlane/docs/source/OpenLANE_commands.md

# Follwing commands are alltogather sourced in "run_floorplan" command
init_floorplan
place_io
tap_decap_or

Screenshots of commands run

Screenshot from 2024-03-24 23-38-07 Screenshot from 2024-03-24 23-38-54 Screenshot from 2024-03-24 23-39-56

Now that floorplan is done we can do placement using following command

# Now we are ready to run placement
run_placement

Screenshots of command run

Screenshot from 2024-03-24 23-49-29 Screenshot from 2024-03-24 23-51-08

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/24-03_10-03/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 placement def in magic

Screenshot from 2024-03-25 00-16-54

Screenshot of custom inverter inserted in placement def with proper abutment

Screenshot from 2024-03-25 00-00-10

Command for tkcon window to view internal layers of cells

# Command to view internal connectivity layers
expand

Abutment of power pins with other cell from library clearly visible

Screenshot from 2024-03-25 00-01-46 Screenshot from 2024-03-25 00-05-35

9. Do Post-Synthesis timing analysis with OpenSTA tool.

Since we are having 0 wns after improved timing run we are going to do timing analysis on initial run of synthesis which has lots of violations and no parameters were added to improve timing

Commands to invoke the OpenLANE flow include new lef and perform synthesis

# Change directory to openlane flow directory
cd Desktop/work/tools/openlane_working_dir/openlane

# alias docker='docker run -it -v $(pwd):/openLANE_flow -v $PDK_ROOT:$PDK_ROOT -e PDK_ROOT=$PDK_ROOT -u $(id -u $USER):$(id -g $USER) efabless/openlane:v0.21'
# Since we have aliased the long command to 'docker' we can invoke the OpenLANE flow docker sub-system by just running this command
docker
# Now that we have entered the OpenLANE flow contained docker sub-system we can invoke the OpenLANE flow in the Interactive mode using the following command
./flow.tcl -interactive

# Now that OpenLANE flow is open we have to input the required packages for proper functionality of the OpenLANE flow
package require openlane 0.9

# Now the OpenLANE flow is ready to run any design and initially we have to prep the design creating some necessary files and directories for running a specific design which in our case is 'picorv32a'
prep -design picorv32a

# Adiitional commands to include newly added lef to openlane flow
set lefs [glob $::env(DESIGN_DIR)/src/*.lef]
add_lefs -src $lefs

# Command to set new value for SYNTH_SIZING
set ::env(SYNTH_SIZING) 1

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

Commands run final screenshot

Screenshot from 2024-03-26 05-52-18

Newly created pre_sta.conf for STA analysis in openlane directory

Screenshot from 2024-03-26 05-53-06

Newly created my_base.sdc for STA analysis in openlane/designs/picorv32a/src directory based on the file openlane/scripts/base.sdc

Screenshot from 2024-03-26 05-55-17 Screenshot from 2024-03-26 05-55-38

Commands to run STA in another terminal

# Change directory to openlane
cd Desktop/work/tools/openlane_working_dir/openlane

# Command to invoke OpenSTA tool with script
sta pre_sta.conf

Screenshots of commands run

Screenshot from 2024-03-26 06-04-28 Screenshot from 2024-03-26 06-05-07 Screenshot from 2024-03-26 06-05-53 Screenshot from 2024-03-26 06-08-51

Since more fanout is causing more delay we can add parameter to reduce fanout and do synthesis again

Commands to include new lef and perform synthesis

# Now the OpenLANE flow is ready to run any design and initially we have to prep the design creating some necessary files and directories for running a specific design which in our case is 'picorv32a'
prep -design picorv32a -tag 25-03_18-52 -overwrite

# Adiitional commands to include newly added lef to openlane flow
set lefs [glob $::env(DESIGN_DIR)/src/*.lef]
add_lefs -src $lefs

# Command to set new value for SYNTH_SIZING
set ::env(SYNTH_SIZING) 1

# Command to set new value for SYNTH_MAX_FANOUT
set ::env(SYNTH_MAX_FANOUT) 4

# 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

Commands run final screenshot

Screenshot from 2024-03-26 06-20-29

Commands to run STA in another terminal

# Change directory to openlane
cd Desktop/work/tools/openlane_working_dir/openlane

# Command to invoke OpenSTA tool with script
sta pre_sta.conf

Screenshots of commands run

Screenshot from 2024-03-26 06-22-31 Screenshot from 2024-03-26 06-22-41 Screenshot from 2024-03-26 06-22-50 Screenshot from 2024-03-26 06-23-01

10. Make timing ECO fixes to remove all violations.

OR gate of drive strength 2 is driving 4 fanouts

Screenshot from 2024-03-26 06-55-46

Commands to perform analysis and optimize timing by replacing with OR gate of drive strength 4

# Reports all the connections to a net
report_net -connections _11672_

# Checking command syntax
help replace_cell

# Replacing cell
replace_cell _14510_ sky130_fd_sc_hd__or3_4

# Generating custom timing report
report_checks -fields {net cap slew input_pins} -digits 4

Result - slack reduced

Screenshot from 2024-03-26 07-02-44 Screenshot from 2024-03-26 07-04-08 Screenshot from 2024-03-26 09-42-15 Screenshot from 2024-03-26 07-07-50

OR gate of drive strength 2 is driving 4 fanouts

Screenshot from 2024-03-26 09-46-23

Commands to perform analysis and optimize timing by replacing with OR gate of drive strength 4

# Reports all the connections to a net
report_net -connections _11675_

# Replacing cell
replace_cell _14514_ sky130_fd_sc_hd__or3_4

# Generating custom timing report
report_checks -fields {net cap slew input_pins} -digits 4

Result - slack reduced

Screenshot from 2024-03-26 09-49-29 Screenshot from 2024-03-26 09-50-13 Screenshot from 2024-03-26 09-50-33

OR gate of drive strength 2 driving OA gate has more delay

Screenshot from 2024-03-26 10-22-10

Commands to perform analysis and optimize timing by replacing with OR gate of drive strength 4

# Reports all the connections to a net
report_net -connections _11643_

# Replacing cell
replace_cell _14481_ sky130_fd_sc_hd__or4_4

# Generating custom timing report
report_checks -fields {net cap slew input_pins} -digits 4

Result - slack reduced

Screenshot from 2024-03-26 10-29-31 Screenshot from 2024-03-26 10-29-55

OR gate of drive strength 2 driving OA gate has more delay

Screenshot from 2024-03-26 10-32-27

Commands to perform analysis and optimize timing by replacing with OR gate of drive strength 4

# Reports all the connections to a net
report_net -connections _11668_

# Replacing cell
replace_cell _14506_ sky130_fd_sc_hd__or4_4

# Generating custom timing report
report_checks -fields {net cap slew input_pins} -digits 4

Result - slack reduced

Screenshot from 2024-03-26 10-36-59 Screenshot from 2024-03-26 10-37-14

Commands to verify instance _14506_ is replaced with sky130_fd_sc_hd__or4_4

# Generating custom timing report
report_checks -from _29043_ -to _30440_ -through _14506_

Screenshot of replaced instance

Screenshot from 2024-03-26 10-43-04

We started ECO fixes at wns -23.9000 and now we stand at wns -22.6173 we reduced around 1.2827 ns of violation

11. Replace the old netlist with the new netlist generated after timing ECO fix and implement the floorplan, placement and cts.

Now to insert this updated netlist to PnR flow and we can use write_verilog and overwrite the synthesis netlist but before that we are going to make a copy of the old old netlist

Commands to make copy of netlist

# Change from home directory to synthesis results directory
cd Desktop/work/tools/openlane_working_dir/openlane/designs/picorv32a/runs/25-03_18-52/results/synthesis/

# List contents of the directory
ls

# Copy and rename the netlist
cp picorv32a.synthesis.v picorv32a.synthesis_old.v

# List contents of the directory
ls

Screenshot of commands run

Screenshot from 2024-03-26 10-54-15

Commands to write verilog

# Check syntax
help write_verilog

# Overwriting current synthesis netlist
write_verilog /home/vsduser/Desktop/work/tools/openlane_working_dir/openlane/designs/picorv32a/runs/25-03_18-52/results/synthesis/picorv32a.synthesis.v

# Exit from OpenSTA since timing analysis is done
exit

Screenshot of commands run

Screenshot from 2024-03-26 11-02-19

Verified that the netlist is overwritten by checking that instance _14506_ is replaced with sky130_fd_sc_hd__or4_4

Screenshot from 2024-03-26 11-01-25

Since we confirmed that netlist is replaced and will be loaded in PnR but since we want to follow up on the earlier 0 violation design we are continuing with the clean design to further stages

Commands load the design and run necessary stages

# Now once again we have to prep design so as to update variables
prep -design picorv32a -tag 24-03_10-03 -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 set new value for SYNTH_STRATEGY
set ::env(SYNTH_STRATEGY) "DELAY 3"

# Command to set new value for SYNTH_SIZING
set ::env(SYNTH_SIZING) 1

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

# Follwing commands are alltogather sourced in "run_floorplan" command
init_floorplan
place_io
tap_decap_or

# Now we are ready to run placement
run_placement

# Incase getting error
unset ::env(LIB_CTS)

# With placement done we are now ready to run CTS
run_cts

Screenshots of commands run

Screenshot from 2024-03-26 11-33-14 Screenshot from 2024-03-26 11-33-22 Screenshot from 2024-03-26 11-35-40 Screenshot from 2024-03-26 11-36-16 Screenshot from 2024-03-26 11-37-36 Screenshot from 2024-03-26 11-38-26 Screenshot from 2024-03-26 11-39-53 Screenshot from 2024-03-26 12-00-48

12. Post-CTS OpenROAD timing analysis.

Commands to be run in OpenLANE flow to do OpenROAD timing analysis with integrated OpenSTA in OpenROAD

# Command to run OpenROAD tool
openroad

# Reading lef file
read_lef /openLANE_flow/designs/picorv32a/runs/24-03_10-03/tmp/merged.lef

# Reading def file
read_def /openLANE_flow/designs/picorv32a/runs/24-03_10-03/results/cts/picorv32a.cts.def

# Creating an OpenROAD database to work with
write_db pico_cts.db

# Loading the created database in OpenROAD
read_db pico_cts.db

# Read netlist post CTS
read_verilog /openLANE_flow/designs/picorv32a/runs/24-03_10-03/results/synthesis/picorv32a.synthesis_cts.v

# Read library for design
read_liberty $::env(LIB_SYNTH_COMPLETE)

# Link design and library
link_design picorv32a

# Read in the custom sdc we created
read_sdc /openLANE_flow/designs/picorv32a/src/my_base.sdc

# Setting all cloks as propagated clocks
set_propagated_clock [all_clocks]

# Check syntax of 'report_checks' command
help report_checks

# Generating custom timing report
report_checks -path_delay min_max -fields {slew trans net cap input_pins} -format full_clock_expanded -digits 4

# Exit to OpenLANE flow
exit

Screenshots of commands run and timing report generated

Screenshot from 2024-03-26 12-55-00 Screenshot from 2024-03-26 12-57-40 Screenshot from 2024-03-26 12-58-12 Screenshot from 2024-03-26 13-09-57

13. Explore post-CTS OpenROAD timing analysis by removing 'sky130_fd_sc_hd__clkbuf_1' cell from clock buffer list variable 'CTS_CLK_BUFFER_LIST'.

Commands to be run in OpenLANE flow to do OpenROAD timing analysis after changing CTS_CLK_BUFFER_LIST

# Checking current value of 'CTS_CLK_BUFFER_LIST'
echo $::env(CTS_CLK_BUFFER_LIST)

# Removing 'sky130_fd_sc_hd__clkbuf_1' from the list
set ::env(CTS_CLK_BUFFER_LIST) [lreplace $::env(CTS_CLK_BUFFER_LIST) 0 0]

# Checking current value of 'CTS_CLK_BUFFER_LIST'
echo $::env(CTS_CLK_BUFFER_LIST)

# Checking current value of 'CURRENT_DEF'
echo $::env(CURRENT_DEF)

# Setting def as placement def
set ::env(CURRENT_DEF) /openLANE_flow/designs/picorv32a/runs/24-03_10-03/results/placement/picorv32a.placement.def

# Run CTS again
run_cts

# Checking current value of 'CTS_CLK_BUFFER_LIST'
echo $::env(CTS_CLK_BUFFER_LIST)

# Command to run OpenROAD tool
openroad

# Reading lef file
read_lef /openLANE_flow/designs/picorv32a/runs/24-03_10-03/tmp/merged.lef

# Reading def file
read_def /openLANE_flow/designs/picorv32a/runs/24-03_10-03/results/cts/picorv32a.cts.def

# Creating an OpenROAD database to work with
write_db pico_cts1.db

# Loading the created database in OpenROAD
read_db pico_cts.db

# Read netlist post CTS
read_verilog /openLANE_flow/designs/picorv32a/runs/24-03_10-03/results/synthesis/picorv32a.synthesis_cts.v

# Read library for design
read_liberty $::env(LIB_SYNTH_COMPLETE)

# Link design and library
link_design picorv32a

# Read in the custom sdc we created
read_sdc /openLANE_flow/designs/picorv32a/src/my_base.sdc

# Setting all cloks as propagated clocks
set_propagated_clock [all_clocks]

# Generating custom timing report
report_checks -path_delay min_max -fields {slew trans net cap input_pins} -format full_clock_expanded -digits 4

# Report hold skew
report_clock_skew -hold

# Report setup skew
report_clock_skew -setup

# Exit to OpenLANE flow
exit

# Checking current value of 'CTS_CLK_BUFFER_LIST'
echo $::env(CTS_CLK_BUFFER_LIST)

# Inserting 'sky130_fd_sc_hd__clkbuf_1' to first index of list
set ::env(CTS_CLK_BUFFER_LIST) [linsert $::env(CTS_CLK_BUFFER_LIST) 0 sky130_fd_sc_hd__clkbuf_1]

# Checking current value of 'CTS_CLK_BUFFER_LIST'
echo $::env(CTS_CLK_BUFFER_LIST)

Screenshots of commands run and timing report generated

Screenshot from 2024-03-26 13-42-03 Screenshot from 2024-03-26 13-45-28 Screenshot from 2024-03-26 13-48-01 Screenshot from 2024-03-26 13-48-13 Screenshot from 2024-03-26 13-50-12 Screenshot from 2024-03-26 13-53-30

Section 5 - Final steps for RTL2GDS using tritonRoute and openSTA (29/03/2024 - 30/03/2024)

Theory

Implementation

  • Section 5 tasks:-
  1. Perform generation of Power Distribution Network (PDN) and explore the PDN layout.
  2. Perfrom detailed routing using TritonRoute.
  3. Post-Route parasitic extraction using SPEF extractor.
  4. Post-Route OpenSTA timing analysis with the extracted parasitics of the route.
  • All section 5 logs, reports and results can be found in following run folder:

Section 5 Run - 26-03_08-45

1. Perform generation of Power Distribution Network (PDN) and explore the PDN layout.

Commands to perform all necessary stages up until now

# Change directory to openlane flow directory
cd Desktop/work/tools/openlane_working_dir/openlane

# alias docker='docker run -it -v $(pwd):/openLANE_flow -v $PDK_ROOT:$PDK_ROOT -e PDK_ROOT=$PDK_ROOT -u $(id -u $USER):$(id -g $USER) efabless/openlane:v0.21'
# Since we have aliased the long command to 'docker' we can invoke the OpenLANE flow docker sub-system by just running this command
docker
# Now that we have entered the OpenLANE flow contained docker sub-system we can invoke the OpenLANE flow in the Interactive mode using the following command
./flow.tcl -interactive

# Now that OpenLANE flow is open we have to input the required packages for proper functionality of the OpenLANE flow
package require openlane 0.9

# Now the OpenLANE flow is ready to run any design and initially we have to prep the design creating some necessary files and directories for running a specific design which in our case is 'picorv32a'
prep -design picorv32a

# 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 set new value for SYNTH_STRATEGY
set ::env(SYNTH_STRATEGY) "DELAY 3"

# Command to set new value for SYNTH_SIZING
set ::env(SYNTH_SIZING) 1

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

# Following commands are alltogather sourced in "run_floorplan" command
init_floorplan
place_io
tap_decap_or

# Now we are ready to run placement
run_placement

# Incase getting error
unset ::env(LIB_CTS)

# With placement done we are now ready to run CTS
run_cts

# Now that CTS is done we can do power distribution network
gen_pdn 

Screenshots of power distribution network run

Screenshot from 2024-03-26 14-22-34 Screenshot from 2024-03-26 14-22-46

Commands to load PDN def in magic in another terminal

# Change directory to path containing generated PDN def
cd Desktop/work/tools/openlane_working_dir/openlane/designs/picorv32a/runs/26-03_08-45/tmp/floorplan/

# Command to load the PDN 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 14-pdn.def &

Screenshots of PDN def

Screenshot from 2024-03-26 14-30-52 Screenshot from 2024-03-26 14-32-24 Screenshot from 2024-03-26 14-34-03

2. Perfrom detailed routing using TritonRoute and explore the routed layout.

Command to perform routing

# Check value of 'CURRENT_DEF'
echo $::env(CURRENT_DEF)

# Check value of 'ROUTING_STRATEGY'
echo $::env(ROUTING_STRATEGY)

# Command for detailed route using TritonRoute
run_routing

Screenshots of routing run

Screenshot from 2024-03-26 14-48-29 Screenshot from 2024-03-26 15-38-39 Screenshot from 2024-03-26 15-29-38

Commands to load routed def in magic in another terminal

# Change directory to path containing routed def
cd Desktop/work/tools/openlane_working_dir/openlane/designs/picorv32a/runs/26-03_08-45/results/routing/

# Command to load the routed 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.def &

Screenshots of routed def

Screenshot from 2024-03-26 15-33-12 Screenshot from 2024-03-26 15-30-36 Screenshot from 2024-03-26 15-31-29 Screenshot from 2024-03-26 15-32-20

Screenshot of fast route guide present in openlane/designs/picorv32a/runs/26-03_08-45/tmp/routing directory

Screenshot from 2024-03-26 15-41-18

3. Post-Route parasitic extraction using SPEF extractor.

Commands for SPEF extraction using external tool

# Change directory
cd Desktop/work/tools/SPEF_EXTRACTOR

# Command extract spef
python3 main.py /home/vsduser/Desktop/work/tools/openlane_working_dir/openlane/designs/picorv32a/runs/26-03_08-45/tmp/merged.lef /home/vsduser/Desktop/work/tools/openlane_working_dir/openlane/designs/picorv32a/runs/26-03_08-45/results/routing/picorv32a.def

4. Post-Route OpenSTA timing analysis with the extracted parasitics of the route.

Commands to be run in OpenLANE flow to do OpenROAD timing analysis with integrated OpenSTA in OpenROAD

# Command to run OpenROAD tool
openroad

# Reading lef file
read_lef /openLANE_flow/designs/picorv32a/runs/26-03_08-45/tmp/merged.lef

# Reading def file
read_def /openLANE_flow/designs/picorv32a/runs/26-03_08-45/results/routing/picorv32a.def

# Creating an OpenROAD database to work with
write_db pico_route.db

# Loading the created database in OpenROAD
read_db pico_route.db

# Read netlist post CTS
read_verilog /openLANE_flow/designs/picorv32a/runs/26-03_08-45/results/synthesis/picorv32a.synthesis_preroute.v

# Read library for design
read_liberty $::env(LIB_SYNTH_COMPLETE)

# Link design and library
link_design picorv32a

# Read in the custom sdc we created
read_sdc /openLANE_flow/designs/picorv32a/src/my_base.sdc

# Setting all cloks as propagated clocks
set_propagated_clock [all_clocks]

# Read SPEF
read_spef /openLANE_flow/designs/picorv32a/runs/26-03_08-45/results/routing/picorv32a.spef

# Generating custom timing report
report_checks -path_delay min_max -fields {slew trans net cap input_pins} -format full_clock_expanded -digits 4

# Exit to OpenLANE flow
exit

Screenshots of commands run and timing report generated

Screenshot from 2024-03-26 23-16-16 Screenshot from 2024-03-26 23-17-09 Screenshot from 2024-03-26 23-17-32 Screenshot from 2024-03-26 23-17-56

About

2 Week Advanced Physical Design using OpenLANE/Sky130 workshop with complete RTL2GDSII flow organised by VSD as part of Level-3 of Chip Design for High School Program in collaboration with Intel India

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published