O
Okashii
Guest
Hi there, this problem has been mentioned before. I am using std_numeric pkg
in Xilinx 7.1 and I wanted to do a division and a mod:
temp is an integer;
temp <= TO_INTEGER(TO_SIGNED(temp,32) mod TO_SIGNED(3,32));
I got this error message:
ERROR:Xst:1775 - Unsupported modulo value 3 found in expression at line 0.
The modulo should be a power of 2.
temp <= TO_INTEGER(TO_SIGNED(temp,32) / TO_SIGNED(3,32));
ERROR:Xst:769 - "D:/School/forloop/forloop_spark_rtl.vhd" line 75: Operator
<INVALID OPERATOR> must have constant operands or first operand must be
power of 2
May I know whether I have to write my own division algorithm to do mod or
division, or did I use the operators wrongly? Thank you!
in Xilinx 7.1 and I wanted to do a division and a mod:
temp is an integer;
temp <= TO_INTEGER(TO_SIGNED(temp,32) mod TO_SIGNED(3,32));
I got this error message:
ERROR:Xst:1775 - Unsupported modulo value 3 found in expression at line 0.
The modulo should be a power of 2.
temp <= TO_INTEGER(TO_SIGNED(temp,32) / TO_SIGNED(3,32));
ERROR:Xst:769 - "D:/School/forloop/forloop_spark_rtl.vhd" line 75: Operator
<INVALID OPERATOR> must have constant operands or first operand must be
power of 2
May I know whether I have to write my own division algorithm to do mod or
division, or did I use the operators wrongly? Thank you!