Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > VHDL > Xilinx synthetize problems

Reply
Thread Tools

Xilinx synthetize problems

 
 
Pedro Claro
Guest
Posts: n/a
 
      07-04-2003
After some simulations I decided to synthetize my design, but I don't know
why these errors occur:


WARNING:Xst:1293 - FF/Latch <queue_nr_7> is constant in block <sched_classif>.
WARNING:Xst:1293 - FF/Latch <queue_nr_4> is constant in block <sched_classif>.
WARNING:Xst:1293 - FF/Latch <queue_nr_6> is constant in block <sched_classif>.
WARNING:Xst:1293 - FF/Latch <queue_nr_5> is constant in block <sched_classif>

Does anyone know why this happens?

Here's the code:
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.STD_LOGIC_ARITH.ALL;
use IEEE.STD_LOGIC_UNSIGNED.ALL;
use work.sched_conf.all;

entity sched_classif is
Port (allow_packet: in std_logic;
clk: in std_logic;
packet_ready: in std_logic;
traffic_class: in std_logic_vector(7 downto 0);
-- packet_size:in std_logic_vector(15 downto 0);
queue_nr: out std_logic_vector(7 downto 0);
reset: in std_logic;
enqueue: out std_logic);

end sched_classif;

architecture Behavioral of sched_classif is

begin

prClassif: process(reset,clk)

--variable tclass: std_logic_vector(7 downto 0);
variable temp: integer range 0 to 255;

begin

if(reset='1') then
queue_nr<="00000000";
enqueue<='0';

else if(rising_edge(clk)) then
if(allow_packet='1') then
temp:=conv_integer(traffic_class) rem N_QUEUES;
queue_nr<= conv_std_logic_vector(temp,;
enqueue<='1';
else if(packet_ready='0') then
queue_nr<=conv_std_logic_vector(N_QUEUES,;
enqueue<='0';
end if;
end if;
end if;
end if;
 
Reply With Quote
 
 
 
 
Dan RADUT
Guest
Posts: n/a
 
      07-05-2003
This warnings mean that your code is changing only the bits 3 down to 0 of
the vector queue_nr(7 downto 0).
Simulation results should show queue_nr output as "0000bbbb".

Anyway this warning doesn't stop the implementation.

BTW what is N_QUEUES? Where is declared?

Regards,

Dan Radut

http://www.velocityreviews.com/forums/(E-Mail Removed) (Pedro Claro) wrote in message news:<(E-Mail Removed). com>...
> After some simulations I decided to synthetize my design, but I don't know
> why these errors occur:
>
>
> WARNING:Xst:1293 - FF/Latch <queue_nr_7> is constant in block <sched_classif>.
> WARNING:Xst:1293 - FF/Latch <queue_nr_4> is constant in block <sched_classif>.
> WARNING:Xst:1293 - FF/Latch <queue_nr_6> is constant in block <sched_classif>.
> WARNING:Xst:1293 - FF/Latch <queue_nr_5> is constant in block <sched_classif>
>
> Does anyone know why this happens?
>
> Here's the code:
> library IEEE;
> use IEEE.STD_LOGIC_1164.ALL;
> use IEEE.STD_LOGIC_ARITH.ALL;
> use IEEE.STD_LOGIC_UNSIGNED.ALL;
> use work.sched_conf.all;
>
> entity sched_classif is
> Port (allow_packet: in std_logic;
> clk: in std_logic;
> packet_ready: in std_logic;
> traffic_class: in std_logic_vector(7 downto 0);
> -- packet_size:in std_logic_vector(15 downto 0);
> queue_nr: out std_logic_vector(7 downto 0);
> reset: in std_logic;
> enqueue: out std_logic);
>
> end sched_classif;
>
> architecture Behavioral of sched_classif is
>
> begin
>
> prClassif: process(reset,clk)
>
> --variable tclass: std_logic_vector(7 downto 0);
> variable temp: integer range 0 to 255;
>
> begin
>
> if(reset='1') then
> queue_nr<="00000000";
> enqueue<='0';
>
> else if(rising_edge(clk)) then
> if(allow_packet='1') then
> temp:=conv_integer(traffic_class) rem N_QUEUES;
> queue_nr<= conv_std_logic_vector(temp,;
> enqueue<='1';
> else if(packet_ready='0') then
> queue_nr<=conv_std_logic_vector(N_QUEUES,;
> enqueue<='0';
> end if;
> end if;
> end if;
> end if;

 
Reply With Quote
 
 
 
 
Pedro Claro
Guest
Posts: n/a
 
      07-06-2003
Thanks for the reply Dan. Well N_QUEUES is an integer declared in
sched_conf.all:

constant N_QUEUES : integer:=8;

But you say that queue_nr is changed but what about these piece of codes:

queue_nr<= conv_std_logic_vector(temp,;

or

queue_nr<="00000000";

Don't they change all the bits in n_queue_nr?


Pedro Claro

(E-Mail Removed) (Dan RADUT) wrote in message news:<(E-Mail Removed) om>...
> This warnings mean that your code is changing only the bits 3 down to 0 of
> the vector queue_nr(7 downto 0).
> Simulation results should show queue_nr output as "0000bbbb".
>
> Anyway this warning doesn't stop the implementation.
>
> BTW what is N_QUEUES? Where is declared?
>
> Regards,
>
> Dan Radut
>
> (E-Mail Removed) (Pedro Claro) wrote in message news:<(E-Mail Removed). com>...
> > After some simulations I decided to synthetize my design, but I don't know
> > why these errors occur:
> >
> >
> > WARNING:Xst:1293 - FF/Latch <queue_nr_7> is constant in block <sched_classif>.
> > WARNING:Xst:1293 - FF/Latch <queue_nr_4> is constant in block <sched_classif>.
> > WARNING:Xst:1293 - FF/Latch <queue_nr_6> is constant in block <sched_classif>.
> > WARNING:Xst:1293 - FF/Latch <queue_nr_5> is constant in block <sched_classif>
> >
> > Does anyone know why this happens?
> >
> > Here's the code:
> > library IEEE;
> > use IEEE.STD_LOGIC_1164.ALL;
> > use IEEE.STD_LOGIC_ARITH.ALL;
> > use IEEE.STD_LOGIC_UNSIGNED.ALL;
> > use work.sched_conf.all;
> >
> > entity sched_classif is
> > Port (allow_packet: in std_logic;
> > clk: in std_logic;
> > packet_ready: in std_logic;
> > traffic_class: in std_logic_vector(7 downto 0);
> > -- packet_size:in std_logic_vector(15 downto 0);
> > queue_nr: out std_logic_vector(7 downto 0);
> > reset: in std_logic;
> > enqueue: out std_logic);
> >
> > end sched_classif;
> >
> > architecture Behavioral of sched_classif is
> >
> > begin
> >
> > prClassif: process(reset,clk)
> >
> > --variable tclass: std_logic_vector(7 downto 0);
> > variable temp: integer range 0 to 255;
> >
> > begin
> >
> > if(reset='1') then
> > queue_nr<="00000000";
> > enqueue<='0';
> >
> > else if(rising_edge(clk)) then
> > if(allow_packet='1') then
> > temp:=conv_integer(traffic_class) rem N_QUEUES;
> > queue_nr<= conv_std_logic_vector(temp,;
> > enqueue<='1';
> > else if(packet_ready='0') then
> > queue_nr<=conv_std_logic_vector(N_QUEUES,;
> > enqueue<='0';
> > end if;
> > end if;
> > end if;
> > end if;

 
Reply With Quote
 
Dan RADUT
Guest
Posts: n/a
 
      07-06-2003
Sorry, I wanted to write: These warning messages mean...

Dan R

(E-Mail Removed) (Dan RADUT) wrote in message news:<(E-Mail Removed) om>...
> This warnings mean that your code is changing only the bits 3 down to 0 of
> the vector queue_nr(7 downto 0).
> Simulation results should show queue_nr output as "0000bbbb".
>
> Anyway this warning doesn't stop the implementation.
>
> BTW what is N_QUEUES? Where is declared?
>
> Regards,
>
> Dan Radut
>
> (E-Mail Removed) (Pedro Claro) wrote in message news:<(E-Mail Removed). com>...
> > After some simulations I decided to synthetize my design, but I don't know
> > why these errors occur:
> >
> >
> > WARNING:Xst:1293 - FF/Latch <queue_nr_7> is constant in block <sched_classif>.
> > WARNING:Xst:1293 - FF/Latch <queue_nr_4> is constant in block <sched_classif>.
> > WARNING:Xst:1293 - FF/Latch <queue_nr_6> is constant in block <sched_classif>.
> > WARNING:Xst:1293 - FF/Latch <queue_nr_5> is constant in block <sched_classif>
> >
> > Does anyone know why this happens?
> >
> > Here's the code:
> > library IEEE;
> > use IEEE.STD_LOGIC_1164.ALL;
> > use IEEE.STD_LOGIC_ARITH.ALL;
> > use IEEE.STD_LOGIC_UNSIGNED.ALL;
> > use work.sched_conf.all;
> >
> > entity sched_classif is
> > Port (allow_packet: in std_logic;
> > clk: in std_logic;
> > packet_ready: in std_logic;
> > traffic_class: in std_logic_vector(7 downto 0);
> > -- packet_size:in std_logic_vector(15 downto 0);
> > queue_nr: out std_logic_vector(7 downto 0);
> > reset: in std_logic;
> > enqueue: out std_logic);
> >
> > end sched_classif;
> >
> > architecture Behavioral of sched_classif is
> >
> > begin
> >
> > prClassif: process(reset,clk)
> >
> > --variable tclass: std_logic_vector(7 downto 0);
> > variable temp: integer range 0 to 255;
> >
> > begin
> >
> > if(reset='1') then
> > queue_nr<="00000000";
> > enqueue<='0';
> >
> > else if(rising_edge(clk)) then
> > if(allow_packet='1') then
> > temp:=conv_integer(traffic_class) rem N_QUEUES;
> > queue_nr<= conv_std_logic_vector(temp,;
> > enqueue<='1';
> > else if(packet_ready='0') then
> > queue_nr<=conv_std_logic_vector(N_QUEUES,;
> > enqueue<='0';
> > end if;
> > end if;
> > end if;
> > end if;

 
Reply With Quote
 
Brian Drummond
Guest
Posts: n/a
 
      07-06-2003
On 5 Jul 2003 17:22:12 -0700, (E-Mail Removed) (Pedro Claro)
wrote:


>constant N_QUEUES : integer:=8;
>
>But you say that queue_nr is changed but what about these piece of codes:
>
>queue_nr<= conv_std_logic_vector(temp,;
>or
>queue_nr<="00000000";
>
>Don't they change all the bits in n_queue_nr?

No, because a) temp is already known to be <= N_QUEUES (from the
previous line of code) and "00000000" certainly is.
The synthesiser has quite correctly trimmed the upper bits, and warned
you about it. If that's what you wanted it to do, you can ignore the
warnings.

- Brian
 
Reply With Quote
 
Dan RADUT
Guest
Posts: n/a
 
      07-06-2003
Pedro:

Now as I know that N_QUEUES is an integer having the value 8 it is very
simple to explain why you get those warnings. Please see my comments below
inserted within your code.
>
> entity sched_classif is
> Port (allow_packet: in std_logic;
> clk: in std_logic;
> packet_ready: in std_logic;
> traffic_class: in std_logic_vector(7 downto 0);
> -- packet_size:in std_logic_vector(15 downto 0);
> queue_nr: out std_logic_vector(7 downto 0);
> reset: in std_logic;
> enqueue: out std_logic);
>
> end sched_classif;
>
> architecture Behavioral of sched_classif is
>
> begin
>
> prClassif: process(reset,clk)
>
> --variable tclass: std_logic_vector(7 downto 0);
> variable temp: integer range 0 to 255;
>
> begin
>
> if(reset='1') then
> queue_nr<="00000000";

Thsi statement assign all queue_nr bits the value '0'.

> enqueue<='0';
>
> else if(rising_edge(clk)) then
> if(allow_packet='1') then
> temp:=conv_integer(traffic_class) rem N_QUEUES;

As N_QUEUES is 8, temp will take one of the following values:0, 1, 2, 3, 4,
5, 6 or 7.
> queue_nr<= conv_std_logic_vector(temp,;

queue_nr is assigned one of the following vectors:

"00000000" (temp = 0), "00000001" (temp = 1), "00000010" (temp = 2),
"00000011" (temp = 3), "00000100" (temp = 4), "00000101" (temp = 5),
"00000110" (temp = 6) and "00000111" (temp = 7)

You can see that only the bits 2 downto 0 change due to this statement.

> enqueue<='1';
> else if(packet_ready='0') then
> queue_nr<=conv_std_logic_vector(N_QUEUES,;

As N_QUEUES is 8 this statement means that queue_nr is assigned the vector
"00001000", that is the bit queue_nr(3) changes.

So only the lower 3 downto 0 bits could have different logic values ('0' or
'1') and will be implemented accordingly by inferring FFs.
The upper 7 downto 4 bits are always assigned the '0' logic level, so they
are constant. Warnings tell you that no logic is inferred as it not necessary
to drive these outputs: the input nets of IOB for these bits are merely tied
to constant '0'.

As an exercise change the value of N_QUEUES to 128 and you'll get no warnings.

Regards,

Dan R
 
Reply With Quote
 
Amontec Team
Guest
Posts: n/a
 
      07-07-2003
Dan RADUT wrote:
> Pedro:
>
> Now as I know that N_QUEUES is an integer having the value 8 it is very
> simple to explain why you get those warnings. Please see my comments below
> inserted within your code.
>
>>entity sched_classif is
>> Port (allow_packet: in std_logic;
>> clk: in std_logic;
>> packet_ready: in std_logic;
>> traffic_class: in std_logic_vector(7 downto 0);
>>-- packet_size:in std_logic_vector(15 downto 0);
>> queue_nr: out std_logic_vector(7 downto 0);
>> reset: in std_logic;
>> enqueue: out std_logic);
>>
>>end sched_classif;
>>
>>architecture Behavioral of sched_classif is
>>
>>begin
>>
>>prClassif: process(reset,clk)
>>
>>--variable tclass: std_logic_vector(7 downto 0);
>>variable temp: integer range 0 to 255;
>>
>>begin
>>
>>if(reset='1') then
>> queue_nr<="00000000";

>
> Thsi statement assign all queue_nr bits the value '0'.
>
>
>> enqueue<='0';
>>
>>else if(rising_edge(clk)) then
>> if(allow_packet='1') then
>> temp:=conv_integer(traffic_class) rem N_QUEUES;

>
> As N_QUEUES is 8, temp will take one of the following values:0, 1, 2, 3, 4,
> 5, 6 or 7.
>
>> queue_nr<= conv_std_logic_vector(temp,;

>
> queue_nr is assigned one of the following vectors:
>
> "00000000" (temp = 0), "00000001" (temp = 1), "00000010" (temp = 2),
> "00000011" (temp = 3), "00000100" (temp = 4), "00000101" (temp = 5),
> "00000110" (temp = 6) and "00000111" (temp = 7)
>
> You can see that only the bits 2 downto 0 change due to this statement.
>
>
>> enqueue<='1';
>> else if(packet_ready='0') then
>> queue_nr<=conv_std_logic_vector(N_QUEUES,;

>
> As N_QUEUES is 8 this statement means that queue_nr is assigned the vector
> "00001000", that is the bit queue_nr(3) changes.
>
> So only the lower 3 downto 0 bits could have different logic values ('0' or
> '1') and will be implemented accordingly by inferring FFs.
> The upper 7 downto 4 bits are always assigned the '0' logic level, so they
> are constant. Warnings tell you that no logic is inferred as it not necessary
> to drive these outputs: the input nets of IOB for these bits are merely tied
> to constant '0'.
>
> As an exercise change the value of N_QUEUES to 128 and you'll get no warnings.
>
> Regards,
>
> Dan R

Right,

and just for advice and for a better generic code:

please use
queue_nr<= (others => '0');
for your
queue_nr<="00000000";

Larry
Amotnec Team
www.amontec.com

 
Reply With Quote
 
Pedro Claro
Guest
Posts: n/a
 
      07-10-2003
Well, thanks for the explanation. I suspected it was something like.
And I always forget in my code the "others" thing.

Pedro Claro


Amontec Team <(E-Mail Removed)> wrote in message news:<(E-Mail Removed)>. ..
> Dan RADUT wrote:
> > Pedro:
> >
> > Now as I know that N_QUEUES is an integer having the value 8 it is very
> > simple to explain why you get those warnings. Please see my comments below
> > inserted within your code.
> >
> >>entity sched_classif is
> >> Port (allow_packet: in std_logic;
> >> clk: in std_logic;
> >> packet_ready: in std_logic;
> >> traffic_class: in std_logic_vector(7 downto 0);
> >>-- packet_size:in std_logic_vector(15 downto 0);
> >> queue_nr: out std_logic_vector(7 downto 0);
> >> reset: in std_logic;
> >> enqueue: out std_logic);
> >>
> >>end sched_classif;
> >>
> >>architecture Behavioral of sched_classif is
> >>
> >>begin
> >>
> >>prClassif: process(reset,clk)
> >>
> >>--variable tclass: std_logic_vector(7 downto 0);
> >>variable temp: integer range 0 to 255;
> >>
> >>begin
> >>
> >>if(reset='1') then
> >> queue_nr<="00000000";

> >
> > Thsi statement assign all queue_nr bits the value '0'.
> >
> >
> >> enqueue<='0';
> >>
> >>else if(rising_edge(clk)) then
> >> if(allow_packet='1') then
> >> temp:=conv_integer(traffic_class) rem N_QUEUES;

> >
> > As N_QUEUES is 8, temp will take one of the following values:0, 1, 2, 3, 4,
> > 5, 6 or 7.
> >
> >> queue_nr<= conv_std_logic_vector(temp,;

> >
> > queue_nr is assigned one of the following vectors:
> >
> > "00000000" (temp = 0), "00000001" (temp = 1), "00000010" (temp = 2),
> > "00000011" (temp = 3), "00000100" (temp = 4), "00000101" (temp = 5),
> > "00000110" (temp = 6) and "00000111" (temp = 7)
> >
> > You can see that only the bits 2 downto 0 change due to this statement.
> >
> >
> >> enqueue<='1';
> >> else if(packet_ready='0') then
> >> queue_nr<=conv_std_logic_vector(N_QUEUES,;

> >
> > As N_QUEUES is 8 this statement means that queue_nr is assigned the vector
> > "00001000", that is the bit queue_nr(3) changes.
> >
> > So only the lower 3 downto 0 bits could have different logic values ('0' or
> > '1') and will be implemented accordingly by inferring FFs.
> > The upper 7 downto 4 bits are always assigned the '0' logic level, so they
> > are constant. Warnings tell you that no logic is inferred as it not necessary
> > to drive these outputs: the input nets of IOB for these bits are merely tied
> > to constant '0'.
> >
> > As an exercise change the value of N_QUEUES to 128 and you'll get no warnings.
> >
> > Regards,
> >
> > Dan R

> Right,
>
> and just for advice and for a better generic code:
>
> please use
> queue_nr<= (others => '0');
> for your
> queue_nr<="00000000";
>
> Larry
> Amotnec Team
> www.amontec.com

 
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
Xilinx FPGA protoboard < $200 Mark Riegert VHDL 1 07-30-2003 04:01 PM
Altera to Xilinx Ronny Hengst VHDL 1 07-24-2003 05:05 PM
xilinx logiblox and modelsim SE 5.6 Tim Terry VHDL 1 07-21-2003 03:25 PM
Again the synthetize problems, structures Pedro Claro VHDL 2 07-16-2003 04:52 PM
Re: ModelSim 5.7 and xilinx libraries David Bishop VHDL 1 06-28-2003 04:53 PM



Advertisments