Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Test vectors for floating point unit

I have designed a 32-bit single precision floating point multiplier and also a separate add/subtract unit in Verilog.

I have a script in MATLAB that I wrote that generates a bunch of random floating point numbers and generates a test bench in Verilog.

I compared the results from the ncverilog simulation to those from MATLAB and verified that my multiplier works correctly and that my add/subtracter works correctly as well.

However, I want to know a list of test cases that stress test my floating point unit. Is there such a list? I know of some programs like Softfloat, but that tests a floating point of a computer, rather than being able to merge that with a verilog test bench.

I should also mention my unit doesn't support exceptions like overflow, underflow, and doesn't support denormalized values. The rounding mode is round to nearest.

Thank you!

like image 520
Veridian Avatar asked Feb 22 '13 17:02

Veridian


1 Answers

Tim's answer was the best, the fpgen suite:
https://www.research.ibm.com/cgi-bin/haifa/test_suite_download.pl?first=elenag&second=webmaster

like image 122
Veridian Avatar answered Sep 30 '22 05:09

Veridian