我是VHDL的新手。我試圖編寫加法器減法器的代碼。合成後,我的一個電路輸入總線接地。我在Ubuntu 14.04 LTS 64位中使用Xilinx ISE 14.2。VHDL輸入強制接地
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.NUMERIC_STD.ALL;
entity examples is
Generic(n: Natural :=8);
port (
A : in std_logic_vector(n-1 downto 0);
B : in std_logic_vector(n-1 downto 0);
subtract : in std_logic;
sum: out std_logic_vector(n-1 downto 0);
carry : out std_logic
);
end examples;
architecture Behavioral of examples is
Signal result: std_logic_vector(n downto 0);
begin
my_adder_subtractor : process(A,B,subtract)
begin
if(subtract = '0') Then
result <= std_logic_vector(('0' & unsigned(A))+('0' & unsigned(B)));
else
result <= std_logic_vector(('0' & unsigned(A))-('0' & unsigned(B)));
end if;
sum <= result(n-1 downto 0);
carry <= result(n);
end process my_adder_subtractor;
end Behavioral;
RTL方案:
你的問題是什麼。 – lorond
我的問題是爲什麼港口A連接到地面? –