SIMPLIS Parts

Digital Comparator

The Digital Comparator compares two digital buses and outputs the comparison results on the five output pins. The device outputs the five combinatorial possibilities, allowing the user to easily see the results of the comparison. The bus inputs can have between 2 and 32 bits, and can be formatted as unsigned, offset binary, or two's complement.

For a comparator with analog inputs and digital outputs, see the Comparator with Analog Inputs and Digital Outputs topic.

In this Topic Hide

Model Name:

Digital Comparator

Simulator:

This device is compatible with the SIMPLIS simulator.

Parts Selector
Menu Location:

Digital Functions | Functions

Symbol Library:

None - the symbol is automatically generated when placed or edited.

Model File:

None - the device model is generated before simulation.

Subcircuit Name:

SIMPLIS_DIGI1_D_COMPARATOR

Symbols:

Multiple Selections:

Only one device at a time can be edited.

Editing the Digital Comparator

To configure the digital comparator, follow these steps:

  1. Double click the symbol on the schematic to open the editing dialog to the Parameters tab.
  2. Make the appropriate changes to the fields described in the table below the image.
Label Parameter Description

Output Delay

Delay from when the input state changes until the output changes

Number of Bits

Number of input bits to the comparator, the number of output bits will be 2 * Number of Bits

Ground Ref

Determines whether or not a device has a ground reference pin.

Any digital component that has an input or output pin connected to an analog circuit node must have its Ground Ref pin connected to an analog node. This is usually ground on the schematic. For more information on the use of Ground Ref for digital components, see When is Ground Ref Required?

Code

Encoding scheme for binary inputs / outputs for the comparator

Initial Condition

Initial condition of the comparator output at time=0. Value is the output bus represented in decimal format.

To define the parameters for the interface between this digital component and each analog component connected directly to an input or output pin, follow these steps from the Edit AND/NAND Gate dialog box:

  1. Click on the   Interface   tab.
  2. Make the appropriate changes to the fields described in the table below the image.
Label Parameter Description

Input Resistance

Input resistance of each input pin

Threshold

Hysteresis

The Threshold (T) and Hysteresis (H) of the Schmitt trigger input buffer on each Digital Comparator input. To determine the low-to-high threshold (TH) and the high-to-low threshold (TL), substitute Threshold (T) and Hysteresis (H) in each of the following formulas :
Input Logic Transition Actual Threshold
0 ➞ 1 TH = Threshold + 0.5 * Hysteresis
1 ➞ 0 TL = Threshold - 0.5 * Hysteresis
 

Output Resistance

Output resistance of each output pin

Output High Voltage

Output high voltage for the comparator output pins

Output Low Voltage

Output low voltage for the comparator output pins

Examples

An example using the digital comparator is a up/down counter with programmable limits. This example is described in the Other Counters Topic.

Subcircuit Parameters

Because the digital lookup table model is generated by a template script when the simulation is executed, there is no fixed model which can be inserted into a netlist. The template script for this device is simplis_make_adder_model.sxscr, which you, as a licensed user, can download in a zip archive of all built-in scripts.

To download this zip file, follow these steps:

Note: You will be prompted to log in with the user name and password given to you when you registered.

  1. Click here to go to the product-installation page on the SIMetrix website.
  2. Click Download Links in the first paragraph of the product-installation web page.
  3. Scroll down to the Built-in Scripts section.
  4. Right click on Download and select Save target as..., and then navigate to a location on your computer to save the zip file.

© 2015 simplistechnologies.com | All Rights Reserved