Comparing Response Data in Hardware

NI Digital Waveform Generator/Analyzer

Comparing Response Data in Hardware

Leveraging the onboard FPGA to compare the acquired response data to the expected data drastically increases the speed and reduces the necessary post-processing data analysis of stimulus-response applications. To develop a program to compare the response data in hardware, complete the following steps:

  1. The original test data is entered by a user or read from a file. The test data may contain both stimulus and response data.
  2. Stimulus data is extracted from the test data. 1’s and 0’s in the test data specify stimulus data; all other characters indicate that no data is generated, so the voltage drivers are disabled.
  3. Use the Hardware Compare Mode property or the NIHSDIO_ATTR_HWC_HARDWARE_COMPARE_MODE attribute to enable the hardware comparison block on the NI 655x during the configuration stage of both the generation and acquisition sessions. After you enable the hardware comparison, a digital waveform created with the six logic states dictate the NI 655x operations—acquisition, generation, and hardware comparison—which eliminates the need for any parsing and software analysis functions.
  4. The stimulus data is generated onto the channel by the digital tester, and the response data is acquired. The generation and acquisition operations occur in parallel, so reducing the round-trip delay can be important.
  5. Once the generation and acquisition are complete, the application program performs the comparison on a per bit basis in software. The final pass/fail decision is only effected by the response data that was acquired when an ‘H’ or ‘L’ was present in the original test data.
  6. For applications requiring more complex fault analysis, a fetch function can acquire the faulty data and any samples surrounding that error. For every sample that is in error, you can retrieve the following information:

Use the Sample Error Backlog property or the NIHSDIO_ATTR_HWC_SAMPLE_ERROR_BACKLOG attribute to query how many errors can be returned using the niHSDIO HWC Fetch Sample Errors (U32) VI or the niHSDIO_HWC_FetchSampleErrors function. Use the Number Of Sample Errors property or NIHSDIO_ATTR_HWC_NUM_SAMPLE_ERRORS attribute, along with the Samples Compared property or the NIHSDIO_ATTR_HWC_SAMPLES_COMPARED attribute, to calculate the sample error rate. By capturing this information, you can perform more detailed fault analysis.

The hardware performs all the data comparison on a per sample basis, which significantly reduces the time spent analyzing the data in software. Using this hardware comparison method, you can program the NI 655x for high-performance functional tests and other stimulus-response applications.

For a complete hardware compare example, refer to the "Hardware Compare - Fetch Error Records" example included with NI-HSDIO.