vhdl 中的真实错误 table
Error in truth table in vhdl
Truth table
My code
我计算了卡诺图,但我的代码不正确。我收到错误消息:"Error for D='1' C='0' B='1' A='0'expected O='1', recieved O='0'".
我哪里弄错了?
library IEEE;
use IEEE.std_logic_1164.all;
entity truth_table is port( A,B,C,D : in std_logic;
O : out std_logic);
end truth_table;
architecture behavior of truth_table isbegin
O <= (((not A) and C and D) or ((not D) and B and C) or (A and (not C) and D) or (A and C and (not B)));
end behavior;
你的信号 'O' 右边的逻辑方程是错误的,应该是:
O <= (((not D) and B and A) or ((not A) and C and B) or (D and (not B) and A) or (D and B and (not C)));
参见 http://www.32x8.com/var4.html 并自己尝试,但请注意,列的顺序与您的真实顺序相反 table。
Truth table
My code
我计算了卡诺图,但我的代码不正确。我收到错误消息:"Error for D='1' C='0' B='1' A='0'expected O='1', recieved O='0'".
我哪里弄错了?
library IEEE;
use IEEE.std_logic_1164.all;
entity truth_table is port( A,B,C,D : in std_logic;
O : out std_logic);
end truth_table;
architecture behavior of truth_table isbegin
O <= (((not A) and C and D) or ((not D) and B and C) or (A and (not C) and D) or (A and C and (not B)));
end behavior;
你的信号 'O' 右边的逻辑方程是错误的,应该是:
O <= (((not D) and B and A) or ((not A) and C and B) or (D and (not B) and A) or (D and B and (not C)));
参见 http://www.32x8.com/var4.html 并自己尝试,但请注意,列的顺序与您的真实顺序相反 table。