answersLogoWhite

0


Best Answer

library IEEE;

use IEEE.STD_LOGIC_1164.ALL;

use IEEE.STD_LOGIC_ARITH.ALL;

use IEEE.STD_LOGIC_UNSIGNED.ALL;

entity SA_VHDL is

Port ( I : in std_logic_vector(15 downto 0);

O : out std_logic_vector(7 downto 0);

c_i, a_i, b_i, c_o, s_o : out std_logic;

CLK : in std_logic;

Load : in std_logic);

end SA_VHDL;

architecture Behavioral of SA_VHDL is

signal ina, inb, oreg : std_logic_vector(7 downto 0);

signal so, ci, co: std_logic;

begin

--reg ina

process (CLK)

begin

if CLK'event and CLK='1' then

if (Load='1') then

ina <= I(15 downto 8);

else

ina <= '0' & ina(7 downto 1);

end if;

end if;

end process;

--reg inb

process (CLK)

begin

if CLK'event and CLK='1' then

if (Load='1') then

inb <= I(7 downto 0);

else

inb <= '0' & inb(7 downto 1);

end if;

end if;

end process;

--oreg

process (CLK)

begin

if CLK'event and CLK='1' then

if (Load='1') then

oreg <= "00000000";

ci <= '0';

else

ci <= co;

oreg <= so & oreg(7 downto 1);

end if;

end if;

end process;

-- FA

so <= inb(0) xor ina(0) xor ci;

co <= (inb(0) and ina(0)) or

(inb(0) and ci) or

(ci and ina(0));

O <= oreg;

-- for test

c_i <= ci;

a_i <= ina(0);

b_i <= inb(0);

c_o <= co;

s_o <= so;

end Behavioral;

User Avatar

Wiki User

11y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: What is VHDL program for serial adder in behavioral model?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

What is VHDL program for half adder in behavioral model?

PROGRAM:Library ieee;use ieee.std_logic_1164.all;entity ha1 isport(a,b:in bit;s,c:out bit);end ha1;architecture ha1 of ha1 isbegins


How can you write a VHDL code for full adder using two half adders?

Since a fulladder can be obtained by using 2 halfadders &amp; 1 OR gate.....so we have to call an halfadder program as well as an OR program......this can be implemented easily with the help of structural model rather than dataflow and behavoioural model


What is component initiation in VHDL?

In structural modeling of VHDL, the concept of components is used. In this model, the system to be designed is considered as a combination of sub structures. These sub structures are called components.For example, a full adder is a combination of two half adders and an or gate. Hence, the components used for designing a full adder arehalf adderOR gateInitially, these components are mentioned in the architecture of a full adder VHDL program. We call this as component initiation. Then the components are called onto the main program and used.Remember, we are using the functionality of the components in main program but we are not coding them in the main program. The code for the component programs will be present somewhere else in the project.Means, code them once and use them infinite number of times.


Evinrude outboard model and serial numbers decoding?

how do I de-code my model/serial#? model # E4BRCIC and serial # E0001509


What is Simon's behavioral model?

doing the opposite of what lewis says


What does the a represent in the emotive behavioral therapy model?

activating event


When was the model made serial?

model 32 ws smokless powder serial 326570


Can you tell model from serial number?

model number is always smaller than serial


Could someone tell you what model your 12 ga Remington is serial?

What model by serial? No


What is the value of a Wurlitzer piano model 2745 serial?

model 2745 serial 1801792


how do i find the model of a honda motercycle serial#?

how do i find the model from a honda motercycle serial#


What is the age of a 30 WCF Winchester Model 55 serial 1079114?

with the serial number that you supplied,your Winchester model 55 was made in the year 1930.Winchester model 55 rifles had there own serial numbers,and also were serial numbered in the model 1894 rifles serial numbers.Yours is the later which was serial numbered in the model 1894 serial number range.Yours was one of only 1,535 model 55 rifles made in 1930.