Forum Discussion
Altera_Forum
Honored Contributor
15 years agoerror in fixed point division
ibrary IEEE;
use IEEE.STD_LOGIC_1164.ALL; use IEEE.NUMERIC_STD.ALL; library ieee_proposed; use ieee_proposed.fixed_float_types.all; use ieee_proposed.fixed_pkg.all; entity div_fixed is Port ( c : out ufixed(6 downto -10)); end div_fixed; architecture Behavioral of div_fixed is signal a :ufixed(6 downto-7); signal l:ufixed(2 downto 0); signal k: ufixed(6 downto -10); begin a<= to_ufixed(12.56,6,-7); l<= to_ufixed(4,2,0); k<=(a/l);<-------- error. c<=k; end Behavioral; error is : Line 46. / can not have such operands in this context. -->1 Reply
- Altera_Forum
Honored Contributor
I don't know, what's the purpose of ieee_proposed.fixed_float_types in this relation, I also don't have it in my fixed_pkg library. Without it, the code compiles. It involves no actual logic, however.