Fall 2018
Test 2
Y = A.B + ~C
A B C X Y
0 0 0 1 1
0 0 1 0 0
0 1 0 1 1
0 1 1 0 0
1 0 0 1 1
1 0 1 0 0
1 1 0 1 1
1 1 1 1 0
The test bench was designed and then elaborated using NCLaunch and then simulated using
Cadence SimVision to obtain the following simulation result.
A B C D X Y
0 0 0 0 0 0
0 0 0 1 0 0
0 0 1 0 1 1
0 0 1 1 1 1
0 1 0 0 0 1
0 1 0 1 0 0
0 1 1 0 1 0
0 1 1 1 1 0
1 0 0 0 1 0
1 0 0 1 1 0
1 0 1 0 1 1
1 0 1 1 1 1
1 1 0 0 1 1
1 1 0 1 1 0
1 1 1 0 1 0
1 1 1 1 1 0
The test bench was designed and then elaborated using NCLaunch and then simulated using
Cadence SimVision to obtain the following simulation result.
The test bench was designed and then elaborated using NCLaunch and then simulated using
Cadence SimVision to obtain the following simulation result.
The test bench was designed and then elaborated using NCLaunch and then simulated using
Cadence SimVision to obtain the following simulation result.
This example was to showcase the functionality of a 2-to-4 decoder coded in the gate level
description.
The test bench was designed and then elaborated using NCLaunch and then simulated using
Cadence SimVision to obtain the following simulation result.
This example was to showcase the functionality of the dataflow description of a 4-bit
comparator.
The test bench was designed and then elaborated using NCLaunch and then simulated using
Cadence SimVision to obtain the following simulation result.
This example was to showcase the functionality of the dataflow description of a 2-to1line
multiplexer.
The test bench was designed and then elaborated using NCLaunch and then simulated using
Cadence SimVision to obtain the following simulation result.
This example was to showcase the functionality of the behavioral description of a 2-to1line
multiplexer.
The test bench was designed and then elaborated using NCLaunch and then simulated using
Cadence SimVision to obtain the following simulation result.
This example was to showcase the functionality of the behavioral description of a 4-to1line
multiplexer.
The test bench was designed and then elaborated using NCLaunch and then simulated using
Cadence SimVision to obtain the following simulation result.
This example was to showcase the functionality of the dataflow description of a 2-to1line
multiplexer.
The test bench was designed and then elaborated using NCLaunch and then simulated using
Cadence SimVision to obtain the following simulation result.
This example was to showcase the functionality of the gatelevel description of the following
circuit.
The test bench was designed and then elaborated using NCLaunch and then simulated using
Cadence SimVision to obtain the following simulation result.
As can be seen, the simulations prove the proper functioning of the circuit.
1.12 Example 5_1
The test bench was designed and then elaborated using NCLaunch and then simulated using
Cadence SimVision to obtain the following simulation result.
As can be seen, the simulations prove the proper functioning of the circuit.
1.13 Example 5_2
The test bench was designed and then elaborated using NCLaunch and then simulated using
Cadence SimVision to obtain the following simulation result.
As can be seen, the simulations prove the proper functioning of the circuit.
1.14 Example 5_3
This example was to showcase the functionality of the D-Flip flop from gates.
The test bench was designed and then elaborated using NCLaunch and then simulated using
Cadence SimVision to obtain the following simulation result.
As can be seen, the simulations prove the proper functioning of the circuit.
1.15 Example 5_4
The test bench was designed and then elaborated using NCLaunch and then simulated using
Cadence SimVision to obtain the following simulation result.
As can be seen, the simulations prove the proper functioning of the circuit.
1.16 Example 5_5
This example was to showcase the functionality of the Mealy State Diagram.
The test bench was designed and then elaborated using NCLaunch and then simulated using
Cadence SimVision to obtain the following simulation result.
As can be seen, the simulations prove the proper functioning of the circuit.
1.17 Example 5_6
This example was to showcase the functionality of the Moore State Diagram.
The test bench was designed and then elaborated using NCLaunch and then simulated using
Cadence SimVision to obtain the following simulation result.
As can be seen, the simulations prove the proper functioning of the circuit.
1.18 Example 5_7
This example was to showcase the functionality of the structural description of a sequential
circuit.
The test bench was designed and then elaborated using NCLaunch and then simulated using
Cadence SimVision to obtain the following simulation result.
As can be seen, the simulations prove the proper functioning of the circuit.
1.19 Example 6_1 and 6_2
This example was to showcase the functionality of the behavioral description of the shift
register.
The test bench was designed and then elaborated using NCLaunch and then simulated using
Cadence SimVision to obtain the following simulation result.
As can be seen, the simulations prove the proper functioning of the circuit.
1.20 Example 6_3
This example was to showcase the functionality of the binary counter with parallel load.
The test bench was designed and then elaborated using NCLaunch and then simulated using
Cadence SimVision to obtain the following simulation result.
As can be seen, the simulations prove the proper functioning of the circuit.
1.21 Example 6_4
The test bench was designed and then elaborated using NCLaunch and then simulated using
Cadence SimVision to obtain the following simulation result.
As can be seen, the simulations prove the proper functioning of the circuit.
2 Question 2
The objective of this question was to show the simulation of 1bit full adder by means of three
different Verilog programs. And to do a comparison of the three methods and how they are
different in terms of
1) Gates used
2) Power consumption
3) Delay
The truth table and symbol for the Full Adder are also show below.
2.1 Full Adder using two half adders
module halfadder(S,C,x,y);
input x,y;
output S,C;
xor (S,x,y);
and (C,x,y);
endmodule
module fulladd1bit_tb;
reg x,y,z;
wire S,C;
fulladd1bit fa(S,C,x,y,z);
initial
begin
x = 0; y = 0; z=0;
#100 x = 0; y = 0; z=1;
#100 x = 0; y = 1; z=0;
#100 x = 0; y = 1; z=1;
#100 x = 1; y = 0; z=0;
#100 x = 1; y = 0; z=1;
#100 x = 1; y = 1; z=0;
#100 x = 1; y = 1; z=1;
end
endmodule
Verilog code:
module fa_nand(a,b,cin,sum,carry);
input a,b,cin;
output carry, sum;
wire w1,w2,w3,w4,w5,w6,w7;
nand n1(w1,a,b);
nand n2(w3,a,w1);
nand n3(w2,w1,b);
nand n4(w4,w3,w2);
nand n5(w5,w4,cin);
nand n6(w6,w4,w5);
nand n7(w7,w5,cin);
nand n8(carry,w5,w1);
nand n9(sum,w6,w7);
endmodule
module fulladd_tb;
reg x,y,z;
wire S,C;
full_adder fa(x,y,z,S,C);
initial
begin
x = 0; y = 0; z=0;
#100 x = 0; y = 0; z=1;
#100 x = 0; y = 1; z=0;
#100 x = 0; y = 1; z=1;
#100 x = 1; y = 0; z=0;
#100 x = 1; y = 0; z=1;
#100 x = 1; y = 1; z=0;
#100 x = 1; y = 1; z=1;
end
endmodule
Verilog code:
module fa_nand(a,b,cin,sum,carry);
input a,b,cin;
output carry, sum;
wire w1,w2,w3,w4,w5,w6,w7;
nand n1(w1,a,b);
nand n2(w3,a,w1);
nand n3(w2,w1,b);
nand n4(w4,w3,w2);
nand n5(w5,w4,cin);
nand n6(w6,w4,w5);
nand n7(w7,w5,cin);
nand n8(carry,w5,w1);
nand n9(sum,w6,w7);
endmodule
module fulladd1bit_tb;
reg x,y,z;
wire S,C;
fa_nand fa(x,y,z,S,C);
initial
begin
x = 0; y = 0; z=0;
#100 x = 0; y = 0; z=1;
#100 x = 0; y = 1; z=0;
#100 x = 0; y = 1; z=1;
#100 x = 1; y = 0; z=0;
#100 x = 1; y = 0; z=1;
#100 x = 1; y = 1; z=0;
#100 x = 1; y = 1; z=1;
end
endmodule
The number of gates used, the amount of total power consumed and the delay for signal
propagation through each of the three methods explained above is summarized in the table
below.
As we can see from the table above, the lower power consumption is by the method that utilizes
the least number of gates. This is makes sense because the lower the number of gates used, the
lower is the power consumption for the entire circuit.
This fact, however, does not translate into lesser delay. As we see, the propagation delay is the
least for the third method, which shows that a circuit can be relatively complex in construction
and still have a lower propagation delay as compared to a seemingly simpler circuit.
3 Question 3
The objective of this question was to design the circuit A+B'C and A'B+C from verilog to
chip.
3.1 A+B’C
The circuit is compiled using RC compiler and then encounter is run to arrive to the layout of
the circuit compiled in the logic.
We then launch virtuoso and create a library in which to import the Verilog file and .DEF file
that we have created.
Once we open the layout, we then use Layout XL to autoroute the circuit according to the
schematic we have drawn using encounter.
This is shown below. Once this is done, DRC is performed followed by extraction and a
comparison with the schematic using LVS.
The pad frame for the chip to be fabricated is then prepared, by copying a template pad frame
and then modifying it to add input and output pins. This is shown below. Once, this is done,
once again, DRC, extraction and LVS is done to ensure that the drawn circuitry is accurate.
Finally, the circuit for the chip to be designed is drawn in the schematic editor with all of the
internal and external inputs and outputs connected and then the layout of the padframe is edited
to add the power rails. This design is then check through DRC, extraction and LVS.
For the final step, xstream is run to export a .GDS file that can be sent over to MOSIS to be
fabricated into a chip.
3.2 A’B+C
The circuit is compiled using RC compiler and then encounter is run to arrive to the layout of
the circuit compiled in the logic.
The circuit is compiled using RC compiler and then encounter is run to arrive to the layout of
the circuit compiled in the logic.
We then launch virtuoso and create a library in which to import the Verilog file and .DEF file
that we have created.
Once we open the layout, we then use Layout XL to autoroute the circuit according to the
schematic we have drawn using encounter.
This is shown below. Once this is done, DRC is performed followed by extraction and a
comparison with the schematic using LVS.
The pad frame for the chip to be fabricated is then prepared, by copying a template pad frame
and then modifying it to add input and output pins. This is shown below. Once, this is done,
once again, DRC, extraction and LVS is done to ensure that the drawn circuitry is accurate.
Finally, the circuit for the chip to be designed is drawn in the schematic editor with all of the
internal and external inputs and outputs connected and then the layout of the padframe is edited
to add the power rails. This design is then check through DRC, extraction and LVS.
For the final step, xstream is run to export a .GDS file that can be sent over to MOSIS to be
fabricated into a chip.
4 Conclusion
As seen from the experimental simulations in the preceding sections, the schematic and symbol
design were successfully carried out in Cadence Virtuoso. The Verilog code was compiled
using RC compiler, and then encounter was used to convert the compiled code into layout that
can be edited in virtuoso. Where the necessary changes were made to the layout to match our
expression from the question. This was then used to export a GDS file that can be sent to
MOSIS for chip fabrication.