EMA Academy

Quick How-Tos

Home > EMA Academy > How-Tos > How to Create XOR and XNOR Gate SPICE Models

How to Create XOR and XNOR Gate SPICE Models

Modern electronics could not exist without semiconductors and digital electronics but as electronics become faster and more complex, it’s essential to model realistic behavior to ensure design accuracy. At high speeds, digital electronics are susceptible to issues with propagation delay, and any stray capacitance present on the board could lead to attenuation, which could prevent a high input from ever reaching the device’s threshold voltage. PSpice allows you to quickly create custom XOR gate SPICE models and XNOR gate SPICE models for accurate simulation of digital designs with a wizard-based approach.

This quick how-to will provide step-by-step instructions on how to create accurate XOR gate SPICE models and XNOR gate SPICE models with the Modeling Application in OrCAD PSpice.

To follow along, download the materials provided above the table of contents.

How-To Video

Open in New Window

Creating an XOR Gate SPICE Model

Step 1: Open the provided design in OrCAD PSpice 23.1.

Note: A wizard-based approach to digital models is new in version 23.1. See other new features here.

Activating the Modeling Application in PSpice

Step 2: Select Place > PSpice Part > Modeling Application from the menu.

Step 3: In the Modeling Application, expand Digital > Gates.

Step 4: Select XOR/XNOR.

Using the modeling application in PSpice to create XOR Spice Models
Configuring XOR SPICE Model Parameters

Step 5: The XOR/XNOR Gate options window opens. Enter the following model parameters:

  • Propagation Delay: 8.8n
  • Threshold: 1.4
  • Hysteresis Width: 1.2
  • Output Resistance: 1m
  • Input Resistance: 10G
  • Max High Voltage: 5

Note: The logic device being modeled has negligible output resistance and requires negligible input current.

Step 6: Click Place.

Step 7: Click to place the gate assembly in the schematic.

Note: This symbol has a non-inverting and inverting output to simulate an XOR and XNOR circuit block.

Step 8: Select the Voltage/Level Marker button from the toolbar.

Placing Probes in PSpice

Step 9: Click to place probes on the XOR_IN1, XOR_IN2, and XOR_OUT nets. Right-click and select End Mode when finished.

Running the Simulation

Step 10: Select PSpice > Run from the menu.

Step 11: View the simulation results. The output is high when either of the inputs, but not both, are high.

Note: The digital inputs are plotted as two-state signals. Adding any components to either net would plot its voltage as an analog signal with the output.

Viewing the XNOR Simulation

Step 12: Back in the schematic, select the probe on the XOR_OUT net and press Delete on the keyboard.

Step 13: Select the Voltage/Level Marker button from the toolbar.

Creating and simulation XNOR gate SPICE models in PSpice

Step 14: Click to place a probe on the /XOR_OUT net. Right-click and select End Mode.

Note: This is the XNOR output.

Step 15: Select PSpice > Run from the menu.

Step 16: View the simulation results. The output is now high when both inputs are high or low.

Wrap Up & Next Steps

Quickly create the required XOR and XNOR SPICE models and simulate accurate digital circuit behavior with the PSpice Modeling Application in OrCAD PSpice. Upgrade to the latest 23.1 release or test out this feature and more with a free trial of OrCAD.

Follow Along, Download the Pre-Packaged Design Files

Current Offers

Get access to the latest and greatest CAD tools today.

Table of Contents

How To was created with:
Share:
LinkedIn
Email
EMA Design Automation