Professional Documents
Culture Documents
CHAPTER 1
INTRODUCTION
1.1 INTRODUCTION:
Receiver and Transmitter. Built-in Self Test, or BIST, is the technique of designing additional
hardware and software features into integrated circuits to allow them to perform self-testing,
i.e., testing of their own operation (functionally, parametrically, or both) using their own
circuits, thereby reducing dependence on an external automated test equipment (ATE). BIST
easier, faster, more efficient, and less costly. The concept of BIST is applicable to just about
any kind of circuit, so its implementation can vary as widely as the product diversity.
with low speed peripheral devices, such as keyboard, the mouse, modems etc. Universal
communication. UART is an integrated circuit used for conversion of serial data to parallel
and vice versa. A BIST UART has the objectives of firstly to satisfy testability requirements
and secondly to generate the lowest-cost with highest performance implementation. In this
1
project, we study, design and implement a UART and BIST environment for that UART using
VHDL.
A built-in self test (BIST) circuit using a linear feedback shift register (LFSR) and a multiple
input signature register (MISR) requiring reduced circuitry exclusive of the number of inputs
The BIST circuit is built in a prescribed circuit having a memory to test a target circuit
in the prescribed circuit. The BIST circuit includes an LFSR, including a first logic section
which is composed of a plurality of XOR gates and selection sections, and a first memory
which is a part of the memory, for performing a primitive polynomial, an MISR, including a
second logic section which is composed of a plurality of XOR gates and selection sections,
and a second memory which is a part of the memory, for performing the primitive polynomial,
and a BIST control section for controlling data input/output between the first and second
memories and the target circuit and providing selection signals for controlling the selection
sections in the first and second logic sections, the BIST control section controlling the target
circuit and comparing operation results of the target circuit to perform the test of the target
circuit.
In order to reduce the amount of hardware required to compress a multiple bit stream, a
multiple input signature analysis register can be used. The theory presented in the literature
shows that the functionality in terms of aliasing probability is unchanged for this
implementation.
2
1.3 UART (Universal asynchronous receiver/transmitter):
Block Diagram:
of the serial communications subsystem of a computer. The UART takes bytes of data and
transmits the individual bits in a sequential fashion. At the destination, a second UART re-
When transmitting, the UART takes 8 bits of parallel data and converts the data to a serial bit
stream that consists of a start bit (logic 0), 8 data bits (least significant bit first), and one or
3
CHAPTER 2
Figure 2.1
BIST is often used for testing memories. More specifically, this we call it as MBIST scheme;
The regular structure of a memory chip makes it easy to generate test patterns.
4
A built-in self-test (BIST) or built-in test (BIT) is a mechanism that permits a machine to
high reliability
A UART is usually an individual (or part of an) integrated circuit used for serial
communications over a computer or peripheral device serial port. UARTs are now commonly
included in microcontrollers. A dual UART or DUART combines two UARTs into a single
chip. Many modern ICs now come with a UART that can also communicate synchronously;
The above fig is standard format for serial transmission. Since no clock (clk) line, data D is
5
Figure 2.2 structure of UART
When text is being transmitted, ASCII code is usually used. In ASCII code each
character is represented by 7 bits and the 8th bit is the parity bit. After 8 bits are transmitted; D
6
When transmitting, the UART takes 8 bits of parallel data and converts the data to a serial bit
stream that consists of a start bit (logic 0), 8 data bits (least significant bit first), and one or
component of the serial communications subsystem of a computer. The UART takes bytes of
data and transmits the individual bits in a sequential fashion. At the destination, a second
UART re-assembles the bits into complete bytes. Serial transmission is commonly used with
modems and for non-networked communication between computers, terminals and other
devices.
send a clock signal to the receiver. Instead, the sender and receiver must agree on timing
parameters in advance and special bits are added to each word which is used to synchronize
data bits, least-significant-bit first, an optional "parity" bit, and then one, one and a half, or
7
two "stop" bits. The start bit is the opposite polarity of the data-line's idle state. The stop bit is
the data-line's idle state, and provides a delay before the next character can start. (This is
called asynchronous start-stop transmission). In mechanical teletypes, the "stop" bit was often
stretched to two bit times to give the mechanism more time to finish printing a character. A
send a clock signal to the receiver. Instead, the sender and receiver must agree on timing
parameters in advance and special bits are added to each word which is used to synchronize
The structure of UART is as shown in figure 3.4, consists of Transmitter part and
Receiver part, rather we can say consists of 3 units, transmitter circuit, receiver circuit and
Control/Status Registers.
8
2.3.1 Design of UART Transmitter
The Block diagram of UART Transmitter is as shown in figure 3.5. The data is loaded
from Data Bus into TBR (Transmit Buffer Register) and from TBR to TSR (Transmit Shift
Register), based on the control and status signals produced by the Control unit. The Size of
TSR is taken in such a way that, it should accommodate the START and STOP bits along with
the Data bits which are loaded from the Data Bus.
The Data loaded into TSR has the format of START-DATA-STOP bits which is as
shown in figure of which, every time one bit will be sent, with reference to baud clock.
Correspondingly, the data in TSR will keeps updating with 0s; will be completely filled with
9
2.3.2 Design of UART Receiver
The Block diagram of UART Receiver is as shown in figure 3.6. The data receiving
will be captured using receiving baud clock and then loaded into RSR (Receive Shift
Register) and from RSR to RBR (Receive Buffer Register), and then to Data Bus, based on
the control and status signals produced by the Control unit. The Size of RSR is taken in such a
way that, it should accommodate the START and STOP bits along with the Data bits which
10
2.3.3 SERIAL DATA FORMAT
The start bit is always a 0 (logic low), which is also called a space. The start bit
signals the receiving DTE that a character code is coming. The next five to eight bits,
depending on the code set employed, represent the character. In the ASCII code set the eighth
data bit may be a parity bit. The next one or two bits are always in the mark (logic high, i.e.,
'1') condition and called the stop bit(s). They provide a "rest" interval for the receiving DTE
so that it may prepare for the next character which may be after the stop bit(s). The rest
interval was required by mechanical Teletypes which used a motor driven camshaft to decode
each character. At the end of each character the motor needed time to strike the character bail
All operations of the UART hardware are controlled by a clock signal which runs at a
multiple (say, 16) of the data rate - each data bit is as long as 16 clock pulses. The receiver
tests the state of the incoming signal on each clock pulse, looking for the beginning of the
start bit. If the apparent start bit lasts at least one-half of the bit time, it is valid and signals the
start of a new character. If not, the spurious pulse is ignored. After waiting a further bit time,
11
the state of the line is again sampled and the resulting level clocked into a shift register. After
the required number of bit periods for the character length (5 to 8 bits, typically) have elapsed,
the contents of the shift register is made available (in parallel fashion) to the receiving system.
The UART will set a flag indicating new data is available, and may also generate a processor
interrupt to request that the host processor transfers the received data. In some common types
of UART, a small first-in, first-out (FIFO) buffer memory is inserted between the receiver
shift register and the host system interface. This allows the host processor more time to handle
an interrupt from the UART and prevents loss of received data at high rates.
system. As soon as data is deposited in the shift register, the UART hardware generates a start
bit, shifts the required number of data bits out to the line, generates and appends the parity bit
(if used), and appends the stop bits. Since transmission of a single character may take a long
time relative to CPU speeds, the UART will maintain a flag showing busy status so that the
host system does not deposit a new character for transmission until the previous one has been
completed; this may also be done with an interrupt. Since full-duplex operation requires
characters to be sent and received at the same time, practical UARTs use two different shift
Transmitting and receiving UARTs must be set for the same bit speed, character
length, parity, and stop bits for proper operation. The receiving UART may detect some
mismatched settings and set a "framing error" flag bit for the host system; in exceptional cases
12
the receiving UART will produce an erratic stream of mutilated characters and transfer them
Typical serial ports used with personal computers connected to modems use eight data
bits, no parity, and one stop bit; for this configuration the number of ASCII character per
Overrun Error:
An "overrun error" occurs when the UART receiver cannot process the character that
just came in before the next one arrives. Various UART devices have differing amounts of
buffer space to hold received characters. The CPU must service the UART in order to remove
characters from the input buffer. If the CPU does not service the UART quickly enough and
An "underrun error" occurs when the UART transmitter has completed sending a
character and the transmit buffer is empty. In asynchronous modes this is treated as an
indication that no data remains to be transmitted, rather than an error, since additional stop
bits can be appended. This error indication is commonly found in USARTs, since an under run
13
Framing Error:
A "framing error" occurs when the designated "start" and "stop" bits are not valid. As
the "start" bit is used to identify the beginning of an incoming character, it acts as a reference
for the remaining bits. If the data line is not in the expected idle state when the "stop" bit is
Parity Error:
A "parity error" occurs when the number of "active" bits does not agree with the
specified parity configuration of the UART, producing a Parity Error. Because the "parity" bit
is optional, this error will not occur if parity has been disabled. Parity error is set when the
parity of an incoming data character does not match the expected value.
Baud rate:
baud rate with little or no error. Some examples of common crystal frequencies and baud rates
One of the two main parts of an LFSR is the shift register (the other being the
feedback function). A shift register is a device whose identifying function is to shift its
contents into adjacent positions within the register or, in the case of the position on the end,
14
out of the register. The position on the other end is left empty unless some new content is
The contents of a shift register are usually thought of as being binary, that is, ones and
zeroes. If a shift register contains the bit pattern 1101, a shift (to the right in this case) would
result in the contents being 0110; another shift yields 0011. After two more shifts, things tend
to get boring since the shift register will never contain anything other than zeroes.
at once (parallel) and then shift them out (serial) or shift the contents into the register bit
by bit (serial) and then read the contents after the register is full (parallel). The delay
function simply shifts the bits from one end of the shift register to the other, providing a
This configuration allows conversion from serial to parallel format. Data is input
serially, as described in the SISO section above. Once the data has been input, it may be either
read off at each output simultaneously, or it can be shifted out and replaced.
15
Figure 2.6 4-Bit SIPO Shift Register
A linear feedback shift register (LFSR) is a shift register whose input bit is a linear
function of its previous state. The only linear function of single bits is xor, thus it is a shift
register whose input bit is driven by the exclusive-or (xor) of some bits of the overall shift
register value.
The initial value of the LFSR is called the seed, and because the operation of the
determined by its current (or previous) state. Likewise, because the register has a finite
number of possible states, it must eventually enter a repeating cycle. However, an LFSR with
a well-chosen feedback function can produce a sequence of bits which appears random and
16
Pseudorandom Pattern Generation:
generators. When the outputs of the flip-flops are loaded with a seed value (anything except
all 0s, which would cause the LFSR to produce all 0 patterns) and when the LFSR is clocked,
it will generate a pseudorandom pattern of 1s and 0s. Note that the only signal necessary to
This will generate different test patterns except 0000 pattern. To include this 0000 pattern
17
Figure 2.8 modified LFSR
The LFSR is a shift register that has some of its outputs together in exclusive-OR
configurations to form a feedback path. LFSRs are frequently used as pseudorandom pattern
generators to generate a random number of 1s and 0s. Each output of the LFSR is multiplexed
with an ASIC input and, when the device is placed in the LFSR (test) mode, the random, high-
toggle-rate Patterns produced are extremely good for generating high-fault coverage. To
minimize the number of results that needs to be compared to expected results, a MISR is used.
The MISR compresses multiple parallel patterns into a single pattern signature that is
compared to the expected value. If the signatures match, it is assumed that the ASIC passed
18
2.6 MISR (Multiple-input Signature Register):
The test data Z1Z2Z3Z4 is XORed into the register with each clock, and the final result
represents a signature that can be compared with a signature for a known correctly
functioning component. For the above MISR, assume that the correct input sequence is 1010,
0001, 1110, 1111, 0100, 1011, 1001, 1000, 0101, 0110, 0011, 1101, 0111, 0010, 1100. This
sequence maps the signature to 1010; any sequence differ by 1 bit maps to some other
signature (take example 0001 to 1001, the resulting sequence maps to 1000).
To adapt scan test scheme for Sequential circuits; the scan register is modified so each
part of the register can serve as a state register, pattern generator, signature register and shift
register. When used as shift register, the test data can be scanned in and out in the usual way.
19
Then part of scan register can be used as a PRPG and part as MISR to test one of the
combinational blocks. (The roles can be interchanged to test another combinational block).
20
A built-in self test (BIST) circuit using a linear feedback shift register (LFSR)
and a multiple input signature register (MISR) requiring reduced circuitry exclusive of the
target circuit in the prescribed circuit. The BIST circuit includes an LFSR, including a first
logic section which is composed of a plurality of XOR gates and selection sections, and a
first memory which is a part of the memory, for performing a primitive polynomial, an
MISR, including a second logic section which is composed of a plurality of XOR gates
and selection sections, and a second memory which is a part of the memory, for
performing the primitive polynomial, and a BIST control section for controlling data
input/output between the first and second memories and the target circuit and providing
selection signals for controlling the selection sections in the first and second logic
sections, the BIST control section controlling the target circuit and comparing operation
results of the target circuit to perform the test of the target circuit.
stream, a multiple input signature analysis register can be used. The theory presented in
the literature shows that the functionality in terms of aliasing probability is unchanged for
this implementation.
input signature register. This register accelerates the testing task by compressing multiple-
input data streams into one signature. Existing designs depend on parallel feeding the
21
input polynomials to the storage elements. These designs give a good compression but,
suffer from some drawbacks. The paper proposes a new design for the multiple-input
signature register. This proposed design aggregates all inputs at a certain point and feeds
them to the shift register. By adopting this concept, we are able to improve the operation
and simulation for the existing and the proposed designs verified the advantages of the
new structure
This is a bank of circuit flip-flops with added testing hardware, which can be
configured to make the flip-flops behave like a scan chain, a linear feedback shift register
The pseudorandom test patterns and multiple-input signature registers stimulated the
which can be used for data transfer and fault detection purposes in complex digital circuits.
22
Each BILBO is composed of a flip flop register row and some additional gates for shift and
feedback operations .Four different functional modes can be selected by setting two control
In the first mode (B1=1, B2=0), BILBO acts as a latch. The input data zl, z2, z3,..z7
are simultaneously clocked into the flip flops and can be read from the Q and Q outputs.
In the second mode (B1=0, B2=0), BILBO works as a shift register. Data are serially
clocked into the register through the serial input Sin pin, while the register contents can be
simultaneously read at the parallel Q and Q pin outputs data, or can be clocked out through
the serial output Sout pin. The shift register feature of BILBO may be utilized both in the
In the third mode (B1=1, B2=1) BILBO is functionally converted into a multiple-input
signature register. In this mode BILBO may be used for performing parallel signature analysis
The remaining fourth mode (B1=0, B2=1) forces Linear feedback shift register.
23
Figure 2.10 BILBO
use the same BILBO as MISR and PRPG for testing the combinational part of the system. For
testing the sequential part, we can use the same BILBO can be used as shift register, to scan
out the data from the flip-flops in the logic. In normal modes, it acts as normal registers of
flip-flops.
The following fig. illustrates how to apply BILBO registers to test the UART design.
In this structure, BILBO I and BILBO II may be configured by B1, B2 signal to act as
either a shift register, a test pattern generator (PRPG), normal application mode function
(normal) or a data compressor (MISR). The test starts with the initialization of the BILBO by
24
applying a seed to its serial-in (Sin) pin. The initialization can be obtained by configuring
BILBOs operating mode B1B2 to 00 (shift register mode). Following the initialization,
BILBO I (LFSR) produces an 8-bits pseudo random pattern data in parallel. The
parallel data is then fed to the UARTs transmitter. The UART converts the pseudo random
parallel data to serial data which is then looped back to its receiver to create an internal
diagnostic capability. The UARTs receiver converts the serial data back to parallel and will
be accepted by Register B (MISR). A signature will be produced after 127 clock iterations
(7 data bits produce 27-1 = 127 (exception, in generating all zeros) PRPG) and this completes
the test. The signature is scanned out from serial output (so) pin by configuring
bilbo_mode to 00. Following the scan, it is compared with the correct signature achieved
from the simulation of the entire self-test sequence approach in a tester. If the signature
produced by MISR is similar to the correct signature, it can be concluded that the UART is
working properl
25
Figure 2.11 Architecture of the Project
26
CHAPTER 3
3.1 INTRODUCTION:
redesign and remake could respond to or correct the errors found in testing.
Understanding the art and science of testing allows you to attain perfection in your
VLSI chip testing is done in several different places by several different types of
people. When a new chip is designed and fabricated for the first time, testing should verify
correctness of design and the test procedure. This often requires the involvement of the design
engineer and the testing may even take place in the design laboratory rather than in a factory.
Based on the result, both the design and the test procedure may be changed. This is called
verification testing. Successful verification testing usually results in some good chips. These
are the earliest chips and are normally used by the designers of systems that will use this
design. A successful verification also signals the beginning of production. Production means
large scale manufacturing. Fabricated chips are tested in the factory. This is called
manufacturing testing. Finally, when the manufactured chips are received by a customer, they
may be again tested to ensure quality. This testing, known as incoming inspection (or
27
acceptance testing), is conducted either by the user or for the user by some independent
testing house.
VLSI testing can be classified into four types depending upon the requirements.
1. Characterization
a new design before it is sent to production. The purpose is to verify that the design is correct
and the device will meet all specifications. Functional tests are run and comprehensive AC
and DC measurements are made. Probing of internal nodes of the chip, commonly not done in
production testing, may also be required during characterization. Use of specialized tools such
as scanning electron microscopes (SEM) and electron beam testers, and techniques such as
artificial intelligence (AI) and expert systems, can be effective. A characterization test
determines the exact limits of device operating values. We generally test for the worst case
because it is easier to evaluate than average cases and devices passing this test will work for
2. Production
Every fabricated chip is subjected to production tests, which are less comprehensive
than characterization tests yet they must enforce the quality requirements by determining
whether the device meets specifications. The vectors may not cover all possible functions and
data patterns but must have a high coverage of modeled faults. The main driver is cost, since
every device must be tested. Test time must be absolutely minimized. Fault diagnosis is not
attempted and only a go/no-go decision is made. Production tests are typically short but verify
28
all relevant specifications of the device. It is an outgoing inspection test of each device, and is
not repetitive. We test whether some device-under-test (DUT) parameters are consistent with
3. Burn-in
All devices that pass production tests are not identical. When put to actual use, some
will fail very quickly while others will function for a long time. Burn-in ensures reliability of
tested devices by testing, either continuously or periodically, over a long period of time, and
4.Incoming Inspection
integrating them into the system. Depending upon the context, this testing can be either
similar to production testing, or more comprehensive than production testing, or even tuned to
the specific systems application. Also, the incoming inspection may be done for a random
sample with the sample size depending on the device quality and the system requirement. The
most important purpose of this testing is to avoid placing a defective device in a system
assembly where the cost of diagnosis may far exceed the cost of incoming inspection
The device specification document initiates the development activity, and contains the
following information:
(timing waveforms, signal levels, etc.), data and control signal behavior, clock rate.
29
Type of Device Logic, microprocessor, memory, analog, etc.
Reliability Acceptance quality level (defective parts per million), failure rate per 1,000
Test specifications, if not given explicitly, are derived from the above data. Based on
these specifications, a test plan is generated. In the test plan the type of test equipment and the
type of tests are specified. Selection of a tester depends on such parameters as throughput,
clock rate, timing accuracy, test sequence length, tester availability, and cost. The types of test
may include parametric, functional, burn-in, margin, speed sorting, etc. The fault coverage
ATPG (acronym for both Automatic Test Pattern Generation and Automatic Test
30
input (or test) sequence that, when applied to a digital circuit, enables testers to distinguish
between the correct circuit behavior and the faulty circuit behavior caused by defects. The
generated patterns are used to test semiconductor devices after manufacture, and in some
cases to assist with determining the cause of failure. The effectiveness of ATPG is measured
by the amount of modeled defects, or fault models, that are detected and the number of
generated patterns. These metrics generally indicate test quality (higher with more fault
detections) and test application time (higher with more patterns). ATPG efficiency is another
important consideration. It is influenced by the fault model under consideration, the type of
circuit under test (full scan, synchronous sequential, or asynchronous sequential), the level of
abstraction used to represent the circuit under test (gate, register-transistor, switch), and the
Algorithmic methods
Testing very-large-scale integrated circuits with high fault coverage is a difficult task
because of complexity. Therefore many different ATPG methods have been developed to
Early test generation algorithms such as Boolean difference and literal proposition were
The D Algorithm was the first practical test generation algorithm in terms of memory
31
Path-Oriented Decision Making (PODEM) is an improvement over the D Algorithm.
PODEM was created in 1981 when shortcomings in D Algorithm became evident when
Methods based on Boolean satisfiability are sometimes used to generate test vectors.
simulation to compute good machine results, and fault simulation to calculate the fault
A built-in self-test (BIST) or built-in test (BIT) is a mechanism that permits a machine
4. high reliability
32
BIST is commonplace in weapons, avionics, medical devices, automotive electronics,
complex machinery of all types, unattended machinery of all types, and integrated circuits.
33
CHAPTER 4
FPGA IMPLEMENTATION
The ISE design flow comprises the following steps: design entry, design synthesis,
includes both functional verification and timing verification, takes places at different points
34
Figure 4.1 FPGA Design Flow
1. Create a project.
2. Create files and add them to your project, including a user constraints (UCF) file.
4. Assign constraints such as timing constraints, pin assignments, and area constraints.
You can verify the functionality of your design at different points in the design flow as
follows:
After Translate, run functional simulation (also known as gate-level simulation), using
35
Implement your design as follows:
Translate
Map
2. Review reports generated by the Implement Design process, such as the Map Report
or Place & Route Report, and change any of the following to improve your design:
Process properties
Constraints
Source files
3. Synthesize and implement your design again until design requirements are met.
You can verify the timing of your design at different points in the design flow as follows:
Run static timing analysis at the following points in the design flow:
After Map
After Map (for a partial timing analysis of CLB and IOB delays)
After Place and Route (for full timing analysis of block and net delays)
36
4.1.6 Xilinx Device Programming:
2. Generate a PROM, ACE, or JTAG file for debugging or to download to your device.
After synthesis, you run design implementation, which comprises the following steps:
1. Translate, which merges the incoming net lists and constraints into a Xilinx design
file
2. Map, which fits the design into the available resources on the target device
3. Place and Route, which places and routes the design to the timing constraints
4. Programming file generation, which creates a bit stream file that can be downloaded to
the device
In the Sources tab, select Synthesis/Implementation from the Design View drop-down list, and
select the top module. In the Processes tab, double-click Implement Design to run the
implementation process in one step, or double click Translate, Map, and Place & Route to run
each of the implementation steps separately. To generate the programming file, double-
37
click Generate Programming File. Alternatively, you can select Process -> Implement -> Top
Module to run Implement Design on the top module. For details, see implementing the Top
Module.
Default property values are used for the implementation process, unless you modify them.
Properties can be set for the Implement Design process or for each of the separate
implementation processes.
specific integrated circuit at least that is what the acronym stands for. Before we answer the
question of what that means we first look at the evolution of the silicon chip or integrate
circuit (IC).
implement their design using the design tools available from the manufacturer. While third
party design tools were available, there was not an effective link from the third party design
tools to the layout and actual semiconductor process performance characteristics of the
various ASIC manufacturers. Most designers ended up using factory specific tools to
complete the implementation of their designs. A solution to this problem that also yielded a
38
Gate array design
Gate array design is a manufacturing method in which the diffused layers, i.e.
transistors and other active devices, are predefined and wafers containing such devices are
held in stock prior to metallization, in other words, unconnected. The physical design process
then defines the interconnections of the final device. For most ASIC manufacturers, this
consists of from two to as many as five metal layers, each metal layer running parallel to the
one below it. Non-recurring engineering costs are much lower as photo-lithographic masks
are required only for the metal layers, and production cycles are much shorter as metallization
Full-custom design
By contrast, full-custom ASIC design defines all the photo lithographic layers of the
device. Full-custom design is used for both ASIC design and for standard product design.
The benefits of full-custom design usually include reduced area (and therefore
recurring component cost), performance improvements, and also the ability to integrate
analog components and other pre-designed (and thus fully verified) components such as
design time, increased non-recurring engineering costs, more complexity in the computer-
39
aided design (CAD) system and a much higher skill requirement on the part of the design
team.
Structured/platform design
Structured ASIC design (also referred to as platform ASIC design) has different
meanings in different contexts. This is a relatively new term in the industry, which is why
there is some variation in its definition. However, the basic premise of a structured/platform
ASIC is that both manufacturing cycle time and design cycle time are reduced compared to
cell-based ASIC by virtue of there being pre-defined metal layers (thus reducing
manufacturing time) and pre-characterization of what is on the silicon (thus reducing design
cycle time).
The Integrated Software Environment (ISE) is the Xilinx design software suite
that allows us to take our design from design entry through Xilinx device programming. The
ISE Project Navigator manages and processes our design through the following steps in the
Design entry is the first step in the ISE design flow. During design entry, we create our
source files based on our design objectives. We can create our top-level design file using a
40
4.4.2 Synthesis:
After design entry and optional simulation, we run synthesis. During this step, VHDL,
Verilog, or mixed language designs become Net-list files that are accepted as input to the
implementation step.
4.4.3 Implementation:
After synthesis, we run design implementation, which converts the logical design into
a physical file format that can be downloaded to the selected target device. From Project
Navigator, we can run the implementation process in one step, or we can run each of the
4.4.4 Verification:
We can verify the functionality of our design at several points in the design flow. we
can use simulator software to verify the functionality and timing of our design or a portion of
our design. The simulator interprets VHDL or Verilog code into circuit functionality and
displays logical results of the described HDL to determine correct circuit operation.
Simulation allows us to create and verify complex functions in a relatively small amount of
time. We can also run in-circuit verification after programming your device.
41
4.4.5 Device Configuration:
we generate configuration files and download the programming files from a host computer to
a Xilinx device.
Introduction:
limited numbers of inputs, outputs, product terms, and flip-flops always restricted SPLDs to
small applications. More scalable and flexible architectures had thus to be sought, and the
feasible from the late 1980s onwards. Two broad classes of hardware organization prevail
today.
CPLDs expand the general idea behind SPLDs by providing many of them on a single
chip. Up to hundreds of identical sub-circuits, each of which conforms to a classic SPLD, are
combined with a large programmable interconnect matrix or network, see fig.2.1. A difficulty
with this type of organization is that a partitioning into a bunch of cooperating SPLDs has to
42
be imposed artificially on any given computational task, which benefits neither hardware nor
programmable logic device (EPLD), and the like in the commercial world.
FPGA have their overall organization patterned after that of gate arrays. Many
configurable logic cells are arranged in a two-dimensional array with bundles of parallel
wires in between. A switchbox is present wherever two wiring channels intersect, see fig.2.2.
Depending on the product, each logic cell can be configured so as to carry out some not-too-
43
As opposed to traditional gate arrays, it is the state of programmable links rather than
fabrication masks that decides on logic functions and signal routing. Parts with this
organization are being promoted under names such as field-programmable gate array (FPGA),
logic cell array (LCA), and programmable multilevel device (PMD). The number of
configurable logic cells greatly varies between products, with typical figures ranging between
44
4.6 VLSI DESIGN FLOW
to run the code. There are a lot of VHDL compilers, which build executable binaries. It can
read and write files on the host computer, so a VHDL program can be written that generates
Specifications
RTL coding
Functional
Verification
Programming into
FPGA
45
4.6.1 Specification:
This is the stage at which we define what are the important parameters of the system
design that you are planning to design. A simple example would be: I want to design a
counter; it should be 4 bit wide, should have synchronous reset, with active high enable; when
This is the stage at which you define various blocks in the design and how they
communicate. Let's assume that we need to design a microprocessor: high level design means
splitting the design into blocks based on their function; in our case the blocks are registers,
46
4.6.3 Micro Design/Low level design
Low-level design or Micro design is the phase in which the designer describes how each
internal registers. It is always a good idea to draw waveforms at various interfaces. This
synthesizable constructs of the language. Normally we like to lint the code, before starting
verification or synthesis.
4.6.5 Simulation
level of abstraction. We use simulators to simulate the Hardware models. To test if the RTL
code meets the functional requirements of the specification, we must see if all the RTL blocks
47
are functionally correct. To achieve this we need to write a testbench, which generates clk,
reset and the required test vectors. A sample testbench for a counter is shown below. Normally
We use the waveform output from the simulator to see if the DUT (Device Under Test)
is functionally correct. Most of the simulators come with a waveform viewer. As design
becomes complex, we write self checking testbench, where testbench applies the test vector,
There is another kind of simulation, called timing simulation, which is done after
synthesis or after P&R (Place and Route). Here we include the gate delays and wires delays
and see if DUT works at rated clock speed. This is also called as SDF simulation or gate level
simulation.
48
4.6.6 COUNTER SIMULATIOIN
4.6.7 SYNTHESIS
Synthesis is the process in which synthesis tools like design compiler or Synplify take
RTL in Verilog or VHDL, target technology, and constrains as input and maps the RTL to
target technology primitives. Synthesis tool, after mapping the RTL to gates, also do the
minimal amount of timing analysis to see if the mapped design is meeting the timing
requirements. (Important thing to note is, synthesis tools are not aware of wire delays, they
only know of gate delays). After the synthesis there are a couple of things that are normally
done before passing the net list to backend (Place and Route).
1. Test Generation
2. I/P combinatorial problem
3. Gate to I/O pin ratio problem
Test Generation:
49
1. VLSI has large number of gates, hence pushed automatic test generation times to
1. A combinatorial circuit, with N number of inputs will have a total set of 2N number of
1. Typically, a VLSI IC will have 32 pins 40 pins; but the number of gates inside the
controllability.
Since its introduction in the early 1990s, boundary scan, also known as JTAG or IEEE
1149, has become an essential tool used for testing boards in development, production and in
50
the field. JTAG, boundary scan is a test technique that enables information about the state of a
board to be gained when it is not possible to gain access to all the nodes that would be
In view of the way in which the density of boards has been increasing in recent years,
it is normally very difficult to be able to probe electronic circuits and gain the information that
is required to test these boards. As JTAG, boundary scan enables much of a board to be tested
with only minimal access, it is now widely used for the test of electronic circuits at all stages
of their life. In view of the fact that other forms of test require access either in terms of bed of
nails fixtures, while others need to probe a variety of places on the board, boundary scan
Although the JTAG, boundary scan technique is aimed at testing circuits, its flexibility
BIST access
Memory testing
Flash programming
CPU emulation
51
While testing remains the major application for boundary scan, it can be see that it is also
useful in other applications as well. In view of its flexibility, the technique is widely used, and
With the problem of lack of access to boards starting to become a problem, a group
known as the Joint Test Action Group (JTAG) was set up in 1985. Its aim was to address the
issues being faced by electronics manufacturers in test strategies and to enable tests to be
The original goal for boundary scan was to complement existing techniques including
in-circuit test, functional built in test and other techniques and to provide a standard that
would enable the testing digital, analogue and mixed signal circuits.
The standard for boundary scan that was devised has been adopted by the Institute or
Electrical and Electronics Engineers, IEEE in the USA as IEEE 1149. The first issue of the
standard, IEEE 1149, was in 1990. The stated purpose of IEEE 1149 was to test the
interconnections between integrated circuits mounted on boards, modules, hybrids and other
substrates. As most of the problems occurring with electronics circuits occur with the
interconnections, the IEEE 1149 test strategy would reveal most of the problems.
In 1993, a revised version of the boundary scan, IEEE 1149 standard was issued which
contained many clarifications, enhancements and corrections. Then in 1994, a further issue of
the IEEE 1149 standard took place. This introduced the Boundary Scan Description
52
Language, BSDL. This enabled boundary scan tests to be written in a common language,
thereby improving the way in which tests could be written and code re-used, thereby saving
development time.
The JTAG, boundary scan test technique uses a shift register latch cell built into each
external connection of every boundary scan compatible device. One boundary scan cell is
included in the integrated circuit line adjacent to each I/O pin, and when used in the shift
register mode it can transfer data along to the next cell in the device. There are defined entry
and exit points for the data to enter and exit the device, and it is therefore possible to chain
Under normal operating conditions the cell is set so that it has no effect and it becomes
invisible. However when the device is set to test mode, it permits a serial data stream (test
vector) to be passed from one shift register latch cell to the next. Boundary-scan cells in a
device can capture data from integrated circuit line, or force data onto them. In this way a test
system that can input a data stream to the shift register chain can set up states on the board,
and also monitor data. By setting up one serial data stream, latching this into place, and then
monitor the returning data stream, it is possible to gain access to the circuits on the board and
check that a returning data stream is what is expected. If it is, then the test can pass, but if not
the boundary scan system has detected and problem that can be further investigated.
53
There are a number of boundary scan, IEEE 1149 control and data lines. There lines
known as TCK, TMS and the optional TRST line are connected in parallel to the chips in the
boundary scan chain. Connections designated TDI (input) and TDO (output) are daisy chained
together to provide a path around the boundary scan chips for the data. Data is sent into the
TDI of the first chip, and then TDO from the first chip is connected to TDI of the next and so
forth. Finally the data is taken from the TDO of the last IC in the daisy chain.
TAP Test Access Port - The pins associated with the test access controller.
TCK Test Clock - this pin is the clock signal used for ensuring the timing of the
boundary scan system. The TDI shifts values into the appropriate register on the rising
edge of TCK. The selected register contents shift out onto TDO on the falling edge of
TCK.
TDI Test Data Input - Test instructions shift into the device through this pin.
TDO Test Data Output - This pin provides data from the boundary scan registers,
TMS Test Mode Select - This input which also clocks through on the rising edge of
TRST Test Reset - This is an optional active low test reset pin. It permits
logic.
54
This technique can obviously only be used with integrated circuits that have the
boundary scan cells included in the chip. Many of the smaller devices do not have them, but
larger chips including memory devices, microprocessors and the like often do. When
designing a board, an early decision about the way in which it will be tested is needed. If
boundary scan techniques are to be used, then devices incorporating boundary scan facilities
must be chosen.
JTAG, boundary scan is an ideal test tool for use in many applications. The most
obvious applications for boundary scan are within the production environment. Here the
boards can be tested and problems that might otherwise go un-detected because of lack of test
access can be adequately tested. In fact boundary scan technology is being combined with
In addition to being used in production test, boundary scan, JTAG, IEEE 1149, can
also be used in a variety of other test scenarios, including product development and debugging
as well as field service. This means that the boundary scan code can be re-used for test areas,
and hence the cost can be split over these applications. Not only does this indicate that
Programme generation:
One of the chief costs for any development these days is the cost of the software, and
this is particularly true for boundary scan where there is little hardware. This means that any
55
savings that can be made in the time taken for the software development can significantly
reduce the costs. Accordingly a Test Programme Generator (TPG) is an integral part of a
Typically the test programme generator requires the net-list of the Unit Under Test
(UUT) and the Boundary Scan Description Language (BSDL) files of the boundary scan
components contained within the circuit. With this information it is possible for the test
programme generator to create the test patterns used for the test. These allow the system to
detect and isolate any faults for all boundary-scan testable nets within the circuit. It is also
possible for the test programme generator to create test vectors that enable the system to
detect faults on the nodes or pins components non-boundary scan components that are
JTAG Summary:
JTAG, boundary scan, IEEE 1149 is a test technique that is now well established.
provides a very cost effective method of gaining access for test vectors into an electronic
circuit board. With circuit board real estate being at a premium, the cost of adding probe or
access points for other type of electronic test technologies would be prohibitive, if indeed it
were possible.
56
SOFTWARE TOOLS:
HARDWARE:
Area : 5.96%
57
UART with BIST (Top Module):
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.STD_LOGIC_ARITH.ALL;
use IEEE.STD_LOGIC_UNSIGNED.ALL;
entity uartwithbist is
Port ( d : in STD_LOGIC;
clk,rst: in STD_LOGIC;
end uartwithbist;
signal tdata_out:std_logic;
signal z:std_logic;
signal parityerr,framingerr,overrun:std_logic;
signal rxrdy,txrdy:std_logic;
58
signal clk_out:std_logic;
component bilbo is
Port ( d : in STD_LOGIC;
clk,rst:in STD_LOGIC;
end component;
component uart_transmitter is
end component;
component uart_receiver is
end component;
component xorgate is
59
Port ( x : in STD_LOGIC;
y : in STD_LOGIC;
z : out STD_LOGIC);
end component;
component tx_clkout is
res : in STD_LOGIC;
end component;
begin
d => d,
b1 => b1,
b0 => b0,
q => tdata_in);
d => d,
60
rst => rst,
b1 => z,
b0 => b0,
q => q);
x =>b0,
y =>b1,
z =>z);
wr => rst,
tx => tdata_out);
61
rd => rst,
rx => tdata_out,
end behavioral;
62
CHAPTER 5
PROJECT RESULTS
Macro Statistics
# Adders/Subtractors :1
32-bit adder :1
# Counters :5
32-bit up counter :5
63
# Registers : 38
1-bit register : 32
32-bit register :1
7-bit register :5
# Comparators :1
# Multiplexers :2
# Xors : 18
1-bit xor2 : 16
1-bit xor7 :2
Macro Statistics
# Adders/Subtractors :1
32-bit adder :1
# Counters :5
32-bit up counter :5
# Registers : 99
Flip-Flops : 99
64
# Comparators :1
# Multiplexers :2
# Xors : 18
1-bit xor2 : 16
1-bit xor7 :2
----------------------------
Macro Statistics
# Registers : 255
Flip-Flops : 255
-----------------------------------
Number of IOs: 19
65
Number of bonded IOBs: 19 out of 232 8%
Timing Summary:
---------------
66
RTL Schematic (in FPGA):
67
Technology Schematic (in FPGA):
68
CONCLUSION
As part of this project, BIST Architecture is developed using VHDL, the test
performance achieved with the implementation of BIST is proven to be adequate to offset the
disincentive of the hardware overhead produced by the additional BIST circuit. The technique
can provide shorter test time compared to an externally applied test and allows the use of low-
cost test equipment during all stages of production. In spite of the hardware overhead obtained
with BIST implementation, the overhead is somehow reasonable considering the test
performance obtained. With the implementation of BIST, expensive tester requirements and
testing procedures starting from circuit or logic level to field level testing are minimized.
69
REFERENCES
[2] Z. Navabi, VHDL Analysis and Modeling of Digital Systems, McGraw-Hill Inc.,
1991.
[4] C. H. Roth, Digital System Design Using VHDL, PWS Publishing Company, 1998.
[5] http://en.wikipedia.org/wiki/Built-in_self-test
[6] http://www.lammertbies.nl/comm/info/serial-uart.html
70