Altera Nios II Custom User Manual
Page 29

Chapter 3: Implementing a Nios II Custom Instruction in SOPC Builder
3–7
Accessing the Custom Instruction from Software
January 2011
Altera Corporation
Nios II Custom Instruction User Guide
Example 3–1. Output of the CRC Design Example Software Run on a NEEK Using the Quartus II Software v10.1
******************************************************************************
Comparison between software and custom instruction CRC32
******************************************************************************
System specification
--------------------
System clock speed = 62.5 MHz
Number of buffer locations = 16
Size of each buffer = 65535 bytes
Initializing all of the buffers with pseudo-random data
-------------------------------------------------------
Initialization completed
Running the software CRC
------------------------
Completed
Running the optimized software CRC
----------------------------------
Completed
Running the custom instruction CRC
----------------------------------
Completed
Validating the CRC results from all implementations
---------------------------------------------------
All CRC implementations produced the same results
Processing time for each implementation
---------------------------------------
Software CRC = 9938.35 ms
Optimized software CRC = 6472.89 ms
Custom instruction CRC = 132.29 ms
Processing throughput for each implementation
---------------------------------------------
Software CRC = 0.84 Mbps
Optimized software CRC = 1.30 Mbps
Custom instruction CRC = 63.41 Mbps
Speedup ratio
-------------
Custom instruction CRC vs software CRC = 75.1
Custom instruction CRC vs optimized software CRC = 48.9
Optimized software CRC vs software CRC = 1.5