Xilinx synthetize problems

P

Pedro Claro

Guest
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,8);
enqueue<='1';
else if(packet_ready='0') then
queue_nr<=conv_std_logic_vector(N_QUEUES,8);
enqueue<='0';
end if;
end if;
end if;
end if;
 
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

orgulhosamenteso@hotmail.com (Pedro Claro) wrote in message news:<25c2602a.0307040717.4522ccb3@posting.google.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,8);
enqueue<='1';
else if(packet_ready='0') then
queue_nr<=conv_std_logic_vector(N_QUEUES,8);
enqueue<='0';
end if;
end if;
end if;
end if;
 
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,8);

or

queue_nr<="00000000";

Don't they change all the bits in n_queue_nr?


Pedro Claro

dradut@golden.net (Dan RADUT) wrote in message news:<b647fde8.0307050705.4a6b7ac@posting.google.com>...
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

orgulhosamenteso@hotmail.com (Pedro Claro) wrote in message news:<25c2602a.0307040717.4522ccb3@posting.google.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,8);
enqueue<='1';
else if(packet_ready='0') then
queue_nr<=conv_std_logic_vector(N_QUEUES,8);
enqueue<='0';
end if;
end if;
end if;
end if;
 
Sorry, I wanted to write: These warning messages mean...

Dan R

dradut@golden.net (Dan RADUT) wrote in message news:<b647fde8.0307050705.4a6b7ac@posting.google.com>...
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

orgulhosamenteso@hotmail.com (Pedro Claro) wrote in message news:<25c2602a.0307040717.4522ccb3@posting.google.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,8);
enqueue<='1';
else if(packet_ready='0') then
queue_nr<=conv_std_logic_vector(N_QUEUES,8);
enqueue<='0';
end if;
end if;
end if;
end if;
 
On 5 Jul 2003 17:22:12 -0700, orgulhosamenteso@hotmail.com (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,8);
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
 
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,8);
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,8);
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
 
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,8);

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,8);

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
 
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 <laurent.gauch@www.DELALLCAPSamontec.com> wrote in message news:<3F095920.3040402@www.DELALLCAPSamontec.com>...
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,8);

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,8);

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
 

Welcome to EDABoard.com

Sponsor

Back
Top