Module 1 VLSI
Module 1 VLSI
(Deemed to be University)
Bengaluru Campus
School of Technology
VLSI Design
EECE3051
VLSI ?
What Should be the way to learn VLSI
Design
Semiconductor Industry Development Cycle
Text Books : 1. Design through verilog HDL by T.R.
Padmanabhan
2. Fundamentals of Digital logic with
verilog by Stephen Brown
In 2001, IEEE 1364 – 2001 was approved and this is the latest
Verilog Standard.
Syntax : OR Gate
or (output , input, input);
Example:
or (c, a, b); Digital Design with Verilog EEC346 21
Do and Don’t do
Example:
and (c, a, b);
Example:
AND (c, a, b);
Example:
and (C, A, B);
Keyword word / Syntax word like and, or, nand, nor, not, xor,
xnor – all should be in sentence case.
No restrictions for I/O declarations.
Syntax : OR Gate
assign output = input | input;
Example:
assign c = a | b;
Example:
xor (sum, a, b);
and (carry, a, b);
Example:
and (carry, a, b);
xor (sum, a, b);
Digital Design with Verilog EEC346 31
2. Simulation and Synthesis
Syntax module
Example :-
If a signal line ‘P’ is driven by two sources,
Q at 1 level with strength strong1
R at 0 level with strength pull0
//ha.v
Digital Design with Verilog EEC346 59
Example: Full Adder using Gate level modeling
S=x⊕y⊕Cin
Cout=x.y+x.cin+y.cin
t a b
0 0 0
2 1 X
4 2 1
6 3 2
8 4 3
For tri state gates the delays associated with the control signals
can be different from those of the input as well as the output.
Expression of bufif1 with delay:
Verilog Model:
module dff1(CLK, D, Q);
input CLK, D;
output Q;
always @(posedge CLK)
begin
Q <= D;
end
endmodule
Example
Verilog code 1-to-4 DEMUX using procedural
continuous assignment.
assign e = a && b;
assign f = c && d ;
assign g1 = e | f;
assign g = ~ g1;
Example: write the verilog code for A-O-I gate in data flow level.
(a) Combining assignment and Net declaration:
The assignment statement can be combining with the net
declaration itself making the assignment implicit in the net
declaration itself.
The AND gate can be declared as;
wire c;
assign c = a && b; both can be combined as
wire c = a && b;
Digital Design with Verilog EEC346 130
Contd ……
Verilog code for A-O-I gate using combining assignment
module aoigate(g,a,b,c,d);
input a,b,c,d;
output g;
wire g;
wire e = a && b;
wire f = c && d ;
wire g1 = e | f;
assign g = ~ g1; Digital Design with Verilog EEC346 131
Contd …………
(b) Continuous Assignment and Strength :
A net to which a continuous assignment is being made can
be assigned strength for its logic levels. The procedure is similar to
the strength allocation to the outputs of primitives.
The output of A-O-I gate (g) can be combined with the
wire declaration into a single statement as
wire (pull1, strong0) g = ~ g1;
module aoigate(g,a,b,c,d);
input a,b,c,d;
output g;
wire g;
wire e = a && b;
wire f = c && d ;
wire g1 = e | f;
= ~Design
assign (pull1, strong0) gDigital g1;with Verilog EEC346 133
Delay and Continuous Assignment
The operators + and – can also work as unary operators. They are
used to specify the positive or negative sign of the operand.
+A, - B
(b) Logical Operators:-
Logical operators are logical-and (&&), logical-or(ll), logical-not
(!). Logical and & logical or are binary operators and logical not is
unary operator.
Logical operators always evaluate to a 1-bit value: 0(false),
1(true), x(ambiguous).
If an operand is not equal to zero, it is equivalent to logical
1(true condition) & if an operand is equal to zero, it is equivalent to
logical 0(false condition).
If an operand bit is “x” or “z”, it is equivalent to x & it is treated
as false condition.
Digital Design with Verilog EEC346 142
(c) Relational Operator :-
Relational operators are greater – than (>), less – than (<), greater-
than-or-equal (>=) & less-than-or-equal (<=).
If relational operators are used in an expression, the expression
return a logical value of 1, if the expression is true and 0 if the
expression is false.
If there are x or z bits in the operands, the expression takes a
value of x.
Example:
X= 4’b 1010
& X= 1 & 0 & 1 & 0 // Ans : 0
^ X = 1 xor 0 xor 1 xor 0 // Ans : 0
~ X= 0101
~ ^ X= 1
Digital Design with Verilog EEC346 147
(g) Shift Operators :-
Shift operators are right shift (>>), left shift (<<), arithmetic right
shift (>>>) and arithmetic left shift (<<<).
Regular shift operators shift a vectors operand to the right or
left by a specified number of bits.
When the bits are shifted, for right & left shift, the vacant
bit positions are filled with zeros.
When the bits are shifted, for arithmetic shift right and shift
left, the vacant bit positions are filled with “1” if the first bit of
operand is signed number & “0” if the operand is unsigned
number.
0 1 X Z
control
0 0Jsdhfdjoikgrk
Z L L
1 1 Z H H
X X Z X X
Z Z Z Z Z
Ground (strong0)
Pulldown network consists of nmos because it pass strong0 (i.e.
it is OFF when gate is 0).
Pullup network consists of pmos because it pass strong1 (i.e. it
is OFF when gate is 1)