Beruflich Dokumente
Kultur Dokumente
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.STD_LOGIC_ARITH.ALL;
use IEEE.STD_LOGIC_UNSIGNED.ALL;
entity fa1 is
Port ( a : in STD_LOGIC;
b : in STD_LOGIC;
cin : in STD_LOGIC;
sum : out STD_LOGIC;
cout : out STD_LOGIC);
end fa1;
begin
end Behavioral;
RTL SCHEMETIC:
Technology schematic:
entity diff_1 is
Port ( d : in STD_LOGIC;
clk : in STD_LOGIC;
rstn : in STD_LOGIC;
q : out STD_LOGIC;
qbar : out STD_LOGIC);
end diff_1;
end Behavioral;
RTL SCHEMETIC:
TECHNOLOGY SCHEMETIC:
VHDL CODE FOR FULL SUBSTRACTOR:
--------------------------------------------------------------------------------
--
-- Company:
-- Engineer:
--
-- Create Date: 16:15:56 03/23/2011
-- Design Name:
-- Module Name: fs - Behavioral
-- Project Name:
-- Target Devices:
-- Tool versions:
-- Description:
--
-- Dependencies:
--
-- Revision:
-- Revision 0.01 - File Created
-- Additional Comments:
--
--------------------------------------------------------------------------------
--
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.STD_LOGIC_ARITH.ALL;
use IEEE.STD_LOGIC_UNSIGNED.ALL;
entity fs is
Port ( a : in STD_LOGIC;
b : in STD_LOGIC;
borin : in STD_LOGIC;
diff : out STD_LOGIC;
borout : out STD_LOGIC);
end fs;
architecture Behavioral of fs is
begin
process( a,b,borin )
begin
if(a='0') then
diff <= b xor borin;
borout <= b or borin;
else
diff <= b xnor borin;
borout <= b and borin;
end if;
end process;
end Behavioral;
RTL SCHEMETIC:
TECHNOLOGY SCHEMETIC: