2 개의 하프 덧셈기와 OR 게이트를 사용하는 간단한 전체 덧셈기를 작성했습니다. VHDL 코드ISE로 전체 덧셈기를 합성하십시오.
library ieee;
use ieee.std_logic_1164.all;
entity ha is
port(x: in std_logic;
y: in std_logic;
s: out std_logic;
c: out std_logic);
end;
architecture x of ha is
begin
s <= x xor y;
c <= x and y;
end;
및
library ieee;
use ieee.std_logic_1164.all;
entity fa is
port(a: in std_logic; b: in std_logic; cin: in std_logic;
sum: out std_logic; cout: out std_logic);
end;
architecture y of fa is
component ha port(x: in std_logic; y: in std_logic;
s: out std_logic; c: out std_logic);
end component;
signal im1, im2, im3: std_logic;
begin
ha1: ha port map(x=>a, y=>b, s=>im1, c=>im2);
ha2: ha port map(x=>im1, y=>cin, s=>sum, c=>im3);
cout <= im3 or im2;
end;
합성기의 출력은 단 두 개의 XOR 게이트가 존재 도시 매우 간단하다. 하프 가산기를위한 OR 게이트 및 다른 것들은 어디에 있습니까?
=========================================================================
* Advanced HDL Synthesis *
=========================================================================
Advanced HDL Synthesis Report
Macro Statistics
# Xors : 2
1-bit xor2 : 2
=========================================================================
또한 FA의 RTL 회로도는 정확하지만 half adder의 RTL 회로도는 이상합니다! y
포트가없고 데이터 [1 : 0]이 있습니다. 그게 무슨 뜻 이죠?
FA :
HA : 나는 정기적으로 매크로 통계 떨어져 Vivado 신디사이저 휴가 물건을 본 적이
삼각형은 제가 생각하기에 버퍼입니다. 아직도 설계도가 이상합니다. 입력 포트 x는 두 개의 신호 data [0]과 data [1]로 간주됩니다. 나는 x와 y를 넣지 않은 이유가 궁금합니다. – mahmood
아니요, 그들은 완충제가 아닙니다. 삼각형은 버퍼의 도식 기호로 자주 사용된다는 것을 알고 있습니다. 이 경우 버스 탭입니다. 신시사이저는 항상 이름을 바꿉니다. 읽을 때 고통스럽지 만 분명히 더 나은 결과를 만들어냅니다. – QuantumRipple