Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > VHDL > Can any one explain booths algorithm in PLL design??

Reply
Thread Tools

Can any one explain booths algorithm in PLL design??

 
 
maheshkumar0459 maheshkumar0459 is offline
Junior Member
Join Date: Jul 2011
Posts: 5
 
      07-05-2011
LIBRARY ieee;
USE ieee.std_logic_1164.all;
USE IEEE.numeric_std.ALL;
ENTITY multiplier IS
port (CLK : in std_logic;
RESET : in std_logic;
input1 : in std_logic_vector(7 downto 0);
input2 : in signed(7 downto 0);
output : out signed(7 downto 0)
);
END multiplier ;
ARCHITECTURE behavior OF multiplier IS
signal out_temp : signed(15 downto 0);
signal input1_buf : signed(15 downto 0);
signal part0,part1,part2,part3,part4,
part5,part6,part7 : signed(15 downto 0);
begin
process(CLK, RESET)
begin
if (RESET='1') then
out_temp <= (others => '0');
output <= (others => '0');
input1_buf <= (others => '0');
part0 <= (others => '0');
part1 <= (others => '0');
part2 <= (others => '0');
part3 <= (others => '0');
part4 <= (others => '0');
part5 <= (others => '0');
part6 <= (others => '0');
part7 <= (others => '0');
elsif rising_edge(CLK) then
input1_buf <= input1(7)&input1(7)&input1(7)&
input1(7)&input1(7)&input1(7)&
input1(7)&input1(7)&
signed(input1);
if (input2(0)='1') then
part0 <= -(input1_buf);
else
part0 <= (others => '0');
end if;
if (input2(1)='1') then
if (input2(0)='1') then
part1 <= (others => '0');
else
part1 <= -(input1_buf);
end if;
else
if (input2(0)='1') then
part1 <= input1_buf;
else
part1 <= (others => '0');
end if;
end if;
if (input2(2)='1') then
if (input2(1)='1') then
part2 <= (others => '0');
else
part2 <= -(input1_buf);
end if;
else
if (input2(1)='1') then
part2 <= input1_buf;
else
part2 <= (others => '0');
end if;
end if;
if (input2(3)='1') then
if (input2(2)='1') then
part3 <= (others => '0');
else
part3 <= -(input1_buf);
end if;
else
if (input2(2)='1') then
part3 <= input1_buf;
else
part3 <= (others => '0');
end if;
end if;
if (input2(4)='1') then
if (input2(3)='1') then
part4 <= (others => '0');
else
part4 <= -(input1_buf);
end if;
else
if (input2(3)='1') then
part4 <= input1_buf;
else
part4 <= (others => '0');
end if;
end if;
if (input2(5)='1') then
if (input2(4)='1') then
part5 <= (others => '0');
else
part5 <= -(input1_buf);
end if;
else
if (input2(4)='1') then
part5 <= input1_buf;
else
part5 <= (others => '0');
end if;
end if;
if (input2(6)='1') then
if (input2(5)='1') then
part6 <= (others => '0');
else
part6 <= -(input1_buf);
end if;
else
if (input2(5)='1') then
part6 <= input1_buf;
else
part6 <= (others => '0');
end if;
end if;
if (input2(7)='1') then
if (input2(6)='1') then
part7 <= (others => '0');
else
part7 <= -(input1_buf);
end if;
else
if (input2(6)='1') then
part7 <= input1_buf;
else
part7 <= (others => '0');
end if;
end if;
out_temp <= part0+(part1(14 downto 0)&'0')+
(part2(13 downto 0)&"00")+
(part3(12 downto 0)&"000")+
(part4(11 downto 0)&"0000")+
(part5(10 downto 0)&"00000")+
(part6(9 downto 0)&"000000")+
(part7(8 downto 0)&"0000000");
output <= out_temp(15 downto ;
end if;
end process;
END behavior;
 
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 in writing code for modified booths radix4 algorithm using Devesh Kishore VHDL 1 01-15-2013 05:55 PM
CAn any one help me in understanding these 3 lines in code from PLL?? maheshkumar0459 VHDL 0 07-06-2011 02:37 PM
501 PIX "deny any any" "allow any any" Any Anybody? Networking Student Cisco 4 11-16-2006 10:40 PM
Highlited default key does not work. Can any one explain this ? =?Utf-8?B?bWFrdGhhcg==?= ASP .Net 2 02-27-2004 10:06 PM
Can any one explain this code bolck in detail. Jagadeesh ASP .Net Security 0 01-02-2004 07:25 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57