Hi all
i want to implement the following mathematical equation in verilog:
slopeup=(y2-y1)/(x2-x1)
slopeup after calculations will be like 0.01456... or -0.013478......... etc.
Plz can anybody tell me how to accomodate numbers like this in verilog???? Plz reply soon. Waiting
You can use any fractional number format of your choice, but you should define the application requirements first. Consider, that the division result can be +/- inf as well. Generally, fast (parallel) division is a resource consuming task in FPGA, a serial divider may be a solution.