Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > VHDL > please help me..

Reply
Thread Tools

please help me..

 
 
anupamaasok
Guest
Posts: n/a
 
      02-27-2008
i am doing a single precision floating point multiplier.my code goes like
this

entity multiplier is
port(frac_A,frac_B:in std_logic_vector(23 downto 0);
s_A,s_B:in std_logic;
e_A,e_B:in std_logic_vector(7 downto 0);
frac_Rut std_logic_vector(23 downto 0);
s_Rut std_logic;
e_Rut std_logic_vector(7 downto 0);
ovrflowut std_logic;
clk:in std_logic;
reset:in std_logic;
zfut std_logic
);
end multiplier;

architecture Behavioral of multiplier is

signal mux:std_logic_vector(23 downto 0);

signal e_int:std_logic_vector(8 downto 0);
signal sel:std_logic_vector(1 downto 0);
signal e_intr:std_logic_vector(8 downto 0);
signal l:std_logic:='1';
signal S:std_logic_vector(23 downto 0);
signal sum:std_logic_vector(48 downto 0);
signal A:std_logic_vector(23 downto 0);
signal P:std_logic_vector(48 downto 0);
signal k:std_logic_vector(4 downto 0);

begin

s_R<=s_A xor s_B;
e_intr<=('0'& e_A) +('0' & e_B)-"001111111" ;

process(reset,clk)
variable i:integer;
variable n:std_logic;

begin
if reset='1' then
A<=(others=>'0');
P<=(others=>'0');

elsif (clk'event and clk='1' )then
if l = '1' then
A <= frac_A;
S <= (not A)+'1';
P <= "000000000000000000000000" & frac_B & '0';
l <= '0';
k <= "00000";
else
P <= sum;
for i in 0 to 47 loop
P(i)<=P(i+1);
end loop;
P(4<='0';
end if;
sel(0)<=P(0);
sel(1)<=P(1);
case sel is
when "00"=>mux<=(others=>'0');
when "01"=>mux<=A;
when "10"=>mux<=S;
when "11"=>mux<=(others=>'0');
when others=>mux<=(others=>'0');

end case;

if k="10111" then
if P(4 = '1' then
e_int <= e_intr+'1';
else
e_int <= e_intr;
for i in 0 to 47 loop
P(i+1) <= P(i);
end loop;
end if;

e_R(7 downto 0) <= e_int(7 downto 0);

ovrflow<=e_int(;

frac_R(23 downto 0)<=P(48 downto 25);
n:='0';
for i in 0 to 48 loop
n:=n nor P(i);
end loop;
zf<=n;

else
sum <= P +(mux & "0000000000000000000000000" );
k<= k+'1';
end if;
end if;


end process;

end Behavioral;
although i have used the signal sum it is always showing a warning error
saying its not used.the warning errors shown are

ARNING:Xst:646 - Signal <sum> is assigned but never used.
WARNING:Xst:1426 - The value init of the FF/Latch l hinder the constant
cleaning in the block multiplier.
what should i do? please help me....


--
Message posted using http://www.talkaboutprogramming.com/...omp.lang.vhdl/
More information at http://www.talkaboutprogramming.com/faq.html

 
Reply With Quote
 
 
 
 
Pieter Hulshoff
Guest
Posts: n/a
 
      02-27-2008
anupamaasok wrote:
> although i have used the signal sum it is always showing a warning error
> saying its not used.the warning errors shown are
>
> ARNING:Xst:646 - Signal <sum> is assigned but never used.
> WARNING:Xst:1426 - The value init of the FF/Latch l hinder the constant
> cleaning in the block multiplier.
> what should i do? please help me....


The first warning is incorrect as far as I can see, but might be a result of the
second warning. Within your code, l is only ever assigned as '0'. The only
reason it will ever be '1' is because of your initialisation value; otherwise it
would have been a constant '0'. Perhaps an error in your code?

Kind regards,

Pieter Hulshoff
 
Reply With Quote
 
 
 
 
Shannon
Guest
Posts: n/a
 
      02-29-2008
The error is correct. 'sum' is never used.

Look at your first IF..Then..Else statement. 'l' is always = 1 so the
'Else' clause will never be executed. Your compiler is deleting all
that code since it is not used. That is the only place you use 'sum'
so the error is correct.

Shannon


On Feb 27, 12:07*am, Pieter Hulshoff <(E-Mail Removed)> wrote:
> anupamaasok wrote:
> > although i have used the signal sum it is always showing a warning error
> > saying its not used.the warning errors shown are

>
> > ARNING:Xst:646 - Signal <sum> is assigned but never used.
> > WARNING:Xst:1426 - The value init of the FF/Latch l hinder the constant
> > cleaning in the block multiplier.
> > what should i do? please help me....

>
> The first warning is incorrect as far as I can see, but might be a result of the
> second warning. Within your code, l is only ever assigned as '0'. The only
> reason it will ever be '1' is because of your initialisation value; otherwise it
> would have been a constant '0'. Perhaps an error in your code?
>
> Kind regards,
>
> Pieter Hulshoff


 
Reply With Quote
 
Thomas Rouam
Guest
Posts: n/a
 
      03-01-2008
On Feb 29, 5:22*pm, Shannon <(E-Mail Removed)> wrote:
> The error is correct. *'sum' is never used.
>
> Look at your first IF..Then..Else statement. *'l' is always = 1 so the
> 'Else' clause will never be executed. *Your compiler is deleting all
> that code since it is not used. *That is the only place you use 'sum'
> so the error is correct.
>
> Shannon
>
> On Feb 27, 12:07*am, Pieter Hulshoff <(E-Mail Removed)> wrote:
>
>
>
> > anupamaasok wrote:
> > > although i have used the signal sum it is always showing a warning error
> > > saying its not used.the warning errors shown are

>
> > > ARNING:Xst:646 - Signal <sum> is assigned but never used.
> > > WARNING:Xst:1426 - The value init of the FF/Latch l hinder the constant
> > > cleaning in the block multiplier.
> > > what should i do? please help me....

>
> > The first warning is incorrect as far as I can see, but might be a result of the
> > second warning. Within your code, l is only ever assigned as '0'. The only
> > reason it will ever be '1' is because of your initialisation value; otherwise it
> > would have been a constant '0'. Perhaps an error in your code?

>
> > Kind regards,

>
> > Pieter Hulshoff- Hide quoted text -

>
> - Show quoted text -


What Shannon just said is right and wrong.
'sum' is truly never used, but not for thos reasons.
If you look at that IF..Then.Else statement he's talking about, in the
Else part :
P <= sum;
for i in 0 to 47 loop
P(i)<=P(i+1);
end loop;
P(4<='0';
sum is assigend to P, but then the bits 0 to 47 of P are assigned and
finally the bit 48. sinc P is defined as 48 downto 0, P is entireley
assigned with the for loop and the final 48th bit assignment. These
two assignement "overwrite" the P <= sum assignment. Since that's the
only place where you use sum, it is not used.

Best Regards,

Thomas
 
Reply With Quote
 
Thomas Stanka
Guest
Posts: n/a
 
      03-03-2008
On 27 Feb., 09:07, Pieter Hulshoff <(E-Mail Removed)> wrote:
> second warning. Within your code, l is only ever assigned as '0'. The only
> reason it will ever be '1' is because of your initialisation value; otherwise it
> would have been a constant '0'. Perhaps an error in your code?


Signal values in the signal declaration are not relevant for synthesis
(only for simulation). So the signal 'I' should throw the first
warning because its value is not defined.
The signal 'I' should be initialisated during reset.

bye Thomas

 
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
Please please please help this guy with his open source java app casioculture@gmail.com Java 4 05-05-2005 08:24 AM
Console profile for Windows app in VC++ - PLEASE PLEASE PLEASE HELP! MuZZy C++ 7 01-07-2005 08:40 PM
Computer problems please please please help Nick Computer Support 0 06-04-2004 08:49 PM
HELP! HELP! PLEASE, PLEASE, PLEASE tpg comcntr Computer Support 11 02-15-2004 06:22 PM
please help... ...me learn C++ please please please :) KK C++ 2 10-14-2003 02:08 PM



Advertisments