Altera_Forum
Honored Contributor
11 years agoHow to implement a code that uses floating-point?
Hello, How should I do to implement in VHDL, a code that calculates the following equation: u(k) = 622,5u(k-1) + 0,6279u(k-2) + 651,2e(k) + 0,000814e(k-1) - 651,2e(k-2). I am a beginner in VHDL and do not know how to work with floating point. I think it not possible to represent the coefficients ranging from 651.2 to 0.000814 with fixed point. After implementing the code, I want to synthesize the circuit. I am using the Quartus II 64-bit Version 10.1 (Build 153 11/29/2010 ). Below, the main questions:
1. What libraries should I use? How do I compile the libraries? 2. How should I declare in the code variable u(k) to get a real number as a result of the equation? Ps. I don't want to use the Nios, and the code should be synthesizable. Thanks for the space...