Altera_Forum
Honored Contributor
16 years agoVHDL errors and question
Hello! I am still learning vhdl and sorry if I made a question already answered on this forum. I am using Quartus II 8.1 web edition.
I have 2 questions: 1- I am trying to use the operators sll, srl, ror, and, (bitwise ones like in C) and I am getting compilation errors! For example, using this:res <= worda sll 2; (res type is std_logic_vector as well as worda)
Error (10327): VHDL error at Shifter.vhd(35): can't determine definition of operator ""sll"" -- found 0 possible definitions.With this: a := a and X"0F"; (a type is integer)
Error (10327): VHDL error at Multiplier.vhd(35): can't determine definition of operator ""and"" -- found 0 possible definitions.I am using this libs: library ieee;
use ieee.std_logic_1164.all;
use ieee.std_logic_arith.all;
use ieee.std_logic_unsigned.all;2- I would like to create a shifter, a block that can do the sll, srl, sla, sra, ror and rol. (I made some calcs to do this, because vhdl operators were giving me errors) I would like to shift it N times, so there is the word A and the N integer. I am doing it using a loop: -- sll
while (con /= int and con < 255) loop
aux(7 downto 1) := aux(6 downto 0);
aux(0) := '0';
con := con + 1;
end loop;This is taking like 5 minutes to compile using in my project as a block (component), is there a better way to do this? Thank you for attention!