VLSID Unit1
VLSID Unit1
Dr.P.Anuradha
Associate Professor
ELECTRONICS & COMMUNICATION ENGINEERING
Chaitanya Bharathi Institute of Technology (A)
10 February 2025 1
VLSI DESIGN Syllabus
UNIT-I : Advanced Verilog HDL: Review of behavioral modelling. Functions and tasks. Switch
level Modelling, User Define Primitives (UDP), Design of Mealy and Moore state models using
Verilog, Logic Synthesis, RTL to GDS flow, Synthesis Design flow, Gate level Netlist.
UNIT-II : IC fabrication Steps: Process steps in IC fabrication. Crystal growth and wafer
preparation - Czochralski process –apparatus silicon shaping, slicing and polishing- Diffusion, Ion
implantation - Annealing process - Oxidation process - Lithography - Photolithography, electron
beam and xray lithography - Chemical Vapour Deposition (CVD) - epitaxial growth-reactors-
metallization and packaging.
UNIT-III : MOS and CMOS Circuits and Design Process: Introduction to MOS Technology, Basic
MOS Transistor action: Enhancement and Depletion Modes. Basic electrical properties of MOS,
Threshold voltage and Body Effect. Design of MOS inverters with different loads. Basic Logic
Gates with CMOS: INVERTER, NAND, NOR, AOI and OAI gates.
Scaling of Technology, MOS Layers, Stick diagrams, Lambda based Design rules and Layout
diagrams. 2
UNIT-IV: Designing of CMOS Circuits:
Sub system design Principles, Dynamic logic, BiCMOS inverter, pass transistors, Latch-up in
CMOS Circuits, Domino logic, Transmission gate logic circuits, Multiplexer and D flip flop using
Transmission gates. Design of complex circuits using AOI and OAI.
10 February 2025 3
Text Books:
1. Samir Palnitkar,“Verilog HDL:A guide to Digital design and synthesis”, 2/e, Pearson
Education, 2008.
2. Kamran Eshraghian, Douglas A. Pucknell, Sholeh Eshraghian, “Essentials of VLSI circuits
and systems”, PHI, 2011.
3. Neil HEWeste, David Harris, Ayan Banerjee, “CMOS VLSI Design–A circuit and System
Perspective”, 3/e, Pearson Education,2006.
4. Parag K Lal, “ Fault Tolerant and Fault Testable Hardware Design ” , BS Publications, 2020
5. S.M. Sze, VLSI Technology, McGraw-Hill, 2nd Edition, 1988.
Suggested Reading:
1. Michael D. Ciletti, “Advanced Digital Design with Verilog HDL”, PHI, 2005.
2. John P. Uyemura, “Introduction to VLSI Circuits and systems”, John Wiley & Sons, 2011.
3. Sung-Mo Kang & Yusuf Leblebici, CMOS Digital Integrated Circuits Analysis and Design,
McGraw-Hill, 1998.
10 February 2025 4
Course Outcomes:
Upon completion of this course, students will be able to:
1. Model a digital design using Advanced Verilog HDL constructs.
2. Analyze the characteristic behavior of MOSFET and discuss CMOS circuit Design Process
3. Explain various process steps involved in IC fabrication.
4. Design various NMOS and CMOS based logic circuits.
5. Discuss the concepts of subsystem designs and Testing.
10 February 2025 5
Introduction to Verilog HDL
• Verilog is a Hardware Description Language (HDL).
• It enables engineers to describe hardware at various abstraction levels, such as
behavioral, structural, and gate-level, and is widely used in designing ASICs, FPGAs, and
digital circuits.
• Designs, which are described in HDL are independent of technology, very easy for
designing and debugging, and are normally more useful than schematics, particularly
for large circuits.
• It is similar in syntax to the C programming language. Designers with C programming
experience will find it easy to learn Verilog HDL.
• Verilog HDL allows different levels of abstraction to be mixed in the same model. Thus,
a designer can define a hardware model in terms of switches, gates, RTL, or behavioral
code. Also, a designer needs to learn only one language for stimulus and hierarchical
design.
• Most popular logic synthesis tools support Verilog HDL. This makes it the language of
choice for designers.
7
Basic Concepts of Verilog HDL
Lexical Conventions
The basic lexical conventions used by Verilog HDL are similar to those in the C
programming language. Verilog contains a stream of tokens. Tokens can be
comments, delimiters, numbers, strings, identifiers, and keywords. Verilog HDL is
a case-sensitive language. All keywords are in lowercase.
Whitespace
Blank spaces (\b) , tabs (\t) and newlines (\n) comprise the whitespace.
Whitespace is ignored by Verilog except when it separates tokens.
Whitespace is not ignored in strings.
Comments
Comments can be inserted in the code for readability and documentation. There
are two ways to write comments.
A one-line comment starts with "//". Verilog skips from that point to the end of
line.
A multiple-line comment starts with "/*" and ends with "*/".
Multiple-line comments cannot be nested.
However, one-line comments can be embedded in multiple-line comments.
a = b && c; // This is a one-line comment
/* This is a multiple line comment */
/* This is /* an illegal */ comment */
/* This is //a legal comment */
Operators
Operators are of three types: unary, binary, and ternary.
Unary operators precede the operand. Binary operators appear between two
operands. Ternary operators have two separate operators that separate three
operands.
a = ~ b; // ~ is a unary operator. b is the operand
a = b && c; // && is a binary operator. b and c are operands
a = b ? c : d; // ?: is a ternary operator. b, c and d are operands
Number Specification
There are two types of number specification in Verilog: sized and unsized.
Sized numbers
Sized numbers are represented as <size> '<base format> <number>.
<size> is written only in decimal and specifies the number of bits in the number.
Legal base formats are decimal ('d or 'D), hexadecimal ('h or 'H), binary ('b or 'B)
and octal ('o or 'O).
The number is specified as consecutive digits from 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, a, b,c,
d, e, f.
Only a subset of these digits is legal for a particular base. Uppercase letters are
legal for number specification.
4'b1111 // This is a 4-bit binary number
12'habc // This is a 12-bit hexadecimal number
16'd255 // This is a 16-bit decimal number.
Unsized numbers
Numbers that are specified without a <base format> specification are decimal
numbers by default.
Numbers that are written without a <size> specification have a default number of
bits that is simulator and machine specific (must be at least 32).
23456 // This is a 32-bit decimal number by default
'hc3 // This is a 32-bit hexadecimal number
'o21 // This is a 32-bit octal number
• X or Z values
Verilog has two symbols for unknown and high impedance values.
These values are very important for modeling real circuits. An unknown value is
denoted by an x. A high impedance value is denoted by z.
12'h13x // This is a 12-bit hex number; 4 least significant bits unknown
6'hx // This is a 6-bit hex number
32'bz // This is a 32-bit high impedance number
An x or z sets four bits for a number in the hexadecimal base, three bits for a
number in the octal base, and one bit for a number in the binary base.
If the most significant bit of a number is 0, x, or z, the number is automatically
extended to fill the most significant bits, respectively, with 0, x, or z.
This makes it easy to assign x or z to whole vector. If the most significant digit is 1,
then it is also zero extended.
• Negative numbers
Negative numbers can be specified by putting a minus sign before the size for a
constant number.
Size constants are always positive. It is illegal to have a minus sign between <base
format> and <number>.
An optional signed specifier can be added for signed arithmetic.
-6'd3
4'd-2 // Illegal specification
• Underscore characters and question marks
An underscore character "_" is allowed anywhere in a number except the first
character.
Underscore characters are allowed only to improve readability of numbers and
are ignored by Verilog.
A question mark "?" is the Verilog HDL alternative for z in the context of
numbers.
The ? is used to enhance readability in the casex and casez statements
4'b10?? // Equivalent of a 4'b10zz
Strings
• A string is a sequence of characters that are enclosed by double quotes.
• The restriction on a string is that it must be contained on a single line, that is,
without a carriage return.
• It cannot be on multiple lines. Strings are treated as a sequence of one-byte ASCII
values.
"Hello Verilog World" // is a string
"a / b" // is a string
Identifiers and Keywords
• Keywords are special identifiers reserved to define the language constructs.
• Keywords are in lowercase.
• Identifiers are names given to objects so that they can be referenced in the
design.
• Identifiers are made up of alphanumeric characters, the underscore ( _ ), or the
dollar sign ( $ ).
• Identifiers are case sensitive. Identifiers start with an alphabetic character or an
underscore.
• They cannot start with a digit or a $ sign (The $ sign as the first character is
reserved for system tasks, which are explained later in the book).
reg value; // reg is a keyword; value is an identifier
input clk; // input is a keyword, clk is an identifier
Data Types
Value Set
Verilog supports four values to model the functionality of real hardware.
Nets
• Nets represent connections between hardware elements. Just as in real circuits, nets
have values continuously driven on them by the outputs of devices that they are
connected to.
• In Figure 3-1 net a is connected to the output of and gate g1. Net a will continuously
assume the value computed at the output of gate g1, which is b & c.
• Nets are declared primarily with the keyword wire. Nets are one-bit values by default
unless they are declared explicitly as vectors.
• The terms wire and net are often used interchangeably. The default value of a net is z
(except the trireg net, which defaults to x ).
• Nets get the output value of their drivers. If a net has no driver, it gets the value z.
wire a; // Declare net a for the above circuit
wire b,c; // Declare two wires b,c for the below circuit
wire d = 1'b0; // Net d is fixed to logic value 0 at declaration.
Registers
• Registers represent data storage elements. Registers retain value until another
value is placed onto them. Do not confuse the term registers in Verilog with
hardware registers built from edge-triggered flipflops in real circuits.
• In Verilog, the term register merely means a variable that can hold a value. Unlike
a net, a register does not need a driver.
• Verilog registers do not need a clock as hardware registers do.
• Values of registers can be changed anytime in a simulation by assigning a new
value to the register.
• Register data types are commonly declared by the keyword reg
Example 3-1 Example of Register
reg reset; // declare a variable reset that can hold its value
initial
begin
reset = 1'b1; //initialize reset to 1 to reset the digital circuit.
#100 reset = 1'b0; // after 100 time units reset is deasserted.
end
Registers can also be declared as signed variables. Such registers can be used for signed
arithmetic.
Example 3-2 shows the declaration of a signed register.
Vectors can be declared at [high# : low#] or [low# : high#], but the left number in
the squared brackets is always the most significant bit of the vector.
In the example shown above, bit 0 is the most significant bit of vector virtual_addr.
Parameters
Verilog allows constants to be defined in a module by the keyword parameter.
Parameters cannot be used as variables.
Parameter values for each module instance can be overridden individually at
compile time. This allows the module instances to be customized.
Parameter types and sizes can also be defined.
parameter port_id = 5; // Defines a constant port_id parameter
cache_line_width = 256; // Constant defines width of cache line parameter
signed [15:0] WIDTH; // Fixed sign and range for parameter
Types of modeling
• Verilog HDL supports four kinds of modeling styles:
❖ Gate-level
❖ Structural
❖ Dataflow
❖ Behavioral
Gate-Level Modeling
At gate level, the circuit is described in terms of gates (e.g., and, nand). Hardware design at
this level is intuitive for a user with a basic knowledge of digital logic design because it is
possible to see a one-to-one correspondence between the logic circuit diagram and the
Verilog description.
Gate Types
A logic circuit can be designed by use of logic gates. Verilog supports basic logic gates as
predefined primitives. These primitives are instantiated like modules except that they are
predefined in Verilog and do not need a module definition. All logic circuits can be designed by
using basic gates. There are two classes of basic gates: and/or gates and buf/not gates.
26
Gatelevel Modeling Example1: Combinational Logic (2-to-1 Multiplexer)
29
Turn-off delay
• The turn-off delay is associated with a gate output transition to the
considered
30
Delay Example
31
Delay Example
32
33
Structural Modeling
• Represents the design by interconnecting pre-defined modules (including gates or higher-
level modules).
• Defines circuits by instantiating and connecting existing modules.
• Focuses on the netlist and instantiation of lower-level modules.
• Mirrors the hardware implementation.
• Uses module instances, which can include gates, flip-flops, or even other structural blocks.
Structural Modeling Example2: Combinational Logic (4-to-1 Multiplexer)
40
Regular Assignment Delay
• The first method is to assign a delay value in a continuous assignment statement.
• The delay value is specified after the keyword assign. Any change in values of in1 or in2 will result in
a delay of 10 time units before recomputation of the expression in1 & in2, and the result will be
assigned to out.
• If in1 or in2 changes value again before 10 time units when the result propagates to out, the values
of in1 and in2 at the time of recomputation are considered.
• This property is called inertial delay. An input pulse that is shorter than the delay of the assignment
statement does not propagate to the output.
• Ex: assign #10 out = in1 & in2; // Delay in a continuous assign
• When signals in1 and in2 go high at time 20, out goes to a high 10 time units later (time = 30)
41
Implicit Continuous Assignment Delay
• An equivalent method is to use an implicit continuous assignment to specify both a delay and an
assignment on the net.
42
Net Declaration Delay
• A delay can be specified on a net when it is declared without putting a
continuous assignment on the net. If a delay is specified on a net out,
then any value change applied to the net out is delayed accordingly.
Net declaration delays can also be used in gate-level modeling.
43
Dataflow model Example
44
Dataflow model Example
45
Behavioral Modeling
• Behavioral modeling describes the behavior of the system using high-level constructs,
algorithmic way without specifying hardware details.
• Suited for testbenches and high-level design descriptions.
• Uses constructs like if-else, case, loops (for, while), always, initial and procedural blocks.
• always block: Key feature for sequential and combinational logic.
• Sensitivity list (@(...)) defines the conditions under which the block is executed.
• Useful for designing synchronous circuits where behavior depends on clock edges or reset
signals.
• During simulation of behavioral model, all the flows defined by the ‘always’ and ‘initial’
statements start together at simulation time ‘zero’.
• The initial statements are executed once, and the always statements are executed
repetitively. In this model, the register variables a and b are initialized to binary 1 and 0
respectively at simulation time ‘zero’.
• The initial statement is then completed and is not executed again during that simulation
run.
• This initial statement is containing a begin-end block (also called a sequential block) of
statements. In this begin-end type block, a is initialized first followed by b.
Behavioral Modeling Syntax
1. always Block
The always block is the foundation of behavioral modeling. It executes based on its sensitivity
list.
2. Sequential Logic (Flip-Flops, Registers)
Synchronous behavior is modeled using clock signals.
3. Case Statement
Simplifies logic with multiple conditions.
4. Loops
Useful for describing iterative or repetitive logic.
Behavioral Modeling Example4: Combinational Logic (2-to-1 Multiplexer)
•@(posedge clk): Triggers the block on the positive edge of the clock.
•<=: Non-blocking assignment used for sequential logic.
Behavioral Modeling Example6: 4-to-1 Multiplexer
module mux4to1 ( input [3:0] in, input [1:0] sel, output reg y);
always @(*)
begin
case (sel)
2'b00: y = in[0];
2'b01: y = in[1];
2'b10: y = in[2];
2'b11: y = in[3];
default: y = 0;
endcase •always block describes behavior and is executed whenever any signal
end in its sensitivity list changes.
endmodule •The @(*) syntax automatically includes all input signals (in, sel) in
the sensitivity list, ensuring proper updates.
Four bit Asynchronous Counter
51
Behavioral Modeling Example6: Four bit Asynchronous Counter
module AsyncCounter4Bit ( input clk, input reset, output reg [3:0] Q );
endmodule
Behavioral Modeling Example6: Four bit Asynchronous Counter Testbench
module AsyncCounter4Bit_tb;
reg clk;
reg reset;
wire [3:0] Q;
// Clock generation
initial begin
clk = 0;
forever #10 clk = ~clk; // Clock period of 20 time units
end
Behavioral Modeling Example6: Four bit Asynchronous Counter Testbench
// Test sequence
initial begin
reset = 1; #15; // Apply reset
reset = 0; #200; // Release reset and observe counting
reset = 1; #10; // Reset again
reset = 0; #100; // Observe counting again
$stop;
end
endmodule
Four bit Asynchronous upcounter Simulation output
Behavioral Modeling Example7: 4-to-2 Priority Encoder
module priority_encoder ( input wire [3:0] in, output reg [1:0] out,
output reg valid); // Indicates if any input is active
integer i; // Loop variable
always @(*)
begin
valid = 0; // Default: no active input
out = 2'b00; // Default: output position is 0
// Priority logic using a for loop
for (i = 3; i >= 0; i = i - 1) begin
if (in[i]) begin
out = i[1:0]; // Assign the index of the active input
valid = 1; // Indicate that a valid input was found
break; // Exit loop after the highest-priority input is found
end
end
end
endmodule
Behavioral Modeling Example7: 4-to-2 Priority Encoder
`timescale 1ns / 1ps
module priority_encoder_tb;
// Testbench signals
reg [3:0] in; // 4-bit input
wire [1:0] out; // 2-bit output
wire valid; // Valid flag
// Function definition
function [7:0] add_two_numbers;
input [7:0] a, b;
begin
add_two_numbers = a + b; // Return the sum
end
endfunction
initial begin
a = 8'h15; // Example values
b = 8'h20;
#1; // Wait for combinational logic
$display("Function: Sum of %h and %h is %h", a, b, sum);
end
endmodule
task Example
module adder_with_task(a,b,sum);
input [7:0] a, b;
output reg [7:0] sum;
// Task definition
task add_two_numbers;
input [7:0] a, b;
output [7:0] result;
begin
result = a + b; // Perform addition
end
endtask
initial begin
a = 8'h15; // Example values
b = 8'h20;
add_two_numbers(a, b, sum); // Call the task
$display("Task: Sum of %h and %h is %h", a, b, sum);
end
endmodule
PARITY GENERATION USING FUNCTIONS
module parity(addr,parity);
input [3:0] addr;
output reg parity;
endmodule
Function Example
(Testbench)
module parity_tb;
reg [3:0] addr;
wire parity;
parity uut ( . addr(addr), .parity(parity) );
initial begin
$monitor($time," Input: addr =%4b output: Parity=%b," addr,parity);
// Initialize Inputs
addr = 0;
#10 addr =4'b 1111 ;
#10 addr =4'b 1000;
#10 addr =4'b 1110 ;
#10 addr =4'b 1010 ;
#10 addr =4'b 1011 ;
#10 addr=4'b 1010;
#20 $stop
end
endmodule
Simulation Output
endmodule
// Testbench for the operation module
module tb_operation;
reg [15:0] A, B; wire [15:0] AB_AND, AB_OR, AB_XOR;
// Instantiate the operation module
operation uut ( .A(A),.B(B),.AB_AND(AB_AND),.AB_OR(AB_OR),
.AB_XOR(AB_XOR) );
initial begin
// Initialize inputs
A = 16'h0000; B = 16'h0000;
#10;
// Apply first set of inputs
A = 16'hF0F0; B = 16'h0F0F;
#10;
// Apply second set of inputs
A = 16'hAAAA; B = 16'h5555;
#10;
// Apply third set of inputs
A = 16'hFFFF; B = 16'h0000;
#10;
// Apply fourth set of inputs
A = 16'h1234; B = 16'h5678;
#10;
// Apply fifth set of inputs
A = 16'hFFFF; B = 16'hFFFF;
#10;
initial begin
$monitor("Time = %0t | A = %h, B = %h | AB_AND = %h, AB_OR = %h, AB_XOR =
%h", $time, A, B, AB_AND, AB_OR, AB_XOR);
end
endmodule
Simulation Output
reg clock;
initial
init_sequence(); // Invoke the task init_sequence
always begin
asymmetric_sequence(); // Invoke the task asymmetric_sequence
end
Example2: Generate Asymmetric Clock Sequence Using Tasks
endmodule
Example2: Generate Asymmetric Clock Sequence Using Tasks (Test bench program)
module sequence_tb;
wire clock;
sequence uut ( .clock(clock));
initial begin
$monitor("Time = %0t, Clock = %b", $time, clock);
end
initial begin
#100 $finish;
end
endmodule
Example2: Generate Asymmetric Clock Sequence Using Tasks (Result)
Time = 0, Clock = 0
Time = 12, Clock = 0
Time = 17, Clock = 1
Time = 20, Clock = 0
Time = 30, Clock = 1
98
User Define Primitives (UDP)
• Verilog provides a standard set of primitives, such as and, nand, or, nor, and not, as a part of
the language.
• These are also commonly known as built-in primitives. However, designers occasionally like to
use their own custom-built primitives when developing a design.
• Verilog provides the ability to define User-Defined Primitives (UDP).
• These primitives are self-contained and do not instantiate other modules or primitives.
• UDPs are instantiated exactly like gate-level primitives.
107
4-to-1 Multiplexer with UDP
primitive mux4_to_1 ( output out, input i0, i1, i2, i3, s1, s0);
table
// i0 i1 i2 i3, s1 s0 : out
1???00:1;
0???00:0;
?1??01:1;
?0??01:0;
??1?10:1;
??0?10:0;
???111:1;
???011:0;
????x?:x;
?????x:x;
endtable
108
endprimitive
4-to-1 Multiplexer
// Stimulate the inputs
with UDP:// Stimulate the inputs
initial
begin
// set input lines
IN0 = 1; IN1 = 0; IN2 = 1; IN3 = 0;
#1 $display("IN0= %b, IN1= %b, IN2= %b, IN3= %b\n",IN0,IN1,IN2,IN3);
// choose IN0
S1 = 0; S0 = 0;
#1 $display("S1 = %b, S0 = %b, OUTPUT = %b \n", S1, S0, OUTPUT);
// choose IN1
S1 = 0; S0 = 1;
#1 $display("S1 = %b, S0 = %b, OUTPUT = %b \n", S1, S0, OUTPUT);
// choose IN2
S1 = 1; S0 = 0;
#1 $display("S1 = %b, S0 = %b, OUTPUT = %b \n", S1, S0, OUTPUT);
// choose IN3
S1 = 1; S0 = 1;
#1 $display("S1 = %b, S0 = %b, OUTPUT = %b \n", S1, S0, OUTPUT);
end
endmodule
109
The output of the simulation is shown below.
110
Sequential UDPs
Sequential UDPs differ from combinational UDPs in their definition and behavior.
Sequential UDPs have the following differences:
• The output of a sequential UDP is always declared as a reg.
• An initial statement can be used to initialize output of sequential UDPs.
• The format of a state table entry is slightly different.
• <input1> <input2> ..... <inputN> : <current_state> :<next_state>;
• There are three sections in a state table entry: inputs, current state, and next state.
The three sections are separated by a colon (:) symbol.
• The input specification of state table entries can be in terms of input levels or edge transitions.
• The current state is the current value of the output register.
• The next state is computed based on inputs and the current state. The next state becomes the
new value of the output register.
• All possible combinations of inputs must be specified to avoid unknown output values.
Level-Sensitive Sequential UDPs
Level-sensitive UDPs change state based on input levels. Latches are the most common example of level-sensitive UDPs.
113
Edge-Sensitive Sequential UDPs
Finite-State machine
A Finite-State Machine (FSM) is abstract model of describing sequential logic circuits and
software systems.
Each FSM has a set of inputs and outputs and a finite set of internal states.
It represents a system that can be in one of a finite number of states at any given time and
transitions between states based on inputs and logic.
We have 2 FSM models depending on how output is generated .
Melay machine and Moore Machine.
Finite-State machine
Types of FSM
1. Moore Machine:
The output depends only on the current state.
Outputs are updated at state transitions.
Output Function: Output=f(State)
State Diagram: Each state has associated outputs.
2. Mealy Machine:
The output depends on both the current state and the inputs.
Outputs can change without a state transition.
Output Function: Output=f(State, Input)
State Diagram: Transitions between states include outputs.
Mealy State Machine
• A Finite State Machine is said to be Mealy state machine, if outputs
depend on both present inputs & present states.
• The block diagram of Mealy circuit model is shown in the following
figure.
Moore State Machine
• A Finite State Machine is said to be Moore state machine, if outputs depend
only on present states. The block diagram of Moore state machine is shown in
the following figure.
Finite-State machine
The behavior of the machine can be represented in 3 different ways.
1. State transition diagram: Pictorial way of representing the behavior of the FSM.
2. State table : represents same information in tabular form.
3. State equation: the algebraic way of representing same information.
Sequence Detector
• It is a sequential machine which produces an o/p 1 every time the desired
sequence is detected and an o/p 0 at all other times.
• Sequence detector is a good example to describe FSMs. It produces a pulse
output whenever it detects a predefined sequence.
• The sequence detectors can be of two types: with overlapping and without
overlapping.
• We have considered a 4-bit sequence “1010”.
• For example, consider the input sequence as “11010101011”.
• Then in ‘without overlapping’ style, the output y will be “00001000100” and the
output y in ‘with overlapping’ style will be “00001010100”. The ‘with
overlapping’ style also considers the overlapping sequences.
Design a sequence detector to detect a sequence
“1010” for an overlapping case using Mealy machine
• The first step of an FSM design is to draw the state diagram.
• State table
• Transition and output table
• Excitation table
• Logic diagram after simplification with K map
To detect the sequence 1010: overlapping is permitted if the input sequence is 01101010 and the output
sequence is 00000101.
State table Transition Table
Excitation Table
Logic Diagram
Verilog code of sequence detector to detect a sequence
“1010” for an overlapping case using Mealy machine
module sequence_detector_mealy( input clk, input reset, input in_bit,
output reg detected );
// State encoding
parameter S0 = 2'b00, // Initial state
S1 = 2'b01, // "1" detected
S2 = 2'b10, // "10" detected
S3 = 2'b11; // "101" detected
135
// State transition logic (sequential)
always @(posedge clk or posedge reset) begin
if (reset)
current_state <= S0; // Reset to initial state
else
current_state <= next_state; // Update to next state
end
// Next state and output logic (combinational)
always @(*) begin
// Default values
next_state = S0;
detected = 0;
136
case (current_state)
S0: begin
if (in_bit)
next_state = S1; // Move to S1 on input 1
else
next_state = S0; // Stay in S0 on input 0
end
S1: begin
if (in_bit)
next_state = S1; // Stay in S1 on input 1
else
next_state = S2; // Move to S2 on input 0
end 137
S2: begin
if (in_bit)
next_state = S3; // Move to S3 on input 1
else
next_state = S0; // Go back to S0 on input 0
end
S3: begin
if (in_bit)
next_state = S1; // Restart to S1 on input 1
else begin
next_state = S2; // Move to S2 on input 0
detected = 1; // Sequence "1010" detected
end end 138
default: next_state = S0; // Default case
endcase
end
endmodule
139
TestBench Program
module tb_sequence_detector_mealy;
// Testbench signals
reg clk;
reg reset;
reg in_bit;
wire detected;
// Test sequence
initial begin
// Initialize inputs
clk = 0;
reset = 1;
in_bit = 0;
// Monitor outputs
initial begin
$monitor("Time = %0d | Reset = %b | Input = %b | Detected = %b",
$time, reset, in_bit, detected);
end
endmodule
143
144
145
1010 Overlapping Moore Sequence Detector (Verilog Code)
module sequence_detector_1010_moore ( input clk, input rst, input din, output reg dout );
// State encoding using parameters
parameter A = 3'b000, // Initial state
B = 3'b001, // Detected '1'
C = 3'b010, // Detected '10'
D = 3'b011, // Detected '101'
E = 3'b100; // Detected '1010'
D: begin
detected = (din == 0) ? 1 : 0; // '1010' detected
next_state = (din == 0) ? B : C; // Overlapping sequence handling
end
default: next_state = A;
endcase
end
endmodule
Integrated Circuit (IC)
• Monolithic chips containing several components.
• Monolithic silicon chip: It means that the silicon chip or substrate, consisting of
only single crystal of silicon.
• And over that single crystal of silicon we are integrating multiple components
like transistors, diodes, resisters and so on. It is not that we are putting together
different components them combining or adding them together.
• On the silicon substrate using some technology we are growing transistors or
making transistors, diodes, resisters and so on. And as a result the complete
system is one piece of monolithic silicon chip. And that is what is known as IC.
VLSI Design Flow
• The VLSI (Very Large Scale Integration) Design Flow is a systematic process for designing and developing
integrated circuits (ICs) or microchips. This methodology employs a divide-and-conquer approach, breaks the
entire chip designing task and manufacturing into multiple sequential steps. Throughout this flow, a design
undergoes numerous transformations, evolving from an initial idea/concept to a finalized chip.
• Initially, the design is represented at the Register Transfer Level (RTL), typically written in hardware description
languages such as VHDL or Verilog. This RTL description serves as the foundation for the design process, which
ultimately culminates in a layout formatted as a Graphical Database System (GDS) file. Thus, two essential
milestones in the journey from concept to chip are identified: RTL and GDS.
• Based on these milestones, the entire design process can be divided into three distinct phases:
• Idea/Concept to RTL: This phase involves translating a high-level idea or product concept into an RTL
representation, effectively capturing the hardware portion of the idea . This stage is often referred to as system-
level design or the “idea/concept to RTL" flow.
• RTL to GDS Flow: In this phase, the RTL description undergoes various stages of logical and physical design,
resulting in a layout represented in GDS format. This comprehensive process includes logic synthesis,
verification, physical design, and testing.
• GDS to Chip: Once the layout is finalized, it is sent to a foundry for fabrication. The foundry utilizes the GDS file
to prepare masks, fabricate the IC, conduct testing, package the chips, and ultimately release the product to the
market.
• Each of these phases is critical in ensuring the successful development and deployment of an integrated circuit,
adhering to the specified design requirements and performance criteria.
RTL to GDS Flow
• The RTL (Register Transfer Level) to GDS Flow is a
comprehensive process in IC (Integrated Circuit) design that
transforms RTL which is a high-level hardware description into
a manufacturable layout.
• This flow encompasses both front-end and back-end design
stages, ensuring the final product meets all functional,
performance, and physical requirements.
RTL to GDS Flow
• RTL : Develop the design using Hardware Description Languages
(HDLs) like Verilog or VHDL, capturing the desired behavior at the
register-transfer level.
• Logic Synthesis: Convert the verified RTL code into a gate-level netlist
using a standard cell library, optimizing for area, speed, and power.
• Physical Design: Process by which a design in the form of a netlist is
converted to an equivalent design in the form of layout or GDS
(geometrical patterns of masks).
Logic Synthesis
• Logic Synthesis: process by which RTL is converted to an equivalent
circuit as interconnection of logic gates, which are picked from
technology libraries.
Synthesis Design Flow
•RTL Description:
•The design is written at a high level using RTL constructs in Verilog or VHDL.
•The RTL design consists of registers, combinational logic, and sequential elements.
•Translation:
•The synthesis tool describes the HDL code and converts it into an intermediate representation (IR), which is an
internal format understood by the tool.
•Unoptimized Intermediate Representation:
•This is an internal representation of the design in terms of basic gates and operations, but it is not yet
optimized.
•The synthesis tool represents the design using data structures like Abstract Syntax Trees (ASTs) or Directed
Acyclic Graphs (DAGs).
•Logic Optimization:
•The synthesis tool applies Boolean algebra transformations, redundancy elimination, and logic restructuring to
optimize the design. The goal is to reduce area, power consumption, and timing delay.
•Technology Mapping and Optimization:
•The optimized logic is mapped to the available ASIC standard cells or FPGA lookup tables (LUTs).
•Further optimizations, such as gate resizing, buffer insertion, and multi-VT optimization, may be performed.
Physical Design
Process by which a design in the form of a netlist is converted to an equivalent design in the form
of layout or GDS (geometrical patterns of masks)
In physical design, all components like macros, cells, gates, transistors, etc with fixed sizes and shapes are placed at the
location in the fabrication layer to perform appropriate routing. Physical design is performed according to DRC (Design Rule
Check) which depends on the capabilities of fabrication technology. For example, wires must be kept at a proper distance
between them. Physical design directly impacts circuit performance, area, reliability, power, and manufacturing yield.
VLSI Design Flow
VLSI Design Flow
1. Specifications
•Define the functionality, performance, area, and power requirements.
•Specify input/output interfaces, technology node, and system constraints.
2. Architectural Design
•Decide the high-level design, including major blocks like processors, memory, and interconnects.
•Perform trade-off analysis for performance, power, and area.
3. Functional Design and Logic Design
•Once the architecture is defined the connectivity and functionality can be defined in this step. That is each module
has an input-output and timing behavior.
•Logic design converts the architectural description into a register-transfer level (RTL) design using hardware
description languages (HDLs) like Verilog or VHDL. Focus on modules, control units, and data path design.
•There are logic synthesis tools that automate the process of converting HDL into low-level circuit elements. That is
by using Verilog or VHDL description and the technology library a logic synthesis tool can map all the functionalities
to the list of signal nets, and specific circuit elements like transistors.
VLSI Design Flow
4. Circuit Design:
After the automatic conversion of standard cells or higher, there are several critical and low-level elements that must be
designed at the transistor level this is called circuit design.
The circuit design phase is where the RTL description is translated into a circuit-level implementation. This involves the
creation of a gate-level netlist, which is a low-level description of the circuit in terms of logic gates.
The gate-level netlist is then optimized to improve performance, power consumption, and area utilization. This optimization is
done using computer-aided design (CAD) tools, which are software programs that automate the design process.
The gate-level netlist is also verified through simulation to ensure that it functions correctly. This involves the creation of test
benches, which are software programs that generate inputs to the circuit and verify that the outputs are correct.
For example, elements like RAM blocks, I/O, analog circuits, Multipliers, and ESD protection circuits are designed in circuit-
level design. The verification of circuit design is done by the simulation tools like SPICE.
VLSI Design Flow
5. Physical Design:
In physical design, all components like macros, cells, gates, transistors, etc with fixed sizes and shapes are placed at the
location in the fabrication layer to perform appropriate routing. Physical design is performed according to DRC (Design Rule
Check) which depends on the capabilities of fabrication technology. For example, wires must be kept at a proper distance
between them. Physical design directly impacts circuit performance, area, reliability, power, and manufacturing yield.
Due to the high complexity of physical design, it split into several steps as follows-
1) Partitioning
2) Floorplanning
3) Power and Ground Routing
4) Placement
5) Clock Network Synthesis
6) Global Routing
7)Detailed Routing
8) Timing Closure
The physical design phase is a critical step in the VLSI design flow because the physical layout can have a significant impact on
the performance, power consumption, and area utilization of the chip. Therefore, the physical design is optimized using CAD
tools to improve these metrics.
VLSI Design Flow
6. Physical Verification:
After the physical design, the designed layout must be verified to ensure correct functionality. In this step after verification,
some problems found can be neglected if they cause a nominal impact on performance but if causing a major impact then the
layout needs to be changed. This is done by experienced design engineers. Some types of verifications are performed in this
step as follows-
7. Fabrication:
The final Layout represented in the GDSII stream format is sent for manufacturing at a dedicated silicon foundry(Fab). The
handoff of the design to the manufacturing process is called tape out. The generation of data for manufacturing is sometimes
referred to as streaming out. At fab, the design pattern is printed on different layers using photolithography. ICs are
manufactured on round silicon wafers of diameter from 200mm to 300mm. The IC must be tested after fabrication and cut
into smaller pieces to get the end chip.
The fabrication process is a complex and expensive process that requires specialized equipment and facilities. Therefore, it is
typically outsourced to semiconductor foundries that specialize in chip manufacturing.
VLSI Design Flow
The testing phase is a critical step in the VLSI design flow because it ensures that the final product meets the design
specifications and is free from defects. Therefore, the testing process is performed rigorously to ensure the quality of the
final product.