customInstructionDemo

This demo (customInstructionDemo directory) shows how to use a custom instruction to accelerate the processing time of an algorithm. It demonstrates how performing an algorithm in hardware can provide significant acceleration vs, using software only. This demo uses the Tiny encryption algorithm to encrypt two 32-bit unsigned integers with a 128-bit key. The encryption is 1,024 cycles.

The demo first processes the algorithm with a custom instruction, and then processes the same algorithm in software. Timestamps indicate how many clock cycles are needed to output results. If both methods output the same results, Passed! prints on a terminal. Otherwise, it prints Failed.

custom instruction demo !
please enable custom instruction plugin to run this demo

custom instruction processing clock cycles:1093
software processing clock cycles:36126

Passed!