Altera_Forum
Honored Contributor
14 years agoA question about floating pointing timing
I am tring to find time cost for floating point number calculations.
I have followed the tutorial "Using Nios II Floating-Point Custom Instructions" and tested results on the DE2 board, but the result is different to the tutorial. The tutorial shows a 14 clock cycle for each Custom Instruction. The tutorial said the result is varied by the hardware setting. Does any one know: is there anywhere to find the time cost for floating point custom instruction for de2?
Thank you. the result i got is about 47 clock cycle...:blink: --- Quote Start --- --Performance Counter Report-- Total Time: 0.0869525 seconds (8695248 clock-cycles) +---------------+-----+-----------+---------------+-----------+ | Section | % | Time (sec)| Time (clocks)|Occurrences| +---------------+-----+-----------+---------------+-----------+ |FP CI ADD |0.541| 0.00047| 47000| 1000| +---------------+-----+-----------+---------------+-----------+ |FP SW ADD | 54| 0.04697| 4696646| 1000| +---------------+-----+-----------+---------------+-----------+ --Performance Counter Report-- Total Time: 0.0939769 seconds (9397685 clock-cycles) +---------------+-----+-----------+---------------+-----------+ | Section | % | Time (sec)| Time (clocks)|Occurrences| +---------------+-----+-----------+---------------+-----------+ |FP CI SUBTRACT | 0.5| 0.00047| 47000| 1000| +---------------+-----+-----------+---------------+-----------+ |FP SW SUBTRACT | 48.5| 0.04560| 4559580| 1000| +---------------+-----+-----------+---------------+-----------+ --Performance Counter Report-- Total Time: 0.252263 seconds (25226350 clock-cycles) +---------------+-----+-----------+---------------+-----------+ | Section | % | Time (sec)| Time (clocks)|Occurrences| +---------------+-----+-----------+---------------+-----------+ |FP CI MULTIPLY |0.194| 0.00049| 49000| 1000| +---------------+-----+-----------+---------------+-----------+ |FP SW MULTIPLY | 79.9| 0.20154| 20153700| 1000| +---------------+-----+-----------+---------------+-----------+ --Performance Counter Report-- Total Time: 0.109719 seconds (10971917 clock-cycles) +---------------+-----+-----------+---------------+-----------+ | Section | % | Time (sec)| Time (clocks)|Occurrences| +---------------+-----+-----------+---------------+-----------+ |FP CI DIVIDE |0.656| 0.00072| 72000| 1000| +---------------+-----+-----------+---------------+-----------+ |FP SW DIVIDE | 49.7| 0.05450| 5449516| 1000| +---------------+-----+-----------+---------------+-----------+ --- Quote End --- The hardware setting is attached at bottom.