不知道为什么装了xilinx7.1和medelsim6.0后,只要输入端口数据类型为integer的总是在仿真时出现如下错误:
Index constraint cannot be applied to non-array type integer.
以下是一简单例子和出现的错误:
entity testboolean is
port(a,b:in integer range 0 to 7;
c:out integer range 0 to 7);
end testboolean;
architecture Behavioral of testboolean is
begin
process(a,b)
begin
if(a>b)then
c<=a;
else
c<=b;
end if;
end process;
# ** Error: testwave.ant(35): Index constraint cannot be applied to non-array type integer.
# ** Error: testwave.ant(36): Index constraint cannot be applied to non-array type integer.
# ** Error: testwave.ant(37): Index constraint cannot be applied to non-array type integer.
# ** Error: testwave.ant(41): Index constraint cannot be applied to non-array type integer.
# ** Error: testwave.ant(42): Index constraint cannot be applied to non-array type integer.
# ** Error: testwave.ant(43): Index constraint cannot be applied to non-array type integer.