Академический Документы
Профессиональный Документы
Культура Документы
Assignment-1
1(a)
32-bit RCA
1(b)
The above diagram 1(a) shows the circuit for 1-bit FA and 1(b) refers to 32-bit RCA using 1-bit
FA blocks.
From fig 1(a) we know that for a 1-bit adder we need
2 XOR, 2 AND, 1 OR gates to implement
Hence for 32-bit adder total number of gates are
XOR – 64
AND – 64
OR – 32
From above we will get to know the number of transistors for AND and XOR gate for OR gate it
is similar to AND gate only Nmos becomes parallel and Pmos becomes series.
AND Gate: - 4T + 2T = 6T
OR Gate: - 4T +2T = 6T
XOR Gate: - 2T + 2T + 2T = 6T
Hence the Total number of Transistors for a 32-bit FA will be 64*6 + 64*6 + 32*6 = 960
Transistors
Delay/Critical path
Worst case delay linear with the number of bits
Td = (N-1) t carry + t sum
Let’s consider B[0] to sum[31] has maximum delay (consider for logic1 just for easy
calculation) in terms of number of Transistors
Therefore, t carry = 3+3+3 =9
t sum = 3+3 = 6
Td = 31*9 + 6
Td = 285 Transistors
Qflow implementation to check the result got manually
Verilog code(structural)
module full_adder(A, B, CIN, S, COUT);
assign S = A ^ B ^ CIN;
endmodule
input [31:0] A;input [31:0] B;input C0; output [31:0] S;output C32;
wire C1; wire C2; wire C3; wire C4; wire C5; wire C6; wire C7; wire C8; wire C9; wire C10; wire C11;
wire C12; wire C13; wire C14; wire C15; wire C16; wire C17; wire C18; wire C19; wire C20; wire C21;
wire C22; wire C23; wire C24; wire C25; wire C26; wire C27; wire C28; wire C29; wire C30; wire C31;
full_adder fu0 (A[0], B[0], C0, S[0], C1);full_adder fu1 (A[1], B[1], C1, S[1], C2);full_adder fu2 (A[2], B[2], C2, S[2], C3);
full_adder fu3 (A[3], B[3], C3, S[3], C4);full_adder fu4 (A[4], B[4], C4, S[4], C5);full_adder fu5 (A[5], B[5], C5, S[5], C6);
full_adder fu6 (A[6], B[6], C6, S[6], C7);full_adder fu7 (A[7], B[7], C7, S[7], C8);full_adder fu8 (A[8], B[8], C8, S[8], C9);
full_adder fu9 (A[9], B[9], C9, S[9], C10);full_adder fu10 (A[10], B[10], C10, S[10], C11);full_adder fu11 (A[11], B[11], C11, S[11],
C12);
full_adder fu12 (A[12], B[12], C12, S[12], C13);full_adder fu13 (A[13], B[13], C13, S[13], C14);full_adder fu14 (A[14], B[14], C14,
S[14], C15);
full_adder fu15 (A[15], B[15], C15, S[15], C16);full_adder fu16 (A[16], B[16], C16, S[16], C17);full_adder fu17 (A[17], B[17], C17,
S[17], C18);
full_adder fu18 (A[18], B[18], C18, S[18], C19);full_adder fu19 (A[19], B[19], C19, S[19], C20);full_adder fu20 (A[20], B[20], C20,
S[20], C21);
full_adder fu21 (A[21], B[21], C21, S[21], C22);full_adder fu22 (A[22], B[22], C22, S[22], C23);full_adder fu23 (A[23], B[23], C23,
S[23], C24);
full_adder fu24 (A[24], B[24], C24, S[24], C25);full_adder fu25 (A[25], B[25], C25, S[25], C26);full_adder fu26 (A[26], B[26], C26,
S[26], C27);
full_adder fu27 (A[27], B[27], C27, S[27], C28);full_adder fu28 (A[28], B[28], C28, S[28], C29);full_adder fu29 (A[29], B[29], C29,
S[29], C30);
full_adder fu30 (A[30], B[30], C30, S[30], C31);full_adder fu31 (A[31], B[31], C31, S[31], C32);
endmodule
Number of Gates/Cells = 160
NAND = 32*4 = 128
NOT = 32*2 = 64
OAI33 = 32*12 = 384
XNOR = 32*6 = 192
XOR = 32*6 = 192
FPGA: -
1-bit adder can be implemented by 2 LUT with three input’s making 1LUT for sum and 1LUT
for carry implementation as shows.
Similarly this will be implemented for the 32-bit FA
AREA
LUT3 in terms of transistors by taking multiplexer in terms of Transmission Gates.
LUT3 = (48+ 34) = 82
For 32-bit we require 64 LUT3, therefore
Total number of Transistors = 64*82 = 5248
DELAY/Critical Path
Td = (N-1) t carry + t sum
t carry = 3
t sum = 3
Td = 31*3+3
Td = 96 Transistors (by taking only mux into consideration)
Let’s 4:1 mux has this type of pass transistor logic then analyzing same for 8:1 mux the number
of transistors will be
AREA
LUT3 in terms of transistors by taking multiplexer in terms of Pass Transistors.
LUT3 = (48+ 22) = 70
For 32-bit we require 64 LUT3, therefore
Total number of Transistors = 64*70 = 4480
DELAY
Td = (N-1) t carry + t sum
t carry = 3, t sum = 3
Td = 31*3+3
Td = 96 Transistors (by taking only mux into consideration)
Let’s 4:1 mux has this type of pass transistor logic then analyzing same for 8:1 mux the number
of transistors will be
AREA
LUT3 in terms of transistors by taking multiplexer in terms of Pass Transistors.
LUT3 = (48+ 20) = 68
For 32-bit we require 64 LUT3, therefore
assign S = A ^ B ^ CIN;
endmodule
wire C1; wire C2;wire C3;wire C4; wire C5;wire C6; wire C7;wire C8; wire C9; wire C10;wire C11;
wire C12;wire C13;wire C14;wire C15;wire C16;wire C17;wire C18;wire C19;wire C20;wire C21;
wire C22;wire C23;wire C24;wire C25;wire C26;wire C27;wire C28;wire C29;wire C30;wire C31;
full_adder fu0 (A[0], B[0], C0, S[0],C1); full_adder fu1 (A[1], B[1], C1, S[1],C2);
full_adder fu2 (A[2], B[2], C2, S[2],C3);full_adder fu3 (A[3], B[3], C3, S[3],C4);
full_adder fu4 (A[4], B[4], C4, S[4],C5);full_adder fu5 (A[5], B[5], C5, S[5],C6);
full_adder fu6 (A[6], B[6], C6, S[6],C7); full_adder fu7 (A[7], B[7], C7, S[7], C8);
full_adder fu8 (A[8], B[8], C8, S[8], C9);full_adder fu9 (A[9], B[9], C9, S[9], C10);
full_adder fu10 (A[10], B[10], C10, S[10], C11);full_adder fu11 (A[11], B[11], C11, S[11], C12);
full_adder fu12 (A[12], B[12], C12, S[12], C13);full_adder fu13 (A[13], B[13], C13, S[13], C14);
full_adder fu14 (A[14], B[14], C14, S[14], C15);full_adder fu15 (A[15], B[15], C15, S[15], C16);
full_adder fu16 (A[16], B[16], C16, S[16], C17);full_adder fu17 (A[17], B[17], C17, S[17], C18);
full_adder fu18 (A[18], B[18], C18, S[18], C19);full_adder fu19 (A[19], B[19], C19, S[19], C20);
full_adder fu20 (A[20], B[20], C20, S[20], C21);full_adder fu21 (A[21], B[21], C21, S[21], C22);
full_adder fu22 (A[22], B[22], C22, S[22], C23); full_adder fu23 (A[23], B[23], C23, S[23], C24);
full_adder fu24 (A[24], B[24], C24, S[24], C25);full_adder fu25 (A[25], B[25], C25, S[25], C26);
full_adder fu26 (A[26], B[26], C26, S[26], C27);full_adder fu27 (A[27], B[27], C27, S[27], C28);
full_adder fu28 (A[28], B[28], C28, S[28], C29);full_adder fu29 (A[29], B[29], C29, S[29], C30);
full_adder fu30 (A[30], B[30], C30, S[30], C31);full_adder fu31 (A[31], B[31], C31, S[31], C32);
endmodule
Schematic: -
1(a)
1(b)
Figure 1(a) shows the schematic for the 1-bit FA using basic gates and 1(b) is 32-bit
implementation using the same