Professional Documents
Culture Documents
DC Unit 4
DC Unit 4
DEPARTMENT OF ECE
EC T45 – DIGITAL
CIRCUITS UNIT - 4
Sequential Circuits: General model of sequential circuits –latches – Master-slave
Configuration- Flip-Flops - Concept of State – State diagram – State Table.
Synchronous Sequential Circuits – Binary ripple counters-Design of Synchronous counters-
binary counters- Arbitrary sequence counter - BCD counter – Shift Registers – Ring Counter
– Johnson Counter – Timing diagram – Serial Adder – PN sequence generator.
Sequential PLDs – Block diagrams of CPLD and Field programmable Gate Array (FPGA).
Introduction
The analysis and design of combinational circuits, shows that the outputs dependent
upon the present inputs. It consists of logic gates only.
There are many applications in which digital outputs are required to be generated in
accordance with the present inputs and previous states of the circuit.
This requirement cannot be satisfied using combinational logic system. These
application require outputs to be generated depend upon the past outputs of these
inputs.
The past output is provided by feedback from the outputs back to the input. These
circuits include the memory elements and are called as sequential circuits.
General Model of Sequential Circuits
A block diagram of a sequential circuit is shown in Figure below.
85
EC T45 / DIGITAL CIRCUITS UNIT 4
86
EC T45 / DIGITAL CIRCUITS UNIT 4
The behaviour of an asynchronous sequential circuit depends upon the order in which
its input signals change and can be affect at any instant of time. These are also called
as unclocked sequential circuits.
The memory elements used in both cases are flip-flops which are capable of storing 1-
bit binary information. A flip-flop circuit has two outputs one for the normal value
and other for the complement value of the bit stored in it.
Comparison between Combinational Circuits and Sequential Circuits
Combinational Circuits Sequential Circuits
A circuit whose output is dependent only A circuit whose output depends not only on
on the inputs at that instant (or) The circuit the present inputs, but also on the past history
that does not contain any memory of the inputs (or) A circuit that contains at
elements. least one memory element.
Combinational circuits are easy to design Sequential circuits are comparatively harder
but require more hardware. to design but require less hardware.
More expensive circuit. Cheaper circuit.
Combinational circuits are faster in speed, Sequential circuits are slower than the
because delay between input and output is combinational circuits because of memory
due to propagation delay of gates. elements or delay elements.
The behaviour is defined by the set of The behaviour is defined by the set of output
output functions only functions and next state functions
Designer has less flexibility since the Designer has more flexibility because, the
output depends only on the present inputs. output depends on both present input and
Example: Parallel Adder past history of input.
87
EC T45 / DIGITAL CIRCUITS UNIT 4
Here the memory elements are clocked flip- The memory elements are either unclocked
flops flip-flops or time delay elements.
The maximum operating speed of clock Because of absence of clock, asynchronous
depends on time delays involved circuits can operate faster than synchronous
circuits.
Synchronization is employed by the help of Here no synchronization, hence it is a
clock pulses. combinational circuit with feedback.
Latches
A flip-flop can maintain a binary state (either 0 or 1) as long as power is delivered to
the flip-flop. The most basic types of flip-flops operate with signal levels and are
referred to as latches.
The latches are the basic circuits from which all flip-flops are constructed. Also
latches are useful for storing binary information and for the design of asynchronous
sequential circuits, they are not practical for use in synchronous sequential circuits.
The basic difference between latches and flip-flops.
Latches Flip-flops
A latch checks all its inputs continuously Flip-flops samples its inputs and changes its
and change its output accordingly at any outputs only at a time as determined by a
time clock signal
No clock is used A clock is used.
It is used in asynchronous sequential logic It is used in synchronous sequential circuit
circuit
RS Latch
The simplest latch is the Reset-Set latch (RS - latch). It can be constructed from either
two NOR gates or two NAND gates.
Figure below shows the RS latch using two NOR gates. The two NOR gates are cross
coupled so that output of NOR gate 1 is connected to one of the inputs of NOR gate 2
and vice-versa.
The latch has two outputs Q and Q’ and two inputs, set (S) and Reset (R).
88
EC T45 / DIGITAL CIRCUITS UNIT 4
89
EC T45 / DIGITAL CIRCUITS UNIT 4
With Q = 1, NOR gate 2 output Q’ is at logic 0. Thus the output is same as initial
value. This same for Q = 0 and Q’ = 1 also. The diagram is shown in figure.
Symbol of RS Latch
Input Output
State
R S Q Q’
0 0 NC NC No Change
0 1 1 0 Set
1 0 0 1 Reset
1 1 X X Indeterminate
90
EC T45 / DIGITAL CIRCUITS UNIT 4
Flip-Flops
The latch is an asynchronous transparent sequential circuit. This meant that any
change in the input of latch is transmitted immediately to the output at Q and Q.
The operation of the latch can be modified by providing an additional control input
that determines when the state of the circuit is to be changed. This additional control
input is called clock or clock pulse.
With this clock, the latch is called flip-flops which is also working in synchronous
mode. The term synchronous indicates that the output changes its state only at
specified point according to the input of the latch circuit.
91
EC T45 / DIGITAL CIRCUITS UNIT 4
There are many types of flip-flops. The major differences among various types of flip-
flops are in the number of inputs they process and the manner in which the inputs
affect their output state. The types of flip-flops s are:
RS flip-flops
JK flip-flops
D flip-flops
T flip-flops
Clocked RS Flip-flop
An RS flip-flops is shown below. It consists of basic NOR latch circuit and two AND
gates at the input.
AND gates remain `0' as long as the clock pulse CLK is `0' regardless of the R and S
inputs. When the clock pulse goes to 1, information from R and S inputs is allowed to
reach the basic RS latch. The basic symbol is also shown below.
92
EC T45 / DIGITAL CIRCUITS UNIT 4
Input Output
State
CLK R’ S’ Q Q’
0 X X NC NC No Change
1 0 0 NC NC No Change
1 0 1 1 1 Set
1 1 0 0 1 Reset
1 1 1 X X Indeterminate
D Flip-Flop
A flip-flop whose output follows it data input when the clock is active. As shown
below, D input goes directly to the S input, and its complement is applied to the R
input, through NOT.
Therefore, only two input conditions exist, either S = 0 and R = 1 or S = 1 and R = 0.
When D = 1; S = 1 and R = 0 and when D = 0; S = 0 and R = 1.
Therefore, during the occurrence of clock pulse if D = 1, the Q output is set and if D =
0, the output is reset. The table below shows the truth table of D flip-flop.
CLK D Qn+1
0 X Qn
1 0 0
1 1 1
93
EC T45 / DIGITAL CIRCUITS UNIT 4
Clocked JK Flip-flop
Case (iii): J = 1, K =0
When J is high and K is low, the upper gate is disabled, so there is no way to reset the
flip-flop.
94
EC T45 / DIGITAL CIRCUITS UNIT 4
The only possibility is to set the flip-flop if it is not previously set with Q = 0; J is
high and hence the lower gate passes a SET trigger on the next positive clock pulse.
This drives Q into the high state. Therefore, J = 1 and K = 0 means that the next
positive clock pulse set the flip-flop unless Q is already set.
Case (iv): J = K =1
When J and K are both high (Recall that this is an indeterminate condition with an RS
flip-flop) it's possible to set or reset the flip-flop.
If Q is high, the upper gate passes a RESET trigger on the next positive clock edge.
On the otherhand, when Q is low, the lower gate passes a SET trigger on the next
positive clock edge.
Either way, Q changes to the complement of the last state. Therefore, J = K = 1 means
output of the flip-flop will toggle on the next positive clock edge. When the inputs J
and K are short circuited, the JK flip-flop is act as a T flip-flop.
When input T = 1, it complement the present input. When input T = 0, it maintain the
present state.
FF Inputs Present State Next State
J K Qn Qn+1
0 0 0 0
0 0 1 1
0 1 0 0
0 1 1 0
1 0 0 1
1 0 1 1
1 1 0 1
1 1 1 0
T Flip-flop
The T flip-flop is also known as .toggle flip-flop. It is a modification of JK flip-flop.
The T flip-flop is made from a JK flip-flop merly by connecting its J and K terminals
together. This means that at all times J = K. The clocked T flip-flop is shown below.
95
EC T45 / DIGITAL CIRCUITS UNIT 4
96
EC T45 / DIGITAL CIRCUITS UNIT 4
97
EC T45 / DIGITAL CIRCUITS UNIT 4
Draw the block diagram of the desired flip-flop from the given problem.
Write the truth table of required flip-flop and excitation table of given flip-flop.
Combine the above truth table and excitation table to form conversion table.
Using K-Maps, simplify the logic expression for excitation inputs of given FF.
Draw a circuit for the desired flip-flop using flip-flop conversion logic and the
given flip-flop as shown in the block diagram.
Triggering of Flip-flop
Flip-flops are synchronous bistable devices. The term synchronous mean that changes
in the output occurred at a specified point on a triggering input called the clock; that
is, changes in the output occurred in synchronization with the clock.
Based on the specific internal or point in the clock during which triggering the flip-
flop to change the output states. The triggering method can be classified into two
different types.
98
EC T45 / DIGITAL CIRCUITS UNIT 4
Level triggering
Edge triggering
Level Triggering in Flip-flop
Flip-flop circuits are constructed in such a way as to make them operate properly
when they are part of a sequential circuit that employs a common clock. For proper
operation of flip-flop is to trigger it only during a signal transition.
A clock pulse goes through two transitions from 0 to 1 (positive level triggering) and
the returns from 1 to 0. (Negative level trigger).
A flip-flop that triggers only during a signal transition (from 0 to 1 or from 1 to 0) and
is disabled during the rest of the clock pulse duration.
The flip-flop changes its states when clock is positive level, it is termed as positive
level triggering flip-flop. The flip-flop changes its states when the clock is negative, it
is termed as negative level triggering flip-flop.
Edge Triggering Flip-flop
Edge: The HIGH to LOW (negative edge) or LOW to HIGH (positive edge)
transition of a pulse wave form.
Edge detector: A circuit in an edge triggered flip-flop that converts active edge of a
CLOCK into an active-level pulse at the internal latch's SET and RESET inputs.
Edge RC circuit: Depends upon a charging time, the clock is converted to spike by
using RC combination circuit.
Clock pulse goes through two signal transitions from 0 to 1 and returns from 1 to 0,
as shown in Figure (a). Figure (b) shows the spike wave forms.
A positive transition is defined as the positive edge and a negative transition as the
negative edge.
RC Equivalent Circuit
99
EC T45 / DIGITAL CIRCUITS UNIT 4
100
EC T45 / DIGITAL CIRCUITS UNIT 4
The present state and the external inputs determine the outputs and the next state of
sequential circuit.
State Diagram
State diagram is the pictorial representation of behaviour of a sequential circuit.
The state represented by a circle, and the transition between different states for
different input conditions are indicated by directed lines connecting the circles.
State Table
The table which represents the relationship between present states and next states is
called state table.
State table is the translation of state diagram into a tabular form; representing
relationships among input, output and flip-flop states.
State Assignment
The state assignment is an one step in the design of sequential circuit which assigns
binary values to states in such a way that it reduces the cost of combinational circuit
that drives the flip-flop.
State Reduction
The State Reduction is a technique that reduces the number of states in the sequential
circuit by keeping only one state for two or more redundant/equivalent states.
This reduces the number of required flip-flops and logic gates reducing the cost of
final circuit.
Ripple Counter
To design the ripple counter, the number of flip-flops required depends on the number
of states. The number of the output states of the counter is called `Modules' (MOD) of
the counter.
The maximum number of states of a counter is 2n, where n is the number of flip-flops
in the counter.
If we have two flip-flops, then the maximum possible number of output states of the
counter is 22 i.e. 4. Now we can name that counter as MOD-4 or Modulus -4 counter.
MOD -4 or 2 - bit Asynchronous counter
MOD - 4 counter is a 2-bit asynchronous counter which consists of four states due to
its two number of flip-flops.
The state diagram and logic diagram of 2-bit ripple counter is shown in Figure a and
b. The clock is connected to the clock input of first flip-flop.
101
EC T45 / DIGITAL CIRCUITS UNIT 4
The clock input of the second stage flip-flop is triggered by the QA output of the first
stage.
Note that the flip-flop changes it's state only when triggered by negative edge of the
each clock pulse, but the second flip-flop changes its state only when triggered by the
negative going transition of the QA output.
Therefore, the two flip-flops are never simultaneously trigged which results in
asynchronous counter operation.
a) State Diagram
b) Logic Diagram
The figure below shows the timing diagram for 2-bit asynchronous counter. It
illustrates the changes in the state of the flip-flop outputs in response to the clock.
Timing Diagram
102
EC T45 / DIGITAL CIRCUITS UNIT 4
State Diagram
In this diagram, each binary states are indicated inside the circles and the directed line
between the circles are indicated by the state transitions.
Logic Diagram
Figure above shows the 3-bit ripple counter with 3 JK flip-flops named as A,B and C,
where C output represents the most significant bit of the count and the A flip-flop
output indicates the least significant bit of the count.
Here, first flip-flop (A) is triggered by the CLK which is holding the least significant
bit. The second flip-flop (B) is triggered by QA output of first flip-flop.
The third flip-flop (C) is triggered by the QB output of the second flip-flop. Figure
below shows the timing diagram of 3-bit ripple counter.
103
EC T45 / DIGITAL CIRCUITS UNIT 4
Timing Diagram
Design procedure of Synchronous counter
To design a synchronous counter, the following steps are followed
Step 1 Obtain the state diagram from the given circuit information
Step 2 Determine the number of required flip-flops
Step 3 Write the excitation table of above obtained flip-flop.
Step 4 Develop the circuit state table by using excitation table.
Step 5 Use K-map to find the expression for corresponding input function of counters
Step 6 Draw the counter circuit by using flip-flop and required gates, from the above
obtained boolean expression.
Example: Design Mod 4 synchronous counter using JK flip-flops and implement it.
Step 1 Here 4 indicates total number of states (0,1,2 and 3)
Step 2 The required flip-flop
2n >N
2n <4
n=2
Two flip-flops are required to design MOD 3 counter. The flip-flops are labelled as A and B.
Step 3 Excitation table for JK flip-flop
104
EC T45 / DIGITAL CIRCUITS UNIT 4
Binary Counter
The following are the types of binary counters. They are
2-bit synchronous binary counter
3-bit synchronous binary counter
4-bit synchronous binary counter
106
EC T45 / DIGITAL CIRCUITS UNIT 4
From the table above, we can notice that flip-flop C has to change its state only when
QB and QA both are at logic 1.
107
EC T45 / DIGITAL CIRCUITS UNIT 4
This condition is detected by AND gate and applied to the JC and KC inputs of flip-
flop C. Whenever both QA and QB are HIGH, the output of the AND gate makes the J
and K inputs of the flip-flop C HIGH and flip-flop C toggles on the clock pulse.
At other times (i.e. other than QA = QB = 1), the J and K inputs of flip-flop C are held
Low by the AND gate output and the flip-flop does not change its state.
108
EC T45 / DIGITAL CIRCUITS UNIT 4
The flip-flop B output must change whenever the QA = 1 and a clock pulse occurs
and when QA = 0, the output QB remains same. After the second clock pulse, the
count Q = 0010.
CLK QD QC QB QA
0 0 0 0 0
1 0 0 0 1
2 0 0 1 0
3 0 0 1 1
4 0 1 0 0
5 0 1 0 1
6 0 1 1 0
7 0 1 1 1
8 1 0 0 0
9 1 0 0 1
10 1 0 1 0
11 1 0 1 1
12 1 1 0 0
13 1 1 0 1
14 1 1 1 0
15 1 1 1 1
When QA and QB are at HIGH, then the third flip-flop output QC is made to change its
state. This condition is detected by the AND gate 1 and it's output is applied to the J
and K inputs of the third flip-flop.
Whenever both QA and QB are HIGH, the output of the gate 1 makes as the JC and KC
of flip-flop C and it toggles on the following clock pulse. At all other conditions, the
gate output is 0 and QC does not change its state.
We can also observe that whenever QA;QB and QC are at HIGH, the fourth flip-flop D
changes its output. This condition is detected by AND gate 2, so that when a clock
109
EC T45 / DIGITAL CIRCUITS UNIT 4
pulse occurs, the D flip-flop will change the state. Note that for all other times, the JD
and KD inputs are LOW and it is no change condition.
110
EC T45 / DIGITAL CIRCUITS UNIT 4
The reason or advantage of using don’t care is easier state diagram, smaller state
table, easier k-map equations as well as less connections in the logic diagram etc.
There is also a good reason to use specific next states from unreachable states instead
of using don’t care conditions. Such as during operation due to outside interference
the may reach an unused state and break the intended sequence. Also it may keep
circulating in unused states and never come back to original sequence.
BCD Counter
To design a BCD or Decade (MOD-10) counter that has ten states i.e., 0 to 9 the
number of flip flops required is four. Let us assume that the MOD-10 counter has ten
states, viz.
Step 1 – State diagram:
Now the state diagram for the MOD-10 counter can be drawn. Here, it is assumed that
the state transition from one state to another takes place when the clock pulse is
asserted. When the clock is unasserted, the counter remains in the present state.
Step 2 – State Table:
From the above state diagram, one can draw the Present state – Next state table as
shown below,
Present State (PS) Next State (NS)
a b
b c
c d
d e
e f
f g
g h
h i
i j
j a
The above state table does not have any redundant state because no two are
equivalent. So, there is no modification required in the above state table.
111
EC T45 / DIGITAL CIRCUITS UNIT 4
112
EC T45 / DIGITAL CIRCUITS UNIT 4
113
EC T45 / DIGITAL CIRCUITS UNIT 4
Schematic Diagram
114
EC T45 / DIGITAL CIRCUITS UNIT 4
115
EC T45 / DIGITAL CIRCUITS UNIT 4
116
EC T45 / DIGITAL CIRCUITS UNIT 4
When the data 1 1 1 1 is applied serially the left most 1 is applied to Din So, Din = 1
QD QC QB QA = 0 0 0 0
Case 1: The arrival of the first falling clock edge sets the left most flip flop, and stored
contents as follows QD QC QB QA = 1 0 0 0
Case 2: After second falling clock edge, the register contents QD QC QB QA = 1 1 0 0
Case 3: The third falling clock edge, the register contents QD QC QB QA = 1 1 1 0
Case 4: The fourth falling clock edge, the register contents QD QC QB QA = 1 1 1 1
Ring Counter
In the Shift Register, if we apply a serial data signal to the input of a Serial-in to
Serial-out Shift Register, the same sequence of data will exit from the last flip flop in
the register chain after a preset number of clock cycles thereby acting as a sort of time
delay circuit to the original input data signal.
But what if to connect the output of this Shift Register back to its input so that the
output from the last flip-flop, QD becomes the input of the first flip-flop, DA.
The closed loop circuit that “re-circulates” the same bit of data around a continuous
loop for every state of its sequence, and this is the principal operation of a Ring
Counter.
Then by looping the output back to the input, (feedback) we can convert a standard
shift register circuit into a ring counter. Consider the circuit below.
117
EC T45 / DIGITAL CIRCUITS UNIT 4
118
EC T45 / DIGITAL CIRCUITS UNIT 4
Since the ring counter has four distinct states, it is also known as a “modulo-4″ or
“mod-4″ counter with each flip-flop output having a frequency value equal to one-
fourth or a quarter (1/4) that of the main clock frequency.
The “MODULO” or “MODULUS” of a counter is the number of states the counter
counts or sequences through before repeating itself and a ring counter can be made to
output any modulo number.
A “mod-n” ring counter will require “n” number of flip-flops connected together to
circulate a single data bit providing “n” different output states.
For example, a mod-8 ring counter requires eight flip-flops and a mod-16 ring counter
would require sixteen flip-flops.
However, as in our example above, only four of the possible sixteen states are used,
making ring counters very inefficient in terms of their output state usage.
Johnson Counter
The Johnson Ring Counter or “Twisted Ring Counters”, is another shift register with
feedback exactly the same as the standard Ring Counter above, except that this time
the inverted output Q of the last flip-flop is now connected back to the input D of the
first flip-flop as shown below.
The main advantage of this type of ring counter is that it only needs half the number
of flip-flops compared to the standard ring counter then its modulo number is halved.
So a “n stage” Johnson counter will circulate a single data bit giving sequence of 2n
different states and can therefore be considered as a “mod-2n counter”.
4- bit Johnson Ring Counter
This inversion of Q before it is fed back to input D causes the counter to “count” in a
different way. Instead of counting through a fixed set of patterns like the normal ring
counter such as for a 4-bit counter.
For a 4-bit counter, “0001”(1), “0010”(2), “0100”(4), “1000”(8) and repeat, the
Johnson counter counts up and then down as the initial logic “1” passes through it to
the right replacing the preceding logic “0”.
A 4-bit Johnson ring counter passes blocks of four logic “0” and then four logic “1”
thereby producing an 8-bit pattern. As the inverted output Q is connected to the input
D this 8-bit pattern continually repeats.
For example, “1000”, “1100”, “1110”, “1111”, “0111”, “0011”, “0001”, “0000” and
this is demonstrated in the following table below.
119
EC T45 / DIGITAL CIRCUITS UNIT 4
As well as counting or rotating data around a continuous loop, ring counters can also
be used to detect or recognize various patterns or number values within a set of data.
By connecting simple logic gates such as the AND or the OR gates to the outputs of
the flipflops the circuit can be made to detect a set number or value.
Serial Adder
Sequential serial adders are economically efficient and simple to build. A serial adder
consists of a 1-bit full-adder and several shift registers. In serial adders, pairs of bits
are added simultaneously during each clock cycle.
Two right-shift registers are used to hold the numbers (A and B) to be added, while
one left-shift register is used to hold the sum (S). A block diagram of a serial adder is
shown below.
A finite-state machine adder performs the addition operation on the values stored in the input
shift registers and stores the sum in a separate shift register during several clockcycles.
During each clock cycle, two input bits ai and bi are shifted from the two input right-shift
registers into the 1-bit full-adder, which adds the two bits and evaluates the sum bit si and the
carryout bit ci+1. The sum bit si, is shifted out to the left-shift register and the carryout
120
EC T45 / DIGITAL CIRCUITS UNIT 4
bit ci+1 is stored in the state memory of the serial adder for the next two bits. The time
sequence of the operation of a 4-bit serial adder is illustrated in table below.
A B S Si Ci+1
1011 0011 0000 0 1
0101 0001 1000 1 1
0010 0000 1100 1 0
0001 0000 1110 1 0
PN Sequence Generator
Pseudo noise sequence is a binary sequence used in spread spectrum communication
for spreading the message signal.
These coded sequences are generated independently at two or more sites, and this
sequence must be deterministic, even though it should appear random to unauthorized
listeners. Such random appearing deterministic signals are called pseudo noise or
pseudo random signals.
A pseudo noise sequence is a periodic binary sequence with a noise like waveform
that is usually generated by means of a feedback shift register, a general block
diagram of which is shown below.
The flip flops in the shift register are regulated by a single timing clock. At each clock
pulse, the state of the flip flop is shifted to the next one down the line.
121
EC T45 / DIGITAL CIRCUITS UNIT 4
122
EC T45 / DIGITAL CIRCUITS UNIT 4
123
EC T45 / DIGITAL CIRCUITS UNIT 4
The Xilinx architecture uses CLBs, I/O blocks switch matrix and an
external memory chip to realize a logic function. It uses external
memory to store the interconnection information.
Therefore, the device can be reprogrammed by simply changing the
configuration data stored in the memory.
Configurable Logic Block:
The CLB consists of a combinational logic array, program controlled
data multiplexers, and flip-flops.
The program controlled multiplexers are used to route data internally
in the CLB.
The two outputs of the combinational logic function F and G can be
routed through multiplexers to either of the two output pins or to the
D inputs of the two flip-flops.
124
EC T45 / DIGITAL CIRCUITS UNIT 4
125
EC T45 / DIGITAL CIRCUITS UNIT 4
Structure of CPLD
Each PAL-like block is also connected to a subcircuit labeled I/O block, which is
attached to a number of the chip's input and output pins.
The figure below shows an example of the wiring structure and the connections to a
PAL-like block in a CPLD.
The PAL-like block includes 3 macrocells (real CPLDs typically have about 16
macrocells in a PAL-like block), each consisting of a four-input OR gate (real
CPLDs usually provide between 5 and 20 inputs to each OR gate).
The OR-gate output is connected to another type of logic gate that we have not yet
introduced. It is called an Exclusive-OR (XOR) gate. The behavior of an XOR gate
is the same as for an OR gate except that if both of the inputs are 1, the XOR gate
produces a 0.
One input to the XOR gate in figure above can be programmably connected to 1 or
0; if 1, then the XOR gate complements the OR-gate output, and if 0, then the XOR
output value produced by the OR gate.
Each tri-state buffer (see section 3.8.8) is connected to a pin on the CPLD package.
The tri-state buffer acts as a switch that allows each pin to be used either as an
output from the CPLD or as an input.
To use a pin as an output, the corresponding tri-state buffer is enabled, acting as a
switch that is turned on. If the pin is to be used as an input, then the tri-state buffer is
disabled, acting as a switch that is turned off.
126
EC T45 / DIGITAL CIRCUITS UNIT 4
In this case an external source can drive a signal onto the pin, which can be
connected to other macrocells using the interconnection wiring. The interconnection
wiring contains programmable switches that are used to connect the PAL-like
blocks.
Each of the horizontal wires can be connected to some of the vertical wires that it
crosses, but not to all of them. Extensive research has -been done to decide how
many switches should be provided for connections between the wires.
The number of switches is chosen to provide sufficient flexibility for typical circuits
without wasting many switches in practice.
Some CPLDs include additional connections between the macrocells and the
interconnection wiring that avoids wasting macrocells in such situations.
Commercial CPLDs range in size from only 2 PAL-like blocks to more than 100
PAL like blocks.
A Section of CPLD
127