/ operand can not have such operands in this context

OP (Company: Student) #2771535
I am using the following libraries
1
library IEEE;
2
use IEEE.STD_LOGIC_1164.all;
3
use ieee.numeric_std.all;
4
library ieee_proposed;
5
use ieee_proposed.fixed_float_types.all;
6
use ieee_proposed.fixed_pkg.all;
I get this error"/ cannot have such operands in this context" at line 
where variable c is assigned in the following code when i checked the 
syntax
I have got this error at all places where the / operator is used in 
fixed point operations.
1
type comp is 
2
  record
3
    Rel :sfixed(7 downto -6);
4
    Img :sfixed(7 downto -6);
5
  end record;
6

7
function complexdiv(seven :comp; h :sfixed(7 downto -6)) return comp is
8
variable result5 :comp;
9
variable a,b,c,d :sfixed(14 downto -13) ;
10
begin
11
  c :=seven.Rel / h;
12
   
13
  --result5.Rel := resize(d,result5.Rel) ;
14
  --result5.Img := resize(seven.Img/h,result5.Img) ;
15
return result5;
16
end complexdiv;

What might be the problem??

Reply

A question of your own? This thread is over 14 years old. Ask it in a thread of its own – more people read along there, and it gets answered more often and sooner.

Start a new thread

A fix, an addition or feedback on this thread? Then reply here.

Formatting
  • [c]C-Code[/c]
  • [vhdl]VHDL-Code[/vhdl]
  • [code]code in other languages, ASCII drawings[/code]
  • [math]formula (LaTeX syntax)[/math]
  • [[Title]] – link to an article
  • Link to another post: right-click its post ID (#8078628), copy the address, paste it into the text

More about formatting

Post long source code as an attachment, not in the text.

Already registered? Log in

Not shown to anyone. We send you a link; your post appears once you confirm it there.

By submitting you create a free account and accept the terms of use.