100% found this document useful (1 vote)
4K views

Full Subtractor VHDL Code Using Data Flow Modeling

This document describes a VHDL code for a full subtractor circuit using a data flow modeling approach. It includes the library declaration, entity declaration with input and output ports, and architecture with concurrent statements that define the circuit logic for calculating the difference and borrow outputs based on the input bits a, b, and c using XOR and AND operations. It also references output waveforms to test and validate the circuit design.

Uploaded by

OP2R
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (1 vote)
4K views

Full Subtractor VHDL Code Using Data Flow Modeling

This document describes a VHDL code for a full subtractor circuit using a data flow modeling approach. It includes the library declaration, entity declaration with input and output ports, and architecture with concurrent statements that define the circuit logic for calculating the difference and borrow outputs based on the input bits a, b, and c using XOR and AND operations. It also references output waveforms to test and validate the circuit design.

Uploaded by

OP2R
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

ONLINE PLATFORM FOR PROGRAMMING AND RESEARCH (OP2R)

FULL SUBTRACTOR VHDL CODE USING DATA FLOW MODELING


Library declaration

library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
-------------------------------------------entity full_subtractor is
Port ( a, b, c: in STD_LOGIC;
diff ,borrow: out STD_LOGIC);
end full_subtractor;
---------------------------------------------

Std_logic_1164; package for std_logic (predefined data type).

Entity declaration.
a, b, c :- input port bits (bits to be
added)
diff, borrow: - output port bits.

architecture Behavioral_FS of full_subtractor is


begin
--------------------------------------------------------------------------diff<= a xor b xor c;
borrow<= (((not a)and b) or ( b and c) or (c and (not a)));
----------------------------------------------------------------------------end Behavioral_FS;

RTL VIEW:-

INFOOP2R.WIX.COM/OP2R

OUT PUT WAVEFORMS:

Concurrent statements.
These are the circuit
expressions which are formed
by k-map or Boolean function.

You might also like