Digital instruments such as the NI 6551/2, NI 6555/6 and the NI 6547/8 can perform real-time hardware comparisons using onboard FPGAs.
Figure 1: Channel Circuity on the 6551. This diagram shows how the NI 6551 implements Hardware Compare.
To perform a comparison in hardware between the expected data and the actual response data, the generation and acquisition sessions have to be linked together as shown in Figure 1. With this feature, you can perform real time bit-error identification of response data. You can compare the value of the expected data with the actual data. Most applications require the flexibility of being able to perform a comparison on any of the channels of the digital instrument. The NI stimulus/response instruments provide input/output/tri-state/open-drain control on a per channel basis, allowing you to control the direction or state of every channel independent of the other. Buses such as I2C also require these channels to be able to change state on a per cycle / per sample basis, which is also supported by the NI stimulus/response instruments.
The NI 6547/8 devices can perform per pin, per cycle tristate similarly to the NI 655x devices but first must set the Supported Data States property to O, 1, Z (tristate) or the NIHSDIO_ATTR_SUPPORTED_DATA_STATES attribute to NIHSDIO_VAL_STATES_0_1_Z before writing or allocating any waveforms. This value puts the device in extended data mode, which supports the high-impedance (Z) state. Extended data mode reduces the number of channels available for dynamic generation with tristate to 24 with the NI 6547/8. The top eight channels are still available though for acquisition or static generation.
You can use LabVIEW SignalExpress to perform a graphical hardware comparison where if the expected data is not returned, it is highlighted in red.
Figure 2 - The Digital Waveform Editor can be used to implement hardware compare. All the logic states mentioned above can also be implemented in the Digital Waveform Editor.