Forum Discussion
Altera_Forum
Honored Contributor
15 years agoFixed point in Verilog
Hi everyone! I'm learning about fixed point in verilog. I do not understand how to declare it. For example, the sign, the exponent and mantissa how to declare. Can u give me a specific example ? Plea...
Altera_Forum
Honored Contributor
15 years agoI'm mostly using VHDL and have only limited knowledge of Verilog. I can't tell you, how to perform similar constant calculations effectively. 3.125 is a real constant, you have to multiply it with a scaling factor according to your fixed point format, round the result to integer and assign the number to the bit vector representing the fixed point number. In VHDL, you can also utilize the IEEE fixed point package with conversion functions.