VHDL code for half subtractor and full subtractor using ISE project navigator

EXPERIMENT NO: 5(A)
Date: 20-02-2018
AIM: TO DESIGN A HALF SUBTRACTOR.
THEORY:
A half subtractor is a logical circuit that performs a subtraction operation on two binary digits. The half subtractor produces a sum and a borrow bit for the next stage.


VHDL CODE:
library IEEE;
use IEEE.STD_LOGIC_1164.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 half_subtractor is
    Port ( a : in  STD_LOGIC;
           b : in  STD_LOGIC;
           d : out  STD_LOGIC;
           bo : out  STD_LOGIC);
end half_subtractor;
architecture Behavioral of half_subtractor is
begin
d<= a xor b;
bo<=(not a) and b;
end Behavioral;

PROCEDURE:
  1. Open a new project from the drop down menu by clicking on FILE given on the top left of the screen.
  2. Create a new project and name it.
  3. Click on next to enter device properties.

  4. Select the appropriate properties.
  5. Click on next button to enter the new source.
  6. Here select VHDL MODULE.
  7. Give the file name.
  8. Click on next button and enter the ENTITY name.
  9. Select the define module.
  10. Select the ports as input or output and name them.
  11. Click on net and then to on finish.
  12. Write the code for the project under the library entity.
  13. Save the program.
  14. Select the behavioral simulation option from the three modeling options.
  15. Now select the syntax check.
  16. If syntax check comes out to be correct, then proceed further, otherwise check for errors.
  17. Now select synthesize option and go through RTL schematic and view the figure.
  18. Similarly view technology schematic with clicking this option inside synthesize.
  19. Click here for complete manual.


Comments

Popular posts from this blog

VLSI DESIGN WITH ISE PROJECT NAVIGATOR (P.49d)

VHDL OF FULL ADDER WITH ISE PROJECT NAVIGATOR (P.49d)