bit_logic_circuit.vhd

来自「thats the CPU source made by JI FENG」· VHDL 代码 · 共 29 行

VHD
29
字号
library ieee;use ieee.std_logic_1164.all;entity bit_logic_circuit is    port (    A  : in std_logic;    B  : in std_logic;     S0 : in std_logic;    S1 : in std_logic;    G  : out std_logic);end bit_logic_circuit;architecture rtl of bit_logic_circuit issignal S : std_logic_vector(1 downto 0);begin  -- rtl S <= S1 & S0;process(S,A,B)begin  case S is    when "00" => G<=A and B ;    when "01" => G<= A or B;    when "10" => G<= A xor B;    when "11" => G<= not(A);    when others => null;  end case;end PROCESS;end rtl;

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?