VHDL code for Full adder using half adder
half_adder.vhdl
ENTITY half_adder IS --- Half Adder
PORT(A,B: IN BIT ;
S, Cout : OUT BIT);
END full_adder;
ARCHITECTURE half_adder_beh OF half_adder IS
BEGIN
S <= A xor B;
Cout <= A and B;
END full_adder_beh;
or_gate.vhdl
ENTITY or_gate IS
PORT(A,B: IN BIT ;
C : OUT BIT);
END or_gate;
ARCHITECTURE or_gate_beh OF or_gate IS
BEGIN
C <= A or B;
END or_gate_beh;
full_adder.vhdl
ENTITY full_adder IS --- Full Adder
PORT(A,B,Cin: IN BIT ;
S, C : OUT BIT);
END full_adder;
ARCHITECTURE str OF full_adder IS
--component Declaration
Component
half_adder IS
PORT(A,B: IN BIT ;
S, Cout : OUT BIT);
END Component;
Component or_gate IS
PORT(A,B: IN BIT ;
C : OUT BIT);
END Component;
signal s1,c2,c3:std_logic;
BEGIN
X1: half_adder port map(A,B,s1,c1);
X2: half_adder port map(s1,Cin,S,c2);
X3: or_gate port map(c1,c2,C);
END str;
testbench
LIBRARY ieee;
USE ieee.std_logic_1164.ALL;
ENTITY Testbench_full_adder IS
END Testbench_full_adder;
ARCHITECTURE behavior OF Testbench_full_adder IS
-- Component Declaration for the Unit Under Test (UUT)
COMPONENT full_adder
PORT(
A : IN std_logic;
B : IN std_logic;
Cin : IN std_logic;
S : OUT std_logic;
C : OUT std_logic
);
END COMPONENT;
--Inputs
signal A : std_logic := '0';
signal B : std_logic := '0';
signal Cin : std_logic := '0';
--Outputs
signal S : std_logic;
signal C : std_logic;
BEGIN
-- Instantiate the Unit Under Test (UUT)
uut: full_adder PORT MAP (
A => A,
B => B,
Cin => Cin,
S => S,
C => C
);
-- Stimulus process
stim_proc: process
begin
-- hold reset state for 100 ns.
wait for 100 ns;
-- insert stimulus here
A <= '1';
B <= '0';
Cin <= '0';
wait for 10 ns;
A <= '0';
B <= '1';
Cin <= '0';
wait for 10 ns;
A <= '1';
B <= '1';
Cin <= '0';
wait for 10 ns;
A <= '0';
B <= '0';
Cin <= '1';
wait for 10 ns;
A <= '1';
B <= '0';
Cin <= '1';
wait for 10 ns;
A <= '0';
B <= '1';
Cin <= '1';
wait for 10 ns;
A <= '1';
B <= '1';
Cin <= '1';
wait for 10 ns;
end process;
END;
Thanks a lot
ReplyDeleteI was diagnosed with COPD with 55-60% lung capacity. My doctor just said all the crying , stomping your feet will not change it so just accept it and basically patted me on the back and sent me home to die. I was devastated and was afraid to do anything. I stopped riding my bike, I was afraid to do anything that would cause any exertion. It consumed my thoughts with every breath and the fear of what to expect was almost more than I could deal with. So I couldn't get myself all time I decided to find a herbal cure online and I came acrose Doctor Itua on how he cure several people suffering from Hiv, and Herpes I gave him a call on this Number +2348149277967 also chat on whatsapp he gave me all the details about the cure i paid him for the medicine after 5 working days i receieve my herbal medicine ,I use it for two weeks that is how I get Cured and today I'm living healthy and fine I give him thanks also promise him to testify about his work,He Can also cure the following diseases..Copd,Herpes,Alzheimer's disease,carcinoma.Asthma,Allergic diseases.Parkinson's ,Epilepsy,Cancer,Fibromyalgia,Hiv,Hepatitis,diabetes,Coeliac disease,Infertility, Asthma.Contact...drituaherbalcenter@gmail.com..Whatsapp Number...+2348149277976
ReplyDeletei am from USA, i am here to give my testimony how i was cured from HIV, i
ReplyDeletecontacted my HIV via blade. a friend of my use blade to peel of her
finger nails and drop it where she use it, so after she has left i did know
what came unto me i looked at my nails, my nails were very long and i took
the blade which she just used on her own nails to cut of my finger nails,
as i was maintaining my names, i mistakenly injured myself. i did even
bothered about it, so when i got to the hospital the next week when i was
ill the doctor told me that i am HIV positive, i wondered where did i got
it from so i remembered how i use my friend blade to cut off my hand so i
feel so sad in my heart to the extent that i don’t even know what to do, so
one day i was passing through the internet i met a testimony of a lady that all
talk about how she was cured by a doctor called DR Imoloa so i quickly
emailed the doctor email, and he also replied to me an told me the
requirements which i will provide and I do according to his command,
he prepare a herbal medicine for me which i took. he
called me the next week that i should go for a test which i did to my own
surprise i found that i was HIV negative. Thanks to him once more the great
doctor that cured me DR Imoloa so you can also emailed him at
{drimoloaherbalmademedicine@gmail.com} or whatssapp him on +2347081986098} God Bless you Sir.
lier
DeleteFINALLY FREE FROM HERPES VIRUSI thought my life had nothing to offer anymore because lifebecame meaningless to me because I had Herpes virus, thesymptoms became very severe and bold and made my familyrun from and abandoned me so they won't get infected. I gaveup everything, my hope, dreams,vision and job because thedoctor told me there's no cure. I consumed so many drugs butthey never cured me but hid the symptoms inside me makingit worse. I was doing some research online someday when Icame across testimonies of some people of how DR Ebhotacured them from Herpes, I never believed at first and thoughtit was a joke but later decided to contact him on the detailsprovided and when I messaged him we talked and he sent mehis herbal medicine and told me to go for a test after twoweeks. Within 7 days of medication the symptomsdisappeared and when I went for a test Lo and behold I wasNEGATIVE by the Doctor Who tested me earlier. Thank you DREbhota because I forever owe you my life and I'll keep ontelling the world about you. If you are going through samesituation worry no more and contact DR Ebhota viadrebhotasolution@gmail. com or WhatsApp him via +2348089535482.he also special on cureing 1. HIV/AIDS2. HERPES 3. CANCER 4.ALS 5. HEPATITIS B 6.DIABETES 7. HUMAN PAPILOMA VIRUS DISEASE(HPV)8. ALZHEIMER 9. LUPUS (Lupus Vulgaris or LupusErythematosus
ReplyDeleteThere are some natural remedies that can be used in the prevention and eliminate diabetes totally. However, the single most important aspect of a diabetes control plan is adopting a wholesome life style Inner Peace, Nutritious and Healthy Diet, and Regular Physical Exercise. A state of inner peace and self-contentment is essential to enjoying a good physical health and overall well-being. The inner peace and self contentment is a just a state of mind.People with diabetes diseases often use complementary and alternative medicine. I diagnosed diabetes in 2010. Was at work feeling unusually tired and sleepy. I borrowed a cyclometer from a co-worker and tested at 760. Went immediately to my doctor and he gave me prescriptions like: Insulin ,Sulfonamides,Thiazolidinediones but Could not get the cure rather to reduce the pain but bring back the pain again. i found a woman testimony name Comfort online how Dr Akhigbe cure her HIV and I also contacted the doctor and after I took his medication as instructed, I am now completely free from diabetes by doctor Akhigbe herbal medicine.So diabetes patients reading this testimony to contact his email drrealakhigbe@gmail.com or his Number +2348142454860 He also use his herbal herbs to diseases like:SPIDER BITE, SCHIZOPHRENIA, LUPUS,EXTERNAL INFECTION, COMMON COLD, JOINT PAIN, EPILEPSY,STROKE,TUBERCULOSIS ,STOMACH DISEASE. ECZEMA, PROGENITOR, EATING DISORDER, LOWER RESPIRATORY INFECTION, DIABETICS,HERPES,HIV/AIDS, ;ALS, CANCER , MENINGITIS,HEPATITIS A AND B,ASTHMA, HEART DISEASE, CHRONIC DISEASE. NAUSEA VOMITING OR DIARRHEA,KIDNEY DISEASE. HEARING LOSSDr Akhigbe is a good man and he heal anybody that comes to him. here is email drrealakhigbe@gmail.com and his Number +2349010754824
ReplyDeleteThere is a safe & effective Natural Herbal Medicine. For Total Cure Call +2349010754824, or email him drrealakhigbe@gmail.com For an Appointment with (Dr.) AKHIGBE contact him. Treatment with Natural Herbal Cure. For:Dengue Fever, Malaria. Painful or Irregular Menstruation. HIV/Aids. Diabetics. Vaginal Infections. Vaginal Discharge. Itching Of the Private Part. Breast Infection. Discharge from Breast. Breast Pain & Itching. Lower Abdominal Pain. No Periods or Periods Suddenly Stop. Women Sexual Problems. High Blood Pressure Chronic Disease. Pain during Sex inside the Pelvis. Pain during Urination. Pelvic Inflammatory Disease, (PID). Dripping Of Sperm from the Vagina As Well As for Low sperm count. Parkinson disease. Obesity, Lupus. Cancer. Tuberculosis. Zero sperm count. Bacteria, Impotence Fertility,Protoplasmic, Diarrhea. Herpatitis A&B, Rabies. Asthma. Quick Ejaculation. Gallstone, Cystic Fibrosis, Schizophrenia, Cirrhosis, Premature Ejaculation. Herpes. Joint Pain. Stroke. Cornelia Disease, Weak Erection. Ovarian problem, Erysipelas, Thyroid, Discharge from Penis. Bronchial Problem, HPV. Hepatitis A and B. STD. Staphylococcus + Gonorrhea + Syphilis. Heart Disease. Pile-Hemorrhoid.rheumatism, Impotence, thyroid, Autism, Sepsis Bacteria, Penis enlargement, Prostate Problem, Waist & Back Pain. Male Infertility and Female Infertility. Etc. Take Action Now. contact him & Order for your Natural Herbal Medicine: +2349010754824 and email him drrealakhigbe@gmail.com Note For an Appointment with (Dr.) AKHIGBE.I suffered in Cancer for a year and three months dieing in pain and full of heart break. One day I was searching through the internet and I came across a testimony herpes cure by doctor Akhigbe. So I contact him to try my luck, we talk and he send me the medicine through courier service and with instructions on how to be drinking it.To my greatest surprise drinking the herbal medicine within three weeks I got the changes and I was cure totally. I don't really know how it happen but there is power in Dr Akhigbe herbal medicine. He is a good herbalist doctor.
ReplyDeleteI GOT CURED FROM HERPES VIRUS I was diagnosed of HERPES virus and i have tried all I can to get cured but all to no avail,,until I saw a post in a health forum about a herbalist man who prepare herbal medications to cure all kind of diseases including #HERPES virus,at first I doubted if it was real but decided to give it a try,when I contacted this herbalist via his email and he prepared a #HERPES herbal cure and sent it to me via DHL delivery company service, when I received this herbal medicine, he gave me step by direction on how to apply it,after applying the way I was instructed,I was totally cured of this deadly disease called HERPES, all thanks to Dr OGODO Email this great herbal doctor via his email Ogodoherbalhomesolution@gmail.com
ReplyDeleteYou can also WhatsApp him on +2349044680467
HE CAN ALSO CURE SICKNESS LIKE
{1}HIV/AIDS
{2}DIABETES
{3}EPILEPSY
{4} BLOOD CANCER
{5} HPV
{6} ALS
{7} HEPATITIS
{8}LOVE SPELL
{9} SICKLE AND ANEMIA
Only DR OGODO Can Help You I Love You Father.
Here is my testimony on how I was cured of HIV by Dr Akhigbe,with his natural herbal medicine. on a regular basis in efforts to help others when I could. As you may know, each donation is tested. Well, on July 6th I had a meeting with a Red Cross representative and was told that I had HIV. “What went through your mind when you heard that "Rose" Good question reader! To be honest, I thought my life was over, that I would ever find love, get married, have children or anything normal. Lucky for me I have an amazing support system. My family supported me then I never thought that I was invincible to STD s or pregnancy or anything else parents warn their kids about. I just didn’t think about it. I was in a monogamous relationship and thought that I asked the right questions. We even talked about marriage Scary. During that time I was in college and donated blood on a re as well. who helped me in search of cure through the media.there we saw a good testimony of sister 'Kate' about the good work of Dr Akhigbe natural herbal medicine cure.then I copied his email address and contacted him. A good herbalist doctor with a good heart, he is kind, loving and caring. He replied back to my message and told me what to do. After a week the doctor sent me my herbal medicine and instructed me how to take it.Yes it worked very well, after drinking it I went to the hospital for another test and everything turned negative. What a wonderful testimony I can never forget in my life. Dr Akhigbe is a man who gave me a life to live happily forever so all I want you all to believe and know that cure of HIV is real and herbs is a powerful medicine and it works and heals. Dr Akhigbe also used his herbal medicine to cure diseases like: HERPES, DIABETES, SCABIES, HEPATITIS A/B, STROKE, CANCER, ALS, TUBERCULOSIS, ASTHMA, PENIS ENLARGEMENT, MALARIA, LUPUS, LIVER CIRRHOSIS, DEPRESSION, HIV/AIDS, EPILEPSY, BACTERIAL, DIARRHEA, HEART DISEASES, HIGH BLOOD PRESSURE, PARKINSON'S, ALZHEIMER, COLD URTICARIA, HUMAN PAPILLOMAVIRUS,INSOMNIA, BACTERIAL VAGINOSIS, SCHIZOPHRENIA, JOINT PAIN, STOMACH PAIN, CHROME DISEASES, CHLAMYDIA, INSOMNIA HEARTBURN, , THYROID, MAR BURG DISEASES, MENINGITIS, ARTHRITIS, BODY WEAK, ANTI VIRUS, SMALLPOX, DENGUE, FEVER, CURBS, CHANCRE, AND OTHERS VARIOUS DISEASES/ VIRUS. You are there and you find yourself in any of these situations, kindly contact Dr Akhigbe now to help you get rid of it. Here is his email address:
ReplyDeletedrrealakhigbe@gmail.com or you can write to him on whats app with his phone number: +2348025012866
My appreciation is to share his testimony for the world to know the good work Dr Akhigbe has done for me and he will do the same for you.