Professional Documents
Culture Documents
LABORATORY 3
COMBINATIONAL & SEQUENTIAL CIRCUIT
OBJECTIVES
No. Objectives Requirements
1 Design a combinational circuit (a 1-bit Full ▪ Complete schematic and
Adder). transient simulation.
2 Design a sequential circuit (a PRBS – Pseudo ▪ Measure some timing
Random Binary Sequence – generator). parameters and power
consumption.
▪ Define speed/clock speed of
your design.
EXPERIMENT 1
Instruction:
➢ In this section, students have a chance to review 1-bit Full Adder (FA). Moreover, FA
will be observed in another aspect – topology. First, let’s overview the truth table of this
component.
′ ′
𝑆 = 𝐴′ 𝐵′ 𝐶𝑖𝑛 + 𝐴′ 𝐵𝐶𝑖𝑛 + 𝐴𝐵′ 𝐶𝑖𝑛 + 𝐴𝐵𝐶𝑖𝑛 = 𝐴⨁𝐵⨁𝐶𝑖𝑛
𝐶𝑜𝑢𝑡 = 𝐴𝐵 + 𝐴𝐶𝑖𝑛 + 𝐵𝐶𝑖𝑛 = (𝐴 + 𝐵)𝐶𝑖𝑛 + 𝐴𝐵
➢ Observe the last column of 1-bit FA truth table – “Carry Status” column – there are
three keywords you need to take care: delete, propagate, and generate. These are analyzed as
follows:
o Generate: concept even if 𝐶𝑖𝑛 = 0, 𝐶𝑜𝑢𝑡 = 1
▪ 𝐺𝑒𝑛𝑒𝑟𝑎𝑡𝑒 ≡ 𝐺 = 𝐴𝐵
o Delete: concept even if 𝐶𝑖𝑛 = 1, 𝐶𝑜𝑢𝑡 = 0
▪ 𝐷𝑒𝑙𝑒𝑡𝑒 ≡ 𝐴′𝐵′
o Propagate: even does not generate if 𝐶𝑖𝑛 = 1, 𝐶𝑜𝑢𝑡 = 1
▪ 𝑃𝑟𝑜𝑝𝑎𝑔𝑎𝑡𝑒 ≡ 𝑃 = 𝐴′ 𝐵 + 𝐴𝐵′ = 𝐴⨁𝐵
These keywords can be used to implement Carry Look Ahead Adder to improve critical path in
Ripple Carry Adder.
➢ When students count the number of transistors used in Figure 2, they find that it
amounts to 46 transistors. This indicates that the area of this topology is large, so solutions to
reduce the number of transistors are needed.
➢ First, student can use the Boolean function to implement (compound gate). However,
the equation describing sum output exists in another form:
o 𝑆 = 𝐴𝐵𝐶 + 𝐶𝑜𝑢𝑡 ′(𝐴 + 𝐵 + 𝐶𝑖𝑛 )
o 𝐶𝑜𝑢𝑡 = (𝐴 + 𝐵)𝐶𝑖𝑛 + 𝐴𝐵
According to the equation, the 𝐶𝑜𝑢𝑡 ′ will be created at the first stage in this topology. The sum
will be calculated after.
Figure 3 FA 28T.
However, this topology still has some disadvantages such as: long stacking PMOS, loading to
𝐶𝑜𝑢𝑡 (2𝐶𝐷 + 6𝐶𝐺 + 𝐶𝑊 )…
Power consumption
Speed
Questions:
➢ Due to the topology shown in Figure 3, why do people implement the PDN of the first
stage using equation 𝐶𝑜𝑢𝑡 = (𝑨 + 𝑩)𝑪𝒊𝒏 + 𝐴𝐵 instead of 𝐶𝑜𝑢𝑡 = 𝐴𝐵 + 𝑨𝑪𝒊𝒏 + 𝑩𝑪𝒊𝒏?
Figure 6 The PDN using 𝐶𝑜𝑢𝑡 = (𝑨 + 𝑩)𝑪𝒊𝒏 + 𝐴𝐵 (left), and 𝐶𝑜𝑢𝑡 = 𝐴𝐵 + 𝑨𝑪𝒊𝒏 + 𝑩𝑪𝒊𝒏 (right).
➢ Due to the topology shown in Figure 3, at the PDN of the first stage, why do people
put 𝐶𝑖𝑛 on top in this topology?
Figure 7 The PDN with 𝐶𝑖𝑛 connecting 𝐶𝑜𝑢𝑡 (left), and 𝐶𝑖𝑛 connecting to ground (right).
EXPERIMENT 2
Requirement: You will learn PRBS, or pseudo random binary sequence, which is a type of
algorithm-generated random signal.
Instructions:
➢ A pseudo random binary sequence (PRBS) is often used as model data to test a high-
speed serial interface devices for emulating a mission mode. It is mathematically randomized
bit stream so that is well neutralized and balanced data. A PRBS bit stream can be generated
by using a linear feedback shift register (LFSR).
➢ Figure 1 illustrates an example of a 4-bit LFSR and its shifting data pattern.
o When the shift register is filled up with a seed pattern of all 1’s here, the table
in the right hand side depicts how the register contents change and put out a series of PRBS.
o Right after the final bit, it returns to the top of the bit stream.
o There are 15 bits of pseudo random bit stream generated.
➢ Figure 8 illustrates how the 15-bit PRBS pattern looks like a waveform. There are 8
edges toggling in the 15 bits NRZ pattern, containing eight 1’s and seven 0’s. This is a general
feature of a PRBS shown in Table 3.
LFSR n−𝒃𝒊𝒕 n 4 7
➢ An n-bit LFSR generates 2𝑛 − 1 bits of PRBS. By carefully looking at the bit pattern in
the shift register, you can see there are all 4-bit combinations appeared except all 0’s. If
students feed the pattern of “0000”, the shift register would be stuck, and it generates only 0’s
infinitely. A seed pattern must not be all 0’s. So, one of the 15 4-bit patterns can be accepted
as a seed.
➢ The linear feedback shift register is implemented as a series of Flip-Flops as a shift
register. Several taps off of the shift register chain are used as inputs to either
an XOR or XNOR gate. The output of this gate is then used as feedback to the beginning of the
shift register chain, hence the Feedback in LFSR.
➢ Students can use any schematic of DFF you want, even the design presented in
laboratory 2. In addition, students should study some types of shift register already existed
such as: SIPO, SISO, PISO, PIPO.
➢ In general, a shift register has a clock, a serial input 𝑆𝑖𝑛 , a serial output 𝑆𝑜𝑢𝑡 , and 𝑁
parallel outputs 𝑄[𝑁 − 1: 0]. In case DFF is positive edge triggered, on each rising edge of the
clock, a new bit is shifted in from Sin and all the subsequent contents are shifted forward. The
last bit in the shift register is available at 𝑆𝑜𝑢𝑡 . Shift registers can be viewed as serial-to-
parallel converters. The input is provided serially (one bit at a time) at 𝑆𝑖𝑛 . After 𝑁 cycles, the
past 𝑁 inputs are available in parallel at 𝑄.
➢ A shift register can be constructed from 𝑁 flip-flops connected in series, as shown in
Figure 13(b). Some shift registers also have a reset signal to initialize all of the flip-flops.
(a) (b)
➢ Before running simulation your PRBS generator, please remember to transmit input
data for your design. This work can be done by using vbit source (in analogLib) with MOS
device to isolate when transmit data period is complete or set up some initial conditions
(ADE L>Simulation>Convergence Aids>Initial Condition) … However, for any method used,
please explain it.
Check:
➢ Show the schematics of your design, and waveform prove your design work correctly.
➢ Define and show how to measure clock speed.
➢ Students can refer to this Python code to check your result or any online generator
found.
@author: nelsonn
"""
import matplotlib.pyplot as plt
output_PRBS = []
#Plotting
plt.tight_layout()
plt.figure(figsize=(15, 8))
plt.step(range(len(output_PRBS)), output_PRBS, drawstyle='steps',
color='r')
plt.title('PRBS')
plt.ylabel('Voltage Level')
plt.grid(True)
plt.show()
➢ Use this PRBS generator to verify the adder (any topology you want) in experiment 1.
Show the schematics of your design, and waveform.
---------------------------------------------------------------------------------------------