Skip to content

Latest commit

 

History

History
366 lines (206 loc) · 16.8 KB

README.md

File metadata and controls

366 lines (206 loc) · 16.8 KB

Digital VLSI SOC Design and Planning

In this workshop, we will see what are all the steps involved in making an Application Specific Intergrated Circuit(ASIC) from RTL to GDSII.

Day-1

The field we are exploring involves the chips inside boards such as the Arduino board and the VSDSquadron. The image below shows Arduino board.

arduino

The block diagram of the board, along with all its peripherals, can be found in the image below.

block_arduino

Since we are dealing with only the central chip, if we open it, it will reveal the package with connections to the chip inside.

package

Connections to and from the outside world occur through the I/O pads. The entire logic (netlist) is placed inside the core. The logic, along with the I/O pads, is referred to as the DIE.

Die

The core is filled with various IPs and macros.

ip n macro

Introduction to RISC-V

RISC-V is an instruction set architecture which is an interface between software(C, python, java programs) and hardware(Layout).

ISA_interface

For a software program to run on hardware, it passes through many interfaces and applications, such as system software, which handles memory allocation and low-level system functions, as well as a compiler that converts the software code into assembly instructions, and an assembler that translates these assembly instructions into machine code.

2

The interface that implements the instruction set architecture is the RTL Verilog code. This RTL code is converted into a layout that executes the program.

3

OpenLane

OpenLane is a flow developed by efabless for opensource skywater sky130 PDK. Three major requirements for an ASIC design are

  1. RTL Designs
  2. EDA Tools
  3. PDK

Screenshot 2024-08-23 134031

RTL Designs describes the flow of data between registers and the operations performed on the data.

Electronic Design Automation tools help design and verify whether the RTL code meets the specifications and functionality of the system.

A Process Design Kit (PDK) serves as an interface between the designer and the foundry. It contains all the necessary information and files required by the designer to design integrated circuits for a specific fabrication process offered by the foundry. The PDK includes various files and data that enable effective communication and collaboration between the designer and the foundry. These files help the designer understand the foundry's process, design rules, and available components, allowing them to create designs that are optimized for the foundry's manufacturing capabilities.

The steps in the RTL to GDSII flow include

Screenshot 2024-08-23 134057

Synthesis: Synthesis is the process of converting RTL code into a netlist, which comprises standard cell libraries and their connections.

Opensource Tools used : yosys,ABC

Screenshot 2024-08-23 134113

Floorplan: This is the process of defining the layout of the ASIC, including the placement of standard cells, macros, and I/O pads. The height and width of the core are decided in this step. Ideally, the power distribution network is also established at this stage. In OpenLane, this occurs after CTS. All preplaced cells are located in the floor plan stage.

Screenshot 2024-08-23 134151

Placement: refers to the process of positioning standard cells in rows on the ASIC. This step is essential for ensuring that the design meets performance, area, and power requirements. Placement occurs in two stages: Global Placement and Detailed Placement.

Screenshot 2024-08-23 134222

Clock Tree Synthesis: After CTS, timing checks are performed to ensure setup and hold constraints are met. If timing is not met, previous steps like placement may need to be revisited and optimized.

Screenshot 2024-08-23 134235

Routing: Signal routing happens after clock routing in CTS stage. Routing is divided into Global routing and Detailed routing.

Screenshot 2024-08-23 134257

Signoff: There should not be any DRC or LVS errors for the design to converge.

Screenshot 2024-08-23 134314

OpenLane ASIC Flow

Screenshot 2024-08-23 160230

RTL to GDSII practical implementation

Commands to initiate the flow

docker
./flow.tcl -interactive
package require openlane
prep -design picorv32a

Screenshot 2024-08-21 144728

This step will create a folder in runs directory.

Screenshot 2024-08-21 144926

After run_synthesis command, it will generate a netlist file picorv32a.synthesis.v in the results synthesis folder.

Screenshot 2024-08-21 151932

Chip area of the module is obtained at the end of the synthesis. Flop ratio is calculated using the statistics obtained from the synthesis step.

Flop ratio = no.of Dff used / total no. of cells

Screenshot 2024-08-21 150951

Screenshot 2024-08-21 151340

Screenshot 2024-08-21 150919

Day-2

Implementation of floorplan

run_floorplan

Utilization factor and aspect ratio can be assigned at this stage. If there are any macros, these pre-placed macros are positioned in this step. Decoupling capacitors and pin placements are also handled at this stage.

A .def file is generated at the end of the floorplan stage. The .def file can be viewed using the Magic tool.

Screenshot 2024-08-21 164032

Using the FP_IO_MODE switch set to 0 and 1, one mode sets the I/O pins equidistantly, while the other places them randomly.

Screenshot 2024-08-21 165022

Screenshot 2024-08-21 171006

Vertical and Horizontal pins are set using the switches FP_IO_VMETAL and FP_IO_HMETAL

Screenshot 2024-08-21 165716

Implementation of Placement

run_placement

Placement determines the arrangement of standard cells within the chip. It refers to the process of positioning standard cells, macros, and I/O pads on the ASIC layout.

Both floor planning and placement do not add any extra logic to the synthesized netlist.

Screenshot 2024-08-21 171538

Screenshot 2024-08-21 171717

Day-3

Characterization of an inverter cell

In this case, Characterization of an inverter starts from the .mag file, not from scratch. From this inverter layout, a SPICE deck is generated, and then the characterization of the cell is performed. Characterization involves simulating the inverter's performance under various conditions using ngspice. We calculate Rise transition delay, Fall transition delay, rise cell delay, fall cell delay. Create a LEF file from the layout which can be used to include this cell in any larger design.

Screenshot 2024-08-21 181855

Opening the sky130_inv.mag file in magic

Screenshot 2024-08-21 182102

extracting spice from the mag file using the commands

extract all
ext2spice cthresh 0 rthresh 0
ext2spice

Screenshot 2024-08-21 182406

Generated sky130_inv.spice file

Screenshot 2024-08-21 182453

Make some changes to the spice desk by including Vdd, input voltage (pulse) and trans response

Screenshot 2024-08-21 193301

Running the modified spice file using ngspice

Screenshot 2024-08-21 194223

Plotting different values from the graph

Screenshot 2024-08-22 101910

Rise time: Time taken for the output waveform to transition from 20% to 80% of its maximum value.

x0 = 2.164 y0 = 0.659

x1 = 2.205 y1 = 2.639

rise time = x1 - x0 = 0.041ns

Fall time: Time taken for the output waveform to transition from 80% to 20% of its maximum value.

x0 = 4.040 y0 = 2.64

x1 = 4.068 y1 = 0.660

fall time = x1 - x0 = 0.028ns

Rise cell delay: The time taken for a 50% transition at the output (0 to 1) corresponding to a 50% transition at the input (1 to 0)

x0 = 2.186 y0 = 1.65

x1 = 2.151 y1 = 1.65

Propogation delay = 0.03ns

Fall cell delay : The time taken for a 50% transition at the output (1 to 0) corresponding to a 50% transition at the input (0 to 1)

x0 = 4.054 y0 = 1.65

x1 = 4.05 y1 = 1.65

propogation delay = 0.004ns

Screenshot 2024-08-22 110502

writing lef file sky130_INV_PA1.lef

Screenshot 2024-08-22 112826

Day-4

To include the customized LEF file sy130_INV_PA1.lef into the picorv32a design, the config.tcl file must be updated. The LEF file and the corresponding libraries also need to be included in the config file.

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

These commands need to be added to the flow to incorporate the custom inverter cell into the ASIC flow during synthesis.

The cell sky130_INV_PA1 has been used 1554 times in the synthesis.

Screenshot 2024-08-22 141656

Screenshot 2024-08-22 150404

During the synthesis, the chip area of the module is 147712.9184

tns = -711.59 wns = -23.89

Screenshot 2024-08-22 141801

By changing the SYNTH_STRATEGY from AREA to DELAY, the TNS and WNS values changed to zero, but this resulted in an increased chip area of 181730.544.

commands to change the swithces

set ::$env(SYNTH_STRATAGEY) "DELAY 3"
echo $::env(SYNTH_STRATAGEY) - To print the value

Similar switches to optimize the netlist at synthesis stage

SYNTH_MAX_FANOUT
SYNTH_SIZING
SYNTH_BUFFERING
SYNTH_DRIVING_CELL

Screenshot 2024-08-22 154329

Screenshot 2024-08-22 154314

Running floorplan by the following commands

init_floorplan
place_io
tap_decap_or

Screenshot 2024-08-22 155415

Screenshot 2024-08-22 155722

sky130_INV_PA1 cell in merged.lef file

Screenshot 2024-08-22 165553

Screenshot 2024-08-22 171816

Screenshot 2024-08-22 171903

Post synthesis timing analysis outside openlane flow using OpenSTA

pre_sta.conf configuration file along with my_base.sdc is used to do STA analysis

Screenshot 2024-08-23 040424

Screenshot 2024-08-23 033249

Screenshot 2024-08-23 033333

.def generated after run_placement & gen_pdn

Screenshot 2024-08-23 054949

Day-5

run_routing

Screenshot 2024-08-23 061324

Routing occurs over many iterations. Below are the images showing that in the 4th iteration there are 21 violations, and in the 57th iteration, the design converges with zero violations.

Screenshot 2024-08-23 061420

Screenshot 2024-08-23 061440

Post-routing static timing analysis (STA) can be performed within the OpenFlow itself using openraod command which invokes OpenSTA.

read_lef /openLANE_flow/designs/picorv32a/src/22-08_08-41/tmp/merged.lef
read_def /openLANE_flow/designs/picorv32a/src/22-08_08-41/results/routing/picorv32a.def
write_db picorv32_rout.db

Screenshot 2024-08-23 063034

read_db picorv32_rout.db
read_verilog /openLANE_flow/designs/picorv32a/results/synthesis/picorv32a.synthesis_preroute.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]
read_spef /openLANE_flow/designs/picorv32a/src/22-08_08-41/results/routing/picorv32a.spef
report_checks -path_delay min_max -fields {slew trans net cap input_pin} -format clock_full_expanded -digits 4

Screenshot 2024-08-23 065735

Screenshot 2024-08-23 065655

Screenshot 2024-08-23 065710

Understanding Magic tool:

To check all the rules regarding front end layers, implant layers check this documentation https://skywater-pdk.readthedocs.io/en/main/rules/periphery.html#poly

By making some changes in the tech file, we reducing the DRC errors.

Screenshot 2024-09-18 105407

Screenshot 2024-09-18 111622

Screenshot 2024-09-18 112521

Screenshot 2024-09-18 114513

Screenshot 2024-09-18 120045

Screenshot 2024-09-18 120256

Screenshot 2024-09-18 124401

Screenshot 2024-09-18 124758

Screenshot 2024-09-18 125450