با سلام به دوستان
کد زیر کد ساده یک جمع کننده تفریق گر 4 بیتی هست این کد از نظر نگارشی خطا نداره ولی نمیدونم چرا سنتز نمیشه
کد زیر کد ساده یک جمع کننده تفریق گر 4 بیتی هست این کد از نظر نگارشی خطا نداره ولی نمیدونم چرا سنتز نمیشه
کد:
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use ieee.std_logic_arith.all;
use ieee.std_logic_unsigned.all;
-- Uncomment the following library declaration if using
-- arithmetic functions with Signed or Unsigned values
--use IEEE.NUMERIC_STD.ALL;
-- Uncomment the following library declaration if instantiating
-- any Xilinx primitives in this code.
--library UNISIM;
--use UNISIM.VComponents.all;
entity fa_sub4 is
Port ( a : in STD_LOGIC_VECTOR (3 downto 0);
b : in STD_LOGIC_VECTOR (3 downto 0);
m : in STD_LOGIC;
sx : out STD_LOGIC_VECTOR (3 downto 0);
c_out : out STD_LOGIC);
end fa_sub4;
architecture str of fa_sub4 is
component fa4b port(a : in STD_LOGIC_VECTOR (3 downto 0);
b : in STD_LOGIC_VECTOR (3 downto 0);
c_in : in STD_LOGIC;
s : out STD_LOGIC_VECTOR (3 downto 0);
c_out : out STD_LOGIC);
end component;
signal t : STD_LOGIC_VECTOR (3 downto 0);
begin
t(0)<=b(0) xor m;
t(1)<=b(1) xor m;
t(2)<=b(2) xor m;
t(3)<=b(3) xor m;
fa_su: fa4b port map (a=>a,b=>t,s=>sx,c_in=>m,c_out=>c_out);
end str;






دیدگاه