Professional Documents
Culture Documents
Vlsidesign 120218133449 Phpapp02 PDF
Vlsidesign 120218133449 Phpapp02 PDF
Reference Material
By
Verilog Course Team
Where Technology and Creativity Meet
Contact Us
VERILOG COURSE TEAM
Email:info@verilogcourseteam.com
Blog: www.vlsiprojects.blogspot.com
Web: www.verilogcourseteam.com
Phone: +91 98942 20795
Revision: 1
Disclaimer:
Due care and diligence has been taken while editing of this material. Verilog
Course Team does not warrant or assume any legal liability or responsibility
for the accuracy, completeness, or usefulness of any information, apparatus,
product, or process disclosed. No warranty of any kind, implied, expressed or
statutory, including to fitness for a particular purpose and freedom from
computer virus, is given with respect to the contents of this material or its
hyperlinks to other Internet resources. The material acts as just a reference to
move forward and understand the concept. Reference in this material to any
specific commercial products, processes, or services, or the use of any trade,
firm or corporation name is for the information, and does not constitute
endorsement, recommendation, or favoring.
Our Mission
Our mission is to provide cost effective, technology independent, good quality
reusable Intellectual Property cores
are
designed and devoted to empower their competitive edge and help them succeed.
Preface
The India Semiconductor Association (ISA), an Indian semiconductor
industry organization, has briefed growth, trends and forecasts for the Indian
semiconductor market in collaboration with a U.S. consulting company Frost
& Sullivan.
The report titled as "ISA-Frost & Sullivan 2007/2008 Indian Semiconductor
Market Update."
According to the report, total semiconductor consumption in India (total value
of semiconductors used for devices marketed in India) was $2.69 billion
(USD) in 2006. The $2.69 billion represents 1.09% of the global
semiconductor market. Of the total semiconductor consumption in India,
consumption by local Indian set manufacturers accounted for $1.26 billion.
The overall Indian semiconductor consumption will grow at an average rate of
26.7% per year in 2006 through 2009. Based on the actual consumption in
2006, the overall Indian semiconductor consumption is forecast to be $5.49
billion in 2009. This represents 1.62% of the global semiconductor market in
2009.
Semiconductor consumption by local Indian set manufacturers is predicted to
increase at 35.8% per year in 2006 through 2009 and amount to $3.18 billion
in 2009.
This material is the result of the Verilog Course Teams practical experience
both in Design/Verification and Training. Many of the examples illustrated
throughout the material are real designs models. With Verilog Course Teams
training experience has led to step by step presentation, which addresses
common mistakes and hard-to-understand concepts in a way that eases
learning.
Verilog Course Team invites suggestion and feedbacks from both students and
faculty community to improve the quality, content and presentation of the
material.
VLSI DESIGN
UNIT-I CMOS TECHNOLOGY
1. An overview of silicon semiconductor technology
1.1.3 Assembly
13
13
14
1.3 INTERCONNECT
18
18
19
20
21
1.4.1 Resistors
21
1.4.2 Capacitors
21
23
24
1.4.5 LatchUp
26
26
28
29
30
31
32
34
www.verilogcourseteam.com
VLSI DESIGN
1.5.4 SOI Rules
34
35
35
35
37
38
38
39
39
40
1.7.2 Hierarchy
40
41
45
45
46
48
48
48
50
51
51
52
52
53
54
www.verilogcourseteam.com
VLSI DESIGN
2.8THE COMPLEMENTARY CMOS INVERTER
DC CHARACTERISTICS
55
61
62
64
68
69
69
69
69
70
70
73
73
74
74
3.1.6.1 Whitespace
75
3.1.6.2 Comments
75
76
76
76
77
77
77
3.1.8 Strings
78
79
www.verilogcourseteam.com
VLSI DESIGN
3.1.9.1 Data Types Value set
79
3.1.9.2 Nets
79
3.1.9.3 Vectors
80
80
3.1.9.5 Arrays
81
3.1.9.6 Memories
82
3.1.9.7 Parameters
82
3.1.9.8 Strings
82
3.2 MODULES
83
3.2.1 Instances
84
3.3 PORTS
84
85
85
86
87
87
88
89
90
91
92
93
94
95
95
96
96
97
www.verilogcourseteam.com
VLSI DESIGN
3.9 GATE LEVEL MODELING
101
101
108
3.10.1 Operators
108
108
109
110
112
113
114
115
116
116
117
119
119
119
122
124
124
125
126
128
128
129
130
131
131
www.verilogcourseteam.com
VLSI DESIGN
3.10.12.1 The Conditional Statement if-else
131
132
134
136
136
136
137
138
139
139
141
141
3.12.1 2 to 4 Decoder
141
3.12.2 Comparator
142
144
3.12.4 D-latch
144
145
145
146
146
148
149
149
4.2.2 INVERTER
150
151
152
www.verilogcourseteam.com
VLSI DESIGN
4.3 TRANSMISSION GATES
153
4.3.1Multiplexers
153
4.3.2 Lathes
153
154
4.4.1 ASIC
154
155
155
156
156
157
158
158
159
159
160
161
161
161
4.5.5 EEPROM
161
162
163
165
166
166
167
5.2.1.1 Stuck-At-Faults
167
www.verilogcourseteam.com
VLSI DESIGN
5.2.1.2 Short-Circuit and Open-Circuit Faults
168
5.2.2 Observability
170
5.2.3 Controllability
171
171
171
177
178
179
180
180
180
181
184
185
187
188
190
191
191
193
194
194
194
194
5.4.2 Memories
195
196
196
196
www.verilogcourseteam.com
VLSI DESIGN
5.5.1.1 Introduction
196
197
197
198
198
199
199
www.verilogcourseteam.com
VLSI DESIGN
CMOS TECHNOLOGY
UNIT-I
An overview of silicon semiconductor technology
Silicon in its pure or intrinsic state is a semiconductor, having a bulk electrical
resistance somewhere between that of a conductor and an insulator. The
conductivity of silicon can be varied over several orders of magnitude by
introducing impurity atoms onto silicon crystal lattice. These dopants may either
supply free electrons or holes. Impurity elements that use electrons are referred to
as acceptors, since they accept some of the electrons already in the silicon,
leaving vacancies or holes. Similarly, donor elements provide electrons. Silicon
that contains a majority of donors is known as n-type and that which contains a
majority are brought together, the region where the silicon changes from n-type
and p-type materials are brought together, the region where the silicon changes
from n-type to p-type is called a junction. By arranging junctions in certain
physical structures and combining these with other physical structures, various
semiconductor devices may be constructed. Over the years, silicon semiconductor
processing has evolved sophisticated techniques for building these junctions and
other structures having special properties.
An integrated circuit is a small but sophisticated device implementing several
electronic functions. It is made up of two major parts: a tiny and very fragile
silicon chip (die) and a package which is intended to protect the internal silicon
chip and to provide users with a practical way of handling the component. The
various steps in manufacturing processes of transistor both in front-end and
back-end is taken as example, because it uses the MOS technology. Actually,
this technology is used for the majority of the ICs manufacturing companies.
1.1 The Fabrication of a Semiconductor Device
The manufacturing phase of an integrated circuit can be divided into two steps.
The first, wafer fabrication, is the extremely sophisticated and intricate process of
manufacturing the silicon chip. The second, assembly, is the highly precise and
automated process of packaging the die. Those two phases are commonly known
as Front-End and Backend. They include two test steps:
www.verilogcourseteam.com
VLSI DESIGN
CMOS TECHNOLOGY
PhotoMasking
Etching
Diffusion
www.verilogcourseteam.com
VLSI DESIGN
CMOS TECHNOLOGY
Ionic
Implantation
Metal
Deposition
Passivation
Back-lap
Initially, the silicon chip forms part of a very thin (usually 650 microns), round
silicon slice: the raw wafer. Wafer diameters are typically 125, 150 or 200 mm (5,
6 or 8 inches). However raw pure silicon has a main electrical property: it is an
isolating material. So some of the features of silicon have to be altered, by means
of well controlled processes. This is obtained by "doping" the silicon.
Dopants (or doping atoms) are purposely inserted in the silicon lattice, hence
changing the features of the material in predefined areas: they are divided into
N and P categories representing the negative and positive carriers they hold.
Many different dopants are used to achieve these desired features: Phosphorous,
Arsenic (N type) and Boron (P type) are the most frequently used ones.
Semiconductors manufacturers purchase wafers predoped with N or P impurities
to an impurity level of.1 ppm (one doping atom per ten million atoms of silicon).
There are two ways to dope the silicon. The first one is to insert the wafer into a
furnace. Doping gases are then introduced which impregnate the silicon surface.
This is one part of the manufacturing process called diffusion (the other part being
the oxide growth). The second way to dope the silicon is called ionic
implantation. In this case, doping atoms are introduced inside the silicon using an
electron beam. Unlike diffusion, ionic implantation allows to put atoms at a given
depth inside the silicon and basically allows a better control of all the main
www.verilogcourseteam.com
VLSI DESIGN
CMOS TECHNOLOGY
www.verilogcourseteam.com
VLSI DESIGN
CMOS TECHNOLOGY
www.verilogcourseteam.com
VLSI DESIGN
CMOS TECHNOLOGY
one particle whose diameter is superior to 0.5 micron (and doesnt exceed 1
micron) inside one cubic foot of air.
All these processes are part of the manufacturing phase of the chip itself. Silicon
chips are grouped on a silicon wafer (in the same way postage stamps are printed
on a single sheet of paper) before being separated from each other at the
beginning of the assembly phase.
Wafer Probing. This step takes place between wafer fabrication and assembly. It
verifies the functionality of the device performing thousands of electrical tests, by
means of special microprobes. Wafer probing is composed of two different tests:
1. Process parametric test: This test is performed on some test samples and
checks the wafer fabrication process itself.
2. Full wafer probing test: This test verifies the functionality of the finished
product and is performed on all the dies. The bad dies are automatically marked
with a black dot so they can be separated from good die after the wafer is cut. A
record of what went wrong with the non-working die is closely examined by
failure analysis engineers to determine where the problem occurred so that may be
corrected. The percentage of good die on an individual wafer is called its yield.
Figure 1.7
www.verilogcourseteam.com
VLSI DESIGN
CMOS TECHNOLOGY
The first step of assembly is to separate the silicon chips: this step is called die
cutting (figure 1.7). Then, the dies are placed on a lead frame: the leads are the
chip legs (which will be soldered or placed in a socket on a printed circuit board.
On a surface smaller than a baby's fingernail we now have thousands (or millions)
of electronic components, all of them interconnected and capable of implementing
a subset of a complex electronic function. At this stage the device is completely
functional, but it would be impossible to use it without some sort of supporting
system. Any scratch would alter its behavior (or impact its reliability), any shock
would cause failure. Therefore, the die must be put into a ceramic or plastic
package to be protected from the external world.
www.verilogcourseteam.com
VLSI DESIGN
CMOS TECHNOLOGY
www.verilogcourseteam.com
VLSI DESIGN
CMOS TECHNOLOGY
Figure 1.12
www.verilogcourseteam.com
VLSI DESIGN
CMOS TECHNOLOGY
Once the n-well is created, the active areas of the nMOS and pMOS transistors
can be defined. Figures 1.13 through 1.18 illustrate the significant milestones that
occur during the fabrication process of a CMOS inverter.
Following the creation of the n-well region, a thick field oxide is grown in the
areas surrounding the transistor active regions, and a thin gate oxide is grown on
top of the active regions. The thickness and the quality of the gate oxide are two
of the most critical fabrication parameters, since they strongly affect the
operational characteristics of the MOS transistor, as well as its long-term
reliability.
Figure 1.14
www.verilogcourseteam.com
VLSI DESIGN
CMOS TECHNOLOGY
Isolation layer
Figure 1.15
The created polysilicon lines will function as the gate electrodes of the nMOS and
the pMOS transistors and their interconnects. Also, the polysilicon gates act as
self-aligned masks for the source and drain implantations that follow this step.
Using a set of two masks, the n+ and p+ regions are implanted into the substrate
and into the n- well, respectively. Also, the ohmic contacts to the substrate and to
the n-well are implanted in this process step.
Figure 1.16
An insulating silicon dioxide layer is deposited over the entire wafer using CVD.
Then, the contacts are defined and etched away to expose the silicon or
polysilicon contact windows. These contact windows are necessary to complete
the circuit interconnections using the metal layer, which is patterned in the next
step.
Figure 1.17
www.verilogcourseteam.com
VLSI DESIGN
CMOS TECHNOLOGY
Metal (aluminum) is deposited over the entire chip surface using metal
evaporation, and the metal lines are patterned through etching.
Figure 1.18
Since the wafer surface is non-planar, the quality and the integrity of the metal
lines created in this step are very critical and are ultimately essential for circuit
reliability. The composite layout and the resulting cross-sectional view of the
chip, showing one nMOS and one pMOS transistor (built-in n-well), the
polysilicon and metal interconnections. The final step is to deposit the passivation
layer (for protection) over the chip, except for wire-bonding pad areas. The
patterning process by the use of a succession of masks and process steps is
conceptually summarized in Figure. 1.19. It is seen that a series of masking steps
must be sequentially performed for the desired patterns to be created on the wafer
surface. An example of the end result of this sequence is shown as a cross-section
on the right.
Figure 1.19
www.verilogcourseteam.com
VLSI DESIGN
CMOS TECHNOLOGY
www.verilogcourseteam.com
VLSI DESIGN
CMOS TECHNOLOGY
Tub formation.
Thin-oxide construction.
Source and drain implantations.
Contact cut definition.
Metallization.
In the conventional n-well CMOS process, the doping density of the well region is
typically about one order of magnitude higher than the substrate, which, among
other effects, results in unbalanced drain parasitics. The twin-tub process (figure
1.20) also avoids this problem.
1.2.4 Silicon On Insulator (SOI) Process
Silicon on insulator technology (SOI) refers to the use of a layered siliconinsulator-silicon substrate in place of conventional silicon substrates in
semiconductor manufacturing, especially microelectronics, to reduce parasitic
device capacitance and thereby improve performance. SOI-based devices differ
from conventional silicon-built devices in that the silicon junction is above an
electrical insulator, typically silicon dioxide or (less commonly) sapphire. The
choice of insulator depends largely on intended application, with sapphire being
used for radiation-sensitive applications and silicon oxide preferred for improved
performance and diminished short channel effects in microelectronics devices.
The insulating layer and topmost silicon layer also vary widely with application.
The first implementation of SOI was announced by IBM in August 1998. Rather
than using silicon as the substrate, the technologies have sought to use an
insulating substrate to improve process characteristics such as latchup and speed.
Hence the emergence of Silicon On Insulator (SOI) technologies. SOI CMOS
processes have several potential advantages over the traditional CMOS
technologies. These include closer packing of p- and n- transistors, absence of
latchup problems, and lower parasitics substrate capacitances. In the SOI process
a thin layer of single-crystal silicon film is epitaxially grown on an insulator such
as sapphire or magnesium aluminium spinal. Alternatively, the silicon may be
grown on SiO2 that has been in turn grown on silicon. This option has proved
more popular in recent years due to the compatibility of the starting material with
conventional silicon CMOS fabrication. Various masking and doping techniques
www.verilogcourseteam.com
VLSI DESIGN
CMOS TECHNOLOGY
(figure 1.21) are then used to form p-channel and n-channel devices. Unlike the
more conventional CMOS approaches, the extra steps in well formation do not
exist in the technology.
The steps used in typical SOI CMOS process are as follows. A thin film (7-8 m)
of very lightly doped n-type Si is grown over an insulator, Sapphire or SiO2 is
commonly used insulator (figure 1.21 a).
An anisotropic etch is used away the Si except where a diffusion area (n or p)
will be needed. The etch must be anisotropic since the thickness of the Si is much
greater than the spacing desired between the Si islands: (figure 1.21 b, c).
The p-islands are formed next by masking the n-islands with a photoresist. A
p-type dopant, boron, for example is then implanted. It is masked by the
photoresist, but forms p-islands at the unmasked islands. The p-islands will
become the n-channel devices (figure 1.12 d).
The p-islands are then covered with a photoresist and an n-type dopantphosphorus, for example is implanted to form the n-islands. The n-islands will
become the p-channel devices (figure 1.12 e).
A thin gate oxide (around 100-250 A) is grown over all of the Si structures,
this is normally done by thermal oxidation.
A polysilicon film is deposited over the oxide. Often the polysilicon is doped
with phosphorus to reduce its resistivity (figure 1.12f).
The polysilicon is then patterned by photomasking and is etched. This defines
the polysilicon layer in the structure (figure 1.12 g).
The next step is to form the n-doped source and drain of the n-channel devices
in the p-islands. The n-islands are covered with a photoresist and an n-type
dopant, normally phosphorus is implanted. The dopant and an n-type dopant,
normally phosphorus is implanted. The dopant will be blocked at the n-islands by
the photoresist, and it will be blocked from the gate region of the p-islands by the
polysilicon. After this step the n-channel devices are complete (figure 1.12 h).
The p-channel devices are formed next by masking the p-islands and
implanting a p-type dopant such as boron. The polysilicon over the gate of the nisland will block the dopant from the gate, thus forming the p-channel devices
(figure 1.12 i).
A layer of phosphorus glass or some other insulator such as silicon dioxide is
then deposited over the entire structure.
The glass is etched as contact cut locations. The metallization layer is formed
next by evaporating aluminum over the entire surface and etching it to leave only
the desired metal wires. The aluminium will flow through the contact cuts to
make contact with the diffusion or polysilicon regions (figure 1.12 j).
A final passivation layer of phosphorus glass is deposited and etched over
bonding pad locations (not shown in figure).
www.verilogcourseteam.com
VLSI DESIGN
CMOS TECHNOLOGY
Because the diffusion regions extend to the insulating substrate, only sidewall
areas associated with source and drain diffusion contribute to the parasitic
junction capacitance. Since sapphire and SiO2 are extremely good insulators,
leakage currents between transistors and substrate and adjacent devices are almost
eliminated.
In order to improve the yield, some processes use preferential etch in which he
island edges are tapered. Thus aluminium or poly runners can enter and leave the
islands with a minimum step height. This is contrasted to fully anisotropic etch
in which the undercut is brought to zero, as shown in figure 1.13.An isotropic
etch is also shown in the same diagram for the comparison.
www.verilogcourseteam.com
VLSI DESIGN
CMOS TECHNOLOGY
www.verilogcourseteam.com
VLSI DESIGN
CMOS TECHNOLOGY
1.3 INTERCONNECT
The most important additions for CMOS logic processes are additional signaland power-routing layers. This eases the routing (especially automated
netting) of logic signals between modules and improves the power and clock
distribution to modules. Improved mutability is achieved through additional
layers of metal or by improving the existing polysilicon interconnection
layer.
1.3.1 Metal Interconnect
A second level of metal is almost mandatory for modern CMOS digital. A
third layer is becoming common and is certainly required for leading-edge
high-density, high-speed chips. Normally, aluminum is used for the metal
layers. I f some form of planarization is employed the second-level metal
pitch can be the same as the first. As the vertical topology becomes more
varied, the width and spacing of metal conductors has to increase so that
the conductors do not thin and hence break at vertical topology jumps (step
coverage).
Contacting the second-layer metal to the first-layer metal is achieved by a
via, as shown in figure 1.14. If further contact to diffusion or polysilicon is
required, a separation between the via and the contact cut is usually
required. This requires a first-level metal tab to bridge between metal2 and
the lower-l e v e l conductor. It is important to realize that in contemporary
processes first level metal must be involved in any contact to underlying
areas. A number of contact geometries are shown in figure 1.15.
www.verilogcourseteam.com
VLSI DESIGN
CMOS TECHNOLOGY
www.verilogcourseteam.com
VLSI DESIGN
CMOS TECHNOLOGY
www.verilogcourseteam.com
VLSI DESIGN
CMOS TECHNOLOGY
www.verilogcourseteam.com
VLSI DESIGN
CMOS TECHNOLOGY
www.verilogcourseteam.com
VLSI DESIGN
CMOS TECHNOLOGY
edge of the array. The sidewall n+ forms the other side of capacitor and one
side of the pass transistor that is used to enable data onto the bit lines. The
bottom of the trench has a p+ plug that forms a channel stop region to isolate
adjacent capacitors. The trench is 4m deep and has a capacitance of 90fF.
Rather than building a trench, figure 1.19(b) shows a fintype- capacitor used
in a 64-Mb DRAM. The storage capacitance is 20 to 30 fF. The fins have the
additional advantage of reducing the bit capacitance by shielding the bit
lines. The fabrication of 3D-process structures such as these is a constant
reminder of the skill, perseverance, and ingenuity of the process engineer.
1.4.3 Electrically Alterable ROMs
Electrically alterable/erasable R O M ( E A R O M / E E P R O M ) i s added to
CMOS processes to yield permanent but reprogrammable s to r ag e to a
process. This is usually added by adding a polysilicon layer. Figure 1.20
shows a typical memory structure, which consists o f a stacked-gate
s t r u c t u r e . The normal gate is left floating, while a control gate is placed
above the floating gate. A very thin oxide called the tunnel oxide
separates the floating gate from the source, drain, and substrate.
www.verilogcourseteam.com
VLSI DESIGN
CMOS TECHNOLOGY
Figure 1.22 BiCMOS process steps for the cross section shown in
figure 1.21
www.verilogcourseteam.com
VLSI DESIGN
CMOS TECHNOLOGY
MOS transistors can add to a bipolar process or vice versa. In past days,
MOS processes always had to have excellent gate oxides while bipolar
processes had to have precisely controlled diffusions.
A BiCMOS process has to have both. A mixed signal BiCMOS process
cross section is shown in figure 1.21. This process features both npn- and
pnp-transistors in addition to pMOS and nMOS transistors. The major
processing steps are summarized in figure 1.22, showing the particular
device to which they correspond. The base layers of the process are similar
to the process shown in figure 1.12. The starting material is a lightlydoped p-type substrate into which antimony or arsenic are diffused to
form an n+ buried layer. Boron is diffused to form a buried p + layer. An ntype epitaxial layer 4.0 m thick is then grown. N-wells and p-wells are then
diffused so that they join in the middle of the epitaxial layer. This
epitaxial layer isolates the pnp-transistor in the horizontal direction, while
the buried n+ layer isolates it vertically. The npn-transistor is junctionisolated. The base for the pnp is then ion-implanted using phosphorous. A
diffusion step follows this to get the right doping profile. The npncollector is formed by depositing phosphorus before LOCOS. Field
oxidation is carried out and the gate oxide is grown. Boron is then used to
form the p-type base of the npn transistor.
Following the threshold adjustment of the pMOS transistors, the
polysilicon gates are defined. The emitters of the npn-transistors employ
polysilicon rather than a diffusion. These are formed by opening windows
and depositing polysilicon. The n+ and p+ source/drain implants are then
completed. This step also dopes the npn-emitter and the extrinsic bases of
the npn- and pnp-transistors (extrinsic because this is the part of the base
that is not directly between collector and emitter).
Following the deposition of PSG, the normal two-layer metallization steps
are completed. Representative of a high-density digital BiCMOS process
is that represented by the cross section shown in figure 1.23. The buriedlayer-epitaxial layer-well structure is very similar to the previous
structure. However because this is a 0.8m process, LDD structures must
be constructed for the p-transistors and the n-transistors. The npn is formed
by a double-diffused sequence in which both base and emitter are formed
by impurities that diffuse out of a covering layer of polysilicon. This
process, intended for logic applications, has only an npn-transistor. The
collector of the npn is connected to the n-well, which is in turn connected
to the VDD supply. Thus all npn-collectors are commoned. A typical npntransistor with a 0.8m-square emitter has a current gain of 90 and an ft. of
15 GHz.
www.verilogcourseteam.com
VLSI DESIGN
CMOS TECHNOLOGY
www.verilogcourseteam.com
VLSI DESIGN
CMOS TECHNOLOGY
www.verilogcourseteam.com
VLSI DESIGN
CMOS TECHNOLOGY
I ntrigger ~
where
V pnp-on
npn R well
(1.1)
V pnp _ on~ 0.7 volts the turn-on voltage of the vertical pnp-transistor
anpn = common base gain of the lateral npn-transistor
Rwell = well resistance.
Vertical triggering occurs when a sufficient current is injected into the
emitter of the vertical-pnp transistor. Similar to the lateral case, this
current is multiplied by the common-base-current gain, which causes a
voltage drop across the emitter base junction of the npn transistor due to
the resistance, R substrate . When the holding or sustaining point is entered, it
represents a stable operating point provided the current required to stay in
the state can he maintained.
Current has to be injected into either the npn- or pnp-emitter to initiate
latchup. During normal circuit in internal circuitry this may occur due to
supply voltage transients, but this is unlikely. However, these conditions
may occur at the I/O circuits employed on a CMOS chip, where the
internal circuit voltages meet the external world and large currents can
flow. Therefore extra precautions need to be taken with peripheral CMOS
circuits.
www.verilogcourseteam.com
VLSI DESIGN
CMOS TECHNOLOGY
a
(1.2)
Where
I
Rwell =
Vbe pnp
Rwell
www.verilogcourseteam.com
VLSI DESIGN
CMOS TECHNOLOGY
This equation yields the keys to reducing latchup to the point where it
should never occur under normal circuit conditions. Thus, reducing the
resistor values and reducing the gain of the parasitic transistors are the
basis for eliminating latchup.
Latchup may be prevented in two basic ways:
A popular process option that reduces the gain of the parasitic transistors
is the use of silicon starting-material with a thin epitaxial layer on top of a
highly doped substrate. This decreases the value of the substrate resistor
and also provides a sink for collector current of the vertical pnp-transistor.
As the epi layer is thinned, the latchup performance improves until a point
where the up-diffusion of the substrate and the down-diffusion of any
diffusions in subsequent high-temperature procession steps thwart
required device doping profiles. The so-called retrograde well structure is
also used. This well has a highly doped area at the bottom of the well,
whereas the top of the well is more lightly doped. This preserves good
characteristics for the pMOS (or nMOS in p-well) transistors but reduces
the well resistance deep in the well. A technique linked to these two
approaches is to increase the holding voltage above the VDD supply. This
guarantees that latchup will not occur.
It is hard to reduce the betas of the bipolar transistors to meet the condition set above. Nominally, for a 1 n-well process, the vertical pnp has a
beta of 10-100, depending on the technology. The lateral npn-currentgain which is a function of n+ drain to n-well spacing , i s b e t w e e n 2
and 5.
www.verilogcourseteam.com
VLSI DESIGN
CMOS TECHNOLOGY
www.verilogcourseteam.com
VLSI DESIGN
CMOS TECHNOLOGY
Interconnection paths.
Interlayer contacts.
The layers for typical CMOS processes are represented in various figures
in terms of:
A color scheme proposed by JPL based on the Mead-Conway colors.
Other color schemes designed to differentiate CMOS structures
(e.g., the colors as used on the from cover of this hook)
Varying stipple patterns.
Varying line styles.
Some of these representations are shown in below table.
www.verilogcourseteam.com
VLSI DESIGN
CMOS TECHNOLOGY
standard cells or memories, where the effort expended is amortized over many
designs. Alternatively, the designs are done symbolically, thus relieving the
designer of having to deal directly with the actual design rules.
The rules are defined in terms of:
Feature sizes.
Separations and overlaps.
www.verilogcourseteam.com
VLSI DESIGN
CMOS TECHNOLOGY
www.verilogcourseteam.com
VLSI DESIGN
CMOS TECHNOLOGY
www.verilogcourseteam.com
VLSI DESIGN
CMOS TECHNOLOGY
www.verilogcourseteam.com
VLSI DESIGN
CMOS TECHNOLOGY
www.verilogcourseteam.com
VLSI DESIGN
CMOS TECHNOLOGY
www.verilogcourseteam.com
VLSI DESIGN
CMOS TECHNOLOGY
www.verilogcourseteam.com
VLSI DESIGN
CMOS TECHNOLOGY
www.verilogcourseteam.com
VLSI DESIGN
UNIT-2
2.1 NMOS ENHANCEMENT TRANSISTOR
The structure for an n-channel enhancement-type transistor, shown in
figure 2.1, consists of a moderately doped p-type silicon substrate into
which two heavily doped n+ regions, the source and the drain, are
diffused. Between these two regions there is a narrow region of p-type
substrate called the channel, which is covered by a thin insulating layer of
silicon dioxide (SiO 2 ), called gate oxide. Over this oxide layer is a
polycrystalline silicon (polysilicon) electrode, referred to as the gate.
Polycrystalline silicon is silicon that is not composed of a single crystal.
Since the oxide layer is an insulator, the DC current from the gate to
channel is essentially zero. Because of the inherent symmetry of the
structure, there is no physical distinction between the drain and source
regions. Since SiO 2 has relatively low loss and high dielectric is strength,
the application of high gate fields is feasible.
In operation, a positive voltage is applied between the source and the
Drain (Vdy ). With zero gate bias (Vs = 0), no current flows from source to
drain because they are effectively insulated from each other by the two
reversed biased pn junctions shown in figure 21 (indicated by the diode
symbols). However, a voltage applied to the gate, which is positive with
respect to 'he source and the substrate, produces an electric field E across
the substrate, which attracts electrons toward the gate and repels holes. If
the gate voltage is sufficiently large, the region under the gate changes
from p-type to n-type (due to accumulation of attracted electrons) and
provides a conduction path between the source and the drain.
www.verilogcourseteam.com
VLSI DESIGN
structure for a voltage, V gs , much less than a voltage, Vt, which is the
threshold voltage. This is termed the accumulation mode. As V gs is raised
above Vt in potential, the holes are repelled causing a depletion region
under the gate. Now the structure is in the depletion mode (figure 2.2b).
Raising Vgs further above Vt. results in electrons being attracted to the
region of the substrate under the gate. A conductive layer of electrons in
the p substrate gives rise to the name inversion mode (figure 2.2c).
www.verilogcourseteam.com
VLSI DESIGN
Figure 2.3 nMOS device behavior under the influence of different terminal
voltages
www.verilogcourseteam.com
VLSI DESIGN
the
the
the
the
the
the
www.verilogcourseteam.com
VLSI DESIGN
www.verilogcourseteam.com
VLSI DESIGN
where V t_mos., is the ideal threshold voltage of an ideal MOS capacitor and
V fb is what is termed the flat-band voltage. Vt_mos is the threshold where
there is no work function difference between the gate and substrate
materials. The MOS threshold voltage, V t-mos , is calculated by
considering the MOS capacitor structure that forms the gate of the MOS
transistor (see for e x a mp l e or 3 ). The ideal threshold voltage may be
expressed as
(2.2)
where
and
which is called the bulk charge
term.
The symbol b is the bulk potential, a term that accounts for the doping of
the substrate. It represents the difference between the Fermi energy level
of the doped semiconductor and the Fermi energy level of the intrinsic
semiconductor. The intrinsic level is midway between the valence-band
edge and the conduction band edge of the semiconductor. In a p type
semiconductor the Fermi level is closer to the valence hand, while in an
n-type
se miconductor it is closer to the conduction band. NA is the
density of carriers in the doped semiconductor substrate, and N i is the
carrier concentration in intrinsic silicon .N i is equal to 1.45 x 10 10 cm -3 at
3000K. The lowercase k is Boltzmanns constant (1.380 x 10-23 J/K).T is
the temperature (K) and q is th e electronic charge (1.602 x10 -1 9
Coulomb). The expression kT / q equals 0.02586 Volts at 300 0K. The term
Cox is the permittivity of silicon (1.06 x 10-12 Farads/cm). The term C o x is
the gate-oxide capacitance, which is inversely proportional to the gateoxide thickness (t ox ).The threshold voltage, V t-mos is positive for ntransistors and negative for p-transistors. The flatband voltage,V fb , is
given by
Vfb=ms-(Qfc/Cox)
(2.3)
The term V fb is the flat-band voltage. The term Qfc represents the fixed
charge due to surface states that arise due to imperfections in the siliconoxide interface and doping. The term ms is the work function difference
www.verilogcourseteam.com
VLSI DESIGN
between the gate material and the silicon substrate ( gate - si ), which may
the calculated for an n + gate over a p substrate as follows
(2.4a)
(2.4b)
From these equations it may be seen that for a given gate and substrate
material the threshold voltage may be varied by changing the doping
concentration o f the substrate (NA ), the oxide capacitance (C ox ), or the
In addition, the temperature variation
surface state charge (Q fc .).
mentioned above may be seen.
It is often necessary to adjust the native (original) threshold voltage of an
MOS device. Two common techniques used for the adjustment of the
threshold voltage entail varying the doping concentration at the siliconinsulator interface through ion implantation or using different insulating
material for gate. The former approach introduces a small doped region
at the oxide/substrate interface that adjusts the flat-band voltage by
varying the Q fc term in equation (2.3). In the latter approach for
instance, a layer of silicon nitride (Si 3 N 4 ) is combined with a layer of
silicon dioxide resulting in an effective relative permittivity of about 6,
which is substantially larger than the dielectric constant SiO 2 .
Consequently, for the same thickness as an insulating layer consisting of
only silicon dioxide, the dual dielectric process will be electrically
equivalent to a thinner layer of SiO 2 leading to a higher C ox value.
www.verilogcourseteam.com
VLSI DESIGN
Under normal conditions that is, when V gs >V t the depletion-layer width
remains constant and charge carriers are pulled into the channel from the
source. However, as the substrate bias V sb (Vsource-Vsubstrate) is increased,
the width of the channel substrate depletion layer also increases, resulting
in an increase in the density of the trapped carriers in the depletion laver.
For charge neutrality to hold, the channel charge must decrease. The
resultant effect is that the substrate voltage, Vsb , adds to the channelsubstrate junction potential. This increases the gate-channel voltage
drop. The overall effect is an increase in the threshold voltage
V t (V t2 -V t1 )
Vgs Vt
(2.5a)
www.verilogcourseteam.com
VLSI DESIGN
(2.5c)
where Ids is the drain-to-source current, Vgs is the gate-to-source voltage, Vt is the
device threshold, and is the MOS transistor gain factor. The last factor is dependent on both the process parameters and the device geometry, and is given by
=(/tox)(W/L)
(2.6)
where is the effective surface mobility of the carriers in the channel, is the
permittivity of the gate insulator, tox is the thickness of the gate insulator, W is the
width of the channel, and L is the length of the channel. The gain factor thus
consists of a process dependent factor /tox, which contains all the process terms
that account for such factors as doping density and gate-oxide thickness and a
geometry dependent term (W/L), which depends on the actual layout dimensions
of the device. The process dependent factor is sometimes written as Cox, where
C ox = / t o x is the gate oxide capacitance. The geometric terms in Eq. (2.6) are
illustrated in figure 2.6 in relation to the physical MOS structure.
www.verilogcourseteam.com
VLSI DESIGN
(2.7)
www.verilogcourseteam.com
VLSI DESIGN
where Vsb is the substrate bias, Vto is the threshold voltage for Vsb=0 , and is
the constant that describes the substrate bias effect. The term b is defined in Eq
2.2. Typical values for lie in the range of 0.4 to 1.2. It may be expressed as
(2.8)
in which q is the charge on an electron, ox, is the dielectric constant of the silicon
dioxide, si; is the dielectric constant of the silicon substrate, and NA is the doping
concentration density of the substrate. The term is the SPICE parameter called
GAMMA. Vto is the parameter VTO, N A is he parameter NSUB, and s=2b is
PHI, the surface potential at the onset of strong inversion. Thus the threshold
shifts by approximately half a volt with the source at 2.5 volts for these process
parameters. The type of CMOS process can have a large impact on this
parameter for both n- and p-transistors. The increase in threshold voltage leads to
lower device currents, which in turn leads to slower circuits.
2.5.2.2 Subthreshold Region
The cutoff region described by Eq. (2.5a) is also referred to as the subthreshold
region where Ids increases exponentially with Vds and Vgs. Although the value of
Ids is very small (I ds =0), the finite value of Ids may be used to advantage to
construct very low power circuits or it may adversely affect circuits such as
dynamic-charge storage nodes. As an approximation, Level 1 SPICE models set
the subthreshold current to 0.
2.5.2.3 Channel-length Modulation
The simplified equations that describe the behavior of an MOS device assume that
the carrier mobility is constant, and do not take into account the variations in
channel length due to the changes in drain-to-source voltage, Vds . For long
channel lengths, the influence of channel variation is of little consequence.
However, as devices are scaled down, this variation should be taken into
account. When an MOS device is in saturation, the effective channel length
actually is decreased such that
Leff=L-Lshort
(2.9)
where
The reduction in channel length increases the (W/L) ratio, thereby increasing
as the drain voltage increases. Thus rather than appearing as a constant current
www.verilogcourseteam.com
VLSI DESIGN
source with infinite output impedance, the MOS device has a unite output
impedance. An approximation that takes this behavior into account is
represented by the following equation:
(2.10)
Where k is the process gain factor /tox and is an empirical channel-length
modulation factor having a value in the range 0.02V-1 to 0.005V-1
2.5.2.4 Mobility Variation
The mobility , describes the ease with which carriers drift in the substrate
material. It is defined by
=average carrier drift velocity (V)/ Electric Field (E)
(2.11)
If the velocity, V, is given in cm/sec, and the electric field, E, in V/cm, the
mobility has the dimensions cm2/V-sec. The mobility may vary in a number of
ways. Primarily, mobility varies according to the type of charge carrier.
Electrons (negative-charge carriers) in silicon have a much higher mobility than
holes (positive-charge carriers), resulting in n-devices having higher currentproducing capability than the corresponding p-devices. Mobility decreases with
increasing doping-concentration and increasing temperature. The temperature
variation becomes less pronounced as the doping density increases. In SPICE is
specified by the parameter UO.
nMOS
pMOS
Units
Description
VTO
0.7
0.7
Volt
Threshold voltage
KP
8x10-5
2.5x10-
A/V2
Transconductance
coefficient
GAMMA
0.4
0.5
V0.5
Bulk threshold
parameter
www.verilogcourseteam.com
VLSI DESIGN
PHI
0.37
0.36
volt
Surface potential
at strong
inversion
LAMBDA
0.01
0.01
Volt-1
Channel length
modulation
parameter
LD
0.1 x
10-6
0.1x10-
Meter
Lateral diffusion
TOX
2x10-8
2x10-8
Meter
Oxide thickness
NSUB
2x1016
4x1016
1/cm3
Substrate doping
density
www.verilogcourseteam.com
VLSI DESIGN
(2.12)
Note that consistent with Eq. (2.5b), Vds must be small compared to V gs for
the MOS device to be in a linear operating regime. On rearrangement, the
channel resistance R c is approximated by
Rc(linear) =1/ (Vgs-Vt)
(2.13)
(2.14)
www.verilogcourseteam.com
VLSI DESIGN
(2.17)
www.verilogcourseteam.com
VLSI DESIGN
Table 2.2 Relations Between Voltages for the Three Regions Of Operation Of
A CMOS Inverter
The input/output transfer curve may now be determined by the points of
common V gs intersection in figure 2.10(c). Thus, solving for V inn = V i n p
and I dsn =I dsp gives the desired transfer characteristics of a CMOS inverter
as illustrated in figure 2.13. The switching point is typically designed to
be 50 percent of the magnitude of the supply voltage: = V DD /2. During
transition, both transistors in the CMOS inverter are momentarily "ON,"
resulting in a short pulse of current drawn from the power supply. This is
shown by the dotted line in figure 2.11
The operation of the CMOS inverter can be divided into five regions
(figure 2.13). The behavior of n- and p-devices in each of the regions may
be found by using Table 2.2.
Region A. This region is defined by 0<V in <V tn in which the n-device is
cut off (Idsn = 0), and the p-device is in the linear region.
Since Idsp=- Idsp the drain-to-source current I dsp
for the p-device is also zero.
But for V dsp = Vout - V DD ,
with V dsp = 0, the output voltage is
V out = V DD
(2.18)
www.verilogcourseteam.com
VLSI DESIGN
www.verilogcourseteam.com
VLSI DESIGN
(2.19)
Where
p=(p/tox)(Wp/Lp)
and
Vtp=threshold voltage of p-device
p =mobility of electrons
Wp=channel width of p-device
Lp=channel length of p-device
Substituting I dsp =-I dsn
The output voltage V out can be expressed as
(2.20)
www.verilogcourseteam.com
VLSI DESIGN
Region C. In this region both the n and p device are in saturation. This is
represented by schematic in figure 2.12(b) which shows two current
sources in series. The saturation currents for the two devices are given by
With
This yields
(2.21)
By setting n= p and V tn =-V tp
We obtain
(2.22)
V in =V DD /2
Which implies that region C exists only for one value of V in . The possible
values of V out in this region can be deduced as follows
n-channel: V in -V out <V tn
V out >V in -V tn
p-channel : V in -V out >V tp
V out <V in -V tp
Combining the two inequalities results in
V in -V tn < V out < V in -V tp
(2.23)
This indicates that with V in =V DD /2, V out varies within the range shown.
An MOS device in saturation behaves like an ideal current source with
drain-to-source current being independent of V ds In reality, as V ds
increases, I ds also increases slightly thus region C has a finite slope. The
significant factor to be noted is that in region C we have two current
sources in series, which is an unstable condition. Thus a small input
voltage has a large effect at the output. This makes the output transition
very steep, which contrasts with the equivalent nMOS inverter
characteristic. The relation defined by equation is particularly useful since
it provides the basis for defining the gate threshold V inv , which
corresponds to the state where V out =V in . This region also defines the
gain of the CMOS inverter when used as a small signal amplifier.
www.verilogcourseteam.com
VLSI DESIGN
Region D. This region is described by V DD /2 < V in V DD +V tp . The pdevice is in saturation while the n-device is operating in its nonsaturated
region. This condition is represented by equivalent circuit shown in
figure. The two currents may be written as
I dsp = (- p /2)(V in -V DD -V tp ) 2
and
Condition
p-device
n-device
Output
0 V in <V tn
Nonsatura
ted
Cutoff
V out =V D
D
V tn V in <V DD /
2
Nonsatura
ted
Saturated
equation
V in =V DD /2
Saturated
Saturated
V out f(V
in )
V DD /2<V in V
DD -|V tp |
Saturated
Nonsatura
ted
Equatio
n
V in >V DD -|V tp |
Cutoff
Nonsatura
ted
V out =V S
S
www.verilogcourseteam.com
VLSI DESIGN
The output in this region is Vout=0
From the transfer curve of figure 2.13 it may be seen that the transition
between the two states is very steep. This characteristic is very desirable
because the noise immunity is maximized. For convenience, the
characteristics associated with the five regions are summarized in Table
2.3.
2.8.1 n/p ratio
In order to explore the variations of the transfer characteristics as a function of
n/p, the transfer curve for several values of n/p are plotted in figure 2.15. The
gate-threshold voltage Vinv where Vin=Vout is dependent on n/p . Thus for a
given process, if we want to change n/p we need to change the channel
dimensions, i.e., channel-length L and channel-width W. from figure it can be
seen that as the ratio n/p is decreased the transition region shifts from left to
right ; however, the output voltage transition remains sharp. For the CMOS
inverter a ratio of
n/p=1
(2.26)
may be desirable since it allows a capacitive load to charge and discharge in equal
times by providing equal current-source and sink capabilities. For inverter transfer
curve is also plotted for Wn/Wp .This shows a relative shift to the left compared
with ratioed case because the p-device has inherently lower gain.
www.verilogcourseteam.com
VLSI DESIGN
-1.5
(2.28)
Since the voltage characteristics depend on the ratio n/p, and the mobility of
both holes and electrons are similarly affected, this ratio is independent of
temperature to a good approximation. Both Vtn and Vtp decrease slightly as
temperature increases, and the extent of region A is reduced while the extent of
region E increases. Thus the overall transfer characteristics of figure shift to the
left as temperature increases. If the temperature rises by 500C, the threshold drop
by 200mV each. This would cause a 0.2V shift in the input threshold of the
inverter.
2.8.2 Noise Margin
Noise margin is a parameter closely related to the input-output voltage
characteristics. This parameter allows us to determine the allowable noise
voltage on the input of a gate so that the output will not be affected. The
specification most commonly used to specify noise margin is in terms of
two parameters the LOW noise margin, NM L
and the HIGH noise
margin NM H . NM L is defined as the difference in magnitude between the
maximum LOW output voltage of the driving gate and the maximum input
LOW voltage recognized by the driven gate. Thus
NM L =| V ILmax - V OLmin |
(2.29)
www.verilogcourseteam.com
VLSI DESIGN
Generally it is desirable to have VIH =VIL and for this to be a value that is midway
in the logic swing, VOL to VOH . This implies that the transfer characteristics
should switch abruptly, that is, there should be high gain in the transition region.
For the purpose of calculating noise margins, the transfer characteristic of a
typical inverter and the definition of voltage levels VIL, VOL, VIH , VOH are shown
in figure 2.15. To determine VIL note that the inverter is in region B of operation,
where the p-device is in its linear region while the n-device is in saturation. The
VIL is found by using the unity gain point at the VOL end of the characteristic. For
the inverter shown the NML is 2.3 volts while the NMH is 1.7 volts.
Note that if either NML or NMH for a gate are reduced, then the gate may be
susceptible to switching noise that may be present on the inputs. Apart from
considering a single gate, one must consider the net effect of noise sources and
noise margins on cascaded gates in assessing the overall noise immunity of a
particular system. This is the reason to keep track of noise margins.
www.verilogcourseteam.com
VLSI DESIGN
www.verilogcourseteam.com
VLSI DESIGN
S=0(-S=1);
n-device =off
p-device =off
Vin=VSS, Vout=Z
Vin=VDD, Vout=Z
S=1(-S=0);
n-device =on
p-device =on
Vin=VSS, Vout=VSS
Vin=VDD, Vout=VDD
Vin
a
Figure2.17 nMOS and PMOS transistor operation in transmission
gate
The transmission gate is a fundamental and ubiquitous component in MOS
logic. It finds use as a multiplexing element, a logic structure, a latch
element, and an analog switch. The transmission gate acts as a voltage
controlled resistor connecting the input and the output. Figure 2.18(a)
shows a typical circuit configuration for a transmission gate in which the
output is connected to a capacitor and the input to an inverter. The control
input is shown turning the transmission gate on. That is, the gate of the nchannel transmission gate switch is changing from 0 1 and the gate of
the p-channel is changing from 1 0. First consider the case where the
control input changes rapidly, the inverter input is low (V S S ), the inverter
output is high (V DD ), and the capacitor on the transmission gate output is
discharged (V SS ). The currents that flow in this situation may be modeled
by circuit shown in figure 2.18(b) in which the currents in the pass
www.verilogcourseteam.com
VLSI DESIGN
www.verilogcourseteam.com
VLSI DESIGN
The total current decreases in magnitude as Vin increases until Vin=|Wtp(bodyaffected)|. Here the p-transistor turns on and in this case slows the decrease of
current. When Vin>VDD-Vtn(body-affected), the current starts to increase in magnitude
as the p current continues to increase while the n transistor is off. In this
simulation the p and n gains were matched. For the region |Vtp|<Vin<VDD-Vtn, the
transmission gate will have a roughly constant resistance. The effect of having
only one polarity transistor in the transmission gate is also seen. If only an ntransistor is used, the output will rise to an n threshold below VDD as current stops
flowing at this point. Similarly, with a single p-transistor, the output would fall to
a p threshold above VSS, as current stops flowing in the p-transistor at this point.
Note also that as either the p or n current approaches zero, the speed of any
circuit would be prejudiced. If the surrounding circuitry can deal with
these imperfect high and low values, then single polarity transmission
gates may be used. Figure 2.20, shows a plot of the transmission gate
"on" resistance for the test circuit shown in figure 2.19(c).
www.verilogcourseteam.com
VLSI DESIGN
www.verilogcourseteam.com
VLSI DESIGN
UNIT 3
HISTORY OF VERILOG
Verilog was started in the year 1984 by Gateway Design Automation Inc as a
proprietary hardware modeling language. It is rumored that the original language
was designed by taking features from the most popular HDL language of the time,
called HiLo, as well as from traditional computer languages such as C. At that
time, Verilog was not standardized and the language modified itself in almost all
the revisions that came out within 1984 to 1990.
Verilog simulator first used in 1985 and extended substantially through 1987. The
implementation of Verilog simulator sold by Gateway. The first major extension
of Verilog is Verilog-XL, which added a few features and implemented the
infamous "XL algorithm" which is a very efficient method for doing gate-level
simulation.
Later 1990, Cadence Design System, whose primary product at that time included
thin film process simulator, decided to acquire Gateway Automation System,
along with other Gateway products., Cadence now become the owner of the
Verilog language, and continued to market Verilog as both a language and a
simulator. At the same time, Synopsys was marketing the top-down design
methodology, using Verilog. This was a powerful combination.
In 1990, Cadence organized the Open Verilog International (OVI), and in 1991
gave it the documentation for the Verilog Hardware Description Language. This
was the event which "opened" the language.
www.verilogcourseteam.com
VLSI DESIGN
It might describe the logical gates and flip flops in a digital system, i.e.,
the gate level.
An even higher level describes the registers and the transfers of vectors of
information between registers. This is called the Register Transfer Level
(RTL).
Verilog supports all of these levels.
A powerful feature of the Verilog HDL is that you can use the same
language for describing, testing and debugging your system.
Extensibility :
Verilog PLI that allows for extension of Verilog capabilities
RTL Description
Coding Styles:
Gate Level Modeling
Data Flow Modeling
Behavioral Modeling
RTL Coding Editor : Vim, Emacs, conTEXT, HDL TurboWriter
www.verilogcourseteam.com
VLSI DESIGN
I0
I1
I2
Out
I3
S0
S1
Figure 3.2 Black Box View of 4:1 MUX
www.verilogcourseteam.com
VLSI DESIGN
Figure 3.3 Simulation Output View of 4:1 MUX Using Modelsim Wave form
Viewer
Logic Synthesis
Conversation of RTL description into Gate level -Net list form.
Description of the circuit in terms of gates and connections.
Synthesis: Design Compiler, FPGA Compiler, Synplify Pro, Leonardo
Spectrum, Altera and Xilinx.
www.verilogcourseteam.com
VLSI DESIGN
www.verilogcourseteam.com
VLSI DESIGN
www.verilogcourseteam.com
VLSI DESIGN
3.1.6.1 Whitespace
White space can contain the characters for blanks, tabs, newlines, and form feeds.
These characters are ignored except when they serve to separate other tokens.
However, blanks and tabs are significant in strings.
White space characters are:
Blank spaces (\b)
Tabs(\t)
Carriage returns(\r)
New-line (\n)
Form-feeds (\a)
Example
3.1.6.2 Comments
Comments can be inserted in the code for readability and documentation. There
are two forms to introduce comments.
Single line comments begin with the token // and end with a carriage
return
Multi line comments begin with the token /* and end with the token */
Example
www.verilogcourseteam.com
VLSI DESIGN
always
begin
end
www.verilogcourseteam.com
VLSI DESIGN
Example
Real
Number
1.2
0.6
3.5E6
Decimal
notation
1.2
0.6
3,500000.0
www.verilogcourseteam.com
VLSI DESIGN
integer or unsigned integer. Any number that does not have negative sign prefix is
a positive number. Or indirect way would be "Unsigned".
Negative numbers can be specified by putting a minus sign before the size for a
constant number, thus they become signed numbers. Verilog internally represents
negative numbers in 2's complement format. An optional signed specifier can be
added for signed arithmetic.
Example
Number
32'hDEAD_BEEF
-14'h1234
Description
Unsigned
or
signed
positive number
Signed negative number
Example
module signed_number;
reg [31:0] a;
initial begin
a = 14'h1234;
$display ("Current Value of a = h", a);
a = -14'h1234;
$display ("Current Value of a = h", a);
a = 32'hDEAD_BEEF;
$display ("Current Value of a = h", a);
a = -32'hDEAD_BEEF;
$display ("Current Value of a = h", a);
#10 $finish;
end
endmodule
3.1.8 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.
Examples
hello Verilog world
a/b
aa+a
www.verilogcourseteam.com
VLSI DESIGN
3.1.9.2 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.
Types of Nets
Each net type has a functionality that is used to model different types of hardware
(such as PMOS, NMOS, CMOS, etc)
Example
Net Data Type
wire, tri
wor, trior
wand, triand
tri0, tri1
supply0, supply1
Trireg
Functionality
Interconnecting wire - no special resolution
function
Wired outputs OR together (models ECL)
Wired outputs AND together (models opencollector)
Net pulls-down or pulls-up when not driven
Net has a constant logic 0 or logic 1 (supply
strength)
Retains last value, when driven by z (tristate).
www.verilogcourseteam.com
VLSI DESIGN
Registers store the last value assigned to them until another assignment
statement changes their value.
Registers represent data storage constructs.
You can create regs arrays called memories.
Register data types are used as variables in procedural blocks.
A register data type is required if a signal is assigned a value within a
procedural block
Procedural blocks begin with keyword initial and always.
Example
Data Types
Functionality
reg
Unsigned variable
integer
time
real
3.1.9.3 Vectors
Nets or reg data types can be declared as vectors. If bit width is not specified, the
default is scalar (1-bit).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.
Examples
wire a // scalar net variable default
wire [7:0]bus; // 8-bit bus
wire [31:0] busA, busB, busC; // 3 buses of 32-bit width
reg clock // scalar register
busA[7]; // bit #7 of vector busA
bus [2:0] // three least significant bits of vector bus
www.verilogcourseteam.com
VLSI DESIGN
bits. Registers declared as data type reg store values as unsigned quantities,
whereas integers store value as signed quantities.
Example
integer counter; // general purpose variable used as a counter
initial
counter=-1; // A negative one is stored in the counter
Real
Real number constants and real register data types are declared with the keyword
real. They can be specified in decimal notation (e.g., 5.12) or in scientific
notation (e.g., 5e6, which is 5x10^6). Real numbers cannot have a range
declaration, and their default value is 0. When a real value is assigned to an
integer, the real number is rounded off to the nearest integer.
Example
real delta; // define a real variable called delta
initial
begin
delta=4e10; // delta is assigned in scientific notation
delta=2.13 ; // delta is assigned a value 2.13
end
integer i; // define an integer i
Time
Verilog simulation is done with respect to simulation time. A special time register
data type is used in Verilog to store simulation time. A time variable is declared
with the keyword time. The width for time register data types is implementation
specific but is at least 64 bits. The system function $time is invoked to get the
current simulation time.
Example
time save_sim_time; // define a time variable save_sim_time
initial
save_sim_time=$time; // save the current simulation time
3.1.9.5 Arrays
Arrays are allowed in Verilog for reg, integer, time and vector register data types.
Arrays are not allowed for real variables. Arrays are accessed by
<array_name>[<subscript>]. Multidimensional arrays not permitted in Verilog.
www.verilogcourseteam.com
VLSI DESIGN
Example
integer count[7:0]; // an array of 8 count variables
reg bool[31:0]; // array of 32 one-bit Boolean register variables
integer matrix[4:0][4:0]; // illegal declaration Multidimensional array
3.1.9.6 Memories
In digital simulation, one often needs to model register files, RAMs and ROMs.
Memories are modeled in Verilog simply as an array of registers. Each element of
the array is known as a word. Each word can be one or more bits. It is important
to differentiate between n 1-bit registers and one n-bit register. A particular word
in memory is obtained by using the address as a memory array subscript.
Example
reg mem1bit[0:1023]; // memory mem1bit with 1K 1-bit words
reg [7:0]membyte[0:1023]; // memory membyte with 1K 8-bit words
3.1.9.7 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.
Example
parameter port_id = 5; //Defines a constant port_id
parameter cache_line_width= 256; // Constant defines width of cache line
3.1.9.8 Strings
Strings can be stored in reg. The width of the register variables must be large
enough to hold the string. Each character in the string takes up 8 bits (1 byte).
If the width of the register is greater than the size of the string, Verilog fills bits
to left of the string with zeros. If the register width is smaller than the string
width, Verilog truncates the leftmost bits of the string. It is always safe to
declare that is slightly wider than necessary.
Example
reg [8*81:1] string_value; // declare a variable that is 18 bytes wide
initial
string_value=hello Verilog course team; // string can be stored in variable
www.verilogcourseteam.com
VLSI DESIGN
3.2 MODULES
A module in Verilog consists of distinct parts as shown in figure 1.8. A
module definition always begins with the keyword module. The module name,
port list, port declarations, and optional parameters must come first in a module
definition. Port list and port declarations are present only if the module has any
ports to interact with the external environment. The five components within a
module are;
variable declarations,
dataflow statements
instantiation of lower modules
behavioral blocks
tasks or functions.
These components can be in any order and at any place in the module definition.
The endmodule statement must always come last in a module definition. All
components except module, module name, and endmodule are optional and can
be mixed and matched as per design needs. Verilog allows multiple modules to be
defined in a single file. The modules can be defined in any order in the file.
www.verilogcourseteam.com
VLSI DESIGN
3.3 PORTS
Ports provide the interface by which a module can communicate with its
environment. For example, the input/output pins of an IC chip are its ports. The
environment can interact with the module only through its ports. The internals
www.verilogcourseteam.com
VLSI DESIGN
of the module are not visible to the environment. This provides a very
powerful flexibility to the designer. The internals of the module can be
changed without affecting the environment as long as the interface is not
modified. Ports are also referred to as terminals.
3.3.1 Port Declaration
All ports in the list of ports must be declared in the module. Ports can be
declared as follows
Verilog Keyword
input
output
inout
Type of Port
Input port
Output port
Bidirectional port
Each port in the port list is defined as input, output, or inout, based on the
direction of the port signal.
3.3.2 Port Connection Rules
One can visualize a port as consisting of two units, one unit that is internal to
the module another that is external to the module. The internal and external
units are connected. There are rules governing port connections when modules
are instantiated within other modules. The Verilog simulator complains if any
port connection rules are violated. These rules are summarized in figure 1.9.
Outputs:
Inouts:
www.verilogcourseteam.com
VLSI DESIGN
From the below example, notice that the external signals a, b, out appear in
exactly the same order as the ports a, b, out in the module defined in adder below.
Example
Port by name
For larger designs where the module have ,say 5o ports , remembering the order
of the ports in the module definition is impractical and error prone. Verilog
provided the capability to connect external signals to ports by the port names,
rather than by position.
Syntax for instantiation with port name:
module_name instance_name (.port_name(signal), .port_name (signal) );
From the below example, note that the port connections in any order as long as
the port name in the module definition correctly matches the external signal.
www.verilogcourseteam.com
VLSI DESIGN
Example
Another advantage of connecting ports by name is that as long as the port name is
not changed, the order of ports in the port list of a module can be rearranged
without changing the port connections in the module instantiations.
Fall delay
The fall delay is associated with a gate output transition to a 0 from another
value.
www.verilogcourseteam.com
VLSI DESIGN
Turn-off delay
The turn-off delay is associated with a gate output transition to the high
impedance value (z) from another value.
If the value changes to X, the minimum of the three delays is considered.
Three types of delay specifications are allowed. If only one delay is specified,
this value is used for all transitions. If two delays are specified, they refer to the
rise and fall delay values. The turn-off delay is the minimum of the two delays.
If all three delays are specified, they refer to rise, fall, and turn-off delay. If no
delays are specified, the default value is zero.
Example for Delay Specification
www.verilogcourseteam.com
VLSI DESIGN
Min, typ, or max values can he chosen at Verilog run time. Method of
choosing a min/typ/max value may vary for different simulators or o p e r a t i n g
systems. (For Verilog-XLTM, the values are chosen by specifying options
+ m a x d e l a y , +typdelay, and +mindelays at run time. If no option
is specified, the typical delay value is the default). This allows the designers the
f l e x i b i l i t y of building three delay values for each transition into their
design. The designer can experiment with delay values without modifying the
design.
Examples of Min, Max and Typical Delay Values
www.verilogcourseteam.com
VLSI DESIGN
At this level the module is designed by specifying the data flow. The designer is
aware of how data flows between hardware registers and how the data is
processed in the design.
Gate level
The module is implemented in terms of logic gates and interconnections
between these gates. Design at this level is similar to describing a design in
terms of a gate-level logic diagram.
Switch level
This is the lowest level of abstraction provided by Verilog. A module can be
implemented in terms of switches, storage nodes, and the interconnections
between them. Design at this level requires knowledge of switch-level
implementation details.
Verilog allows the designer to mix and match all four levels of abstractions in a
design. In the digital design community, the term register transfer level (RTL) is
frequently used for a Verilog description that uses a combination of behavioral and
dataflow constructs and is acceptable to logic synthesis tools.
If a design contains four modules, Verilog allows each of the modules to be written
at a different level of abstraction. As the design matures, most modules are replaced
with gate-level implementations.
,
Normally, the higher the level of abstraction, the more flexible and technology
Independent the design. As one goes lower toward switch-level design, the design
becomes technology dependent and inflexible. A small modification can cause a
significant number of changes in the design. Comparing the analogy with C
programming and assembly language programming. It is easier to program in higherlevel language such as C. The program can be easily ported to any machine.
However, if the design at the assembly level, the program is specific for that
machine and cannot be easily ported to another machine.
www.verilogcourseteam.com
VLSI DESIGN
so Verilog switch input and output signals can take any of the four 0, 1, Z, and X
logic values.
3.6.1 Switch level primitives
Table 1.1 shows Verilog switch and pull primitives. Switches are unidirectional or
bidirectional and resistive or nonresistive. For each group those primitives that
switch on with a positive gate {like an NMOS transistor} and those that switch
on with a negative gate {like a PMOS transistor}. Switching on means that logic
values flow from input transistor to its input. Switching off means that the output
of a transistor is at Z level regardless of its input value.
A unidirectional transistor passes its input value to its output when it is switched
on. A bidirectional transistor conducts both ways. A resistive structure reduces the
strength of its input logic when passing it to its output. In addition to switch level
primitives, pull-primitives that are used as pull-up and pull-down resistors for tristate outputs.
Table 3.1
Figure 1.10 shows standard switches; pull primitives, and tri-state gates that
behave like nmos and pmos. Instantiations of these primitives and their
corresponding symbols are also shown. Cmos is a unidirectional transmission gate
with a true and complemented control lines. Nmos and pmos are unidirectional
pass gates representing NMOS and PMOS transistors respectively.
When such a resistive switch conducts, the strength of its output signal is one or
two levels below that of its input signal. Delay values for transition to 1, transition
to 0, and transition to Z can be specified in the #(to-1, to-0, to-z) format for
unidirectional switches. Bidirectional tran switches shown in figure are
functionally equivalent to unidirectional switches shown in the adjacent column
of this figure. When conducting, the two inout ports are connected and logic
values flow in both directions.
www.verilogcourseteam.com
VLSI DESIGN
Figure 3.10
Since switches are Verilog primitives, like logic gates, the name of the instance is
optional. Therefore, it is acceptable to instantiate a switch without assigning an
instance name.
www.verilogcourseteam.com
VLSI DESIGN
Value of the out signal is determined from the values of data and control signals.
Logic tables for out are shown in table. Some combinations of data and control
signals cause the gates to output to either a 1 or 0 or to an z value without a
preference for either value. The symbol L stands for 0 or Z; H stands for 1 or z.
www.verilogcourseteam.com
VLSI DESIGN
The ncontrol and pcontrol are normally complements of each other. When the
ncontrol signal is 1 and pcontrol signal is 0, the switch conducts. If ncontrol is
0 and pcontrol is 1, the output of the switch is high impedance value. The cmos
gate is essentially a combination of two gates: one nmos and one pmos. Thus
the cmos instantiation shown above is equivalent to the following.
nmos (out, data, ncontrol); //instantiate a nmos switch
pmos (out, data, pcontrol); //instantiate a pmos switch
Since a cmos switch is derived from nmos and pmos switches, it is possible
derive the output value from Table 1.2, given values of data, ncontrol, and
pcontrol signals.
3.6.4 Bidirectional Switches
NMOS, PMOS and CMOS gates conduct from drain to source. It is important to
have devices that conduct in both directions. In such cases, signals on either side
of the device can be the driver signal. Bidirectional switches are provided for
this purpose. Three keywords are used to define bidirectional switches: tran,
tranif0, and tranifl.
Symbols for these switches are shown in figure 3.13 below.
www.verilogcourseteam.com
VLSI DESIGN
rpmos
rtranif0
rtranifl
There are two main differences between regular switches and resistive switches:
their source-to-drain impedances and the way they pass signal strengths.
Resistive devices have a high source-to-drain impedance. Regular to have a
low source-to-drain impedance.
Resistive switches reduce signal strengths when signals pass through them.
The changes are shown below. Regular switches retain strength levels of
signals from input to output. The exception is that if the input is of supply,
the output is of strength strong. Table 1.3 shows the strength reduction due
to resistive switches
www.verilogcourseteam.com
VLSI DESIGN
Output strength
pull
pull
weak
medium
medium
small
small
high
Delay
specification
Pmos,nmos,rpmo
s,rnmos
Examples
pmos
p1(out,data,control);
pmos#(1)
p1(out,data,control);
Two (rise,fall)
Three
(rise,fall,turnof
f)
Cmos,rcmos
Zero, one,two
or three delays
(same as
above)
nmos #(1,2)
p2(out,data,control);
nmos #(1,3,2)
p2(out,data,control);
cmos #(5)
c2(out,data,nctrl,pctrl);
cmos #(1,2)
c1(out,data,nctrl,pctrl);
www.verilogcourseteam.com
VLSI DESIGN
Delay
specification
tran, rtran
No
delay
specification
allowed
tranif1,rtranif1
tranif0,rtranif0
Examples
rtranif0
rt1(inout1,inout2,control);
tranif0#(3)
T(inout1,inout2,control);
tranif1#(1,2)
t1(inout1,inout2,control);
www.verilogcourseteam.com
VLSI DESIGN
Example-CMOS NAND
www.verilogcourseteam.com
VLSI DESIGN
www.verilogcourseteam.com
VLSI DESIGN
The CMOS flip-flop can be defined using the CMOS switches and my_hot
inverters. The Verilog description for the CMOS flip-flop is given below.
module cff(q, qbar, d, clk);
output q,qbar;
input d,clk;
wire e;
wire nclk;
my_not nt(nclk, clk);
www.verilogcourseteam.com
VLSI DESIGN
xor
xnor
The corresponding logic symbols for these gates are shown in figure 1.18. We
consider gates with two inputs.
These gates are instantiated to build logic circuits in Verilog. Examples of gate
Instantiations are shown below. In the below example, for all instances, OUT is
connected to the output out, and IN1 and IN2 are connected to the two inputs i1 and
i2 of the gate primitives.
www.verilogcourseteam.com
VLSI DESIGN
The instance name does not need to be specified for primitives. More than two
inputs can be specified in gate instantiation Gates with more two inputs are
instantiated by simply adding more ports in the gate instantiation. Verilog
automatically instantiates the appropriate gate.
Example Gate Instantiation of And/Or gates
The truth tables for these gates are given below, assuming two inputs. Outputs of
gates with more than two inputs are computed by applying the truth table
iteratively.
Buf/Bufif1/Bufif0/Not/Notfif1/Notfif0 Gates
Buf/not gates have one scalar input and one or more scalar output. The lasts
terminal in the port list is connected to the input. Other terminals are connected
the outputs.
Bufif1, Bufif0, Notif1, Notifo gates propagate only if their control signal is
asserted. Such a situation is applicable when multiple drivers drive the signal.
These drivers are designed to drive the signal on mutually exclusive control.
They propagate z if their control signal is deasserted.
buf
bufif1
bufif1
not
notfif1
bufif0
__________________________________________
Figure 3.19 Gates But, Not, Bufif1, Bufif0, Notif1, Notifo
www.verilogcourseteam.com
VLSI DESIGN
From the above example, notice that theses gates can have multiple outputs but
exactly one inputs, which is the last terminal in the port list.
The truth tables for these gates are shown below.
www.verilogcourseteam.com
VLSI DESIGN
Examples
AND Gate from NAND Gate
www.verilogcourseteam.com
VLSI DESIGN
// Testbench Code
initial begin
$monitor ("X = %b Y = %b F = %b", X, Y, F);
X = 0;
Y = 0;
#1 X = 1;
#1 Y = 1;
#1 X = 0;
#1 $finish;
end
endmodule
Simulation Output
X=0Y=0F=0
X=1Y=0F=0
X=1Y=1F=1
X=0Y=1F=0
www.verilogcourseteam.com
VLSI DESIGN
#3 D = 0;
#3 $finish;
end
always #2 CLK = ~CLK;
endmodule
Simulation Output
CLK = 0 D = 0 Q = x Q_BAR = x
CLK = 1 D = 0 Q = 0 Q_BAR = 1
CLK = 1 D = 1 Q = 1 Q_BAR = 0
CLK = 0 D = 1 Q = 1 Q_BAR = 0
CLK = 1 D = 0 Q = 0 Q_BAR = 1
CLK = 0 D = 0 Q = 0 Q_BAR = 1
www.verilogcourseteam.com
VLSI DESIGN
or (Y, y0,y1,y2,y3);
// Test bench
initial begin
$monitor (
"c0 = %b c1 = %b c2 = %b c3 = %b A = %b B = %b Y = %b",
c0, c1, c2, c3, A, B, Y);
c0 = 0;
c1 = 0;
c2 = 0;
c3 = 0;
A = 0;
B = 0;
#1 A = 1;
#2 B = 1;
#4 A = 0;
#8 $finish;
end
always #1 c0 = ~c0;
always #2 c1 = ~c1;
always #3 c2 = ~c2;
always #4 c3 = ~c3;
endmodule
Simulation Output
c0 = 0 c1 = 0 c2 = 0 c3 = 0 A = 0 B = 0 Y = 0
c0 = 1 c1 = 0 c2 = 0 c3 = 0 A = 1 B = 0 Y = 0
c0 = 0 c1 = 1 c2 = 0 c3 = 0 A = 1 B = 0 Y = 0
c0 = 1 c1 = 1 c2 = 1 c3 = 0 A = 1 B = 1 Y = 0
c0 = 0 c1 = 0 c2 = 1 c3 = 1 A = 1 B = 1 Y = 1
c0 = 1 c1 = 0 c2 = 1 c3 = 1 A = 1 B = 1 Y = 1
c0 = 0 c1 = 1 c2 = 0 c3 = 1 A = 1 B = 1 Y = 1
c0 = 1 c1 = 1 c2 = 0 c3 = 1 A = 0 B = 1 Y = 1
c0 = 0 c1 = 0 c2 = 0 c3 = 0 A = 0 B = 1 Y = 0
c0 = 1 c1 = 0 c2 = 1 c3 = 0 A = 0 B = 1 Y = 0
c0 = 0 c1 = 1 c2 = 1 c3 = 0 A = 0 B = 1 Y = 1
c0 = 1 c1 = 1 c2 = 1 c3 = 0 A = 0 B = 1 Y = 1
c0 = 0 c1 = 0 c2 = 0 c3 = 1 A = 0 B = 1 Y = 0
c0 = 1 c1 = 0 c2 = 0 c3 = 1 A = 0 B = 1 Y = 0
c0 = 0 c1 = 1 c2 = 0 c3 = 1 A = 0 B = 1 Y = 1
www.verilogcourseteam.com
VLSI DESIGN
www.verilogcourseteam.com
VLSI DESIGN
Description
a<b
a less than b
a>b
a greater than b
a <= b
a >= b
www.verilogcourseteam.com
VLSI DESIGN
initial begin
$display (" 5 <= 10 = %b", (5 <= 10));
$display (" 5 >= 10 = %b", (5 >= 10));
$display (" 1'bx <= 10 = %b", (1'bx <= 10));
$display (" 1'bz <= 10 = %b", (1'bz <= 10));
#10 $finish;
end
endmodule
Simulation Output
5 <= 10 = 1
5 >= 10 = 0
1'bx <= 10 = x
1'bz <= 10 = x
Description
negation
and
inclusive or
exclusive or
exclusive nor (equivalence)
www.verilogcourseteam.com
VLSI DESIGN
Example
module bitwise_operators();
initial begin
// Bit Wise Negation
$display (" ~4'b0001
= %b", (~4'b0001));
$display (" ~4'bx001
= %b", (~4'bx001));
$display (" ~4'bz001
= %b", (~4'bz001));
// Bit Wise AND
$display (" 4'b0001 & 4'b1001 = %b", (4'b0001 & 4'b1001));
$display (" 4'b1001 & 4'bx001 = %b", (4'b1001 & 4'bx001));
$display (" 4'b1001 & 4'bz001 = %b", (4'b1001 & 4'bz001));
// Bit Wise OR
$display (" 4'b0001 | 4'b1001 = %b", (4'b0001 | 4'b1001));
$display (" 4'b0001 | 4'bx001 = %b", (4'b0001 | 4'bx001));
$display (" 4'b0001 | 4'bz001 = %b", (4'b0001 | 4'bz001));
// Bit Wise XOR
$display (" 4'b0001 ^ 4'b1001 = %b", (4'b0001 ^ 4'b1001));
$display (" 4'b0001 ^ 4'bx001 = %b", (4'b0001 ^ 4'bx001));
$display (" 4'b0001 ^ 4'bz001 = %b", (4'b0001 ^ 4'bz001));
// Bit Wise XNOR
$display (" 4'b0001 ~^ 4'b1001 = %b", (4'b0001 ~^ 4'b1001));
$display (" 4'b0001 ~^ 4'bx001 = %b", (4'b0001 ~^ 4'bx001));
$display (" 4'b0001 ~^ 4'bz001 = %b", (4'b0001 ~^ 4'bz001));
#10 $finish;
end
endmodule
Simulation Output
~4'b0001
= 1110
~4'bx001
= x110
~4'bz001
= x110
4'b0001 & 4'b1001 = 0001
4'b1001 & 4'bx001 = x001
4'b1001 & 4'bz001 = x001
4'b0001 | 4'b1001 = 1001
4'b0001 | 4'bx001 = x001
4'b0001 | 4'bz001 = x001
4'b0001 ^ 4'b1001 = 1000
4'b0001 ^ 4'bx001 = x000
4'b0001 ^ 4'bz001 = z000
4'b0001 ~^ 4'b1001 = 0111
4'b0001 ~^ 4'bx001 = x111
4'b0001 ~^ 4'bz001 = x111
www.verilogcourseteam.com
VLSI DESIGN
Example
module logical_operators();
initial begin
// Logical AND
$display ("1'b1 && 1'b1 = %b", (1'b1 && 1'b1));
$display ("1'b1 && 1'b0 = %b", (1'b1 && 1'b0));
$display ("1'b1 && 1'bx = %b", (1'b1 && 1'bx));
// Logical OR
$display ("1'b1 || 1'b0 = %b", (1'b1 || 1'b0));
$display ("1'b0 || 1'b0 = %b", (1'b0 || 1'b0));
$display ("1'b0 || 1'bx = %b", (1'b0 || 1'bx));
// Logical Negation
$display ("! 1'b1
= %b", (! 1'b1));
$display ("! 1'b0
= %b", (! 1'b0));
#10 $finish;
end
endmodule
Simulation Output
1'b1 && 1'b1 = 1
1'b1 && 1'b0 = 0
1'b1 && 1'bx = x
1'b1 || 1'b0 = 1
1'b0 || 1'b0 = 0
www.verilogcourseteam.com
VLSI DESIGN
1'b0 || 1'bx = x
! 1'b1
=0
! 1'b0
=1
Example
module reduction_operators();
initial begin
// Bit Wise AND reduction
$display (" & 4'b1001 = %b", (& 4'b1001));
$display (" & 4'bx111 = %b", (& 4'bx111));
$display (" & 4'bz111 = %b", (& 4'bz111));
// Bit Wise NAND reduction
$display (" ~& 4'b1001 = %b", (~& 4'b1001));
$display (" ~& 4'bx001 = %b", (~& 4'bx001));
$display (" ~& 4'bz001 = %b", (~& 4'bz001));
// Bit Wise OR reduction
$display (" | 4'b1001 = %b", (| 4'b1001));
$display (" | 4'bx000 = %b", (| 4'bx000));
$display (" | 4'bz000 = %b", (| 4'bz000));
// Bit Wise OR reduction
$display (" ~| 4'b1001 = %b", (~| 4'b1001));
$display (" ~| 4'bx001 = %b", (~| 4'bx001));
$display (" ~| 4'bz001 = %b", (~| 4'bz001));
www.verilogcourseteam.com
VLSI DESIGN
The left operand is shifted by the number of bit positions given by the
right operand.
www.verilogcourseteam.com
VLSI DESIGN
Example
module shift_operators();
initial begin
// Left Shift
$display (" 4'b1001 << 1 = %b", (4'b1001 << 1));
$display (" 4'b10x1 << 1 = %b", (4'b10x1 << 1));
$display (" 4'b10z1 << 1 = %b", (4'b10z1 << 1));
// Right Shift
$display (" 4'b1001 >> 1 = %b", (4'b1001 >> 1));
$display (" 4'b10x1 >> 1 = %b", (4'b10x1 >> 1));
$display (" 4'b10z1 >> 1 = %b", (4'b10z1 >> 1));
#10 $finish;
end
endmodule
Simulation Output
4'b1001 << 1 = 0010
4'b10x1 << 1 = 0x10
4'b10z1 << 1 = 0z10
4'b1001 >> 1 = 0100
4'b10x1 >> 1 = 010x
4'b10z1 >> 1 = 010z
www.verilogcourseteam.com
VLSI DESIGN
endmodule
Simulation Output
{4'b1001,4'b10x1} = 100110x1
Example
module replication_operator();
initial begin
// replication
$display (" {4{4'b1001}}
= %b", {4{4'b1001}});
// replication and concatenation
$display (" {4{4'b1001,1'bz}} = %b", {4{4'b1001,1'bz}});
#10 $finish;
end
endmodule
Simulation Output
{4{4'b1001}
= 1001100110011001
{4{4'b1001,1'bz} = 1001z1001z1001z1001z
www.verilogcourseteam.com
VLSI DESIGN
module conditional_operator();
wire out;
reg enable,data;
// Tri state buffer
assign out = (enable) ? data : 1'bz;
initial begin
$display ("time\t enable data out");
$monitor ("%g\t %b
%b %b",$time,enable,data,out);
enable = 0;
data = 0;
#1 data = 1;
#1 data = 0;
#1 enable = 1;
#1 data = 1;
#1 data = 0;
#1 enable = 0;
#10 $finish;
end
endmodule
Simulation Output
time
0
1
2
3
4
5
6
Description
a equal to b, including x and z (Case equality)
a not equal to b, including x and z (Case inequality)
a equal to b, result may be unknown (logical equality)
a not equal to b, result may be unknown (logical
equality)
www.verilogcourseteam.com
VLSI DESIGN
Operands are compared bit by bit, with zero filling if the two operands do
not have the same length
Result is 0 (false) or 1 (true)
For the == and != operators, the result is x, if either operand contains an x
or a z
For the === and !== operators, bits with x and z are included in the
comparison and must match for the result to be true
Note: The result is always 0 or 1
Example
module equality_operators();
initial begin
// Case Equality
$display (" 4'bx001 === 4'bx001 = %b", (4'bx001 === 4'bx001));
$display (" 4'bx0x1 === 4'bx001 = %b", (4'bx0x1 === 4'bx001));
$display (" 4'bz0x1 === 4'bz0x1 = %b", (4'bz0x1 === 4'bz0x1));
$display (" 4'bz0x1 === 4'bz001 = %b", (4'bz0x1 === 4'bz001));
// Case Inequality
$display (" 4'bx0x1 !== 4'bx001 = %b", (4'bx0x1 !== 4'bx001));
$display (" 4'bz0x1 !== 4'bz001 = %b", (4'bz0x1 !== 4'bz001));
// Logical Equality
$display (" 5
== 10
= %b", (5
== 10));
$display (" 5
== 5
= %b", (5
== 5));
// Logical Inequality
$display (" 5
!= 5
= %b", (5
!= 5));
$display (" 5
!= 6
= %b", (5
!= 6));
#10 $finish;
end
endmodule
Simulation Output
4'bx001 === 4'bx001 = 1
4'bx0x1 === 4'bx001 = 0
4'bz0x1 === 4'bz0x1 = 1
4'bz0x1 === 4'bz001 = 0
4'bx0x1 !== 4'bx001 = 1
4'bz0x1 !== 4'bz001 = 1
5
== 10
=0
5
== 5
=1
5
!= 5
=0
5
!= 6
=1
www.verilogcourseteam.com
VLSI DESIGN
Symbols
!, ~, *, /, %
+, - , <<, >>
<,>,<=,>=,==,!=,===,!==
&, !&,^,^~,|,~|
&&, ||
?:
www.verilogcourseteam.com
VLSI DESIGN
www.verilogcourseteam.com
VLSI DESIGN
module intra_assign();
reg a, b;
initial begin
$monitor("TIME = %g A = %b B = %b",$time, a , b);
a = 1;
b = 0;
a = #10 0;
b = a;
#20 $display("TIME = %g A = %b B = %b",$time, a , b);
$finish;
end
endmodule
Simulation output
TIME = 0 A = 1 B = 0
TIME = 10 A = 0 B = 0
TIME = 30 A = 0 B = 0
www.verilogcourseteam.com
VLSI DESIGN
www.verilogcourseteam.com
VLSI DESIGN
end
always
#1 clk = ~clk;
endmodule
Simulation Output
TIME : 0 CLK : 0 ENABLE : 0 TRIGGER : x
TIME : 1 CLK : 1 ENABLE : 0 TRIGGER : x
TIME : 2 CLK : 0 ENABLE : 0 TRIGGER : x
TIME : 3 CLK : 1 ENABLE : 0 TRIGGER : x
TIME : 4 CLK : 0 ENABLE : 0 TRIGGER : x
TIME : 5 CLK : 1 ENABLE : 1 TRIGGER : 0
TIME : 6 CLK : 0 ENABLE : 0 TRIGGER : 0
TIME : 7 CLK : 1 ENABLE : 0 TRIGGER : 0
TIME : 8 CLK : 0 ENABLE : 0 TRIGGER : 0
TIME : 9 CLK : 1 ENABLE : 0 TRIGGER : 0
TIME : 10 CLK : 0 ENABLE : 0 TRIGGER : 0
TIME : 11 CLK : 1 ENABLE : 0 TRIGGER : 0
TIME : 12 CLK : 0 ENABLE : 0 TRIGGER : 0
TIME : 13 CLK : 1 ENABLE : 0 TRIGGER : 0
TIME : 14 CLK : 0 ENABLE : 0 TRIGGER : 0
TIME : 15 CLK : 1 ENABLE : 0 TRIGGER : 1
TIME : 16 CLK : 0 ENABLE : 1 TRIGGER : 0
TIME : 17 CLK : 1 ENABLE : 0 TRIGGER : 0
TIME : 18 CLK : 0 ENABLE : 0 TRIGGER : 0
TIME : 19 CLK : 1 ENABLE : 0 TRIGGER : 0
TIME : 20 CLK : 0 ENABLE : 0 TRIGGER : 0
www.verilogcourseteam.com
VLSI DESIGN
Event OR control
Sometimes a transition on any one of multiple signals or events can trigger the
execution of a statement or a block of statements. This is expressed as an OR of
events or signals. The list of events or signals expressed as an OR is also known
as a sensitivity list. The keyword or is used to specify multiple triggers as shown
in below example,
always @(reset or clock or d)
begin
if(reset)
q=1b0;
else if (clock)
q=d;
end
initial: initial blocks execute only once at time zero (start execution at
time zero).
always: always blocks loop to execute over and over again; in other
words, as the name suggests, it executes always.
www.verilogcourseteam.com
VLSI DESIGN
Example initial
module initial_example();
reg clk,reset,enable,data;
initial begin
clk = 0;
reset = 0;
enable = 0;
data = 0;
end
endmodule
In the above example, the initial block execution and always block execution
starts at time 0. Always block waits for the event, here positive edge of clock,
whereas initial block just executed all the statements within begin and end
statement, without waiting.
Example always
module always_example();
reg clk,reset,enable,q_in,data;
always @ (posedge clk)
if (reset) begin
data <= 0;
end else if (enable) begin
data <= q_in;
end
endmodule
In an always block, when the trigger event occurs, the code inside begin and end
is executed; then once again the always block waits for next event triggering. This
process of waiting and executing on event is repeated till simulation stops.
3.10.5 Procedural Assignment Statements
www.verilogcourseteam.com
VLSI DESIGN
initial begin
clk = 0;
reset = 0;
enable = 0;
data = 0;
end
endmodule
www.verilogcourseteam.com
VLSI DESIGN
Begin : clk gets 0 after 1 time unit, reset gets 0 after 11 time units, enable after 16
time units, data after 19 units. All the statements are executed sequentially.
Simulator Output
0 clk=x reset=x enable=x data=x
1 clk=0 reset=x enable=x data=x
11 clk=0 reset=0 enable=x data=x
16 clk=0 reset=0 enable=0 data=x
19 clk=0 reset=0 enable=0 data=0
Example - "fork-join"
module initial_fork_join();
reg clk,reset,enable,data;
initial begin
$monitor("%g clk=%b reset=%b enable=%b data=%b",
$time, clk, reset, enable, data);
fork
#1 clk = 0;
#10 reset = 0;
#5 enable = 0;
#3 data = 0;
join
#1 $display ("%g Terminating simulation", $time);
$finish;
end
endmodule
Fork: clk gets its value after 1 time unit, reset after 10 time units, enable after 5
time units, data after 3 time units. All the statements are executed in parallel.
Simulator Output
0 clk=x reset=x enable=x data=x
1 clk=0 reset=x enable=x data=x
3 clk=0 reset=x enable=x data=0
5 clk=0 reset=x enable=0 data=0
10 clk=0 reset=0 enable=0 data=0
11 Terminating simulation
www.verilogcourseteam.com
VLSI DESIGN
-> Any timing within the sequential groups is relative to the previous
statement.
-> Delays in the sequence accumulate (each delay is added to the previous
delay)
-> Block finishes after the last statement in the block.
Example sequential
module sequential();
reg a;
initial begin
$monitor ("%g a = %b", $time, a);
#10 a = 0;
#11 a = 1;
#12 a = 0;
#13 a = 1;
#14 $finish;
end
endmodule
Simulator Output
0a=x
10 a = 0
21 a = 1
33 a = 0
46 a = 1
Example Parallel
module parallel();
reg a;
initial
fork
$monitor ("%g a = %b", $time, a);
www.verilogcourseteam.com
VLSI DESIGN
#10 a = 0;
#11 a = 1;
#12 a = 0;
#13 a = 1;
#14 $finish;
join
endmodule
Simulator Output
0a=x
10 a = 0
11 a = 1
12 a = 0
13 a = 1
www.verilogcourseteam.com
VLSI DESIGN
initial begin
c = #10 0;
c = #11 1;
c = #12 0;
c = #13 1;
end
initial begin
d <= #10 0;
d <= #11 1;
d <= #12 0;
d <= #13 1;
end
initial begin
$monitor("TIME = %g A = %b B = %b C = %b D = %b",$time, a, b, c, d);
#50 $finish;
end
endmodule
Simulator Output
TIME = 0 A = x B = x C = x D = x
TIME = 10 A = 0 B = 0 C = 0 D = 0
TIME = 11 A = 0 B = 0 C = 0 D = 1
TIME = 12 A = 0 B = 0 C = 0 D = 0
TIME = 13 A = 0 B = 0 C = 0 D = 1
TIME = 21 A = 1 B = 1 C = 1 D = 1
TIME = 33 A = 0 B = 0 C = 0 D = 1
TIME = 46 A = 1 B = 1 C = 1 D = 1
www.verilogcourseteam.com
VLSI DESIGN
Example- if-else
module if_else();
reg dff;
wire clk,din,reset;
always @ (posedge clk)
if (reset) begin
www.verilogcourseteam.com
VLSI DESIGN
dff <= 0;
end else begin
dff <= din;
end
endmodule
Example- nested-if-else-if
module nested_if();
reg [3:0] counter;
reg clk,reset,enable, up_en, down_en;
always @ (posedge clk)
// If reset is asserted
if (reset == 1'b0) begin
counter <= 4'b0000;
// If counter is enable and up count is asserted
end else if (enable == 1'b1 && up_en == 1'b1) begin
counter <= counter + 1'b1;
// If counter is enable and down count is asserted
end else if (enable == 1'b1 && down_en == 1'b1) begin
counter <= counter - 1'b1;
// If counting is disabled
end else begin
counter <= counter; // Redundant code
end
www.verilogcourseteam.com
VLSI DESIGN
Example- case
module mux (a,b,c,d,sel,y);
input a, b, c, d;
input [1:0] sel;
output y;
reg y;
always @ (a or b or c or d or sel)
case (sel)
0 : y = a;
1 : y = b;
2 : y = c;
3 : y = d;
default : $display("Error in SEL");
endcase
endmodule
www.verilogcourseteam.com
VLSI DESIGN
Example- casez
module casez_example();
reg [3:0] opcode;
reg [1:0] a,b,c;
reg [1:0] out;
always @ (opcode or a or b or c)
casez(opcode)
4'b1zzx : begin // Don't care about lower 2:1 bit, bit 0 match with x
out = a;
$display("@%0dns 4'b1zzx is selected, opcode %b",$time,opcode);
end
4'b01?? : begin
out = b; // bit 1:0 is don't care
$display("@%0dns 4'b01?? is selected, opcode %b",$time,opcode);
end
4'b001? : begin // bit 0 is don't care
out = c;
$display("@%0dns 4'b001? is selected, opcode %b",$time,opcode);
end
default : begin
$display("@%0dns default is selected, opcode %b",$time,opcode);
end
endcase
Simulation Output - casez
@0ns default is selected, opcode 0000
@2ns 4'b1zzx is selected, opcode 101x
@4ns 4'b01?? is selected, opcode 0101
@6ns 4'b001? is selected, opcode 0010
@8ns default is selected, opcode 0000
www.verilogcourseteam.com
VLSI DESIGN
Example- casex
module casex_example();
reg [3:0] opcode;
reg [1:0] a,b,c;
reg [1:0] out;
always @ (opcode or a or b or c)
casex(opcode)
4'b1zzx : begin // Don't care 2:0 bits
out = a;
$display("@%0dns 4'b1zzx is selected, opcode %b",$time,opcode);
end
4'b01?? : begin // bit 1:0 is don't care
out = b;
$display("@%0dns 4'b01?? is selected, opcode %b",$time,opcode);
end
4'b001? : begin // bit 0 is don't care
out = c;
$display("@%0dns 4'b001? is selected, opcode %b",$time,opcode);
end
default : begin
$display("@%0dns default is selected, opcode %b",$time,opcode);
end
endcase
Simulation Output - casex
@0ns default is selected, opcode 0000
@2ns 4'b1zzx is selected, opcode 101x
@4ns 4'b01?? is selected, opcode 0101
@6ns 4'b001? is selected, opcode 0010
@8ns default is selected, opcode 0000
forever
repeat
while
for
www.verilogcourseteam.com
VLSI DESIGN
www.verilogcourseteam.com
VLSI DESIGN
begin
if (opcode == 10) begin
// Perform rotate
repeat (8) begin
#1 temp = data[15];
data = data << 1;
data[0] = temp;
end
end
end
// Simple test code
initial begin
$display (" TEMP DATA");
$monitor (" %b %b ",temp, data);
#1 data = 18'hF0;
#1 opcode = 10;
#10 opcode = 0;
#1 $finish;
end
endmodule
www.verilogcourseteam.com
VLSI DESIGN
end
$display ("DATA = %b LOCATION = %d",data,loc);
end
initial begin
#1 data = 8'b11;
#1 data = 8'b100;
#1 data = 8'b1000;
#1 data = 8'b1000_0000;
#1 data = 8'b0;
#1 $finish;
end
endmodule
Executes an < initial assignment > once at the start of the loop.
Executes the loop as long as an < expression > evaluates as true.
Executes a < step assignment > at the end of each pass through the loop.
Syntax: for (< initial assignment >; < expression >, < step assignment >) <
statement >
Note: Verilog does not have ++ operator as in the case of C language.
Example For
module for_example();
integer i;
reg [7:0] ram [0:255];
initial begin
for (i = 0; i < 256; i = i + 1) begin
#1 $display(" Address = %g Data = %h",i,ram[i]);
ram[i] <= 0; // Initialize the RAM with 0
#1 $display(" Address = %g Data = %h",i,ram[i]);
end
#1 $finish;
end
endmodule
www.verilogcourseteam.com
VLSI DESIGN
www.verilogcourseteam.com
VLSI DESIGN
#10 a = 0;
#10 b = 0;
#10 $finish;
end
endmodule
www.verilogcourseteam.com
VLSI DESIGN
#10 $finish;
end
endmodule
www.verilogcourseteam.com
VLSI DESIGN
3.12.2 Comparator
Digital circuit for Comparator
A11(N1,A3);
A12(N2,B3);
A13(N3,A2);
A14(N4,B2);
A15(N5,A1);
A16(N6,B1);
www.verilogcourseteam.com
VLSI DESIGN
not A17(N7,A0);
not A18(N8,B0);
and
and
and
and
and
and
and
and
A19(N11,B3,N1);
A20(N12,A3,N2);
A21(N13,B2,N3);
A22(N14,A2,N4);
A23(N15,B1,N5);
A24(N16,A1,N6);
A25(N17,B0,N7);
A26(N18,A0,N8);
nor A27(M1,N11,N12);
nor A28(M2,N13,N14);
nor A29(M3,N15,N16);
nor A30(M4,N17,N18);
and A31(M11,M1,N13);
and A32(M12,M1,N14);
and A33(M13,M1,M2,N15);
and A34(M14,M1,M2,N16);
and A35(M15,M1,M2,M3,N17);
and A36(M16,M1,M2,M3,N18);
and A37(AEQB,M1,M2,M3,M4);
or A38(ALTB,N11,M11,M13,M15);
or A39(AGTB,N12,M12,M14,M16);
endmodule
3.12.3 D-latch
Digital circuit for D-latch
www.verilogcourseteam.com
VLSI DESIGN
wire n1,n2,n3,n4;
not a11(n1,D);
and a12(n2,E,n1);
and a13(n3,E,D);
nor a14(Q,n2,Qbar);
nor a15(Qbar,n3,Q);
endmodule
www.verilogcourseteam.com
VLSI DESIGN
www.verilogcourseteam.com
VLSI DESIGN
and a14(n3,A,B);
or a15(COUT,n2,n3);
endmodule
www.verilogcourseteam.com
VLSI DESIGN
nand a14(m1,bi,cin);
nand a15(m2,cin,ai);
nand a16(m3,ai,bi);
nand a17(m4,ai,bi,cin);
nand a18(m5,n3,n2,ai);
nand a19(m6,n3,bin,n1);
nand a20(m7,cin,n2,n1);
nand a21(carry,m1,m2,m3);
nand a22(sum,m4,m5,m6,m7);
endmodule
www.verilogcourseteam.com
VLSI DESIGN
UNIT 4
4.1 INTRODUCTION TO CMOS
Over the past decade, Complementary Metal Oxide Semiconductor (CMOS)
technology has played an increasingly important role in the global integrated
circuit industry. Not that CMOS technology is that new. In fact, the basic
principle behind the MOS filed-transistor was proposed by J.Lilienfeld as early as
1925, and a similar structure closely resembling a modern MOS transistor was
proposed by O.Heli in 1935.
In VLSI design, a logic function is implemented by means of a circuit consisting
of one or more basic cells, such as NAND or NOR gates. The implementation can
be used as a library cell in the design phase. In CMOS circuits, it is possible to
implement complex Boolean functions by means of NMOS and PMOS
transistors. A cell is an interconnection of CMOS transistors. A CMOS cell is
depicted in Figure 4 .1. It consists of a row of PMOS transistors and a row of
NMOS transistors corresponding to the PMOS and NMOS sides of the circuit,
respectively. The automatic generation of standard CMOS logic cells has been
studied intensively during the last decade. The continuous progress in VLSI
technology presents new challenges in developing efficient algorithms for the
layout of standard CMOS logic cells. The cell generation techniques are classified
into random generation and regular style. A random cell generation technique
does not exploit any particular structure to produce the cells. It uses a general
technique, such as a hierarchical place-route algorithm. Random generation
methods produce compact and (if desired) high-performance layouts. However, it
takes a long time to design a cell. Regular generation techniques employ a
predefined structure to design a cell. Cells generated in this manner occupy more
area but can be designed faster. Traditional cell structures based on regularity are,
for example, PLAs, ROMs, and RAMs. The disadvantage of the ROM-based cell
is that it takes a lot of area, as it uses many redundant transistors.
www.verilogcourseteam.com
VLSI DESIGN
s1=0 s1=0
s2=0 s2=1
s1=1
s2=0
s1=1
s2=1
s1=0
s2=0
s1=0
s2=1
s1=1
s2=0
s1=1
s2=1
s1=0
s2=0
s1=0
s2=1
s1=1
s2=0
s1=1
s2=1
c
d
Figure 4.2 Connection and behavior of series and parallel of N-SWITHCES
and P-SWITCHES
www.verilogcourseteam.com
VLSI DESIGN
4.2.2 INVERTER
Table 4.1 outlines the truth table of required to implement a logical inverter.
INPUT
OUTPUT
0
1
1
0
Table 4.1 Inverter Truth Table
www.verilogcourseteam.com
VLSI DESIGN
The pull-down tree is a series pair of N-switches with one end connected to Vdd
and the other end connected to the output.
www.verilogcourseteam.com
VLSI DESIGN
www.verilogcourseteam.com
VLSI DESIGN
upper transistors be saturated, the conditions necessary for the output to go "high"
(1). This behavior, of course, defines the NOR logic function.
Output
S
B
Output
C
1
S
a
b
Figure 4.8 A 2-input CMOS multiplexer
4.3.2 Lathes
A structure called D latch using 2-input multiplexer and two inverter is shown in
Figure 4.9(a). It consist of a data input, D, a clock input, CLK, and output Q and
Q. When CLK=1, Q set to D and Q is set to D (the logical NOT of D) Figure
4.9(b).There are number of ways are used to indicate the logical NOT of a signal.
The form D is often used in texts. However, CAD systems due to the use of an
ASCII a feedback path around the inverter pair is established figure 4.9(c). This
causes the current state of Q to be stored. While CLK=0 the input D is ignored.
This is known as level-sensitive latch. That is the state of the output is dependent
on the level of the clock signal. The latch shown is a positive level-sensitive latch.
By reversing the control connection to the multiplexer, a negative level-sensitive
latch may be constructed.
www.verilogcourseteam.com
VLSI DESIGN
D
C
C
CLK
D
-Q
b
CLK=1
-Q
D
CLK=0
c
Q
Figure 4.9 A CMOS positive-level-sensitive D latch
www.verilogcourseteam.com
VLSI DESIGN
Today, full custom ASICs represent a small percentage of the ASIC market
because gate arrays, structured ASICs and standard cells turn circuit designs into
working chips much faster and at much less cost. Such chips have greatly
improved in speed over the years and provide the necessary performance for
many applications. The speed advantage of a full custom ASIC is not as relevant
as it was in the past. It is used primarily for devices such as microprocessors that
must run as fast as possible and will be produced in huge quantities.
Also promoting the decline of full custom ASICs are chip manufacturers that
make generic chips containing all the necessary functions for specific mass
market products such as DVDs, CDs, digital cameras, etc. An ASIC (Application
Specific Integrated Circuit) is a semiconductor device designed especially for a
particular customer (versus a Standard Product, which is designed for general use
by any customer). The two major categories of ASIC Technology are ArrayBased and Cell-Based (also referred to as Standard Cell). Array-Based ASICs
configure a customer's design at the metal layers, whereas Cell-Based ASICs are
uniquely fabricated at all layers of the silicon process including the diffusion
layers.
4.4.2 Uses of ASICs
To save chip area, ASIC technology integrates the logic and much of the memory
formerly distributed among multiple ICs, thus improving reliability, optimizing
PC Board space, and reducing component costs. In addition, the higher
integration and smaller size results in significantly better system performance.
ASICs were originally used solely to replace or consolidate TTL glue logic and
consisted of relatively low complexity logic. Improvements in design tools and
implementation software, in process technology, and in large pin count packages,
now integrate much more of the logic formerly distributed among numerous ICs
onto a single, very large scale System-On-a-Chip (SOC)
4.4.3 Full Custom ASICs
In a Full-custom ASIC all mask layers are customized show in figure 4.10.Full
Custom designs offer the highest performance and the smallest die size, with the
disadvantage if increased design time, higher complexity and costs, together with
the highest risks of failure .This design option only makes sense when either
libraries nor IP cores are available, or when very high performances are required.
Time after time, fewer projects are really full-custom, because of the very high
cost and the prohibitively slow time to market.
Most of the full-customs works are related library cell generation or minor parts
of a full design. Examples of full-custom IC specific parts are high voltage
(automobiles-avionic), analog processing and analog/digital communication
devices, sensors and transducers. Traditionally microprocessors and memories
www.verilogcourseteam.com
VLSI DESIGN
www.verilogcourseteam.com
VLSI DESIGN
megacells. Megacells are also called mega functions, full-custom blocks, systemlevel macros (SLMs), fixed blocks, cores, or Functional Standard Blocks (FSBs).
The ASIC designer defines only the placement of the standard cells and the
interconnect in a CBIC. However, the standard cells can be placed anywhere on
the silicon, this means that all mask layers of a CBIC are customized and are
unique to a particular customer. The advantage of CBIC is that designers save
time, money, and reduce risk by using a predesigned, pretested and pre
characterized standard-cell library. In addition each standard cell can be
optimized individually. During the design of the cell library each and every
transistor in every standard cell can be chosen to maximize speed or minimizing
area, for example. The disadvantages are time or expense of designing or buying
the standard-cell library and time needed to fabricate all layers of the ASIC for
each new design.
www.verilogcourseteam.com
VLSI DESIGN
The gate array also called masked gate array (MGA), or prediffused array) used
library components and macros that reduce the development time.
Three main types of gate array can be mentioned
Channel
Channelless and
Structured.
Only some (the top few) mask layers are customized the interconnect.
www.verilogcourseteam.com
VLSI DESIGN
www.verilogcourseteam.com
VLSI DESIGN
www.verilogcourseteam.com
VLSI DESIGN
Fusible links
UV-erasable EPROM
EEPROM-Electrically Erasable Programmable ROM
www.verilogcourseteam.com
VLSI DESIGN
100 M
Polysilicon
Dielectric
ONO Layer
n+ diffusion
Metal
200-500 M
Polysilicon
Dielectric
after breakdown
n+ diffusion
www.verilogcourseteam.com
VLSI DESIGN
antifuse. Certain special logic elements are surrounded by I/O pads and
programming and diagnostic logic
Metal
Via
Sio2
metal
link
via
Sio2
www.verilogcourseteam.com
VLSI DESIGN
www.verilogcourseteam.com
VLSI DESIGN
CMOS TESTING
UNIT-5
5.1 THE NEED FOR TESTING
While in real estate the refrain is Location! the comparable advice in IC design
should be Testing! Testing! Testing! .While most problems in VLSI design has
been reduced to algorithm in readily available software, the responsibilities for
various levels of testing and testing methodology can be significant burden on the
designer.
The yield of a particular IC was the number of good die divided by the total
number of die per wafer. Due to the complexity of the manufacturing process not
all die on a wafer correctly operate. Small imperfections in starting material,
processing steps, or in photomasking may result in bridged connections or
missing features. It is the aim of a test procedure to determine which die are good
and should be used in end systems.
www.verilogcourseteam.com
VLSI DESIGN
CMOS TESTING
words, these tests assert that all the gates in the chip, acting in concert, achieve a
desired function. These tests are usually used early in the design cycle to verify
the functionality of the circuit. These will be called functionality tests. The second
set of tests verifies that every gate and register in the chip functions correctly.
These tests are used after the chip is manufactured to verify that the silicon in
intact. They will be called manufacturing tests. In many cases these two sets of
tests may be one and the same, although the natural flow of design usually has a
designer considering function before manufacturing concerns.
5.1.1 Functionality Tests
Functionality tests are usually the first tests a designer might construct as part of
the design process. For most systems, functionality tests involve proving that the
circuit is functionally equivalent to some specification. That specification might
be a verbal description, a plain-language textual specification, a description in
some high-level computer language such as C, FORTRAN, Pascal, or Lisp or in a
hardware-description language such as VHDL, ELLA, or Verilog or simply a
table of inputs and required outputs. Functional equivalence involves running a
simulator at some level on the two descriptions of the chip and ensuring for all
inputs applied that the outputs are equivalent at some convenient checkpoints in
time. The most detailed check might be on a cycle-by-cycle basis.
Functional equivalence may be carried out at various levels of the design
hierarchy. If the description is in a behavior language, the behavior at the system
level may be verifiable. For instance, in the case of a microprocessor, the
operating system might be booted and key programs might be run for the
behavioral description. However, this might be impractical for a gate-level model
and extremely impractical for a transistor-level model. The way out of this
impasse is to use the hierarchy inherent within a system to verify chips and
modules within chips.
www.verilogcourseteam.com
VLSI DESIGN
CMOS TESTING
Combinational
Logic
n
m
m
Register
Clk
www.verilogcourseteam.com
VLSI DESIGN
CMOS TESTING
Where Fn is the previous state of the gate. Similarly if the B n-transistors drain
connection is missing, the function is
F= (not (A+B)) + ((not A).B.Fn)
If either p-transistor is open, the node would be arbitrarily charged until one of the
n-transistors discharged the node. Thereafter it would remain at zero, bar charge
www.verilogcourseteam.com
VLSI DESIGN
CMOS TESTING
leakage effects. This problem has caused researchers to search for new methods
of test generation to detect such behavior.
Currently debate ranges over whether an SA0/SA1 approach to testing is adequate for
testing CMOS. It is also possible to have switches exhibit a stuck-open or stuckclosed state. Stuck closed states can be detected by observing the static VDD current
(IDD ) while applying test vectors. Consider the gate fault shown in Figure 5.5 where a
p-transistor in a 2-input NAND gate is shorted. This could physically occur if stray
www.verilogcourseteam.com
VLSI DESIGN
CMOS TESTING
metal overlapped the source and drain connection or if the source and drain diffusions
shorted. If the test vector 11 is applied to the A and B input and measure the static IDD
, the change to notice that it rises to some value determined by the ratios of the n
and p transistors. While the debate continues and test cycles are at a premium, the
SA0/SA1 model will suffice for some time to come.
www.verilogcourseteam.com
VLSI DESIGN
CMOS TESTING
www.verilogcourseteam.com
VLSI DESIGN
CMOS TESTING
fallen on the circuit/logic designer. To deal with this burden, methods for
automatically generating tests have been invented. Collectively these are known
as ATPG, for Automatic Test Pattern Generation. In practice, one may find that
ATPG is of great use in the generation of test vectors or that for a variety of
reasons it is not applicable.
Most ATPG approaches have been based on simulation. A five-valued logic form
is commonly used to implement test generate algorithms. This consists of the
states 1, 0, D, D and X. 0 and 1 represent logical zero and logical one
respectively. X represents the unknown or DONT-CARE state. D represents a
logic 1 in a good machine and a logic 0 in a faulty machine while D represents a
logic 0 in a good machine and logic 1 in a faulty machine. The truth tables for
inverters, AND, and OR gates are shown in tables 5.1, 5.2, and 5.3.
A
With the use of this five-valued logic by considering the circuit shown in fig5.6
where an S-A-0 fault is to be detected at node h. Alternatively call a circuit
machine, which is customary in test momentclature. Thus node h would have
value D. There are two objectives. The first is to propagate the D on node h to one
or more primary outputs (Pos). A primary output is a directly observable signal,
such as a pad or a scan output. This path to the primary output (or outputs) is
called the sensitized path. The second objective is to set node h to state D via a set
of primary inputs (PIs). A primary input is one that can be directly set via a pad or
some other means. The gate driving node h is the Gate Under test or GUT. From
node h we backtrack to the primary inputs (a, b, c, d, e) to find the necessary input
vector required to set node to a 1. Because the gate driving node h is an AND gate
from the above definition (a D is a 1 in a good machine), both inputs (f, g) have to
be set to 1 to set h to 1. Proceeding further toward the inputs, to assert node f as a
1, both nodes a and b have to be set to a 1. Because node g is driven by an OR
gate, either node c or node d need to be set to a 1 to assert node g.
www.verilogcourseteam.com
VLSI DESIGN
CMOS TESTING
A
B
0
0
1
0
X
0
D
0
D
0
B
0
0
1
1
X
X
D
D
D
D
www.verilogcourseteam.com
VLSI DESIGN
CMOS TESTING
NODE TEST
h
S-A-0
h
S-A-1
f
S-A-0
f
S-A-1
g
S-A-0
g
S-A-1
VECTOR{a,b,c,d,e}
{1,1,0,1,1},{1,1,1,0,1}
0,1,X,X,1},{1,0,X,X,1},{0,0,X,X,1},{1,1,0,0,1}
{1,1,0,1,1},{1,1,1,0,1}
{0,0,0,1,1},{0,0,1,0,1}
{1,1,0,1,1},{1,1,1,0,1},{1,1,1,1,1}
{1,1,0,0,1}
Table 5.4 Node-vector Summary of D-algorithm
The next step is to collapse the vectors into least set that covers all nodes. A
possible set is [1,1,0,1,1],[0,0,1,0,1],[1,1,0,0,1].
The reason for using a five-valued logic is shown in figure5.7. Here an additional
AND gate and INVERT gate have been added to the circuit. From the figure 5.7
that a fault at node h is essentially unobservable. This circuit suffers from what is
called reconvergent fan-out. The usual basis for manual generation of tests by test
engineers and many current automatic test-pattern generation programs is the Dalgorithm(DALG), PODEM and PODEM-X are improved algorithms that are
more efficient than the original DALG and in addition treat error-correcting
circuits composed of XOR gates with reconvergent fan-out. Another ATPG
algorithm is called FAN and an improved efficiency algorithm dealing with
www.verilogcourseteam.com
VLSI DESIGN
CMOS TESTING
tristate drivers called ZALG has been developed. Other work has concentrated on
dealing at a module level rather than the gate level. In basis these algorithms start
by propagating the D value on an internal node to a primary output. This is called
the D-propagation phase. The selection of which gates to pass through to the
output is guided by observability indexes assigned to gates. At any particular gate
input, the gate with the highest observability is selected. Once the D value is
observable at a primary output, the next step is to determine the primary input
values that are required to enable the fault to be observed and tested. This
proceeds by backtracking from the faulted signal and sensitized path-enables
toward the primary inputs. The selection of which path to proceed along toward
the inputs is aided by controllability indices assigned to nodes. This is known as
the backtrace step.
Controllabilities and observabilities can be assigned statically or dynamically. The
SCOAP algorithm is one method of assigning controllabilities and observabilites.
In the SCOAP system the following six testability measures are defined for each
circuit node:
The combinatorial measures are applied to the outputs of logic gates, while the
sequential measures apply to registers and other sequential modules. As an
example, for the AND gate shown in figure 5.8 the CC1 value is
CC1 (z) =CC1 (a) +CC1 (b) +1
www.verilogcourseteam.com
VLSI DESIGN
CMOS TESTING
This arises due to the fact that either a 0 on a or b forces a 0 at the output.
Therefore the easiest controllable input may be used. The sequential
controllability is given by
SC0 (z) =min [SC0 (a), SC0 (b)],
Similar equations may be derived for other gate types. The SCOAP algorithm
proceeds by first calculating the circuit controllabilities by propagating
controllabilities from logic inputs. Following this, the observabilities are
propagated from the logic outputs. Figure 5.9(a) shows a logic circuit with the 1controllabities annotated. Figure 5.9(b) shows the observabilities.
www.verilogcourseteam.com
VLSI DESIGN
CMOS TESTING
This serial fault simulation process is therefore running K sets of the test vector
set. With a small vector set, simple circuit, or very fast simulator, this approach is
feasible. However, for large test sets and circuits, it is highly impractical.
To deal with this problem, a number of ideas have been developed to increase the
speed of fault simulation.
Parallel simulation is one method for speeding up simulation of multiple
machines. In this method m words in an n-bit computer are used to encode the
state of n machines for a 2^m state machine. Two n-bit words may be used to
encode n machines for a three-state simulation. More computer words may be
used to encode simulators with more states. Moreover this principle has been
extended to special-purpose hardware where the computer word length could be
optimized to deal with substantially more circuits in parallel. Now if M circuits
can be simulated in parallel, then
SK =KN/M
Concurrent simulation is currently the most popular method for software based
fault simulation. The technique uses a nonfaulted version of the circuit to create a
good machine model. Each fault creates a new faulty machine that is simulated
parallel with the good machine. Thus N+1 simulations mat have to be completed,
where N is the number of faults. Concurrent simulators rely on a number of
heuristics to reduce the amount of simulation. For instance, when a difference is
noted between a faulted machine and a good machine at an externally observable
www.verilogcourseteam.com
VLSI DESIGN
CMOS TESTING
point, the faulty machine is dropped from the simulation queue and the fault is
detected. If the bad machines has an X or Z compared to a 1 or 0 for the good
machine, the fault is possible detect. Obviously, the more externally observable
nodes a circuit has, the quicker bad machines get dropped from the simulations.
Normally, only the good machine state is stored, with each node listing the fault
machines that differ with the good machine. The different state is often small,
which implies that there is a small amount of extra simulation to be done. In other
words most simulation for a faulty machine is exactly the same as the good
machine. This is what concurrent simulation exploits. Fault collapsing occurs
when two different faults result in the same faulty machine. This is noted, and one
of the faulty machines may be dropped. Some machines performs static fault
collapsing prior to simulation. For instance, an SA0 fault on the input of an
inverter is the same as an SA1 fault at the output of the same inverter. With some
fault simulators it is possible to create a fault dictionary.
This is a cross reference that maps an observed fault to a set of possible internal
faults. It is of use when the tester wishes to track down the actual internal failure
rather than just call the part. Apart from software based simulations, hardwarefault simulation accelerators that can provide a speedup over software based
simulators are also available.
5.2.7 Delay Fault Testing
The fault models we have dealt with to this point have neglected timing. Failures
that occur in CMOS could leave the functionality of the circuit untouched, but
affect the timing.
www.verilogcourseteam.com
VLSI DESIGN
CMOS TESTING
fault now becomes sequential because the detection of the fault depends on the
previous state of the gate and the simulation clock speed.
5.2.8 Statistical Fault Analysis
Conventional fault analysis can consume large CPU resources and take a long
time. An alternative to this is what is called statistical fault analysis. This method
of fault analysis relies on estimating the probability that a fault will be detected.
In summary, a fault free simulation is performed on a circuit in which some extra
statistics are gathered by a modified simulator on a per-input vector basis. These
are as follows
GATE TYPE
B1 (l)
B0(l)
AND
B1 (m).(C1(m)/C1(l))
B0(m).(S(l)-1(m))/C0(l)
OR
B1 (m).(S(l)-C0(m))/C1(l)
B0(m).C0(m)/C0(l)
NAND
B0 (m).C0(m)/C1(l)
B1(m).(S(l)-1(m))/C0(l)
OR
B0 (m).(S(l)-C1(m))/C1(l)
B1(m).(C1(m)/C0(l))
NOT
B0 (m)
B1(m)
www.verilogcourseteam.com
VLSI DESIGN
CMOS TESTING
The observabilities are calculated by propagating from gate outputs to gate inputs.
For common gates, Jain and Agrawal derive the one-observabilites (B1) and zeroobservabilities (B0) for common gates as shown in table 5.5
Methods also exist to deal with fan-out where two observabilities must be
combined. Once these observability and controllability measures have been
determined, the probability of fault detection may be calculated as follows
D1 (l) =B0 (l).C0 (l)
Where D1 (l) is the probability of detection that line l is SA1
D0 (l) =B1 (l). C1 (l)
Where D0 (l) is the probability of detection that line l is SA0
From these values the fault coverage of the circuit mat be calculated. The results
of using this technique follow very closely the results generated by conventional
fault simulation.
5.2.9 Fault Sampling
Another approach to fault analysis is known as fault sampling. This is used in
circuits where it is impossible to fault every node in the circuit. Nodes are
randomly selected and faulted. The resulting fault-detection rate may be
statistically inferred from the number of faults that are detected in the fault set and
the size of the set. As with all probabilistic methods it is important that the
randomly selected faults be unbiased. Although this approach does not yield a
specific level of fault coverage, it will determine whether the fault coverage
exceeds a desired level. The level of confidence may be increased by increasing
the no of samples.
Scan-based approaches
www.verilogcourseteam.com
VLSI DESIGN
CMOS TESTING
Adding multiplexers
Long counters are good examples of circuits that can be tested by ad-hoc
techniques. For instance imagine you have designed an 8-bit counter and want to
test it. Figure 5.11(a) shows a nave implementation in which the counter only has
a RESET and a CLOCK input, with the terminal count (TC) being observable.
The designer probably thought that a reset and 256 clock cycles, followed by the
observation of TC, would be adequate for testing purposes. Apart from the
nonobservability of the count value (Q<7:0>), the main problem is the number of
cycles required to test a single counter. Possible ad-hoc test techniques are shown
in figure 5.11(b) and figure 5.11(c). In figure 5.11(b), a parallel-load feature is
added to the counter. This enables the counter to be preloaded with appropriate
values to check the carry propagation within the counter. Another technique is to
reduce the length of each counter to, say, 4 bits, as shown in figure 5.11(c). This
is achieved by having the test signal block the carry propagate at every 4-bit
boundary. With this method 16 vectors exhaustively can test each 4-bit section.
The carry propagate between 4-bit sections may be tested with a few additional
vectors.
Another technique classified in this category is the use of the bus in a bus-oriented
system for test purposes. This is shown on figure 5.12(a) for a very simple
accumulator. Each registers has been made loadable from the bus and capable of
being driven onto the bus for testing purposes. A more general scheme is
illustrated in figure 5.12(b), where the normally inaccessible inputs are set and the
outputs are observed via the bus.
Frequently, multiplexers may be used to provide alternative signal paths during
testing. In CMOS transmission gate multiplexers provide low area and speed
overhead. Figure 5.13(a) shows a scheme called a design for autonomous test,
www.verilogcourseteam.com
VLSI DESIGN
CMOS TESTING
which uses multiplexers. Figure 5.13(b) shows the circuit configured for normal
use, while figure 5.13(c) shows the circuit configuration to test module A.
www.verilogcourseteam.com
VLSI DESIGN
CMOS TESTING
www.verilogcourseteam.com
VLSI DESIGN
CMOS TESTING
www.verilogcourseteam.com
VLSI DESIGN
CMOS TESTING
The basic building block in LSSD is that Shift Register Latch or SRL. A block
level implementation of a polarity hold SRL is shown in figure 5.14(a). It consists
of two latches L1 and L2. L1 has a serial port data, I, and an enable, A. It also has
a data port, D, and an enable, C. when A is high, the value of L1 (T1) is set by the
value of I, while when C is high, L1 is set by D. A and C cannot be
simultaneously high. When signal B in L2 is high, T1 is passed to T2. A gatelevel implementation of the SRL is shown in figure 5.14(b) and 5.14(c). In normal
operation, the D input is the normal input to the register, while the T2 signal is the
output. L1 is the master while L2 is the slave. SRLs may be connected in series by
using the T2 output and the I input of successive latches. During normal system
operation, A is held low and C and B may be thought of as a two-phase
nonoverlapping clock. When data is to be loaded into the SRL or dumped out of
SRL, A and B are used as a two-phase shift clock.
www.verilogcourseteam.com
VLSI DESIGN
CMOS TESTING
C2 are then clocked three times to shift QB1, QB2 and QB3 out via the serialdata-out line.
Figure 5.15 An LSSD scan chain: (a) basic architecture (b) example circuit
(c) example timing
Testing proceeds in this manner of serially clocking the data through the SRLs to
the right point in the manner of serially clocking the data through the SRLs to the
right point in the circuit, running a single system clock cycle and serially clocking
the data out for observation. In this scheme, every input to the combinational
block may be controlled and every output may be observed. In addition,
running a serial sequence of 1s and 0s through the SRLs can test them.
www.verilogcourseteam.com
VLSI DESIGN
CMOS TESTING
www.verilogcourseteam.com
VLSI DESIGN
CMOS TESTING
www.verilogcourseteam.com
VLSI DESIGN
CMOS TESTING
Consider the design shown in figure 5.18. in a fault scan test strategy all registers
would have to be scannable. A partial scan design is shown in figure 5.18(a)
where only two registers have been made scannable (R6 and R3). In addition,
these registers have the ability to hold their state dependent on a HOLD control.
The part of the circuit that is being tested and monitored by the scan registers is
shown in figure 5.18(b). it may be proven that, by holding the vectors at the input
of the kernel for three clock cycles, the kernel may be represented by the
combinational-equivalent circuit shown in figure 5.18(c). This circuit may be used
by an ATPG program to generate test vectors.
Figure 5.18 The application of scan techniques to employ partial scan (a)
pipeline circuit (b) kernal of pipeline circuit (c) combinational equivalent of
kernal
www.verilogcourseteam.com
VLSI DESIGN
CMOS TESTING
www.verilogcourseteam.com
VLSI DESIGN
CMOS TESTING
www.verilogcourseteam.com
VLSI DESIGN
CMOS TESTING
Figure 5.22 Built-in logic block observation (BIBLO) (a) individual register
(b) use in a system
www.verilogcourseteam.com
VLSI DESIGN
CMOS TESTING
A 3-bit register is shown with the associated circuitry. In mode D (C0=C1=1), the
registers act as conventional parallel registers. In mode A (C0=C1=0), the
registers act as scan registers. In mode C (C0=1, C1=0) the registers act as a
signature analyzer or pseudo-random sequence generator (PRSG). The registers
are reset if C0=0 and C1=1. Thus a complete test-generation and observation
arrangement can be implemented, as shown in Figure 5.22(b). In this case two
sets of registers have been added in addition to some random logic to effect the
test structure.
A chip set for FFT application was designed with local testing based on pseudorandom pattern generation and signature analysis. With a 28-bit pattern generator
and a 17-bit signature at 10MHz it took 26 seconds to test the part.
5.3.4.2 Memory Self-Test
Embedding self-test circuits for memories in higher-speed circuits not only may
be the way of testing the structures at speed but can save on the number of
external test vectors that have to be run. A typical read/write memory (RAM) test
program for an M-bit address memory might be as follows.
FOR i=0 to M-1 write (data)
FOR i=0 to M-1 read (data) then write (data)
FOR i=0 to M-1 read (data) then write (data)
FOR i=M-1 to 0 read (data) then write (data)
FOR i=M-1 to 0 read (data) then write (data)
data is 1 and data is 0 for a 1-bit memory or a selected set of patterns for an n-bit
word. For an 8-bit memory data might be x00, x55, x33, and x0F. An address
counter, some multiplexers, and a simple-state machine result in a fairly low
overhead self-test structure for read/write memories. The self-test consists of
256K cycles that input a checkerboard pattern to test for cell-to-cell interference.
This is followed by 256K cycles in which the data is read out. Then a
complemented checkerboard is written and read. A total of 1 million cycles
provide a test sufficient for system maintenance.
ROM memories may be tested by placing a signature analyzer at the output of the
ROM and incorporating a test mode that cycles through the contents of the ROM.
A significant advantage of all self-test methods is that testing mat be completed
when the part is in the field. With care, self-test may be performed during normal
system operation.
www.verilogcourseteam.com
VLSI DESIGN
CMOS TESTING
www.verilogcourseteam.com
VLSI DESIGN
CMOS TESTING
a register that may be serially accessed. All of the control signals to the datapath
are also made scannable.
5.4.2 Memories
Memories may use the self-testing techniques mentioned in section 5.3.4.2.
alternatively, the provision of multiplexers on data inputs and addresses and
convenient external access to data outputs enables the testing of embedded
memories. It is a mistake to have memories indirectly accessible (i.e., data is
written by passing through logic, data is observed after passing through logic,
addresses cannot be conveniently sequenced). Because memories have to be
tested exhaustively, any overhead on writing and reading the memories can
substantially increase the test time and, probably more significantly, turn the
testing task into an effort inscrutability
www.verilogcourseteam.com
VLSI DESIGN
CMOS TESTING
www.verilogcourseteam.com
VLSI DESIGN
CMOS TESTING
TCK (The Test Clock Input) used to clock tests into and out of chips.
TMS (The Test Mode Select) used to control test operations.
TDI (The Test data Input) used to input test data to a chip.
TDO (the Test Data Output) used to output test data from a chip.
TRST (The Test Reset Signal) used to asynchronously reset the TAP
controller, also used if a power-up reset signal is not available in the chip
being tested.
The TDO signal is defined as a tristate signal that is only driven when the
TAP controller is outputting test data.
5.5.1.3 The Test Architecture
The basic test architecture that must be implemented on a chip is shown in figure
5.25 it consists of:
Data that is input via the TDI port may be fed to one or more test dat registers or
an instruction register. An output MUX selects between the instruction register
and the data registers to be output to the tristate TDO pin.
www.verilogcourseteam.com
VLSI DESIGN
CMOS TESTING
www.verilogcourseteam.com
VLSI DESIGN
CMOS TESTING
www.verilogcourseteam.com
VLSI DESIGN
CMOS TESTING
Figure 5.29 Boundary scan (a) input and (b) output cells
A single structure can be used for all I/O pad types, depending on the connections
made to the cell. It consists of two multiplexers and two edge-triggered registers.
Figure 5.29(a) shows this cell used as an input pad. Two register bits allow the
serial shifting of data through the boundary-scan chain and the local storage of a
data bit. This data bit may be directed to internal circuitry in the INTEST or
RUNBIST modes (Mode=1). When Mode=0, the cell is in EXTEST or
SAMPLE/PRELOAD mode. A further multiplexer under the control of shift DR
controls the serial/parallel nature of the cell. The signal ClockDR and UpdateDR
generated by the Tap Controller load the serial and parallel register, respectively.
An output cell is shown in figure 5.29(b). When Mode=1, the cell is in EXTEST,
INTEST, or RUNBIST modes, communicating the internal data to the output pad.
When Mode=0, the cell is in the SAMPLE/PRELOAD mode.
www.verilogcourseteam.com
VLSI DESIGN
CMOS TESTING
www.verilogcourseteam.com