Professional Documents
Culture Documents
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
entity ha is
Port ( a : in STD_LOGIC;
b : in STD_LOGIC;
s : out STD_LOGIC;
c: out STD_LOGIC);
end ha;
architecture Behavioral of ha is
begin
end Behavioral;
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
entity fa is
Port ( a : in STD_LOGIC;
b : in STD_LOGIC;
cin : in STD_LOGIC;
s : out STD_LOGIC;
end fa;
architecture Behavioral of fa is
begin
end Behavioral;
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
entity Adder_4bit is
end Adder_4bit;
Component ha
Port ( a : in STD_LOGIC;
b : in STD_LOGIC;
s : out STD_LOGIC;
c: out STD_LOGIC);
end component;
Component fa
Port ( a : in STD_LOGIC;
b : in STD_LOGIC;
cin : in STD_LOGIC;
s : out STD_LOGIC;
end component;
begin
end Behavioral;
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
entity Adder_6bit is
end Adder_6bit;
Component ha
Port ( a : in STD_LOGIC;
b : in STD_LOGIC;
s : out STD_LOGIC;
c: out STD_LOGIC);
end component;
Component fa
Port ( a : in STD_LOGIC;
b : in STD_LOGIC;
cin : in STD_LOGIC;
s : out STD_LOGIC;
end component;
begin
end Behavioral;
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
entity Vedic_Multiplier_2bits is
end Vedic_Multiplier_2bits;
architecture Behavioral of Vedic_Multiplier_2bits is
begin
end Behavioral;
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
entity Vedic_Multiplier_4bit is
end Vedic_Multiplier_4bit;
Component Vedic_Multiplier_2bits
end component;
Component Adder_4bit
end component;
Component Adder_6bit
end component;
begin
s10<=('0'&s5);
end Behavioral;
Modified booth multiplier code
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use ieee.std_logic_unsigned.all;
entity booth_multiplier8 is
end booth_multiplier8;
begin
process(A,B)
begin
D :=B&'0';
minusA4:=(((not A)+1));
if A= "10000000" then
minusA:= "010000000";
else
minusA:=minusA4(7)&minusA4;
end if;
mcd:= A(7)&A;
twiceA:=std_logic_vector(A)&'0';
for i in 0 to 3 loop
else
end if;
acqr(16):=acqr(17);
end loop;
end process;
end Behavioral;