Install Quartus Lite and Modelsim s oftware on your laptop Refer to the pdf file on the Blackboard called Quartus 18.1 Lite Edition Installation Guide

Install Quartus Lite and Modelsim s oftware on your laptop Refer to the pdf file on the Blackboard called
Quartus 18.1 Lite Edition Installation Guide

  1. Define a Full-Adder using primitive gates
    in Verilog outputs are: s, c_out
    inputs are a, b, c
    (upload your design Homework1 in Blackboard)
  2. Compile it in Quartus Lite and make sure there are no syntax issues.
    4th problem:
    Implement a CMOS
    Compound Gate for Y = A exor B

The Correct Answer and Explanation is :

Here’s how you can complete each step of your assignment:


1. Install Quartus Lite and ModelSim

Follow the guide provided in Blackboard “Quartus 18.1 Lite Edition Installation Guide” and ensure that you:

  • Download Intel Quartus Prime Lite 18.1 from Intel’s official website.
  • Select the ModelSim-Intel FPGA Starter Edition during installation.
  • Set up the environment variables for ModelSim in Quartus.

2. Define a Full-Adder Using Primitive Gates in Verilog

A Full-Adder adds three input bits (a, b, c) and produces two outputs:

  • s (Sum)
  • c_out (Carry-out)

Here’s a Verilog implementation using primitive gates:

module full_adder (
    input a, b, c,
    output s, c_out
);

    wire w1, w2, w3;

    xor G1(w1, a, b);
    xor G2(s, w1, c);
    and G3(w2, w1, c);
    and G4(w3, a, b);
    or  G5(c_out, w2, w3);

endmodule

Steps to Submit on Blackboard

  • Save this as homework1.v
  • Upload it to Blackboard.

3. Compile in Quartus Lite

  • Open Quartus Lite.
  • Create a new project.
  • Add homework1.v to the project.
  • Run Analysis & Synthesis to check for errors.
  • Ensure there are no syntax issues before submission.

4. Implement a CMOS Compound Gate for Y = A XOR B

A CMOS XOR gate can be implemented using both PMOS pull-up and NMOS pull-down networks.

CMOS XOR Implementation:

  • PMOS Network: Conducts when output should be HIGH.
  • NMOS Network: Conducts when output should be LOW.

CMOS XOR Equation:
[
Y = A \oplus B = (A \cdot \overline{B}) + (\overline{A} \cdot B)
]

300-Word Explanation

The XOR gate is a fundamental logic gate used in arithmetic circuits, error detection, and cryptographic applications. The CMOS implementation of XOR is based on complementary networks: the PMOS pull-up and NMOS pull-down transistors.

In a CMOS XOR circuit, we use transistors to create the Boolean function:

  1. PMOS Network (Pull-up)
  • When A = 0 and B = 1, output Y = 1 (Path from Vdd to output is enabled).
  • When A = 1 and B = 0, output Y = 1 (Another path to Vdd is enabled).
  • When both inputs are the same (00 or 11), output Y = 0 (No connection to Vdd).
  1. NMOS Network (Pull-down)
  • When A = 0, B = 0, the NMOS network connects output to GND, making Y = 0.
  • When A = 1, B = 1, it also connects to GND, making Y = 0.
  • When A = 1, B = 0 or A = 0, B = 1, the path to GND is blocked, keeping Y = 1.

This balanced CMOS structure ensures minimal power dissipation and high-speed switching, making it ideal for low-power digital designs.

I’ll now generate a CMOS XOR circuit diagram for you.

Here is the CMOS XOR gate diagram. Let me know if you need any modifications or explanations!

Scroll to Top