EMA Academy

Quick How-Tos

Home > EMA Academy > How-Tos > How to Create a Clocked D Flip-Flop SPICE Model

How to Create a Clocked D Flip-Flop SPICE Model

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 a custom D flip-flop 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 a create a clocked D flip-flop SPICE model in OrCAD PSpice.

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

How-To Video

Open in New Window

Creating a D Flip-Flop 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 > Flip Flops.

Step 4: Select Clocked D – Set/Reset.

Note: This model contains PRESET and CLEAR pins, which can be used to set the output of the flip-flop without the clock.

Using the Modeling Application in PSpice to create a D Flip-Flop SPICE Model
Configuring D Flip-Flop SPICE Model Parameters

Step 5: The Clocked D Flip-Flop options window opens. Enter the following model parameters:

  • Clock to Output Delay: 150n
  • Set/Reset Delay: 175n
  • Setup Time: 20n
  • Hold Time: 2n
  • Threshold: 2.5
  • Hysteresis Width: 2
  • Output Resistance: 1m
  • Input Resistance: 10G

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 flip-flop in the schematic.

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

Placing Probes in PSpice

Step 9: Click to place probes on the CLK, DATA, and DATA_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 follows the D input.

Modifying the D Flip-Flop SPICE Model

Note: A D flip-flop can be used as a push-on-push-off circuit, which we will create in the following steps.

Step 12: Select stimulus DSTM1 and press Delete on the keyboard.

Step 13: Select Place > Wire from the menu, the Wire button from the toolbar, or press W on the keyboard.

Step 14: Click to connect the DATA net to the Qbar output.

Step 15: Press Escape on the keyboard.

Step 16: Select PSpice > Run from the menu.

Step 17: View the results. The output now oscillates at half the clock frequency and is inverted at the DATA input.

Wrap Up & Next Steps

Quickly create the required D Flip-Flop 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

Table of Contents

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