Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > General Computer Discussion > Software > booth multilpier in vhdl

Reply
Thread Tools

booth multilpier in vhdl

 
 
kingki kingki is offline
Junior Member
Join Date: Nov 2012
Posts: 1
 
      11-03-2012
hai i am new to vhdl..i got error in my booth multiplier coding..pls correct and nd send me the same..thanks in advance


library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.STD_LOGIC_ARITH.ALL;
use IEEE.STD_LOGIC_UNSIGNED.ALL;

---- Uncomment the following library declaration if instantiating
---- any Xilinx primitives in this code.
--library UNISIM;
--use UNISIM.VComponents.all;
entity module1 is
Port ( clk,notclk:in STD_LOGIC;
mpr : in STD_LOGIC_VECTOR (3 downto 0):="0000";
mpd : in STD_LOGIC_VECTOR (3 downto 0):="0000";
product : out STD_LOGIC_VECTOR(2*4-1 DOWNTO 0));
end module1;

architecture Behavioral of module1 is
signal code:std_logic_vector(1 downto 0):="00";
signal X:STD_LOGIC_VECTOR (3 downto 0):="0000";
signal Y:STD_LOGIC_VECTOR (3 downto 0):="0000";
signal Xminus1:std_logic;
signal newY :STD_LOGIC_VECTOR (3 downto 0):="0000";
signal U1:STD_LOGIC_VECTOR (3 downto 0):="0000";
signal V1:STD_LOGIC_VECTOR (3 downto 0):="0000";
signal U11:STD_LOGIC_VECTOR (3 downto 0):="0000";
signal V11:STD_LOGIC_VECTOR (3 downto 0):="0000";
signal X1:STD_LOGIC_VECTOR(3 DOWNTO 0):="0000";
begin
p1rocess(clk)is
begin
if rising_edge(clk)then
X<=mpr;
Y<=mpd;
newY<= not(Y)+"0001";
Xminus1<=X(0);
code<=X(0) & Xminus1;

end if;
end process;
p2rocess(code,notclk) is
begin
if rising_edge(notclk)then
loop1:for i in 3 downto 0 loop
if code= "00" then
U1(3)<=U1(3);
U1(2 downto 0)<=U1(3 downto 1);
v1(3)<=U1(0);
V1(2 downto 0)<=U1(3 downto 1);
X1(3)<=X(0);
Xminus1<=X(0);
X1(2 downto 0)<=X(3 downto 1);
elsif code= "11" then
U11(3)<=U1(3);
U11(2 downto 0)<=U1(3 downto 1);
v11(3)<=u1(0);
V11(2 downto 0)<=U1(3 downto 1);
X1(3)<=X(0);
Xminus1<=X(0);
X1(2 downto 0)<=X(3 downto 1);
elsif code= "01" then
U11(3 downto 0)<=newY+U1(3 downto 0);
U11(3)<=U1(3);
U11(2 downto 0)<=U1(3 downto 1);
v11(3)<=u1(0);
V11(2 downto 0)<=U1(3 downto 1);
X1(3)<=X(0);
Xminus1<=X(0);
X1(2 downto 0)<=X(3 downto 1);
elsif code="10" then
U11(3 downto 0)<=U1(3 downto 0)+(not(Y)+"0001");
U11(3)<=U1(3);
U11(2 downto 0)<=U1(3 downto 1);
v11(3)<=u1(0);
V11(2 downto 0)<=U1(3 downto 1);
X1(3)<=X(0);
Xminus1<=X(0);
X1(2 downto 0)<=X(3 downto 1);
end if;
end loop;
end if;
end process;
PRODUCT<=U11(3 downto 0) & V11(3 downto 0);
end Behavioral;
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Help to get a copy of A. D. Booth, "A signed binary multiplication technique," Weng Tianxiang VHDL 4 04-07-2005 04:10 PM
NEWS RELEASE: Patton Unveils New Booth at CeBIT 2005 Chris VOIP 0 01-31-2005 08:08 PM
modified booth or mux based (Pekmestzi) multiplier transformer VHDL 1 08-02-2004 03:06 PM
Digital Photo "booth" Tim Digital Photography 5 11-06-2003 07:20 AM
Phone Booth spoiler on the cover! Phil7101 DVD Video 5 07-06-2003 02:28 AM



Advertisments