Intel® Quartus® Prime Software
Intel® Quartus® Prime Design Software, Design Entry, Synthesis, Simulation, Verification, Timing Analysis, System Design (Platform Designer, formerly Qsys)
Intel Support hours are Monday-Fridays, 8am-5pm PST, except Holidays. Thanks to our community members who provide support during our down time or before we get to your questions. We appreciate you!

Need Forum Guidance? Click here
Search our FPGA Knowledge Articles here.
15547 Discussions

failed to evaluate call to operator ""&""


Hallo everyone,


i need to shift a signal " mantissa_D" with a value, this value "D_shift" is the different between exponent of two floating point number (Q, D). Unfortunately, i got an error "failed to evaluate call to operator ""&"" "

, because "D_shift" is declared as a variable (it is not possible to declare it as constant). here is what i did:


variable mantissa_Q: unsigned (23 downto 0);

variable mantissa_D: unsigned (23 downto 0);

variable zeros : unsigned (23 downto 0);

variable D_shift: integer;

variable Q_shift: integer;


D_shift:= (exp_Q - exp_D);

mantissa_D := unsigned (zeros (23 downto 23 - D_shift+1)) & mantissa_D(23 downto D_shift);


can someone help me to solve this issue?

Thanks in advance.


0 Kudos
1 Reply
Honored Contributor III

I think you're missing an outer set of parentheses.


mantissa_D := unsigned ((zeros (23 downto 23 - D_shift+1)) & mantissa_D(23 downto D_shift));