Report A4
Report A4
Report A4
Figure 1: Wp > Wn
Figure 2: Wp < Wn
1
The netlist used is given below (netlist given in folder).
Figure 3: Q1 Netlist
2
The following readings are observed:
Figure 4: Wp = 3, Wn = 3
Figure 5: Wp = 4, Wn = 2
Figure 6: Wp = 5, Wn = 1
Figure 7: Wp = 2, Wn = 4
Figure 8: Wp = 1, Wn = 5
3
2 Pass Transistor MUX, Shannon’s Expansion
We know Shannon’s Expansion for given boolean function with n inputs is:
f (x1 , x2 , x3 , x4 ) = x1 · x2 + x1 · x3 + x1 · x4 + x2 · x3 + x3 · x4 + x2 · x4
4
2.2 NGSpice Netlist
Note: We use 2 inverter chains as repeaters to get clean proper voltage levels for our
signals (Complete netlist is in folder).
5
Our Input Signals are run as follows (Voltages adjusted for clarity).
6
(a) Time Rise (b) Time Fall
f (x1 = 1, x2 , x3 , x4 )
f (x1 = 0, x2 , x3 , x4 )
Paths for charging and discharging the circuit output are observed in the initial circuit
diagram.
Equal Transistor Count: Charging path (VDD to output) and discharging path
(output to ground) should have an equal number of transistors of the same size.
Repeaters: Insert inverters at appropriate nodes to maintain signal integrity and
drive strength.
This setup helps achieve minimal delay by balancing the pull-up and pull-down strengths
effectively.
7
3 GCD Design
Initialize Registers: On reset, both registers for A and B are set to zero.
Load Inputs: When the load signals are active, inputs A and B are loaded into
their respective registers.
Swap Operation: If the swap signal is high, the values in registers A and B are
exchanged.
Subtraction Operation: If the subtract signal is active, the value of B is sub-
tracted from A, and the result is stored in A.
Output Result: The result Z is updated based on the current values of A and
B; if either register is zero or if A = B, Z holds the non-zero or equal value.
Subtract: X = X − Y
Swap: X, Y if X < Y
Load: Load X, Load Y
8
3.2 Circuit Diagram
The next state expressions can be defined as follows:
N S0 = (S0 ∧ (XR > 0) ∧ (XR < Y R)) ∨ (S1 ∧ (XR > 0))
where:
S0 , S1 , S2 , and S3 represent the current states.
∧ for AND
∨ for OR
9
3.3 Control Unit Implementation
Given below is the FSM implementation related to Control Unit.
10
3.4 Datapath Unit Implementation
Given below is the FSM implementation related to Datapath Unit.
11
We use the following testbench for both c. and d.
12
3.5 GCD Compute
13