Floating-Point Convertor

ModelSim test bench output

Using a hardware design made with System Verilog to convert a 32-bit float-value into a decimal representation of 5+ digits.

How to Use:

  1. First, open the top_level_tb.sv file, and find lines 8 and 21:
  2. You can change the amount of DISPLAY_WIDTH, and the binary floating point number for the module to convert like so:
  3. Then build the project in ModelSim, use top_level_tb as the design.
  4. Finally, run the simulation. It will create an output file containing the converted floating point value in the desired number of digits!

Download:

Get the source files on my GitHub repository at: github.com/TristonBabers/Floating-Point-Convertor.

Specifications:

ModelSim - Intel FPGA Starter Edition 10.5b (Quartus Prime 18.1)

I used this edition of ModelSim in all of my testing. You can find it for free at intel.com!

References:

Radix Conversion Algorithm:

(Textbook) Knuth, Donald E - Art of Computer Programming, Volume 2 Seminumerical Algorithms, Third Edition (p. 319 Method 2a)

Double Dabble Algorithm:

https://www.realdigital.org/doc/6dae6583570fd816d1d675b93578203d

General Description:

https://kyledewey.github.io/comp122-fall17/lecture/week_2/floating_point_interconversions.html