4 비트와 4 비트 ALU를 만들기 위해 재사용되는 할당을 위해 1 비트 ALU를 설계해야합니다.연산이 carry에 의존하는 1 비트 ALU
1 비트 ALU는 2 개 선택 라인 및 입력 A, B와의 캐리가 있습니다.
내 문제는 선택 라인 및 플래그 캐리가 선택하는 어떤 동작을 선택하는 것입니다. 난 그냥 선택 라인을 사용하는 방법과 작업을 선택하는 동시에 깃발을 들고 실마리가 없습니다.
예를 들어, 라인 "00"을 선택하고 Cin "0"은 더하기 연산이고 Cin "1"은 빼기 연산자입니다.
아래에서 수행 한 작업을 수행 할 수 있습니까? 당신의 도움을 주셔서 감사합니다.
entity ALU1Bit is
port(
A: IN std_logic_vector;
B: IN std_logic;
carryIn: IN std_logic;
operation: IN std_logic_vector(1 downto 0);
F: OUT std_logic;
carryOut: OUT std_logic
);
end ALU1Bit;
architecture Behavioral of ALU1Bit is
component Adder1Bit
port(
carryIn: IN std_logic;
A: IN std_logic;
B: IN std_logic;
output: OUT std_logic;
F: OUT std_logic
);
end component;
begin
carryIn <= '0';
case operation is
when...
carryIn <= '1';
case operation is
when...
end Behavioral;
번호 입력 포트에 할당하는 것은 오류입니다. –