Forum Discussion
Altera_Forum
Honored Contributor
11 years agoDecimal point arithmetic
Hi, I am trying to do some math involving degrees for my program. I have two values A and B, both 8 bit Std_logic_vector. I need to calculate the angle given by arctan(B/A). Since this is a very expe...
Altera_Forum
Honored Contributor
11 years ago --- Quote Start --- Its quite straight forward if you use the fixed point package from www.vhdl.org/fphdl as simple as: b <= a* to_sfixed(2.41421, 3, -4); -- 4 bits integer 4 bits fractional --- Quote End --- Hi, How can i add this capability to my quartus project? If i added the file to my project, i get an error saying it cant find fixed_pkg cannot be found in library IEEE.