Skip to content

Files

Latest commit

fd1a979 · Sep 29, 2024

History

History
1651 lines (1184 loc) · 79 KB

README.md

File metadata and controls

1651 lines (1184 loc) · 79 KB

Digital VLSI SoC Design and Planning

Static Badge Static Badge Static Badge

image image

The VSD Squadron board's chip was designed using the flow discussed in this workshop.This chip is a 48 pin QFN package.Inverter is used as the macro in this workshop.

https://vsdsquadron.vlsisystemdesign.com/digital-vlsi-soc-design-and-planning/

Contents

image

Section 1 - Inception of open-source EDA, OpenLANE and Sky130 PDK (11/04/2024 - 12/03/2024)

How to talk to computers?

Introduction to QFN-48 Package, chip, pads, core, die and IPs

image

This a typical Board that contains an SOC with peripherals.Our focus is on the chip/processor.

image image

This is an example of QFN-48 package.The chip is connected with the package using wirebonds.

  • Package : A package is the external casing that surrounds and protects the integrated circuit (IC) die. This casing provides mechanical support, electrical connections, and protection against environmental factors such as moisture, dust, and physical damage. The package also facilitates the connection of the chip to external components or circuitry, typically through pins or solder balls.Packages come in various forms and sizes, ranging from small, surface-mount packages like quad flat no-leads (QFN) and ball grid arrays (BGAs) to larger, through-hole packages like dual in-line packages (DIPs) and small outline integrated circuits (SOICs). The choice of package depends on factors such as the intended application, space constraints, thermal considerations, and manufacturing requirements.

  • QFN-48 : A QFN-48 package is a type of integrated circuit packaging commonly used in modern semiconductor devices. This package features a square shape measuring 7mm by 7mm, with leads on all four sides, providing a compact and efficient solution for mounting semiconductor chips onto printed circuit boards (PCBs). The absence of traditional wire leads reduces the overall size of the package and enhances thermal performance, making it suitable for applications where space and heat dissipation are critical concerns, such as mobile devices, consumer electronics, and automotive systems.

  • Wirebonds : Wire bonding is a method used in semiconductor manufacturing to create electrical connections between the integrated circuit (IC) die and the external leads of the chip package. Thin wires made of gold or aluminum are attached to bond pads on the die and the package substrate using specialized equipment.

Components of a chip:

image

  • Pads: These are areas on the surface of the chip used for making electrical connections. Pads typically connect the chip to external components or the package.

  • Core: The core of a chip refers to its central processing unit (CPU) or the primary computational component where most of the processing tasks occur.

  • Die: The die is the small, square or rectangular piece of semiconductor material that contains the integrated circuitry of the chip. It's typically made from silicon and contains the transistors, resistors, and other components that make up the chip's functionality.

image

This is an example of a typical RISC-V chip.

  • Foundry : A foundry is a specialized facility that manufactures integrated circuits for semiconductor design companies. It provides the equipment and expertise for high-volume production of chips, allowing companies to prototype and produce electronics without their own manufacturing facilities.

  • Intellectual Property : It refers to inventions, designs, and processes, that are legally protected under patents, copyrights, or trade secrets.

  • Foundry IPs:In chip design, IP can include pre-designed circuit blocks, algorithms, or software modules that are licensed or owned by companies for integration into their own designs, saving time and resources.Foundry IPs can include standard cell libraries, memory compilers, I/O libraries, analog and mixed-signal IPs, and various other building blocks required for chip design.

  • Macros : They are pre-designed and pre-verified blocks of digital circuitry that perform specific functions. These macros are often complex and can include components such as arithmetic units, memory controllers, or communication interfaces. Designers use macros to expedite the development process by integrating proven, reusable blocks into their designs, rather than designing them from scratch. This approach saves time and effort and helps ensure reliability and consistency in chip design.

Introduction to RISC-V

image

If a user wants to run a certain program in a chip (here a swap c code) , the abstract flow goes like compiling the program,what happens behind is converting the code(Specs) to a assembly langugae program/instructions based on its architecture(here RISC-V) which is then converted to a machine language program(binary).Concurrently,a RTL corresponding to the specs(here picorv32) is generated which through RTL2GDSII flow can be physically realized on a chip.

  • RISC-V : RISC-V is an open-source instruction set architecture (ISA) that defines the instructions and functionalities of a computer's central processing unit (CPU).

  • PicoRV32 CPU core : It is a lightweight and compact implementation of the RISC-V ISA.It is known for its small size, low power consumption, and ease of integration into FPGA (Field-Programmable Gate Array) designs. Despite its simplicity, PicoRV32 still provides essential features such as pipelining, branch prediction, and support for both 32-bit and 64-bit RISC-V instructions.

  • Qflow layout : Qflow is an open-source digital synthesis and layout tool flow used in the design of integrated circuits (ICs). It provides a suite of tools for performing various steps in the chip design process, including synthesis, place and route, and layout generation.

From Software Applications to Hardware

image image image image

Similar to the flow discussed in the previous section,we see the flow starting from a software application.

  • Instruction Set Architecture : ISA defines the set of instructions and how they are encoded for a specific CPU architecture. It dictates how software communicates with the hardware, specifying operations like arithmetic, data movement, and control flow. ISAs can vary widely, influencing factors such as performance, power efficiency, and software compatibility.

  • RTL : It is a hardware description language abstraction level used in digital circuit design. It describes the behavior of a digital system by detailing the flow of data between registers and logic elements. RTL designs are closer to the hardware implementation, making them suitable for synthesis and subsequent physical design stages.

  • synthesized netlist : It is a digital blueprint of a circuit created after synthesis. It lists the electronic components and connections, representing the logical structure of the circuit without detailing its physical layout. This netlist serves as an intermediate step for further optimization and analysis in the chip design process before actual implementation.

  • Physical Design : Physical design involves the transformation of a logical design (such as RTL) into a physical layout that can be manufactured as a semiconductor chip.It encompasses tasks like floorplanning, placement, routing, and verification

Soc design and OpenLANE

Introduction to all components of open-source digital asic design

Asic Enablers:

image

  • EDA tools : Electronic Design Automation tools are software applications used in electronic system and integrated circuit design. They automate tasks like schematic capture, simulation, synthesis, place and route, timing analysis, physical verification, and power analysis. These tools are crucial for creating complex electronic systems efficiently and accurately, reducing development time and cost.

  • PDK : Process Design Kit is a collection of files and documents provided by semiconductor foundries to support the design of ICs using their manufacturing processes. PDKs contain information about the foundry's fabrication processes, including design rules, device models, parameterized cells (PCells), technology files, and simulation models. Designers use PDKs with EDA tools to create custom IC layouts and verify their designs before manufacturing.

  • Open Source PDK : The Open Source PDK from Google and SkyWater Technology Foundry offers a freely available Process Design Kit (PDK) based on the 130nm technology node. Github

Is 130nm old and not in use?

image

6%-4.5B revenue.Despite its age, 130nm technology still finds use in various specialized applications where cost, power efficiency, and reliability are more critical than cutting-edge performance or density.Intel

Is 130nm fast?

image

  • It is capable of supporting clock speeds sufficient for various applications, especially when coupled with optimized designs and modern design methodologies.

  • Intel P4EE(Q4'o4) : The Intel Pentium 4 Extreme Edition (P4EE) processor, released in Q4 of 2004, operated at a clock speed of 3.46 GHz. This high clock speed was achieved through aggressive transistor scaling and optimization techniques available at the time

  • sky130_OSU (single cycle RV32i CPU) : Designed using the open-source PDK for the 130nm process node, it can achieve a clock speed of more than 1 GHz.

Simplified RTL2GDS flow

image image

Several steps-Methodology-RT2GDS/Automated Pnr/Physical Implementation

image

  • Synthesis : This stage involves translating a high-level hardware description into a netlist of logic gates and flip-flops. It's the process of converting RTL design into a gate-level representation.

  • Standard cells : Standard cells are basic components in digital integrated circuit design, comprising pre-designed logic gates and flip-flops.Provided by semiconductor foundries as part of a PDK, standard cells offer benefits such as faster design turnaround time and improved manufacturability.

image image image

  • Floor/Power Planning : In this stage, designers decide how to partition the chip's layout space and allocate resources such as power supplies and signal routing channels. It involves making decisions about where to place major components and how to manage power distribution.

  • Chip Floorplan involves the initial layout planning of the various components and functional blocks on a semiconductor chip. It determines the placement of major elements such as the CPU core, memory blocks, I/O interfaces, and other components to optimize factors like signal routing, power distribution, and thermal considerations.

  • Macro Floorplan is a more detailed level of floorplanning focusing on specific macro-level functional blocks within the chip. These macros could include complex components such as memory arrays, processors, or specialized IP blocks. Macro floorplanning involves determining the physical placement and interconnection of these blocks to meet performance, area, and power targets while adhering to design constraints and specifications.

image image

  • Placement : Placement involves determining the physical location of each logic gate, flip-flop, and other components on the chip's layout. It aims to minimize wire length and optimize performance metrics such as timing and power consumption.

  • Global placement : Also known as coarse placement or initial placement, is the first stage of the placement process. It involves roughly positioning the cells or modules of the design on the chip's layout while considering factors like timing, power, and area constraints. Global placement aims to achieve a rough approximation of the final placement layout before refining the positions in the detailed placement stage.

  • Detailed placement : Also known as fine placement, follows global placement and involves refining the positions of individual cells or modules on the chip's layout. Detailed placement focuses on optimizing factors such as wirelength, timing, and congestion while ensuring that design constraints are met. This stage often employs advanced algorithms and techniques to achieve high-quality placement results, which directly impact the performance and manufacturability of the chip.

image

  • Clock Tree Synthesis : This stage involves designing the clock distribution network on the chip to ensure that clock signals reach all parts of the design with minimal skew and jitter. It includes synthesizing buffers and routing clock signals to different parts of the chip.

  • Clock Skew : It refers to variations in the arrival times of clock signals at different parts of a digital circuit. It can cause timing issues and impact the performance of the circuit. Minimizing clock skew is crucial for ensuring reliable operation.

image image

  • Routing : Routing is the process of determining the paths for connecting the various components on the chip layout while obeying design rules and constraints. It involves routing wires to connect the outputs of one component to the inputs of another.

  • Global routing : Also known as rough routing, is the initial stage of routing where the approximate paths for interconnecting the various components of the design are determined. It involves finding high-level routes between blocks or modules while considering factors such as wirelength, congestion, and timing constraints. Global routing creates a rough layout of the routing tracks and establishes the overall connectivity of the design.

  • Detailed routing : Also known as fine routing, follows global routing and involves refining the routing paths to meet design specifications and constraints. In this stage, individual wires or nets are routed within the routing tracks established during global routing.

image

  • Sign-off : Sign-off refers to the final stage of the design process, where the chip design is verified against various criteria such as timing, power, and signal integrity. It involves running extensive simulations and tests to ensure that the design meets all specifications and requirements before sending it for fabrication.

  • Design Rule Checking : DRC is a process used in semiconductor design to ensure that the layout of an integrated circuit adheres to the manufacturing rules and constraints specified by the foundry or design team. It involves automatically checking the layout against a set of design rules to identify violations such as minimum feature sizes, spacing requirements, overlap violations, and other geometric violations. DRC is essential for detecting potential manufacturing defects and ensuring the manufacturability and reliability of the chip.

  • Layout vs. Schematic : LVS is a verification process used to ensure the accuracy and consistency between the layout of an integrated circuit and its corresponding schematic or netlist representation. LVS compares the geometric layout of the transistors, wires, and other components against the connectivity and electrical properties specified in the schematic. It checks for discrepancies such as missing connections, extra connections, and electrical mismatches. LVS is critical for identifying design errors and ensuring the functional correctness of the chip.

  • Static Timing Analysis : STA is a method used to analyze and verify the timing behavior of an integrated circuit design. It evaluates the timing characteristics of the digital circuit to ensure that signals propagate correctly and meet timing requirements such as setup and hold times. STA considers factors such as gate delays, wire delays, clock skew, and signal arrival times to predict the circuit's performance under different operating conditions. STA helps identify timing violations and ensures that the design operates reliably at the desired clock frequency.

Introduction to OpenLANE and Strive chipsets

image image image

  • OpenLane is an open-source digital ASIC (Application-Specific Integrated Circuit) design flow framework developed by efabless and Google. It provides a complete RTL-to-GDSII design flow for designing and fabricating integrated circuits using standard cell libraries and open-source tools.It can be used to harden Macros and chips.Two mode of operation-Autonomus,Interactive.It has large number of design examples(43 designs with their best configurations).

  • striVe is a family of open everything SoCs: Open PDK, Open EDA and Open RTL.

  • clean GDSII means No LVS/DRC/timing violations.

Introduction to OpenLANE detailed ASIC design flow

image

  • Yosys : Yosys is an open-source synthesis tool that transforms RTL (Register Transfer Level) code into a gate-level netlist. It performs logic optimization and technology mapping, converting the design into a format suitable for physical implementation.

  • abc : ABC is used for logic optimization and technology mapping during synthesis. It converts RTL descriptions into optimized gate-level netlists, enhancing design efficiency and effectiveness.

Static Timing Analysis:

image

  • OpenSTA : OpenSTA is a static timing analysis tool used for analyzing and verifying timing constraints. It evaluates timing paths in the design to ensure that signals meet timing requirements and identifies timing violations.

image

  • Synthesis Exploration: Refers to the process of exploring various synthesis options and parameters to optimize the RTL-to-gate-level conversion. Designers can experiment with different synthesis configurations to achieve better results in terms of area, power, and timing.

image

  • Design Exploration: Involves exploring different design configurations and constraints to achieve desired performance metrics. Designers can iterate through multiple design options, adjusting parameters such as clock frequency, power constraints, and design goals to find the best design solution.

image

  • Regression Testing: Is the practice of running automated tests on a set of design revisions or configurations to ensure that changes do not introduce regressions or unintended side effects. In OpenLANE, regression testing helps validate design changes and optimizations while maintaining design integrity and quality.

DFT:

image

  • Fault : Fault is a tool for performing fault simulation and testing to verify the robustness and reliability of the design. It identifies potential faults and assesses the impact on circuit functionality.

  • Design for Test : It encompasses techniques and methodologies in chip design to enhance testing efficiency and effectiveness. It includes methods like scan chains, built-in self-test (BIST), boundary scan (JTAG), memory BIST, and logic BIST, ensuring thorough testing and fault detection in integrated circuits. DFT aims to improve testability, reduce test costs, and expedite time-to-market.

Physical Implementation:

image

  • OpenROAD : OpenROAD is a set of open-source tools for RTL-to-GDSII implementation. It includes tools for floorplanning, placement, and routing, enabling physical design optimization while considering factors like area, timing, and power.

  • TritonRoute : TritonRoute is a detailed router included in OpenLANE for performing global and detailed routing. It optimizes the routing paths while adhering to design rules and constraints, ensuring signal integrity and manufacturability.

Dealing with Antenna Rules Violations:

image image image

  • Antenna rule violations : It can occur during the manufacturing process of integrated circuits when certain regions of the chip become susceptible to charge accumulation or depletion. These violations can lead to reliability issues, such as gate oxide breakdown or circuit malfunction, and need to be addressed during the design phase.

  • Bridging : It involves adding metal connections to neutralize the charge buildup or depletion in susceptible regions. By connecting these regions to a power or ground rail, the charge is dissipated, mitigating the risk of reliability issues.

  • Inserting Antenna Diodes:Antenna diodes are specialized diodes inserted into vulnerable regions of the chip to provide a low-resistance path for charge dissipation. These diodes divert any accumulated charge to prevent reliability problems.

  • Fake Antenna Diodes: It refers to a technique used to address antenna rule violations during physical design optimization. Instead of inserting actual diodes, fake diodes are virtually inserted into the design layout to satisfy the antenna rules without altering the circuit's functionality. This approach allows designers to meet manufacturing requirements without introducing unnecessary components into the design.

LEC:

image

  • Logical Equivalence Checking : LEC is a formal verification technique used to compare two designs or design representations to ensure that they are functionally equivalent. It checks whether the behavior specified in the RTL description matches that of the gate-level netlist after synthesis

Physical Verification DRC&LVS :

image

  • Magic : Magic is a layout tool used for viewing, editing, and verifying physical layout designs. It allows designers to inspect the layout at different levels of abstraction and perform manual optimizations if needed.

  • Netgen : Netgen is a tool for performing LVS (Layout vs. Schematic) and DRC (Design Rule Checking) verification. It compares the layout against the schematic and checks for discrepancies and violations to ensure design correctness.

Get familiar to open-source EDA tools

OpenLANE Directory structure in detail

image

cd Desktop/work/tools/openlane_working_dir/
cd pdks
cd sky130A
cd libs.ref
cd ..
cd libs.tech

SKY130 PDK libraries:

There are seven standard cell libraries provided directly by the SkyWater Technology foundry available for use on SKY130 designs, which differ in intended applications and come in three separate cell heights.Libraries in the SKY130 PDK are named using the following scheme:
<Process name> _ <Library Source Abbreviation> _ <Library Type Abbreviation> [_ <Library Name>]	

sky130_fd_sc_hd.lib:

The sky130_fd_sc_hd library is designed for high density. This library enables higher routed gated density, lower dynamic power consumption, and comparable timing and leakage power. As a trade-off it has lower drive strength.
  • Sky130 : It is the name of the process technology.
  • fd : It is abbreviation for who created and is responsible for the library, here the SkyWater Foundry.
  • sc : It is abbreviation for the type of content found in the library, here the Digital Standard Cells.
  • hd : It represents high density.

image

cd sky130_fd_sc_hd
cd lib

image

cd ..
cd lef
cd ..
cd techlef

Design Preparation Step

image

cd Desktop/work/tools/openlane_working_dir/openlane
docker
pwd
ls -ltr
./flow.tcl -interactive
package require openlane 0.9

image

cd Desktop/work/tools/openlane_working_dir/openlane
cd designs
ls -ltr

image

cd picorv32a/
ls-ltr
cd src

image

less config.tcl #exit by pressing q

image

less sky130A_sky130_fd_sc_hd_config.tcl

Review files after design prep and run synthesis

image

ls -ltr 
cd runs
cd 14-04-19-44/
cd tmp

image

less merged.lef

image

cd results
cd synthesis
cd reports

image

ls

image

less config.tcl #go to end by pressing "Ctrl + End" or "Fn + Right Arrow" and exit by pressing q

image

less cmds.log

image

prep -design picorv32a

image

run_synthesis

OpenLANE Project Git Link Description

Openlane Github

Autonomous mode:

./flow.tcl -design designname

Interactive Mode: You may run the flow interactively by using the -interactive option:

./flow.tcl -interactive

A tcl shell will be opened where the openlane package is automatically sourced:

% package require openlane

Then, you should be able to run the following main commands:

  1. Any tcl command.
  2. prep -design <design> -tag <tag> -config <config> -init_design_config -overwrite similar to the command line arguments, design is required and the rest is optional
  3. run_synthesis
  4. run_floorplan
  5. run_placement
  6. run_cts
  7. run_routing
  8. write_powered_verilog followed by set_netlist $::env(routing_logs)/$::env(DESIGN_NAME).powered.v
  9. run_magic
  10. run_magic_spice_export
  11. run_magic_drc
  12. run_lvs
  13. run_antenna_check

The above commands can also be written in a file and passed to flow.tcl:

./flow.tcl -interactive -file <file>

Steps to characterize synthesis results

image

F l o p   R a t i o = N u m b e r   o f   D   F l i p   F l o p s T o t a l   N u m b e r   o f   C e l l s = 1613 14876 = 0.1084 P e r c e n t a g e   o f   D F F s = F l o p   R a t i o 100 = 0.1084 100 = 10.84   %

image

cd results
cd synthesis
cd ..
cd ..
cd reports
cd synthesis

image

less picorv32a.synthesis.v

image

image

less 1-yosys_4.stat.rpt

image

less 2-opensta.rpt

image

less 2-opensta.timing.rpt

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

Chip Floor planning consideration

Utilization factor and aspect ratio

Defining the width and height of oore and die is the first step PD flow

Finding values of H&W:

image

Basic Netlist (launch flop and capture flop with combinational logic)

image

Providing proper dimensions to the logic gates

image

Dimensions of the wire can be neglected for the calculation

image

Clubing them to a single plate

L e n g t h = 2 u n i t s , W i d t h = 2 u n i t s , A r e a = 4 s q . u n i t s

image

Place the cells inside core

U t i l i z a t i o n   F a c t o r = A r e a   o c c u p i e d   b y   n e t l i s t T o t a l   a r e a   o f   c o r e = 4 4 = 1

In case of 100% Utilization,Adding extra cells is not allowed,ideally 50/60% is prefered .

A s p e c t   R a t i o = H e i g h t W i d t h = 4 4 = 1

In case of Aspect Ratio = 1,then its a square shaped core,otherwise rectangle.

image

In a diff dimension,

U t i l i z a t i o n   F a c t o r = 4 8 = 0.5

UF < 1,Some more area is present which can be utilized/Optimisation required.

A s p e c t   R a t i o = 2 4 = 0.5

image

Steps to run floorplan using OpenLANE

cd configuration

image

Before running floorplan command enable certain switches

less README.md

image

less floorplan.tcl

(FP_IO MODE) 1 = 0 means pin positioning is random but it is on equal distance.

priority : system default (floorplanning.tcl) < config.tcl < PDK varient.tcl (sky130A_sky130_fd_sc_hd_congig.tcl)

image

run_floorplan

image image

Review floorplan files and steps to view floorplan

cd runs
ls -ltr
cd logs/floorplan

image

less picorv32a.floorplan.def
G i v e n   1000   U n i t   D i s t a n c e = 1   M i c r o n D i e   w i d t h   i n   u n i t   d i s t a n c e = 660685 0 = 660685 D i e   h e i g h t   i n   u n i t   d i s t a n c e = 671405 0 = 671405 D i s t a n c e   i n   m i c r o n s = V a l u e   i n   U n i t   D i s t a n c e 1000 D i e   w i d t h   i n   m i c r o n s = 660685 1000 = 660.685   M i c r o n s D i e   h e i g h t   i n   m i c r o n s = 671405 1000 = 671.405   M i c r o n s A r e a   o f   d i e   i n   m i c r o n s = 660.685 671.405 = 443587.212425   S q   M i c r o n s

image

Review floorplan layout in 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 &

image

press S+V - fit layout To Zoom, Left click & Right click & Press Z

image

Place cursor on object and Press S,open tkcon app and type what

image

Decap Cells and Tap Cells

image

Standard Cells at the bottom left

image

Library building and Placement

Congestion aware placement using RePlAce

run_placement

image

cd ../placement
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 &

image

standard cells are correctly placed in standard cell rows

image

Design library cell using Magic Layout and ngspice characterization (15/03/2024 - 16/03/2024)

Labs for CMOS inverter ngspice simulations

IO placer revision

Rerun till floorplan

image

less floorplan.txt

image

% set ::env(FP_IO_MODE) 2
% run_floorplan

image

Opening the newly run directory

image

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 &

Pins are not equidistant here

image

Lab steps to git clone vsdstdcelldesign

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

image

Copy the tech file

cd Desktop/work/tools/openlane_working_dir/pdks/sky130A/libs.tech/magic
cp sky130A.tech /home/vsduser/Desktop/work/tools/openlane_working_dir/openlane/vsdstdcelldesign

image image

magic -T sky130A.tech sky130_inv.mag &

image

Custom CMOS inverter image

Inception of layout ̂A CMOS fabrication process

Lab introduction to Sky130 basic layers layout and LEF using inverter

Polycross N-diffusion -PMOS

image

Polycross P-diffusion -NMOS

image

Y output port connected to PMOS & NMOS

image

PMOS source connected to VDD

image

NMOS source connected to VDD

image

Lab steps to create std cell layout and extract spice netlist

extract all

image

ext2spice cthresh 0 rthresh 0
ext2spice

image

image

Sky130 Tech File Labs

Lab steps to create final SPICE deck using Sky130 tech

gvim sky130_inv.spice

M1000 - Pmos : Drain-Y , Gate-A , Source-VPWR M1001 - Nmos : Drain-Y , Gate-A , Source-VGND

image

Change scale value,include pmos nmos libraries,add missing connections-VDD,VSS,define input pulse,specify type of analysis

.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 w=35 l=23 
+ ad=1.44n pd=0.152m as=1.37n ps=0.148m
M1000 Y A VPWR VPWR pshort_model.0 w=37 l=23
+ ad=1.44n pd=0.152m as=1.52n ps=0.156m
VDD VPWR 0 3.3V
VSS VGND 0 0V

Va A VGND PULSE(0V 3.3V 0 0.1ns 0.1ns 2ns 4ns)
C0 A Y 0.05fF
C1 Y VPWR 0.11fF
C2 A VPWR 0.07fF
C3 Y 0 0.24fF
C4 VPWR 0 0.59fF
//.ends
.tran 1n 20n
.control
run
.endc
.end

image image image

Lab steps to characterize inverter using sky130 model files

sudo apt-get install ngspice
ngsspice sky130_inv.spic

image

change in gvim - C3 Y 0 2fF
plot y vs time a

image

Right click to zoom Rise time transition 20%-0.66 to 80%-2.64 - time value = 60ps

image

Fall time transition 80%-2.64 to 20%-0.66 - time value = 40ps image

Cell rise delay 50%-1.65 - time value = 50ps

image

Cell fall delay 50%-1.65 - time value = 30ps

image

Lab introduction to Sky130 pdk's and steps to download labs

wget http://opencircuitdesign.com/open_pdks/archive/drc_tests.tgz
tar xfz drc_tests.tgz
cd drc_tests
ls -al
gvim .magicrcmagic -d 
magic -d XR &

image image image

Lab introduction to Magic and steps to load Sky130 tech-rules

File -> Open -> met3.mag Sky130 Periphery rules: Link

image

Lab exercise to fix poly.9 error in Sky130 tech-file

poly.mag

image

gvim sky130A.tech

change to allpolynonres rule

image image

Lab exercise to implement poly resistor spacing to diff and tap

tech load sky130A.tech
drc check

image

Lab challenge exercise to describe DRC error as geometrical construct

nwell.mag

% cif ostyle drc
% cif see dnwell_shrink
% feed clear
% cif see nwell_missing
% feed clear

image

Lab challenge to find missing or incorrect rules and fix them

Not a simple edge rule

image

 templayer nwell_tapped
 bloat-all nsc nwell

 templayer nwell_untapped nwell
 and-not nwell_tapped

 variants (full)
  cifmaxwidth nwell_untapped 0 bend_illegal \
  "Nwell missing tap (nwell.4)"
 variants *

image image

% tech load sky130A.tech
% drc style drc(full)
% drc check
% drc why

image

Pre-layout timing analysis and importance of good clock tree (17/03/2024 - 18/03/2024)

Timing modeling using delay tables

Lab steps to convert grid info to track info

Desktop/work/tools/openlane_working_dir/pdks/sky130A/libs.tech/openlane/sky130_fd_sc_hd

image

less tracks.info

image

help grid

image image

grid 0.46um 0.34um 0.23um 0.17um

image

Ports lie on the intersection of the vertical and horizontal tracks.Width of the standard cell should be odd multiples of the horizontal track pitch.Height of the standard cell should be even multiples of the vertical track pitch.

image

Lab steps to convert magic layout to std cell LEF

Defining ports

image

save sky130_varun.mag #custom name
lef write

image

less sky130_varun.lef

image image

Copy necessary files to 'picorv32a' design 'src' directory

cp sky130_varun.lef ~/Desktop/work/tools/openlane_working_dir/openlane/designs/picorv32a/src/
ls ~/Desktop/work/tools/openlane_working_dir/openlane/designs/picorv32a/src/
cp libs/sky130_fd_sc_hd__* ~/Desktop/work/tools/openlane_working_dir/openlane/designs/picorv32a/src/
ls ~/Desktop/work/tools/openlane_working_dir/openlane/designs/picorv32a/src/

image

Lab steps to configure synthesis settings to fix slack and include vsdinv

cd Desktop/work/tools/openlane_working_dir/openlane/designs/picorv32a

image

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

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]
package require openlane 0.9
prep -design picorv32a
set lefs [glob $::env(DESIGN_DIR)/src/*.lef]
add_lefs -src $lefs
run_synthesis

image image

Note down values of newly introduced violations with the introduction of custom inverter cell

image image

Stratergy to reduce the violations

image

prep -design picorv32a -tag 22-04_08-29 -overwrite
set lefs [glob $::env(DESIGN_DIR)/src/*.lef]
echo $::env(SYNTH_STRATEGY) # Command to display current value of variable SYNTH_STRATEGY
set ::env(SYNTH_STRATEGY) "DELAY 3" # Command to set new value for SYNTH_STRATEGY
echo $::env(SYNTH_BUFFERING)# Command to display current value of variable SYNTH_BUFFERING to check whether it's enabled
echo $::env(SYNTH_SIZING) # Command to display current value of variable SYNTH_SIZING
set ::env(SYNTH_SIZING) 1 # Command to set new value for SYNTH_SIZING
echo $::env(SYNTH_DRIVING_CELL) # Command to display current value of variable SYNTH_DRIVING_CELL to check whether it's the proper cell or not
run_synthesis

image image

Area has increased,Worst negative slack has become 0 image

run_floorplan

image image

Since we are facing unexpected un-explainable error while using run_floorplan command,run the below instead

init_floorplan
place_io
tap_decap_or
run_placement

image image image image

cd Desktop/work/tools/openlane_working_dir/openlane/designs/picorv32a/runs/22-04_08-29/results/placement/
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 &

image image image

Timing analysis with ideal clocks using openSTA

Lab steps to configure OpenSTA for post-synth timing analysis

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

Created pre_sta.conf for STA analysis

./flow.tcl -interactive
package require openlane 0.9
prep -design picorv32a
set lefs [glob $::env(DESIGN_DIR)/src/*.lef]
add_lefs -src $lefs
set ::env(SYNTH_SIZING) 1
run_synthesis

image image

gvim pre_sta.conf
set_cmd_units -time ns -capacitance pF -current mA -voltage V -resistance kOhm -distance um

read_liberty -max /home/vsduser/Desktop/work/tools/openlane_working_dir/openlane/designs/picorv32a/src/sky130_fd_sc_hd__slow.lib

read_liberty -min /home/vsduser/Desktop/work/tools/openlane_working_dir/openlane/designs/picorv32a/src/sky130_fd_sc_hd__fast.lib

read_verilog /home/vsduser/Desktop/work/tools/openlane_working_dir/openlane/designs/picorv32a/runs/22-04_09-28/results/synthesis/picorv32a.synthesis.v

link_design picorv32a

read_sdc /home/vsduser/Desktop/work/tools/openlane_working_dir/openlane/designs/picorv32a/src/my_base.sdc

report_checks -path_delay min_max -fields {slew trans net cap input_pin}
report_tns
report_wns

Created pre_sta.conf for STA analysis in openlane directory image

set ::env(CLOCK_PORT) clk
set ::env(CLOCK_PERIOD) 24.73
#set ::env(SYNTH_DRIVING_CELL) sky130_vsdinv
set ::env(SYNTH_DRIVING_CELL) sky130_fd_sc_hd__inv_8
set ::env(SYNTH_DRIVING_CELL_PIN) Y
set ::env(SYNTH_CAP_LOAD) 17.653
set ::env(IO_PCT) 0.2
set ::env(SYNTH_MAX_FANOUT) 6

create_clock [get_ports $::env(CLOCK_PORT)]  -name $::env(CLOCK_PORT)  -period $::env(CLOCK_PERIOD)
set input_delay_value [expr $::env(CLOCK_PERIOD) * $::env(IO_PCT)]
set output_delay_value [expr $::env(CLOCK_PERIOD) * $::env(IO_PCT)]
puts "\[INFO\]: Setting output delay to: $output_delay_value"
puts "\[INFO\]: Setting input delay to: $input_delay_value"

set_max_fanout $::env(SYNTH_MAX_FANOUT) [current_design]

set clk_indx [lsearch [all_inputs] [get_port $::env(CLOCK_PORT)]]
#set rst_indx [lsearch [all_inputs] [get_port resetn]]
set all_inputs_wo_clk [lreplace [all_inputs] $clk_indx $clk_indx]
#set all_inputs_wo_clk_rst [lreplace $all_inputs_wo_clk $rst_indx $rst_indx]
set all_inputs_wo_clk_rst $all_inputs_wo_clk

# correct resetn
set_input_delay $input_delay_value  -clock [get_clocks $::env(CLOCK_PORT)] $all_inputs_wo_clk_rst
#set_input_delay 0.0 -clock [get_clocks $::env(CLOCK_PORT)] {resetn}
set_output_delay $output_delay_value  -clock [get_clocks $::env(CLOCK_PORT)] [all_outputs]

# TODO set this as parameter
set_driving_cell -lib_cell $::env(SYNTH_DRIVING_CELL) -pin $::env(SYNTH_DRIVING_CELL_PIN) [all_inputs]
set cap_load [expr $::env(SYNTH_CAP_LOAD) / 1000.0]
puts "\[INFO\]: Setting load to: $cap_load"
set_load  $cap_load [all_outputs]

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

sta pre_sta.conf

image

image

Lab steps to optimize synthesis to reduce setup violations

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

prep -design picorv32a -tag 22-04_08-29 -overwrite
set lefs [glob $::env(DESIGN_DIR)/src/*.lef]
add_lefs -src $lefs
set ::env(SYNTH_SIZING) 1
set ::env(SYNTH_MAX_FANOUT) 4
echo $::env(SYNTH_DRIVING_CELL)
run_synthesis

image image

Make changes in pre_sta.conf

sta pre_sta.conf

image image

OR gate of drive strength 2 is driving 4 fanouts image

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

report_net -connections _11672_
help replace_cell
replace_cell _14510_ sky130_fd_sc_hd__or3_4
report_checks -fields {net cap slew input_pins} -digits 4

We observe slack is reduced

image image

Another OR gate of drive strength 2 is driving 4 fanouts image

report_net -connections _11675_
replace_cell _14514_ sky130_fd_sc_hd__or3_4
report_checks -fields {net cap slew input_pins} -digits 4

We observe slack is reduced again image image

Lab steps to do basic timing ECO

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

report_net -connections _11643_
replace_cell _14481_ sky130_fd_sc_hd__or4_4
report_checks -fields {net cap slew input_pins} -digits 4

We observe slack is reduced again image image

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

report_net -connections _11668_
replace_cell _14506_ sky130_fd_sc_hd__or4_4
report_checks -fields {net cap slew input_pins} -digits 4

We observe slack is reduced again image image

Verify instance 14506 is replaced with sky130_fd_sc_hd__or4_4

report_checks -from _29043_ -to _30440_ -through _14506_

image

Around 1.2827 ns of violation reduced.

Clock tree synthesis TritonCTS and signal integrity

Lab steps to run CTS using Triton

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

cd Desktop/work/tools/openlane_working_dir/openlane/designs/picorv32a/runs/ 22-04_08-29/results/synthesis/
ls
cp picorv32a.synthesis.v picorv32a.synthesis_old.v
ls

image

help write_verilog
write_verilog /home/vsduser/Desktop/work/tools/openlane_working_dir/openlane/designs/picorv32a/runs/22-04_08-29/results/synthesis/picorv32a.synthesis.v
exit

image

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

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

prep -design picorv32a -tag 22-04_08-29 -overwrite
set lefs [glob $::env(DESIGN_DIR)/src/*.lef]
add_lefs -src $lefs
set ::env(SYNTH_STRATEGY) "DELAY 3"
set ::env(SYNTH_SIZING) 1
run_synthesis
init_floorplan
place_io
tap_decap_or
run_placement
run_cts

image image image image image

Lab steps to verify CTS runs

echo $::env(LIB_SYNTH_COMPLETE)
echo $::env(LIB_TYPICAL)
echo $::env(CURRENT_DEF)
echo $::env(SYNTH_MAX_TRAN)
echo $::env(CTS_MAX_CAP)
echo $::env(CTS_CLK_BUFFER_LIST)
echo $::env(CTS_ROOT_BUFFER)

image

Timing analysis with real clock using openSTA

Lab steps to analyze timing with real clocks using OpenSTA

openroad

read_lef /openLANE_flow/designs/picorv32a/runs/22-04_08-29/tmp/merged.lef

read_def /openLANE_flow/designs/picorv32a/runs/22-04_08-29/results/cts/picorv32a.cts.lef

write_db pico_cts.db

read_db pico_cts.db

read_verilog /openLANE_flow/designs/picorv32a/runs/22-04_08-29/results/synthesis/picorv32a.synthesis_cts.v

read_liberty $::env(LIB_SYNTH_COMPLETE)

link_design picorv32a

read_sdc /openLANE_flow/designs/picorv32a/src/my_base.sdc

set_propagated_clock [all_clocks]

help report_checks

report_checks -path_delay min_max -fields {slew trans net cap input_pins} -format full_clock_expanded -digits 4

exit

image image

This analysis is incorrect

Lab steps to execute OpenSTA with right timing libraries and CTS assignment

echo $::env(CTS_CLK_BUFFER_LIST)

set ::env(CTS_CLK_BUFFER_LIST) [lreplace $::env(CTS_CLK_BUFFER_LIST) 0 0]

echo $::env(CTS_CLK_BUFFER_LIST)

echo $::env(CURRENT_DEF)

set ::env(CURRENT_DEF) /openLANE_flow/designs/picorv32a/runs/22-04_08-29/results/placement/picorv32a.placement.def

run_cts

echo $::env(CTS_CLK_BUFFER_LIST)

image

image

Lab steps to observe impact of bigger CTS buffers on setup and hold timing

openroad

read_lef /openLANE_flow/designs/picorv32a/runs/22-04_08-29/tmp/merged.lef

read_def /openLANE_flow/designs/picorv32a/runs/22-04_08-29/results/cts/picorv32a.cts.def

write_db pico_cts1.db

read_db pico_cts.db

read_verilog /openLANE_flow/designs/picorv32a/runs/22-04_08-29/results/synthesis/picorv32a.synthesis_cts.v

read_liberty $::env(LIB_SYNTH_COMPLETE)

link_design picorv32a

read_sdc /openLANE_flow/designs/picorv32a/src/my_base.sdc

set_propagated_clock [all_clocks]

report_checks -path_delay min_max -fields {slew trans net cap input_pins} -format full_clock_expanded -digits 4

report_clock_skew -hold

report_clock_skew -setup

exit

echo $::env(CTS_CLK_BUFFER_LIST)

set ::env(CTS_CLK_BUFFER_LIST) [linsert $::env(CTS_CLK_BUFFER_LIST) 0 sky130_fd_sc_hd__clkbuf_1]

echo $::env(CTS_CLK_BUFFER_LIST)

image image

Section 5 -Final step for RTL2GDS using tritinRoute and openSTA (19/03/2024 - 20/03/2024)

Lab steps to build power distribution network

gen_pdn

image

Load PDN def

cd Desktop/work/tools/openlane_working_dir/openlane/designs/picorv32a/runs/22-04_08-29/tmp/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 19-pdn.def &

image image

Detailed routing using TritonRoute and explore the routed layout.

echo $::env(CURRENT_DEF)
run_routing

image image image

cd Desktop/work/tools/openlane_working_dir/openlane/designs/picorv32a/runs/22-04_08-29/results/routing/

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 &

image image image

cd Desktop/work/tools/openlane_working_dir/openlane/designs/picorv32a/runs/22-04_08-29/tmp/routing
gvim 20-fastroute.guide

image image

Post-Route parasitic extraction using SPEF extractor & Final Layout

image image

Final generated layout image image

References

https://futureskillsprime.in/course/digital-vlsi-soc-design-and-planning

Openlane

Repo Documentation format inspired from Ms.Kalpana , Mr.Mohammed Fayiz Ferosh

Acknowledgement

Dear Kunal Ghosh, Nickson P Jose, and R. Timothy Edwards,

I want to express my heartfelt gratitude to each of you for your invaluable contributions and dedication during the workshop. Your expertise, guidance, and passion for teaching have truly made a significant impact on me.Thank you for your time, energy, and commitment to nurturing the next generation of engineers.

With deep appreciation,

Varun

Internship Completion Certificate

image