Professional Documents
Culture Documents
VHDL Code For Full Subtractor Using Behavioral Method - Full Code & Explanation
VHDL Code For Full Subtractor Using Behavioral Method - Full Code & Explanation
Contents
1. Explanation of the VHDL code for full subtractor using behavioral
method. How does the code work?
1.1. Logic circuit of the full subtractor
1.2. Truth table of the full subtractor
2. VHDL code for full subtractor using behavioral method
3. Testbench
4. Simulation result
5. RTL Schematic
0 0 0 0 0
0 0 1 1 1
0 1 0 1 1
0 1 1 0 1
1 0 0 1 0
1 1 0 0 0
1 1 1 1 1
In the VHDL code for full adder post, we made the use of if-else
commands. Here, we will make use of if-elsif commands.
VHDL code for full subtractor using
View Course Path
behavioral method
View Course Path
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.STD_LOGIC_ARITH.ALL;
use IEEE.STD_LOGIC_UNSIGNED.ALL;
entity FULLSUBTRACTOR_BEHAVIORAL_SOURCE is
end FULLSUBTRACTOR_BEHAVIORAL_SOURCE;
architecture Behavioral of
FULLSUBTRACTOR_BEHAVIORAL_SOURCE is
begin
Back to course page
VHDL Course
process (A)
Course Path
VHDL d f f ll b & h lf
VHDL code for full subtractor & half
end if;
subtractor using dataflow method
– full code & explanation
end process; View Course Path
VHDL code for multiplexer using
dataflow method – full code and
end Behavioral; explanation
entity full_sub_tb is
end entity;
architecture tb of full_sub_tb is
component FULLSUBTRACTOR_BEHAVIORAL_SOURCE
is
Port ( A : in STD_LOGIC_VECTOR (2 downto 0);
Y : out STD_LOGIC_VECTOR (1 downto 0));
end component;
begin
stim:process
begin
A <= "000";
wait for 20 ns;
A <= "001";
wait for 20 ns;
A <= "010";
wait for 20 ns;
A <= "011";
wait for 20 ns;
A <= "100";
wait for 20 ns;
A <= "101";
wait for 20 ns;
A <= "110";
wait for 20 ns;
A <= "111";
wait for 20 ns;
wait;
View Course Path
end process;
end tb;
Simulation result
RTL Schematic
Deepak Joshi
Deepak is an undergrad student in ECE from Bhagwan Parshuram Institute of
Technology, Delhi. He is working as a student researcher in the field of antenna
designing for 5G communication. He is passionate about electronics and has good
skills in modeling digital circuits using VHDL. His passion and interest in electronics
led him to dive into embedded systems and IoT.
Related courses to VHDL code for full subtractor using behavioral method – full code &
explanation
Leave a Reply
This site uses Akismet to reduce spam. Learn how your comment data is processed.
Join our mailing list to get notified about new courses and features
Content Navigation
Helpful Links
Contact About Us Advertise Blog
TECHNOBYTE
© 2016 - 2022
All rights reserved. Read our privacy policy and terms of use .