S
Salman Sheikh
Guest
What is wrong with this?
procedure gen_s (
variable si, di : in std_logic_vector(z_width downto 0);
variable so : out std_logic_vector(z_width downto 0)) is
begin
if si(z_width) = '1' then
so := (si(z_width-1 downto 0) & '0') + di;
else
so := (si(z_width-1 downto 0) & '0' - di);
end if;
end gen_s;
I get errors about the + and - being infix operators in Modelsim, below.
# ** Error: C:/dividers/div_uu.vhd(72): No feasible entries for infix op: "+"
# ** Error: C:/dividers/div_uu.vhd(72): Bad right hand side in assignment.
# ** Error: C:/dividers/div_uu.vhd(74): No feasible entries for infix op: "-"
# ** Error: C:/dividers/div_uu.vhd(74): Bad right hand side in assignment.
Thanks.
Salman
procedure gen_s (
variable si, di : in std_logic_vector(z_width downto 0);
variable so : out std_logic_vector(z_width downto 0)) is
begin
if si(z_width) = '1' then
so := (si(z_width-1 downto 0) & '0') + di;
else
so := (si(z_width-1 downto 0) & '0' - di);
end if;
end gen_s;
I get errors about the + and - being infix operators in Modelsim, below.
# ** Error: C:/dividers/div_uu.vhd(72): No feasible entries for infix op: "+"
# ** Error: C:/dividers/div_uu.vhd(72): Bad right hand side in assignment.
# ** Error: C:/dividers/div_uu.vhd(74): No feasible entries for infix op: "-"
# ** Error: C:/dividers/div_uu.vhd(74): Bad right hand side in assignment.
Thanks.
Salman