小编Jim*_*Jim的帖子

VHDL中简单IF语句中的数据类型问题

我有一个非常奇怪的问题,我不是100%为什么编译器抱怨.代码如下:

variable a : std_logic_vector(2 downto 0);
variable b : std_logic;
....
if (a = "100") AND (b) then
  -- do something
elsif (a = "011") OR (b) then
  -- do something else
Run Code Online (Sandbox Code Playgroud)

然后我收到错误消息:

 "AND can not have such operands in this context",
 "OR can not have such operands in this context", respectively for the second IF   
Run Code Online (Sandbox Code Playgroud)

声明.

任何人都知道为什么VHDL不喜欢这种结构,如果有解决方法呢?

谢谢,吉姆

vhdl systemc

1
推荐指数
1
解决办法
282
查看次数

标签 统计

systemc ×1

vhdl ×1