Xilinx synthetize problems

Discussion in 'VHDL' started by Pedro Claro, Jul 4, 2003.

  1. Pedro Claro

    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;
    Pedro Claro, Jul 4, 2003
    #1
    1. Advertising

  2. Pedro Claro

    Dan RADUT Guest

    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

    (Pedro Claro) wrote in message news:<>...
    > 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;
    Dan RADUT, Jul 5, 2003
    #2
    1. Advertising

  3. Pedro Claro

    Pedro Claro Guest

    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

    (Dan RADUT) wrote in message news:<>...
    > 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
    >
    > (Pedro Claro) wrote in message news:<>...
    > > 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;
    Pedro Claro, Jul 6, 2003
    #3
  4. Pedro Claro

    Dan RADUT Guest

    Sorry, I wanted to write: These warning messages mean...

    Dan R

    (Dan RADUT) wrote in message news:<>...
    > 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
    >
    > (Pedro Claro) wrote in message news:<>...
    > > 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;
    Dan RADUT, Jul 6, 2003
    #4
  5. On 5 Jul 2003 17:22:12 -0700, (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
    Brian Drummond, Jul 6, 2003
    #5
  6. Pedro Claro

    Dan RADUT Guest

    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, Jul 7, 2003
    #6
  7. Pedro Claro

    Amontec Team Guest

    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
    Amontec Team, Jul 7, 2003
    #7
  8. Pedro Claro

    Pedro Claro Guest

    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 <> wrote in message news:<>...
    > 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
    Pedro Claro, Jul 10, 2003
    #8
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. David Bishop

    Re: ModelSim 5.7 and xilinx libraries

    David Bishop, Jun 28, 2003, in forum: VHDL
    Replies:
    1
    Views:
    2,175
    Tim Hubberstey
    Jun 28, 2003
  2. Pedro Claro
    Replies:
    2
    Views:
    2,444
    Mike Treseler
    Jul 16, 2003
  3. Tim Terry
    Replies:
    1
    Views:
    2,060
    Michael Nicklas
    Jul 21, 2003
  4. Ronny Hengst

    Altera to Xilinx

    Ronny Hengst, Jul 24, 2003, in forum: VHDL
    Replies:
    1
    Views:
    2,348
    Andras Tantos
    Jul 24, 2003
  5. Mark Riegert

    Xilinx FPGA protoboard < $200

    Mark Riegert, Jul 29, 2003, in forum: VHDL
    Replies:
    1
    Views:
    1,938
    Thomas Fuchs
    Jul 30, 2003
Loading...

Share This Page