33 0 276KB
ONLINE PLATFORM FOR PROGRAMMING AND RESEARCH (OP2R)
BINARY TO EXCESS 3 CODE CONVERSIONS VHDL CODE USING STRUCTURAL MODELING
Library declaration library IEEE; use IEEE.STD_LOGIC_1164.ALL; --------------------------------------------------------entity B_xcess is Port ( bin: in std_logic_vector (1 downto 0 ); exss: out std_logic_vector (3 downto 0); end B_xcess;
Std_logic_1164. package for std_logic (predefined data type).
Entity declaration…. bin :- input port bits.(code that will be converted in to its equivalent excess 3 representation.) exss: - output port bits. (Converted code).
---------------------------------------------------------architecture Behavioral_bxcess of B_xcess is ----------------------------------------------------------signal bin0bar, bin1bar, bin2bar: std_logic;
Architecture’s declarative part. Three signals are declared here. These signals will act as inout ports.
------------------------------------------------------------------begin bin2bar