Professional Documents
Culture Documents
GDS
Lecture 1
Basic Concepts of Integrated Circuit: I
Sneh Saurabh
Electronics and Communications
Engineering
IIIT Delhi
Lecture Plan
Basic Concepts of Integrated Circuit
▪ Historical Perspective
▪ Structure
▪ Fabrication
Source:
https://commons.wikimedia.org/wiki/Fi
le:Charles_Babbage_-_1860.jpg, See
page for author, Public domain, via
Wikimedia Commons
▪ Bottom: devices
Problem:
▪ Multiple layers are necessary to make connections between devices that would otherwise
short when connected in a single layer
Silicon Ingots:
▪ Massive cylindrical single crystal of silicon
Source:
https://commons.wikimedia.org/wiki/File:I ▪ Silicon ingots are mostly prepared using
CC_2008_Poland_Silicon_Wafer_1_edit.png
FxJ, Public domain, via Wikimedia
Czochralski (CZ) process
Commons
➢ Pure seed crystal is pulled out from a
highly pure melted silicon at 1425℃
▪ A silicon wafer is sliced out from silicon ingots
Source: https://commons.wikimedia.org/wiki/File:Monokristalines_Silizium_f%C3%BCr_die_Waferherstellung.jpg,
German Wikipedia, original upload 7. Okt 2004 by Stahlkocher
▪ Dies are sliced out from silicon wafers after fabrication and
testing
Chips:
▪ After dies are sliced, they are encapsulated into a supporting
case for protection against physical and chemical damage.
▪ Packaged dies are generally known as chips
Designing:
▪ Determining the parameters and
composition of a circuit that can achieve
the desired functionality
Fabrication:
▪ It involves actual creation of integrated
circuit for a given design (layout of various
layers)
▪ Related Task
▪ Share Information:
➢ Process Design Kit (PDK)
➢ Design (Layout)
Lecture 2
Basic Concepts of Integrated Circuit: II
Sneh Saurabh
Electronics and Communications
Engineering
IIIT Delhi
Lecture Plan
Different VLSI
Design Flows
Types of Integrated
Circuits
Types of Design
Styles
Design Styles
▪ Base cell or primitive cells: smallest element that is repeated to form a gate array
▪ Fixed functionality of the base cell may make implementing some functions such as memory
difficult or inefficient
▪ Some custom blocks can be embedded in the IC to obtain special functionality such as
memory, micro-controller etc.
Economics of
Integrated Circuit
▪ Cost of masks
▪ Depends on number of layers
𝑇𝑜𝑡𝑎𝑙 𝑝𝑟𝑜𝑑𝑢𝑐𝑡 𝑐𝑜𝑠𝑡 = 𝐹𝑖𝑥𝑒𝑑 𝑝𝑟𝑜𝑑𝑢𝑐𝑡 𝑐𝑜𝑠𝑡 + 𝑉𝑎𝑟𝑖𝑎𝑏𝑙𝑒 𝑝𝑟𝑜𝑑𝑢𝑐𝑡 𝑐𝑜𝑠𝑡 × 𝑁𝑢𝑚𝑏𝑒𝑟 𝑜𝑓 𝑃𝑟𝑜𝑑𝑢𝑐𝑡
For small volume FPGA is better, for large volume standard-cell based design is better.
Figures of Merit
Area Power
▪ Goal of a design flow is to find one of the feasible solutions with acceptable FoM
Lecture 3
Overview of VLSI Design Flow: I
Sneh Saurabh
Electronics and Communications
Engineering
IIIT Delhi
Lecture Plan
Overview of VLSI Design Flow
▪ Design Flows
▪ Abstraction
▪ Pre-RTL Methodologies
▪ Hardware—software partitioning
Abstraction
System-level
Design
Preparing specifications:
• Features (functionality)
• PPA
• Time to market (TTM)
HW—SW Partitioning:
• Identify components
• Determine which components to
implement in HW/SW
Hardware—software
Partitioning
Hardware Software
Performance High Low
Cost High Low
Risk due to bug High Low
Customization Low High
Development Time High Low
Challenges:
• Performance estimation
• Verification: hardware-software co-
simulation
Lecture 4
Overview of VLSI Design Flow: II
Sneh Saurabh
Electronics and Communications
Engineering
IIIT Delhi
Lecture Plan
Pre-RTL Methodologies
▪ Reusing RTL
▪ Behavior Synthesis
Functional
Specification to RTL
Reusing RTL
System-on-chip (SoC)
▪ Composed of:
➢ Processors, hardware accelerators, memories, peripherals, analog components, and RF
devices connected using some structured communication links
➢ Embedded software
▪ Merits:
➢ Improves productivity
➢ Lowers cost
➢ Increases features
Behaviour Synthesis
Behavioral Synthesis
• Process of converting an
algorithm (not timed) to an
equivalent design in RTL (fully
timed) and satisfy the
specified constraints.
Cost Metrics:
• Area: number of circuit elements
• Latency: number of clock cycles required before results are available
• Maximum clock frequency: worst case combinational delay
• Power dissipation, Throughput, etc.
Resources Resources
• 2 Adders (+) and 1 Register • 2 Adders (+) and 2 Registers
Latency Latency
• 1 clock cycle • 2 clock cycle
Worst Delay Worst Delay
• Delay of 2 Adders • Delay of 1 Adders
Latency 1 2 2
cycle cycle cycle
Lecture 5
Overview of VLSI Design Flow: III
Sneh Saurabh
Electronics and Communications
Engineering
IIIT Delhi
Lecture Plan
Overview of VLSI Design Flow
Logic Synthesis
▪ Netlist:
➢ Interconnection of logic gates
➢ Usually represented using
Verilog constructs or schematic
assign y = (select) ? b : a;
endmodule
Netlist
module …..
……. module top(a, b, clk, select, out);
endmodule
Logic input a, b, clk, select;
RTL Synthesis output out;
wire y;
library
cell(MUX2) MUX2 INST1(.A(a), .B(b), .S(select),
… Library .Y(y));
cell(DFF)
DFF INST2(.D(y), .CP(clk), .Q(out));
Design: Top level entity that represents the circuit. Example: MYDESIGN
Ports: The interfaces of the Design through which it communicates with the external world.
Example: in1, in2, CLK, out1, out2
▪ Input Ports: Signals going inside the design. Example: in1, in2, CLK
▪ Output Ports: Signals going outside from the design. Example: out1, out2
▪ Pin: An interface of a library cell or instance through which it communicates with the other
components is called a pin.
▪ Examples: A, B, Y are the pins of the cell AN2 and the instance I1
▪ Library Pin and Instance Pin (if we want to be explicit)
➢ Often apparent from the context
▪ Input Pin or Output Pin based on direction of flow of signal to cell/instance
VLSI Design Flow: RTL to GDS NPTEL 2023 S. Saurabh 13
Netlist Terminologies: Pin Names
▪ Instance pin name: typically specified as combination of instance name and pin name
separated by /
▪ Examples: I1/A, I1/B , out1_reg/Q
▪ Net: The wire that connects different instances and ports is a called net.
Examples.: N1, N2, N3, …N8
Logic Optimization:
▪ Typically area-driven
Technology-dependent optimization:
▪ PPA can be estimated more accurately after
technology mapping
▪ Perform timing, area, and power optimizations over
netlist consisting of standard cells
Lecture 6
Overview of VLSI Design Flow: IV
Sneh Saurabh
Electronics and Communications
Engineering
IIIT Delhi
Lecture Plan
Physical Design
Chip Planning
Placement
Objectives:
▪ Ensure no congestion
VLSI Design Flow: RTL to GDS NPTEL 2023 S. Saurabh 7
Physical Design: Clock Tree Synthesis
Clock Tree Synthesis (CTS)
Objectives:
Routing
▪ Creates wire layout for all the nets (other than clock
and power supply) satisfying certain constraints
Write GDS
▪ One task may require that previous tasks retract some design
decisions
➢ This creates loops in the physical design flow
Lecture 7
Overview of VLSI Design Flow: V
Sneh Saurabh
Electronics and Communications
Engineering
IIIT Delhi
Lecture Plan
Overview of VLSI Design Flow
▪ Verification
▪ Testing
Verification
▪ Once we have proven a property ▪ Check whether properties are being satisfied in
mathematically, it is guaranteed to the implemented design RTL using formal
hold for all test stimuli. methods
Verification using formal methods: Example:
▪ Check a set of rules during physical design before sending the layout to the foundry.
Design rule check (DRC):
▪ Rules are defined by the foundries and depend on the manufacturing technology
▪ All DRC violations must be fixed before sending it to the foundry for fabrication.
Electrical rule check (ERC):
▪ Rules are defined to ensure proper connectivity (for e.g.: no short circuit between distinct
signal lines).
Layout vs. schematic (LVS) check:
Testing
Origin of defects
▪ Statistical deviations in material properties
▪ Finite tolerances in process parameters
▪ Airborne particles, and undesired chemicals
▪ Deviations in mask features
▪ We model defect
(physical phenomenon)
using faults (circuit
model)
Unclustered defects
24
Yield=34 × 100 = 71%
Clustered defects
26
Yield=34 × 100 = 76%
Lecture 8
Overview of VLSI Design Flow: VI
Sneh Saurabh
Electronics and Communications
Engineering
IIIT Delhi
Lecture Plan
▪ We can solve the problem by increasing the spacing between features printed at a time
Double- or Multi-patterning
Die Testing
▪ Each die is tested and compared with the expected pattern
▪ Bad dies are marked and not packaged
Binning
▪ Classification based on characteristics such
as maximum frequency and power dissipation
▪ Statistical variations in performance
▪ On-chip delay measurement circuitry
▪ Assign performance-based price points to
different bins.
Lecture 12
RTL Synthesis- Part I
Sneh Saurabh
Electronics and Communications
Engineering
IIIT Delhi
Lecture Plan
Tasks
▪ Lexical analysis:
keywords, identifiers
▪ Grammar/syntax
checking
endmodule
endmodule
VLSI Design Flow: RTL to GDS NPTEL 2023 S. Saurabh
RTL Synthesis: Elaboration (2)
▪ Creates separate modules with different interfaces for each distinct set of parameters
Verilog Constructs to
Circuit
endmodule
S. Saurabh, “Introduction to VLSI Design Flow”.Cambridge
University Press, 2023.
VLSI Design Flow: RTL to GDS NPTEL 2023 S. Saurabh
If-else Statement
▪ Depends on the sensitivity list and how are variables assigned with the always block
Lecture 13
RTL Synthesis- Part II
Sneh Saurabh
Electronics and Communications
Engineering
IIIT Delhi
Lecture Plan
▪ Optimization
Verilog Constructs to
Circuit
function MAJOR3;
input A, B, C;
begin
MAJOR3 = (A&B)|(B&C)|(C&A);
end
endfunction
endmodule
VLSI Design Flow: RTL to GDS NPTEL 2023 S. Saurabh
Operators: Synthesis Tasks
Resource/Timing
Optimization
Assume: a, b, x, y
are of 8 bits and
z is of 16 bits.
▪ Need to ensure that path through the select pin of the multiplexer does not violate timing
constraint
z = a+y;
Assume: a, b, c, y
are of 8 bits.
▪ Assume that path through sel ▪ Decreases delay of the critical path
is critical. by employing more resources
Implementation of
Arithmetic Function
▪ Instantiate these internal modules and choose the right set of parameters
assign {carry,sum}= a + b;
assign comp = (c > d);
Compiler Optimizations
▪ Can be applied to the parse tree or the internal model of the RTL
➢ Typically, optimizations applied in passes
Lecture 14
Logic Optimization: Part I
Sneh Saurabh
Electronics and Communications
Engineering
IIIT Delhi
Lecture Plan
Source:
https://commons.wikimedia.org/wiki/File:Ralph_Waldo_Emer
son_by_Josiah_Johnson_Hawes_1857.jpg Josiah Johnson
Hawes, Public domain, via Wikimedia Commons
VLSI Design Flow: RTL to GDS NPTEL 2023 S. Saurabh
Logic Optimization
Two-level
Boolean function: function that takes Boolean variables as arguments and evaluates to 0 or 1.
Denoted as: 𝑦 = 𝑓(𝑥1 ,𝑥2 ,𝑥3 , … , 𝑥𝑁 ) where the variables {𝑥1 ,𝑥2 ,𝑥3 , … , 𝑥𝑁 } are Boolean variables.
Boolean Hypercube:
▪ For some input combinations, the function 𝑦 = 𝑓(𝑥1 ,𝑥2 ,𝑥3 , … , 𝑥𝑁 ) may not be specified.
➢ These input combinations are known as don’t care
▪ DC conditions are related to the input combinations that can never occur
➢ Example: If a function receives binary coded decimal (BCD) digits it cannot receive input
combinations {1010, 1011, ..., 1111}
▪ Can also be those input combinations for which the output is not observed
➢ Example: A function producing an output for a block that is in a sleep state
Not an implicant:
▪ 𝑥1 ′𝑥3 ′
▪ 𝑥1 ′
𝑦 = 𝑥1 ′𝑥2 𝑦 = 𝑥2
VLSI Design Flow: RTL to GDS NPTEL 2023 S. Saurabh
Prime Implicant
Prime Implicant of a function:
▪ An implicant of a function that is not covered
by any other implicant of that function
▪ Also called prime (in short)
Prime Implicants:
▪ 𝑥2 : Yes
▪ 𝑥1 ′𝑥2 𝑥3 ′: No
▪ 𝑥1 𝑥2 : No
▪ For problems with more than 20 variables: conventional techniques becomes too
complicated.
▪ In finding the minimum cover, we can reduce the search space by employing Quine’s
theorem
Quine’s Theorem:
▪ There exists a minimum cover consisting only of prime implicants (prime cover)
Proof:
Application:
▪ By finding the set of prime implicants and building a prime implicant table.
▪ Arrange the prime implicants in separate columns and the minterms in individual rows of the
prime implicant table.
▪ Fill entries in the table: If a given prime (column) covers a given minterm (row), then the
corresponding entry is made 1, else it is made 0.
Minimal Cover:
▪ A minimal cover satisfies certain local minimum cover property rather than the global
minimum property.
▪ For example, a cover in which no implicant is contained in any other implicant of the cover.
➢ Minimal with respect to single-implicant containment.
▪ The size of a minimal cover can be more than the size of the minimum cover.
Operators:
▪ Expand: expands a non-prime implicant to make it prime (removes implicants covered by
the expanded implicant)
▪ Reduce: replaces an implicant with a reduced implicant (covering fewer minterms) such that
the function is still covered.
▪ Reshape: operates on a pair of implicants (expands one implicant and reduces others such
that the function is still covered).
▪ Irredundant: makes a cover irredundant
➢ Cover in which, if we remove any implicant, then it will be no more a cover.
▪ Not guaranteed to be
minimum
▪ ESPRESSO two-level
minimizer: practically very
efficient
VLSI Design Flow: RTL to GDS NPTEL 2023 S. Saurabh
References
▪ G. D. Micheli. “Synthesis and Optimization of Digital Circuits”. McGraw-Hill Higher Education,
1994.
Lecture 9
Hardware Modeling: Introduction to Verilog-I
Sneh Saurabh
Electronics and Communications
Engineering
IIIT Delhi
Lecture Plan
▪ Features of Hardware Description Languages (HDLs)
▪ Language constructs of Verilog
Concurrency
▪ Computation can be done in parallel in hardware
▪ HDL must support syntax/semantics to distinguish
parallel and sequential operations
Notion of Time
▪ Describe behavior of circuit with respect to time
▪ Concurrent/sequential operations
▪ Ability to create waveform (periodic signal)
Electrical Characteristics
▪ Tristate
▪ Driver Strength
Source:
https://commons.wikimedia.org/wiki/File:Lew
isCarrollSelfPhoto.jpg Lewis Carroll, Public
domain, via Wikimedia Commons
Integers:
▪ In traditional format like 169, -123
Verilog Internal Representation
▪ In the format:
-<size>’<base><value> 1 0000 0000 0000 0000 0000
0000 0000 0001
▪ - for negative sign (optional)
▪ <size> number of bits (default 32) 1’b1 1
▪ <base> can be b/B for binary, o/O, for 8’ha1 1010 0001
octal, d/D for decimal, h/H 6’o71 111 001
hexadecimal
S. Saurabh, “Introduction to VLSI Design Flow”. Cambridge University
▪ <value> value of the integer Press, 2023.
▪ R. Seisyan. S. Palnitkar, “Verilog HDL: a guide to digital design and synthesis”, Pearson
Education India, 2003
▪ “IEEE standard Verilog hardware description language.” IEEE Std 1364-2001 (2001), pp. 1–
792.
Lecture 10
Hardware Modeling: Introduction to Verilog-II
Sneh Saurabh
Electronics and Communications
Engineering
IIIT Delhi
Modules
▪ Modules are building blocks of a Verilog design: starts with a keyword module and ends
with endmodule
▪ Modules are instantiated inside another modules to create a design hierarchy
▪ Instantiation of a module means using that module in another higher-level module
module Mid;
Bottom_1 b1;
endmodule
S. Saurabh, “Introduction to VLSI Design Flow”.
Cambridge University Press, 2023.
endmodule
endmodule
▪ Verilog primitive gates available for module mygates(a, b, en, y1, y2);
modelling logic gates
input a, b, en;
▪ Using keyword and, nand, or, nor, xor, output y1, y2;
xnor
and a1(y1, a, b);
▪ First pin is output pin and rest are and a2(y2, a, b, en);
inputs
endmodule
▪ Assume that:
a =2'b00,
▪ {N{}}: Replication operator (Multiple b =4'b1111,
concatenations performed N times)
and c =1'b0.
▪ Then, {4{a}, b, 2{c}} is 14'b00000000111100
VLSI Design Flow: RTL to GDS NPTEL 2023 S. Saurabh
Block of statement
▪ A group of statements within the keywords fork : my_block_name
begin and end forms a block statement-1
▪ A name can be given to a block statement-2
statement-3
begin : my_block_name join
statement-1
statement-2 ▪ Statement executed concurrently within
statement-3 fork-join block
end ➢ Known as parallel block
for (i = 1; i < 8; i = i + 1 )
while (i < 8) begin repeat (8) begin
begin
y[i]= c[i]; y[i]= c[i];
state[i] = 1'b1;
i = i + 1; i = i + 1;
y[i]= c[i]; end
end
end
▪ Initial and Always blocks provide a mechanism to model the concurrency of the hardware.
➢ Different hardware components working in parallel and whose order of starting the
execution is not within our control
❑ a simulation tool is free to choose any arbitrary order
▪ Examples: $display, $probe, $monitor, $stop, $finish, $reset, $random, $time etc..
▪ R. Seisyan. S. Palnitkar, “Verilog HDL: a guide to digital design and synthesis”, Pearson
Education India, 2003
▪ “IEEE standard Verilog hardware description language.” IEEE Std 1364-2001 (2001), pp. 1–
792.
Lecture 11
Functional Verification using Simulation
Sneh Saurabh
Electronics and Communications
Engineering
IIIT Delhi
Lecture Plan
Functional Verification using Simulation
▪ Framework of Simulation
▪ Testbench
▪ Coverage
▪ Types of Simulators
▪ Mechanism of Simulation
Framework
Testbench
▪ Applies stimulus
▪ Observes response
Testbench
endmodule
▪ Instantiate the DUT
▪ Generate test signals
▪ Monitor the signals and save it in a file
endmodule
Code Coverage:
▪ Identifies sections of DUV’s source code that did not execute during verification.
▪ Line coverage: number of times each RTL ▪ State coverage: whether all the states of an
statement is executed during simulation FSM have been activated and all the state
transitions traversed.
▪ Branch coverage: whether all branches of
the code (as in if–else and case statements) ▪ Toggle coverage: whether all variables or bits
were exercised in simulation in variables have risen and fallen.
VLSI Design Flow: RTL to GDS NPTEL 2023 S. Saurabh 8
Code Coverage vs. Functional Coverage
Mechanism
▪ Definition: When two or more statements that are scheduled to execute in the same
simulation time, and would give different results when the order of execution of the
statements are changed (as permitted by IEEE standard), then race condition is said to
exist
reg a, b;
▪ Race conditions can occur in many
initial begin situations
a = 0;
b = 1; ▪ Race conditions are difficult to debug
end
endmodule
S. Saurabh, “Introduction to VLSI Design Flow”. Cambridge
University Press, 2023.
▪ J. Bergeron, “Writing Testbenches: Functional Verification of HDL Models”, Springer Science &
Business Media, 2012.
▪ “IEEE standard Verilog hardware description language.” IEEE Std 1364-2001 (2001), pp. 1–
792.
Lecture 15
Logic Optimization: Part II
Sneh Saurabh
Electronics and Communications
Engineering
IIIT Delhi
Lecture Plan
▪ Number of literals in the factored form correlates with the circuit area
▪ Both its underlying graph and the local functions can be manipulated during optimization
▪ Optimization can explore both the behavioral and the structural features of the
implementation
▪ Local functions restricted to be in an SOP form and made minimal with respect to single-
implicant containment
▪ Estimating area: sum of all the literal counts of the local functions
Transformations
▪ These operators applied iteratively until no more improvement in some QoR measures is
possible.
➢ The final QoR depends on the order of operation and is hard to predict.
▪ We carry out eliminate in the hope that subsequent transformations can reduce the cost
(area)
▪ Substitute operator needs to find whether local function 𝑓𝑖 divides another local function 𝑓𝑗
➢ If it divides, we can replace 𝑓𝑗 = 𝑄. 𝑓𝑖 + 𝑅
➢ Need to perform division efficiently
VLSI Design Flow: RTL to GDS NPTEL 2023 S. Saurabh
Extract
▪ It finds a common subexpression for functions associated with two or more vertices.
➢ Subsequently, it creates a new vertex associated with the subexpression.
➢ Then replaces the common subexpressions in the original functions with the variable of
the new vertex.
Division Operation:
▪ During multilevel logic optimization, we need to carry out division too many times.
Divisors:
▪ Need to find good divisors (one that can reduce cost) for Boolean expressions
▪ Simplified model treats the local Boolean functions as polynomials and employs rules of
polynomial algebra
➢ Treat a variable and its complement as separate variables.
▪ Efficient algorithms can be designed to carry out division in the algebraic model (rather than
in the Boolean model)
Boolean Model:
▪ Post algebraic model-based optimization, transformations that utilize the power of the
Boolean model is applied
Boolean Model
▪ A logic synthesis tool needs to discover them using Boolean algebra (in contrast to given
DCs)
There are two types of DC that are useful in simplifying local functions in a Boolean logic
network:
▪ Local functions can be simplified by accounting for CDCs and two-level logic minimizers
▪ Cover is: 𝑞 = 𝑝 +
𝑏𝑐
▪ Reduces the literal
count by 1
Cover is:
𝑞 = 𝑝𝑏 + 𝑏𝑐
VLSI Design Flow: RTL to GDS NPTEL 2023 S. Saurabh
Satisfiability Don’t Cares (SDCs)
▪ CDCs can be computed using efficient algorithms by exploiting Satisfiability Don’t Cares
(SDCs).
▪ SDCs get enforced by the local functions associated with a vertex at its output.
Consider the vertex 𝑝 = 𝑎𝑏
▪ The following function will never evaluate to 1:
𝑝 ⊕ 𝑎𝑏 = 𝑝𝑎′ + 𝑝𝑏′ + 𝑝′𝑎𝑏
▪ Hence, the combination of values that make the
above function 1 can never occur in the network:
𝑝 = 1, 𝑎 = 0,
𝑝 = 1, 𝑏 = 0,
𝑝 = 0, 𝑎 = 1, 𝑏 = 1
▪ These values can be treated as DCs for the Boolean
logic network
▪ If 𝑐 = 0, then 𝑥 = 0 irrespective of 𝑝
▪ 𝑐 = 0, can be treated as ODC for 𝑝
Lecture 16
Logic Optimization: Part III
Sneh Saurabh
Electronics and Communications
Engineering
IIIT Delhi
Lecture Plan
▪ Output is a function of the current state and current input: Mealy Machine
▪ Inputs to the regulator (rotate clockwise and rotate anti-clockwise) are inputs of the FSM
➢ 𝐼 = {𝐶, 𝐴}
▪ Among set of equivalent states, retain any one of the equivalent states and remove others
▪ Update the transition function to maintain the same behavior as the original FSM.
Approach:
▪ CL needs to produce the next state functions and
output functions
➢ Encode such that they share logic
➢ Allow more common cubes and common sub-
expressions
Heuristics-based Algorithms:
➢ Quantify the possibility of common cube extraction
as “gain” of an encoding scheme
➢ Determine encoding that maximizes the “gain”
VLSI Design Flow: RTL to GDS NPTEL 2023 S. Saurabh
References
▪ S. Saurabh, “Introduction to VLSI Design Flow”. Cambridge: Cambridge University Press,
2023.
Lecture 17
Formal Verification- I
Sneh Saurabh
Electronics and Communications
Engineering
IIIT Delhi
Lecture Plan
Functional Verification
Source:
https://commons.wikimedia.org/wiki/File:Edsger_Wybe_Dijks
tra.jpg Hamilton Richards, CC BY-SA 3.0
<http://creativecommons.org/licenses/by-sa/3.0/>, via
Wikimedia Commons VLSI Design Flow: RTL to GDS NPTEL 2023 S. Saurabh
Formal
Verification
Specification: 𝑦 = (𝑥 − 4)2
Design: 𝑦 = 𝑥 2 − 8𝑥 + 16
Formal Verification
Techniques
Binary Decision
Diagram
Compactness of Representation:
▪ Quantifies the growth in the size of a representation with the increase in the number of
Boolean variables
▪ Examples:
➢ A truth table has 2𝑁 rows for a Boolean function of 𝑁 variables.
❑ Truth table size increases exponentially with the number of Boolean variables
➢ A logic formula representation of a function: 𝑦 = 𝑎𝑏 + 𝑎𝑐𝑑 + 𝑏′ 𝑑 + 𝑏𝑐′ can be very
compact
To make it canonical and compact, we need to add constraint on variable ordering and
remove redundancies
VLSI Design Flow: RTL to GDS NPTEL 2023 S. Saurabh
Binary Decision Tree: Variable Order
• At an intermediate node, we can choose any variable for expansion in a binary decision
tree
• In general, different variable orders can give different binary decision tree
Ordered Binary Decision Diagram (OBDD): A BDD becomes an OBDD if the decision variables
follow the same order in all the paths from the root to the leaf nodes
• Edge between a vertex 𝑣 and 𝑙𝑜𝑤 𝑣 represents the case when the corresponding
variable assumes 𝑥𝑖𝑛𝑑𝑒𝑥(𝑣) = 0
• Similarly high 𝑣 corresponds to 𝑥𝑖𝑛𝑑𝑒𝑥(𝑣) = 1
▪ To enforce ordering of non-terminal vertices: 𝑖𝑛𝑑𝑒𝑥 𝑣 < 𝑙𝑜𝑤(𝑖𝑛𝑑𝑒𝑥 𝑣 ) and 𝑖𝑛𝑑𝑒𝑥 𝑣 <
ℎ𝑖𝑔ℎ(𝑖𝑛𝑑𝑒𝑥 𝑣 )
Compactness:
• Size of ROBDDs for many Boolean functions grows as polynomial with the number of
variables
• Size of ROBDDs for a given function depends on the variable order.
➢ Depending on the variable order, the size of ROBDD can be linear or exponential for an
adder circuit
➢ Finding a good variable order is difficult
➢ For some functions, such as a multiplier, the size of ROBDD is always exponential
Lecture 18
Formal Verification - II
Sneh Saurabh
Electronics and Communications
Engineering
IIIT Delhi
Lecture Plan
Satisfiability Problem
Solver
𝑓(𝑥1 ,𝑥2 ,𝑥3 ) = (𝑥1 +𝑥2 ) (𝑥1 ′+𝑥2 )(𝑥1 +𝑥3 ′) ▪ Variables: 𝑥1 ,𝑥2 , 𝑥3
▪ Literals: 𝑥1 ,𝑥2 , 𝑥1 ′,𝑥3′
▪ Clauses: (𝑥1 +𝑥2 ) , (𝑥1 ′ +𝑥2 ) and (𝑥1 +𝑥3 ′)
Examples
• 2-SAT Problem: 𝑓(𝑥1 ,𝑥2 ,𝑥3 ) = (𝑥1 +𝑥2 ) (𝑥1 ′+𝑥2 )(𝑥1 +𝑥3 ′)
• 3-SAT Problem: 𝑓(𝑥1 ,𝑥2 ,𝑥3 ) = (𝑥1 +𝑥2 + 𝑥3 ) (𝑥1 ′+𝑥2 )(𝑥1 +𝑥3 ′)
• 4-SAT Problem: 𝑓(𝑥1 ,𝑥2 ,𝑥3 , 𝑥4 ) = (𝑥1 +𝑥2 + 𝑥3 ) (𝑥1 ′+𝑥2 )(𝑥1 +𝑥2 + 𝑥3 ′ + 𝑥4 ′)
Complexity:
• 2-SAT Problem: can be solved in polynomial time
• 3-SAT Problem: NP-complete problem (No known algorithm exist that can solve in
polynomial time for the worst case)
• k-SAT where k >3: NP-complete
1: decision_level ← 0
2: while (DECIDE( f, decision_level) != ALL_ASSIGNED) do
3: if (DEDUCE( f, decision_level) = CONFLICT) then
4: backtrack_level ← DIAGNOSE( f, decision_level)
5: if (backtrack_level = NOT_POSSIBLE) then
6: return UNSAT
7: else
8: BACKTRACK( f, decision_level, backtrack_level)
9: decision_level ← backtrack_level
10: end if
11: else
12: decision_level ← decision_level + 1
13: end if
14: end while ▪ S. Saurabh, “Introduction to VLSI Design Flow”. Cambridge: Cambridge University Press,
2023.
15: return SAT
VLSI Design Flow: RTL to GDS NPTEL 2023 S. Saurabh
Satisfiability Solver: Algorithm (2)
Improvements:
• Preprocessing to simplify the SAT problem,
• Employing efficient data structure for BCP
• Intelligent pruning of search spaces and random restarts
• Multicore processing
▪ S. Malik and L. Zhang. “Boolean satisfiability from theoretical hardness to practical success.”,
Communications of the ACM 52 (Aug. 2009), pp. 76–82.
▪ S. A. Cook. “The complexity of theorem-proving procedures.” Proceedings of the Third
Annual ACM Symposium on Theory of Computing, STOC ’71, (New York, NY, USA) (1971), pp.
151–158, ACM.
Lecture 19
Formal Verification- III
Sneh Saurabh
Electronics and Communications
Engineering
IIIT Delhi
Lecture Plan
Model Checking
▪ Verifies that for a given model
(design), whether the
Formal Verification
specifications or given set of
Usage
properties are satisfied
Equivalence Checking
Model Checking Equivalence Checking ▪ Verifies that the two
representations of the same
design will exhibit exactly the
same behavior
Model Checking
Challenges
▪ Model checker needs to verify that the given
property is valid as the FSM evolves through its
states
▪ For 𝑁 state elements: number of states can be
2𝑁
▪ This problem is known as the state explosion
problem
BDD-based Model
Checking
Example:
▪ Consider an FSM with five states 𝑄 = {𝑠0 , 𝑠1 , 𝑠2 , 𝑠3 , 𝑠4 }.
▪ Let the states be represented by 3 bits {𝑥2 𝑥1 𝑥0 }. We refer to these bits as state bits.
▪ We can encode these states {𝑠0 , 𝑠1 , 𝑠2 , 𝑠3 , 𝑠4 } as {000,001,010,011,100}.
▪ In this representation we can represent the subset of states: 𝐴 = 𝑠0 , 𝑠2 , 𝑠4 as a Boolean
function: 𝑓 𝑥2 , 𝑥1 , 𝑥0 = 𝑥2 ′𝑥1 ′𝑥0 ′ + 𝑥2 ′𝑥1 𝑥0 ′ +𝑥2 𝑥1 ′𝑥0 ′
▪ We can represent a large set using its characteristics function with the help of compact
BDDs
▪ We can also compute the transition from a set of states to another set of states very
efficiently using BDDs
▪ For a given set of states, we can compute image and preimage very efficiently using BDDs.
▪ BDD-based model checking relies on this computation
1: 𝑆𝑟𝑒𝑎𝑐ℎ ← 𝑆0
2: 𝑆𝑛𝑒𝑤 ← 𝑆0 ▪ States represented compactly
3: 𝑘 = 0 as characteristic functions
4: while (𝑆𝑛𝑒𝑤 ≠ {}) do using BDDs
5: 𝑘 ← 𝑘 + 1 ▪ Canonicity of BDDs eases
6: 𝑆𝑘 ← 𝐼𝑚𝑎𝑔𝑒(𝑆𝑛𝑒𝑤 , 𝑇) manipulation
7: 𝑆𝑛𝑒𝑤 ←𝑆𝑘 − 𝑆𝑟𝑒𝑎𝑐ℎ ▪ Pre-image computation: set of
8: 𝑆𝑟𝑒𝑎𝑐ℎ ← 𝑆𝑟𝑒𝑎𝑐ℎ ∪ 𝑆𝑛𝑒𝑤 all states from which 𝑆0 can be
9: end while reached.
10: return 𝑆𝑟𝑒𝑎𝑐ℎ
▪ Using preimage computation, we can determine the set of all states 𝑆𝑟𝑒𝑎𝑐ℎ ′ from which 𝑆𝑃
can be reached.
▪ If 𝑆𝑟𝑒𝑎𝑐ℎ ′ includes the initial state 𝑠0 , given property holds.
▪ If 𝑆𝑟𝑒𝑎𝑐ℎ ′ does not include the initial state 𝑠0 , the given property does not hold
VLSI Design Flow: RTL to GDS NPTEL 2023 S. Saurabh
BDD-based Model Checking: Limitations
▪ In the worst case, the size of BDD can be exponential in the number of inputs.
➢ A BDD-based representation of transition relation can blow up with an increase in the
number of state bits.
➢ Different variable orders can be tried
SAT-based Model
Checking
Mechanism:
▪ To derive 𝜙𝑛 , we unfold the behavior of the system one cycle at a time using the next-state
function until it reaches 𝑛th clock cycle.
▪ The Boolean function 𝜙𝑛 is the logical conjunction (ANDs) of clauses obtained from:
➢ Given initial state.
➢ The system behavior obtained from the next-state function.
➢ A Boolean expression that evaluates to 1 for a counterexample (derived from the given
property).
VLSI Design Flow: RTL to GDS NPTEL 2023 S. Saurabh
SAT-based Model Checking: Merits/Demerits
Merits:
▪ Avoids the problem of memory blow-up in representing transition relations in the BDD-based
model checking
➢ Next-state function grows linearly as the BMC traverses the next state in each cycle.
➢ But can take longer time by SAT solver because introduction of new variables
▪ Exploits power of SAT solver
Demerits:
▪ Lacks completeness.
➢ In practice, can quickly find bugs (if it exists)
▪ J. Herve, S. Hamid, L. Bill, K. B. Robert, and S.-V. Alberto. “Implicit state enumeration of
finite state machines using BDD’s.” Computer-aided Design, 1990ICCAD-90. Digest of
Technical Papers. 1990 IEEE International Conference on (1990), pp. 130–133.
Lecture 20
Formal Verification- IV
Sneh Saurabh
Electronics and Communications
Engineering
IIIT Delhi
Lecture Plan
Formal Verification
Usage
▪ Equivalence Checking
Equivalence
Checking
Combinational
Equivalence
Checking (CEC)
CEC:
• Create miter circuits for all flip-flops and output ports in the models
• For equivalent models, all miter circuits should be equivalent
Lecture 21
Technology Library
Sneh Saurabh
Electronics and Communications
Engineering
IIIT Delhi
Lecture Plan
Till now….
▪ Logic Synthesis:
➢ Transformation of RTL to netlist of generic logic gate
➢ Logic optimization
Subsequently ….
Libraries
▪ Header contains:
➢ PVT conditions, scaling factors, units
➢ Information that are valid for all the cells/pins/arcs
➢ List of cells
▪ Pin contains:
➢ Direction
➢ Capacitance
➢ Functionality (for output pins)
➢ List of timing arcs
➢ List of power arcs
Modelling Delay
▪ Delay Arc
10-90 Threshold:
▪ Rise slew: time taken for a signal to reach from 10%
to 90% of supply voltage
▪ Fall slew: time taken for a signal to reach from 90%
to 10% of supply voltage
u_table_template(index_1) {
variable_1 : input_net_transition ;
variable_2 : total_output_net_capacitance ;
index_1( "10, 20, 30" ) ;
index_2( "1.2, 5.0,15.0, 37.5) ;
}
….
pin(Z) {
timing() {
related_pin : “A" ;
timing_sense : positive_unate ;
cell_rise(index_1) {
values( " 4, 5, 7, 12, …3x4 table);
}
…
}
}
S. Saurabh, “Introduction to VLSI Design Flow”.Cambridge
University Press, 2023.
VLSI Design Flow: RTL to GDS NPTEL 2023 S. Saurabh
Library : Advanced Delay Model
timing() {
▪ Intermediate values are interpolated related_pin : “CP" ;
from closest match timing_type : "setup_rising";
rise_constraint(index_1) {
values( " 4, 5, 7, 12,
…3x4 table);
}
…
}
}
S. Saurabh, “Introduction to VLSI Design Flow”.Cambridge
University Press, 2023.
▪ S. Saurabh, “Introduction to VLSI Design Flow”. Cambridge: Cambridge University Press, 2023.
▪ Bhasker, Jayaram, and Rakesh Chadha. Static timing analysis for nanometer designs: A practical
approach. Springer Science & Business Media, 2009.
Lecture 22
Static Timing Analysis – Part I
Sneh Saurabh
Electronics and Communications
Engineering
IIIT Delhi
Lecture Plan
Basics
Required time for data to settle at FF2/D: 𝑡𝑟𝑒𝑞,𝑠𝑒𝑡 = 𝑇𝑝𝑒𝑟𝑖𝑜𝑑 + 𝑇𝑐𝑎𝑝𝑡𝑢𝑟𝑒 − 𝑇𝑠𝑒𝑡𝑢𝑝−𝑐
To avoid zero clocking and setup-time constraints of flip-flops: 𝑡𝑟𝑒𝑞,𝑠𝑒𝑡 > 𝑡𝑎𝑟𝑟𝑖𝑣𝑎𝑙
Data to arrive at FF2/D after the required time: 𝑡𝑟𝑒𝑞,ℎ𝑜𝑙𝑑 = 𝑇𝑐𝑎𝑝𝑡𝑢𝑟𝑒 + 𝑇ℎ𝑜𝑙𝑑−𝑐
To avoid double clocking and hold-time constraints of flip-flops: 𝑡𝑎𝑟𝑟𝑖𝑣𝑎𝑙 > 𝑡𝑟𝑒𝑞,ℎ𝑜𝑙𝑑
Hold requirement:
𝑇𝑙𝑎𝑢𝑛𝑐ℎ + 𝑇𝑐𝑙𝑘−𝑞𝑙 + 𝑇𝑑𝑎𝑡𝑎 > 𝑇𝑐𝑎𝑝𝑡𝑢𝑟𝑒 + 𝑇ℎ𝑜𝑙𝑑−𝑐
𝛿𝑙𝑐 + 𝑇𝑐𝑙𝑘−𝑞𝑙 + 𝑇𝑑𝑎𝑡𝑎 > 𝑇ℎ𝑜𝑙𝑑−𝑐
Lecture 23
Static Timing Analysis – Part II
Sneh Saurabh
Electronics and Communications
Engineering
IIIT Delhi
Lecture Plan
How it works
Interconnect:
▪ Zero capacitance models, parasitic
extraction
▪ Interconnect delay model: Lumped
Capacitance, Elmore, Asymptotic
Waveform Evaluation (AWE)
▪ Given a stage, we can compute the output waveform once we know the input waveform
▪ Each edge 𝑒𝑖,𝑗 has annotated information of delay 𝐷𝑖,𝑗 and slew 𝑆𝑖,𝑗
VLSI Design Flow: RTL to GDS NPTEL 2023 S. Saurabh
Arrival Time Computation: Basic Concept
Arrival Time (AT): time at which a signal settles at a given vertex
▪ AT can be computed in one traversal of the vertices and edges of the timing graph
1
0 4 5
3 8 9
7
0 1 2 3 4
5
6 7 8 9
0 1
▪ Assume that delay of all the edges = 1 time unit ▪ Similarly, minimum arrival time
computation can be done
▪ Assume that AT is 0 at all sources
▪ Setup/Late analysis: the maximum time by which a signal should arrive to avoid violation
▪ Hold/Early analysis: the minimum time after which a signal should arrive to avoid timing
violation
▪ RT can be computed in one traversal of the vertices and edges of the timing graph
▪ Delay of cell/net arcs calculated during AT computation is reused in RT computation
8
7 9 10
8
11 12
10
2 3 4 5 6
7
8 9 10 11
6 7
▪ Assume that delay of all the edges = 1 time unit ▪ Similarly, required time for hold
analysis can be computed
▪ Assume that RT is 11 and 12 as shown at the sinks
▪ Bhasker, Jayaram, and Rakesh Chadha. Static timing analysis for nanometer designs: A
practical approach. Springer Science & Business Media, 2009.
Lecture 24
Static Timing Analysis – Part III
Sneh Saurabh
Electronics and Communications
Engineering
IIIT Delhi
Lecture Plan
▪ Slew Propagation
▪ Accounting for Variations
▪ Bhasker, Jayaram, and Rakesh Chadha. Static timing analysis for nanometer designs: A
practical approach. Springer Science & Business Media, 2009.
Lecture 25
Constraints I
Sneh Saurabh
Electronics and Communications
Engineering
IIIT Delhi
Lecture Plan
▪ Basics of constraints
▪ Clock constraints
▪ Input/Output constraints
▪ Timing exceptions
▪ Attributes of a clock signal such as frequency, duty cycle, skew, uncertainty and delay
▪ Attributes of external incoming signal and expected behavior of the signals produced by a
design
Functionality of the design (informative)
▪ Timing exceptions (paths that are false and paths that are allowed to behave differently
than traditional synchronous behavior), modes of design
▪ Maximum slew at the port, maximum capacitance at a pin, and soft constraints
Clock Signal
current_design MyComp
create_clock -name EXT_CLK -period 10 -waveform {0 4}
[get_ports clk_in]
create_clock -name INT_CLK -period 10 [get_pins CS1/clk_g]
▪ Safety margins
▪ Bhasker, Jayaram, and Rakesh Chadha. Static timing analysis for nanometer designs: A
practical approach. Springer Science & Business Media, 2009.