L
ledinhkha
hi all,
I'm new with VHDL. In my code, i have to calculate, like:
value_output := (buff00 - min) * 255 / max;
in which, these variables are declared as integers.
variable max: integer;
variable min: integer;
variable buff00: integer;
variable value_output: integer;
I've got no syntax error. But when i try to synthesize, i got this
error:
Operator <DIVIDE> must have constant operands or first operand must be
power of 2
HOw can I fix it?
Thks so much, it's urgent!
Kha
I'm new with VHDL. In my code, i have to calculate, like:
value_output := (buff00 - min) * 255 / max;
in which, these variables are declared as integers.
variable max: integer;
variable min: integer;
variable buff00: integer;
variable value_output: integer;
I've got no syntax error. But when i try to synthesize, i got this
error:
Operator <DIVIDE> must have constant operands or first operand must be
power of 2
HOw can I fix it?
Thks so much, it's urgent!
Kha