这些小活动你都参加了吗?快来围观一下吧!>>
电子产品世界 » 论坛首页 » 嵌入式开发 » FPGA » 新手的疑惑,请哪位帮忙看一下^-^

共2条 1/1 1 跳转至

新手的疑惑,请哪位帮忙看一下^-^

菜鸟
2008-11-30 11:05:28     打赏

不知道为什么装了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.




关键词: 新手     疑惑     哪位     帮忙     看一下    

菜鸟
2008-12-04 09:53:07     打赏
2楼

用std_logic_vector是没问题,不过是直接在xilinx里creat new source里test bench waveform 生成测试波形,然后调用modelsim进行后仿的
以前用6.2版本的也没这个问题


共2条 1/1 1 跳转至

回复

匿名不能发帖!请先 [ 登陆 注册 ]