关于移位SLL或SHIFT_LEFT的问题

求助各位大侠:下面的程序运行后为什么老是出错呀?
library ieee;
use ieee.std_logic_1164.all;
use ieee.std_logic_unsigned.all;
use ieee.numeric_std.all;
use ieee.std_logic_arith.all;
entity fdkz is
port(kongzhi:in std_logic;
   srdata:in std_logic_vector(9 downto 0);
   fddataut std_logic_vector(9 downto 0));
end;
architecture behav of fdkz is
constant fd:std_logic_vector(6 downto 0):="1100010";
begin
  process(kongzhi,srdata)
  variable data1:std_logic_vector(15 downto 0);
  variable data2:std_logic_vector(15 downto 0);
  variable data3:integer range 0 to 102300;
  variable data4:integer range 0 to 1023;
  variable data2:std_logic_vector(15 downto 0);
   begin
data1:="0000000000000000";
data2:="0000000000000000";
if (kongzhi='1') then
   for n in 6 downto 0 loop
  if (fd(n)='1') then
   data1(9 downto 0):=srdata;
   data1:=data1 sll 1;
   data2:=data2+data1;
  end if;
    end loop;
    fddata<=data2(15 downto 6);
end if;
   end process;
end;
本程序为实现输入数据移位后相加送到输出端,在QUARTUS中编译
程序运行后老是出现:can't determine definition of opertor "sll"--found 0 possible definitions
请问哪位大侠知道SLL的用法?
我也来说两句 查看全部回复

最新回复

  • zhdgo (2008-11-30 04:01:18)

    ************************************************************DDD
  • zhdgo (2008-11-30 04:02:01)

    ******************************************DD
  • 斌坚 (2008-12-30 13:42:29)

    移位操作符是VHDL‘93标准新增的运算符,SLL是将位矢量向左移,右边跟进的位补零,移位操作符的语句格式是
    标识符 移位操作符 移位位数
    目前好多综合器都不支持以上格式,除非其标识符改为常数位矢量。比如以下语句:
    OUTPUT<="00001010100"   SLL  1;
    这样的语句是可被综合的.