Home » , , » VHDL Digital 8 - Bit SUBSTRUCTURE Logic Program

VHDL Digital 8 - Bit SUBSTRUCTURE Logic Program

Written By 1 on Sunday, April 8, 2012 | 12:13 PM


VHDL program for “8 Bit Substructure” behavioral design in Xilinx integrated software environment-
-------------------------------------------------------------------------------
-- Company:Techno Global - Balurghat
-- Engineer:Mr. Jitaditya Mondal
-- Create Date:20:36:38 03/28/12
-- Design Name:8 Bit Substructure  Design    
-- Module Name: SUB4 - Behavioral
-- Project Name:VHDL Program for "8 Bit Substructure " in XILINX Integrated Software Environment
-- Target Device:XC2S15
-- Tool versions:XST(VHDL/Verilog)
-- 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;
--------------------------------------------------------------------------------
---- Uncomment the following library declaration if instantiating
---- any Xilinx primitives in this code.
--library UNISIM;
--use UNISIM.VComponents.all;
--------------------------------------------------------------------------------
entity SUB4 is
generic(N: natural :=2);
    Port ( X : in std_logic_vector (7 downto 0);
           Y : in std_logic_vector (7 downto 0);
           SUB : out std_logic_vector (7 downto 0);
           BORROW : out std_logic);
end SUB4;
architecture Behavioral of SUB4 is
signal result: std_logic_vector (8 downto 0);
begin
            result<=('0' & X)-('0' & Y);      
            SUB <= result(7 downto 0);
            BORROW <= result(8);
end Behavioral;

0 Comment:

Post a Comment