Here are the results from the past two days, implementing FPGA fixed-point decimal calculation in Verilog. There will be N parts, including addition, multiplication, division, square root, square, etc. Currently, addition and multiplication have been debugged, while division, square root, and square are not yet completed. Due to time constraints, this blog post will directly present the program, RTL structure diagram, and functional simulation waveform diagram. The explanation of the algorithm principles will be supplemented later when there is time.
FPGA Fixed-Point Decimal Calculation (Verilog) Part One – Addition Operation
First is qadd.v


Testbench file:


RTL view obtained after synthesis with Synplify Pro:

ActiveHDL script file:

ActiveHDL functional simulation waveform diagram:

Note: Some of you may have already noticed, haha. The source code comes from Opencores, but I have fixed the bugs present in it…

