SlideShare una empresa de Scribd logo
1 de 6
Descargar para leer sin conexión
CARRY SAVE ADDER




                Done by:

        Atchyuth Sonti
Main program for the Entire CARRY SAVE ADDER

library IEEE;

use IEEE.STD_LOGIC_1164.ALL;

use IEEE.NUMERIC_STD.ALL;



entity carrysaveadder2 is

  Port ( a : in STD_LOGIC_VECTOR (3 downto 0);

      b : in STD_LOGIC_VECTOR (3 downto 0);

      s : out STD_LOGIC_VECTOR (3 downto 0);

           cout : out STD_LOGIC);

end carrysaveadder2;



architecture structural of carrysaveadder2 is



component fulladder is

  Port( a,b,cin:in std_logic;

      sum,carry:out std_logic);
end component;



component mux is

  Port( p,q,s: in std_logic;

          r:out std_logic);

end component;



signal l,m,c:std_logic_vector (1 downto 0);

signal tl,tm:std_logic_vector (1 downto 0);

signal i,j,k:std_logic;



begin

--'i' is the carry 0 for parellel fulladder set 0.

--'j' is the carry 1 for parellel fulladder set 1.

--'k' is the carry for the entire adder at the first full adder.

i<='0';

j<='1';

k<='0';



--tl and tm are set of inputs to the multplexer out of which any one wiil be chosen depending upon
the carry c(1).

--l and m are set of carrry`s which will be driving the set of parellel set of full adders.

--l(1) and m(1) are the carrys that are generated by the set of parellel adders here any one of them is
chosen by the carry c(1).

--the selection line for the mux is carry emerging from the second full adder c(1).



f1: fulladder port map(a(0),b(0),k,s(0),c(0));

f2: fulladder port map(a(1),b(1),c(0),s(1),c(1));
f3a: fulladder port map(a(2),b(2),i,tl(0),l(0));

f4a: fulladder port map(a(2),b(2),l(0),tl(1),l(1));

f3b: fulladder port map(a(2),b(2),j,tm(0),m(0));

f4b: fulladder port map(a(2),b(2),m(0),tm(1),m(1));

m1 : mux port map(tl(0),tm(0),c(1),s(2));

m2 : mux port map(tl(1),tm(1),c(1),s(3));

m3 : mux port map(l(1),m(1),c(1),cout);



end structural;
Sub program for the Full adder circuit.
library IEEE;

use IEEE.STD_LOGIC_1164.ALL;




entity fulladder is

  Port ( a : in STD_LOGIC;

        b : in STD_LOGIC;

        cin : in STD_LOGIC;

        sum : out STD_LOGIC;

        carry : out STD_LOGIC);

end fulladder;



architecture dataflow of fulladder is



begin

sum<=a xor b xor cin;

carry<=(a and b) or (b and cin) or (cin and a);

end dataflow;
Sub Program for the MULTIPLEXER

library IEEE;

use IEEE.STD_LOGIC_1164.ALL;



entity mux is

  Port ( p : in STD_LOGIC;

        q : in STD_LOGIC;

        s : in STD_LOGIC;

        r : out STD_LOGIC);

end mux;



architecture Behavioral of mux is

begin

process(s)

begin

if (s='0') then

r<=p;

          else

          r<=q;

end if;

end process;

end Behavioral;

Más contenido relacionado

La actualidad más candente

A tabu search algorithm for the min max k-chinese postman problem
A tabu search algorithm for the min max k-chinese postman problemA tabu search algorithm for the min max k-chinese postman problem
A tabu search algorithm for the min max k-chinese postman problem政謙 陳
 
14. 8085 programming example vi
14. 8085 programming example vi14. 8085 programming example vi
14. 8085 programming example visandip das
 
Day4 順序控制的循序邏輯實現
Day4 順序控制的循序邏輯實現Day4 順序控制的循序邏輯實現
Day4 順序控制的循序邏輯實現Ron Liu
 
Sequential Circuits I VLSI 9th experiment
Sequential Circuits I VLSI 9th experimentSequential Circuits I VLSI 9th experiment
Sequential Circuits I VLSI 9th experimentGouthaman V
 
Lec9 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- Com...
Lec9 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- Com...Lec9 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- Com...
Lec9 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- Com...Hsien-Hsin Sean Lee, Ph.D.
 
86254 162058-ee2255-digital-logic-circuits
86254 162058-ee2255-digital-logic-circuits86254 162058-ee2255-digital-logic-circuits
86254 162058-ee2255-digital-logic-circuitsLekashri Subramanian
 
Circuit complexity
Circuit complexityCircuit complexity
Circuit complexityAmi Prakash
 
Lec15 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- Re...
Lec15 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- Re...Lec15 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- Re...
Lec15 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- Re...Hsien-Hsin Sean Lee, Ph.D.
 
7segment scetch
7segment scetch7segment scetch
7segment scetchBang Igo
 
MapReduce for Parallel Trace Validation of LTL Properties
MapReduce for Parallel Trace Validation of LTL PropertiesMapReduce for Parallel Trace Validation of LTL Properties
MapReduce for Parallel Trace Validation of LTL PropertiesSylvain Hallé
 

La actualidad más candente (20)

A tabu search algorithm for the min max k-chinese postman problem
A tabu search algorithm for the min max k-chinese postman problemA tabu search algorithm for the min max k-chinese postman problem
A tabu search algorithm for the min max k-chinese postman problem
 
QB_DCE_Anuj
QB_DCE_AnujQB_DCE_Anuj
QB_DCE_Anuj
 
Micro
MicroMicro
Micro
 
14. 8085 programming example vi
14. 8085 programming example vi14. 8085 programming example vi
14. 8085 programming example vi
 
Day4 順序控制的循序邏輯實現
Day4 順序控制的循序邏輯實現Day4 順序控制的循序邏輯實現
Day4 順序控制的循序邏輯實現
 
FINISHED_CODE
FINISHED_CODEFINISHED_CODE
FINISHED_CODE
 
Vcs15
Vcs15Vcs15
Vcs15
 
เฉลยแบบฝึกหัดบทที่ 1
เฉลยแบบฝึกหัดบทที่ 1เฉลยแบบฝึกหัดบทที่ 1
เฉลยแบบฝึกหัดบทที่ 1
 
Sequential Circuits I VLSI 9th experiment
Sequential Circuits I VLSI 9th experimentSequential Circuits I VLSI 9th experiment
Sequential Circuits I VLSI 9th experiment
 
Pwm wave
Pwm wave Pwm wave
Pwm wave
 
Lec9 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- Com...
Lec9 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- Com...Lec9 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- Com...
Lec9 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- Com...
 
86254 162058-ee2255-digital-logic-circuits
86254 162058-ee2255-digital-logic-circuits86254 162058-ee2255-digital-logic-circuits
86254 162058-ee2255-digital-logic-circuits
 
Osc ac
Osc acOsc ac
Osc ac
 
Circuit complexity
Circuit complexityCircuit complexity
Circuit complexity
 
Lec15 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- Re...
Lec15 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- Re...Lec15 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- Re...
Lec15 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- Re...
 
week-18x
week-18xweek-18x
week-18x
 
week-11x
week-11xweek-11x
week-11x
 
7segment scetch
7segment scetch7segment scetch
7segment scetch
 
MapReduce for Parallel Trace Validation of LTL Properties
MapReduce for Parallel Trace Validation of LTL PropertiesMapReduce for Parallel Trace Validation of LTL Properties
MapReduce for Parallel Trace Validation of LTL Properties
 
Bisection methode alternate
Bisection methode alternateBisection methode alternate
Bisection methode alternate
 

Destacado

Carry save addition
Carry save additionCarry save addition
Carry save additionMICKYJINDAL
 
Design and Simulation of a Modified Architecture of Carry Save Adder
Design and Simulation of a Modified Architecture of Carry Save AdderDesign and Simulation of a Modified Architecture of Carry Save Adder
Design and Simulation of a Modified Architecture of Carry Save AdderCSCJournals
 
Carry save multiplier
Carry save multiplierCarry save multiplier
Carry save multiplieryoussef ramzy
 
Carry look ahead adder
Carry look ahead adderCarry look ahead adder
Carry look ahead adderdragonpradeep
 
Iaetsd mac using compressor based multiplier and carry save adder
Iaetsd mac using compressor based multiplier and carry save adderIaetsd mac using compressor based multiplier and carry save adder
Iaetsd mac using compressor based multiplier and carry save adderIaetsd Iaetsd
 
MAC UNIT USING DIFFERENT MULTIPLIERS
MAC UNIT USING DIFFERENT MULTIPLIERSMAC UNIT USING DIFFERENT MULTIPLIERS
MAC UNIT USING DIFFERENT MULTIPLIERSBhamidipati Gayatri
 
Kmap Slideshare
Kmap SlideshareKmap Slideshare
Kmap Slidesharetech4us
 
DESIGN AND SIMULATION OF DIFFERENT 8-BIT MULTIPLIERS USING VERILOG CODE BY SA...
DESIGN AND SIMULATION OF DIFFERENT 8-BIT MULTIPLIERS USING VERILOG CODE BY SA...DESIGN AND SIMULATION OF DIFFERENT 8-BIT MULTIPLIERS USING VERILOG CODE BY SA...
DESIGN AND SIMULATION OF DIFFERENT 8-BIT MULTIPLIERS USING VERILOG CODE BY SA...Saikiran Panjala
 
Encoders and Decoders
Encoders and DecodersEncoders and Decoders
Encoders and DecodersNic JM
 

Destacado (20)

Adder
Adder Adder
Adder
 
Carry save addition
Carry save additionCarry save addition
Carry save addition
 
Adder Presentation
Adder PresentationAdder Presentation
Adder Presentation
 
Design and Simulation of a Modified Architecture of Carry Save Adder
Design and Simulation of a Modified Architecture of Carry Save AdderDesign and Simulation of a Modified Architecture of Carry Save Adder
Design and Simulation of a Modified Architecture of Carry Save Adder
 
Carry save multiplier
Carry save multiplierCarry save multiplier
Carry save multiplier
 
Carry look ahead adder
Carry look ahead adderCarry look ahead adder
Carry look ahead adder
 
Adder ppt
Adder pptAdder ppt
Adder ppt
 
Array multiplier
Array multiplierArray multiplier
Array multiplier
 
Iaetsd mac using compressor based multiplier and carry save adder
Iaetsd mac using compressor based multiplier and carry save adderIaetsd mac using compressor based multiplier and carry save adder
Iaetsd mac using compressor based multiplier and carry save adder
 
Presentation on ILU
Presentation on ILUPresentation on ILU
Presentation on ILU
 
Flot multiplier
Flot multiplierFlot multiplier
Flot multiplier
 
carry select adder
carry select addercarry select adder
carry select adder
 
MAC UNIT USING DIFFERENT MULTIPLIERS
MAC UNIT USING DIFFERENT MULTIPLIERSMAC UNIT USING DIFFERENT MULTIPLIERS
MAC UNIT USING DIFFERENT MULTIPLIERS
 
Kmap Slideshare
Kmap SlideshareKmap Slideshare
Kmap Slideshare
 
05 multiply divide
05 multiply divide05 multiply divide
05 multiply divide
 
Lecture28
Lecture28Lecture28
Lecture28
 
Final ppt
Final pptFinal ppt
Final ppt
 
DESIGN AND SIMULATION OF DIFFERENT 8-BIT MULTIPLIERS USING VERILOG CODE BY SA...
DESIGN AND SIMULATION OF DIFFERENT 8-BIT MULTIPLIERS USING VERILOG CODE BY SA...DESIGN AND SIMULATION OF DIFFERENT 8-BIT MULTIPLIERS USING VERILOG CODE BY SA...
DESIGN AND SIMULATION OF DIFFERENT 8-BIT MULTIPLIERS USING VERILOG CODE BY SA...
 
Encoders and Decoders
Encoders and DecodersEncoders and Decoders
Encoders and Decoders
 
Karnaugh map
Karnaugh mapKarnaugh map
Karnaugh map
 

Similar a Carry save adder Type 2

Digital system design lab manual
Digital system design lab manualDigital system design lab manual
Digital system design lab manualSanthosh Poralu
 
Write complete VHDL codes for the following schematic. Solution.pdf
Write complete VHDL codes for the following schematic.  Solution.pdfWrite complete VHDL codes for the following schematic.  Solution.pdf
Write complete VHDL codes for the following schematic. Solution.pdfarjuncollection
 
gate level modeling
gate level modelinggate level modeling
gate level modelingVandanaBR2
 
Introduction to VHDL
Introduction to VHDLIntroduction to VHDL
Introduction to VHDLYaser Kalifa
 
VHDL PROGRAMS FEW EXAMPLES
VHDL PROGRAMS FEW EXAMPLESVHDL PROGRAMS FEW EXAMPLES
VHDL PROGRAMS FEW EXAMPLESkarthik kadava
 
Practical file
Practical filePractical file
Practical filerajeevkr35
 
Ecad &amp;vlsi lab 18
Ecad &amp;vlsi lab 18Ecad &amp;vlsi lab 18
Ecad &amp;vlsi lab 18Shekar Midde
 
Matlab fair-record-model
Matlab fair-record-modelMatlab fair-record-model
Matlab fair-record-modelajaydev1111
 
Digital System Design Lab Report - VHDL ECE
Digital System Design Lab Report - VHDL ECEDigital System Design Lab Report - VHDL ECE
Digital System Design Lab Report - VHDL ECERamesh Naik Bhukya
 
FPGA based BCH Decoder
FPGA based BCH DecoderFPGA based BCH Decoder
FPGA based BCH Decoderijsrd.com
 
Digital system design practical file
Digital system design practical fileDigital system design practical file
Digital system design practical fileArchita Misra
 
(Www.entrance exam.net)-tcs placement sample paper 2
(Www.entrance exam.net)-tcs placement sample paper 2(Www.entrance exam.net)-tcs placement sample paper 2
(Www.entrance exam.net)-tcs placement sample paper 2Pamidimukkala Sivani
 
Interactive Transmission System Computation Unit
Interactive Transmission System Computation UnitInteractive Transmission System Computation Unit
Interactive Transmission System Computation Unitmayankraj0805
 
Exam 6 commlab 18_119_ei0292
Exam 6 commlab 18_119_ei0292Exam 6 commlab 18_119_ei0292
Exam 6 commlab 18_119_ei0292lucky859450
 

Similar a Carry save adder Type 2 (20)

Digital system design lab manual
Digital system design lab manualDigital system design lab manual
Digital system design lab manual
 
VHDL Programs
VHDL ProgramsVHDL Programs
VHDL Programs
 
Eecs 317 20010209
Eecs 317 20010209Eecs 317 20010209
Eecs 317 20010209
 
Write complete VHDL codes for the following schematic. Solution.pdf
Write complete VHDL codes for the following schematic.  Solution.pdfWrite complete VHDL codes for the following schematic.  Solution.pdf
Write complete VHDL codes for the following schematic. Solution.pdf
 
gate level modeling
gate level modelinggate level modeling
gate level modeling
 
OFDMA MATLAB CODE.pdf
OFDMA MATLAB CODE.pdfOFDMA MATLAB CODE.pdf
OFDMA MATLAB CODE.pdf
 
Introduction to VHDL
Introduction to VHDLIntroduction to VHDL
Introduction to VHDL
 
VHDL PROGRAMS FEW EXAMPLES
VHDL PROGRAMS FEW EXAMPLESVHDL PROGRAMS FEW EXAMPLES
VHDL PROGRAMS FEW EXAMPLES
 
Practical file
Practical filePractical file
Practical file
 
Ecad &amp;vlsi lab 18
Ecad &amp;vlsi lab 18Ecad &amp;vlsi lab 18
Ecad &amp;vlsi lab 18
 
Matlab fair-record-model
Matlab fair-record-modelMatlab fair-record-model
Matlab fair-record-model
 
Modulation techniques matlab_code
Modulation techniques matlab_codeModulation techniques matlab_code
Modulation techniques matlab_code
 
Digital System Design Lab Report - VHDL ECE
Digital System Design Lab Report - VHDL ECEDigital System Design Lab Report - VHDL ECE
Digital System Design Lab Report - VHDL ECE
 
VerilogHDL_Utkarsh_kulshrestha
VerilogHDL_Utkarsh_kulshresthaVerilogHDL_Utkarsh_kulshrestha
VerilogHDL_Utkarsh_kulshrestha
 
FPGA based BCH Decoder
FPGA based BCH DecoderFPGA based BCH Decoder
FPGA based BCH Decoder
 
Digital system design practical file
Digital system design practical fileDigital system design practical file
Digital system design practical file
 
(Www.entrance exam.net)-tcs placement sample paper 2
(Www.entrance exam.net)-tcs placement sample paper 2(Www.entrance exam.net)-tcs placement sample paper 2
(Www.entrance exam.net)-tcs placement sample paper 2
 
Structural modelling
Structural modellingStructural modelling
Structural modelling
 
Interactive Transmission System Computation Unit
Interactive Transmission System Computation UnitInteractive Transmission System Computation Unit
Interactive Transmission System Computation Unit
 
Exam 6 commlab 18_119_ei0292
Exam 6 commlab 18_119_ei0292Exam 6 commlab 18_119_ei0292
Exam 6 commlab 18_119_ei0292
 

Último

Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104misteraugie
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxmanuelaromero2013
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...Marc Dusseiller Dusjagr
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptxVS Mahajan Coaching Centre
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxSayali Powar
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxGaneshChakor2
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxiammrhaywood
 
Hybridoma Technology ( Production , Purification , and Application )
Hybridoma Technology  ( Production , Purification , and Application  ) Hybridoma Technology  ( Production , Purification , and Application  )
Hybridoma Technology ( Production , Purification , and Application ) Sakshi Ghasle
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingTechSoup
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformChameera Dedduwage
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphThiyagu K
 
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxContemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxRoyAbrique
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityGeoBlogs
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfsanyamsingh5019
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Krashi Coaching
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesFatimaKhan178732
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactPECB
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxheathfieldcps1
 

Último (20)

Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptx
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
 
Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptx
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
 
Hybridoma Technology ( Production , Purification , and Application )
Hybridoma Technology  ( Production , Purification , and Application  ) Hybridoma Technology  ( Production , Purification , and Application  )
Hybridoma Technology ( Production , Purification , and Application )
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy Reform
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot Graph
 
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxContemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdf
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and Actinides
 
Staff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSDStaff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSD
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global Impact
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 

Carry save adder Type 2

  • 1. CARRY SAVE ADDER Done by: Atchyuth Sonti
  • 2. Main program for the Entire CARRY SAVE ADDER library IEEE; use IEEE.STD_LOGIC_1164.ALL; use IEEE.NUMERIC_STD.ALL; entity carrysaveadder2 is Port ( a : in STD_LOGIC_VECTOR (3 downto 0); b : in STD_LOGIC_VECTOR (3 downto 0); s : out STD_LOGIC_VECTOR (3 downto 0); cout : out STD_LOGIC); end carrysaveadder2; architecture structural of carrysaveadder2 is component fulladder is Port( a,b,cin:in std_logic; sum,carry:out std_logic);
  • 3. end component; component mux is Port( p,q,s: in std_logic; r:out std_logic); end component; signal l,m,c:std_logic_vector (1 downto 0); signal tl,tm:std_logic_vector (1 downto 0); signal i,j,k:std_logic; begin --'i' is the carry 0 for parellel fulladder set 0. --'j' is the carry 1 for parellel fulladder set 1. --'k' is the carry for the entire adder at the first full adder. i<='0'; j<='1'; k<='0'; --tl and tm are set of inputs to the multplexer out of which any one wiil be chosen depending upon the carry c(1). --l and m are set of carrry`s which will be driving the set of parellel set of full adders. --l(1) and m(1) are the carrys that are generated by the set of parellel adders here any one of them is chosen by the carry c(1). --the selection line for the mux is carry emerging from the second full adder c(1). f1: fulladder port map(a(0),b(0),k,s(0),c(0)); f2: fulladder port map(a(1),b(1),c(0),s(1),c(1));
  • 4. f3a: fulladder port map(a(2),b(2),i,tl(0),l(0)); f4a: fulladder port map(a(2),b(2),l(0),tl(1),l(1)); f3b: fulladder port map(a(2),b(2),j,tm(0),m(0)); f4b: fulladder port map(a(2),b(2),m(0),tm(1),m(1)); m1 : mux port map(tl(0),tm(0),c(1),s(2)); m2 : mux port map(tl(1),tm(1),c(1),s(3)); m3 : mux port map(l(1),m(1),c(1),cout); end structural;
  • 5. Sub program for the Full adder circuit. library IEEE; use IEEE.STD_LOGIC_1164.ALL; entity fulladder is Port ( a : in STD_LOGIC; b : in STD_LOGIC; cin : in STD_LOGIC; sum : out STD_LOGIC; carry : out STD_LOGIC); end fulladder; architecture dataflow of fulladder is begin sum<=a xor b xor cin; carry<=(a and b) or (b and cin) or (cin and a); end dataflow;
  • 6. Sub Program for the MULTIPLEXER library IEEE; use IEEE.STD_LOGIC_1164.ALL; entity mux is Port ( p : in STD_LOGIC; q : in STD_LOGIC; s : in STD_LOGIC; r : out STD_LOGIC); end mux; architecture Behavioral of mux is begin process(s) begin if (s='0') then r<=p; else r<=q; end if; end process; end Behavioral;