如何在 VHDL 中的一个句子中使用许多 "and" 和 "or"?
How to use many "and" and "or" in one sentence in VHDL?
我有这行代码:
REn0 <= En0 and (conditionCode = "110" or conditionCode = "010");
En0 是 Std_logic 并且 condtionCode 是 Std_logic_vector of size 3 bits.
我正在对括号内的内容进行 ORing,并用信号 En0 对其进行运算,但我得到了那个奇怪的错误。
No feasible entries for infix operator 'and'.
Type error resolving infix expression "and" as type ieee.std_logic_1164.STD_LOGIC.
我不明白这些错误信息。我不能在 vhdl 中执行多个 or 和 and ??
我已经解决了..错误是因为我正在安定一个带有位向量的信号(1 位)..std_logic_1164 包中没有函数可以做到这一点。
一个简单的想法是:
x <= '1' when conditionCode = "110" else '0';
y <= '1' when conditionCode = "010" else '0';
REn0 <= En0 and ( x or y);
我有这行代码:
REn0 <= En0 and (conditionCode = "110" or conditionCode = "010");
En0 是 Std_logic 并且 condtionCode 是 Std_logic_vector of size 3 bits.
我正在对括号内的内容进行 ORing,并用信号 En0 对其进行运算,但我得到了那个奇怪的错误。
No feasible entries for infix operator 'and'.
Type error resolving infix expression "and" as type ieee.std_logic_1164.STD_LOGIC.
我不明白这些错误信息。我不能在 vhdl 中执行多个 or 和 and ??
我已经解决了..错误是因为我正在安定一个带有位向量的信号(1 位)..std_logic_1164 包中没有函数可以做到这一点。
一个简单的想法是:
x <= '1' when conditionCode = "110" else '0';
y <= '1' when conditionCode = "010" else '0';
REn0 <= En0 and ( x or y);