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 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


    prClassif: process(reset,clk)

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


    if(reset='1') then

    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);
    else if(packet_ready='0') then
    end if;
    end if;
    end if;
    end if;
    Pedro Claro, Jul 4, 2003
    1. Advertisements

  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?


    Dan Radut
    Dan RADUT, Jul 5, 2003
    1. Advertisements

  3. Pedro Claro

    Pedro Claro Guest

    Thanks for the reply Dan. Well N_QUEUES is an integer declared in

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



    Don't they change all the bits in n_queue_nr?

    Pedro Claro
    Pedro Claro, Jul 6, 2003
  4. Pedro Claro

    Dan RADUT Guest

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

    Dan R
    Dan RADUT, Jul 6, 2003
  5. 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

    - Brian
    Brian Drummond, Jul 6, 2003
  6. Pedro Claro

    Dan RADUT Guest


    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.
    Thsi statement assign all queue_nr bits the value '0'.
    As N_QUEUES is 8, temp will take one of the following values:0, 1, 2, 3, 4,
    5, 6 or 7.
    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.
    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.


    Dan R
    Dan RADUT, Jul 7, 2003
  7. Pedro Claro

    Amontec Team Guest


    and just for advice and for a better generic code:

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

    Amotnec Team
    Amontec Team, Jul 7, 2003
  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
    Pedro Claro, Jul 10, 2003
    1. Advertisements

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.