warning?

Discussion in 'VHDL' started by Max, Sep 4, 2003.

  1. Max

    Max Guest

    the following code:

    global_read: process (reset, reg_en, rd)
    begin
    if reset = '1' then
    ctrl_data_bus <= (others => 'Z'); -- all warnings are here!
    else
    if rd = '1' then
    case reg_en is
    when "001" =>
    ctrl_data_bus <= CONV_STD_LOGIC_VECTOR(prescaler_reg,8);
    when "010" =>
    ctrl_data_bus(0) <= ch_en;
    when "100" =>
    ctrl_data_bus(2 downto 0) <= probe_bus;
    when others =>
    ctrl_data_bus <= (others => 'Z');
    end case;
    end if;
    end if;
    end process;

    give the following woranings:

    WARNING:Xst:736 - Found 1-bit latch for signal
    <Mtridata_ctrl_data_bus<7>> created at line 129.
    WARNING:Xst:736 - Found 1-bit latch for signal
    <Mtridata_ctrl_data_bus<6>> created at line 129.
    WARNING:Xst:736 - Found 1-bit latch for signal
    <Mtridata_ctrl_data_bus<5>> created at line 129.
    WARNING:Xst:736 - Found 1-bit latch for signal
    <Mtridata_ctrl_data_bus<4>> created at line 129.
    WARNING:Xst:736 - Found 1-bit latch for signal
    <Mtridata_ctrl_data_bus<3>> created at line 129.
    WARNING:Xst:736 - Found 1-bit latch for signal
    <Mtridata_ctrl_data_bus<2>> created at line 129.
    WARNING:Xst:736 - Found 1-bit latch for signal
    <Mtridata_ctrl_data_bus<1>> created at line 129.
    WARNING:Xst:736 - Found 1-bit latch for signal
    <Mtridata_ctrl_data_bus<0>> created at line 129.
    WARNING:Xst:736 - Found 1-bit latch for signal
    <Mtrien_ctrl_data_bus<7>> created at line 129.
    WARNING:Xst:736 - Found 1-bit latch for signal
    <Mtrien_ctrl_data_bus<6>> created at line 129.
    WARNING:Xst:736 - Found 1-bit latch for signal
    <Mtrien_ctrl_data_bus<5>> created at line 129.
    WARNING:Xst:736 - Found 1-bit latch for signal
    <Mtrien_ctrl_data_bus<4>> created at line 129.
    WARNING:Xst:736 - Found 1-bit latch for signal
    <Mtrien_ctrl_data_bus<3>> created at line 129.
    WARNING:Xst:736 - Found 1-bit latch for signal
    <Mtrien_ctrl_data_bus<2>> created at line 129.
    WARNING:Xst:736 - Found 1-bit latch for signal
    <Mtrien_ctrl_data_bus<1>> created at line 129.
    WARNING:Xst:736 - Found 1-bit latch for signal
    <Mtrien_ctrl_data_bus<0>> created at line 129.


    WARNING:Xst:382 - Register Mtrien_ctrl_data_bus<7>_0 is equivalent to
    Mtrien_ctrl_data_bus<6>_0
    WARNING:Xst:382 - Register Mtrien_ctrl_data_bus<6>_0 is equivalent to
    Mtrien_ctrl_data_bus<5>_0
    WARNING:Xst:382 - Register Mtrien_ctrl_data_bus<7>_0 is equivalent to
    Mtrien_ctrl_data_bus<5>_0
    WARNING:Xst:382 - Register Mtrien_ctrl_data_bus<6>_0 is equivalent to
    Mtrien_ctrl_data_bus<4>_0
    WARNING:Xst:382 - Register Mtrien_ctrl_data_bus<5>_0 is equivalent to
    Mtrien_ctrl_data_bus<4>_0
    WARNING:Xst:382 - Register Mtrien_ctrl_data_bus<7>_0 is equivalent to
    Mtrien_ctrl_data_bus<4>_0
    WARNING:Xst:382 - Register Mtrien_ctrl_data_bus<6>_0 is equivalent to
    Mtrien_ctrl_data_bus<3>_0
    WARNING:Xst:382 - Register Mtrien_ctrl_data_bus<5>_0 is equivalent to
    Mtrien_ctrl_data_bus<3>_0
    WARNING:Xst:382 - Register Mtrien_ctrl_data_bus<4>_0 is equivalent to
    Mtrien_ctrl_data_bus<3>_0
    WARNING:Xst:382 - Register Mtrien_ctrl_data_bus<7>_0 is equivalent to
    Mtrien_ctrl_data_bus<3>_0
    WARNING:Xst:382 - Register Mtrien_ctrl_data_bus<2>_0 is equivalent to
    Mtrien_ctrl_data_bus<1>_0
    WARNING:Xst:382 - Register Mtrien_ctrl_data_bus<7>_0 is equivalent to
    Mtrien_ctrl_data_bus<6>_0
    WARNING:Xst:382 - Register Mtrien_ctrl_data_bus<6>_0 is equivalent to
    Mtrien_ctrl_data_bus<5>_0
    WARNING:Xst:382 - Register Mtrien_ctrl_data_bus<7>_0 is equivalent to
    Mtrien_ctrl_data_bus<5>_0
    WARNING:Xst:382 - Register Mtrien_ctrl_data_bus<6>_0 is equivalent to
    Mtrien_ctrl_data_bus<4>_0
    WARNING:Xst:382 - Register Mtrien_ctrl_data_bus<5>_0 is equivalent to
    Mtrien_ctrl_data_bus<4>_0
    WARNING:Xst:382 - Register Mtrien_ctrl_data_bus<7>_0 is equivalent to
    Mtrien_ctrl_data_bus<4>_0
    WARNING:Xst:382 - Register Mtrien_ctrl_data_bus<6>_0 is equivalent to
    Mtrien_ctrl_data_bus<3>_0
    WARNING:Xst:382 - Register Mtrien_ctrl_data_bus<5>_0 is equivalent to
    Mtrien_ctrl_data_bus<3>_0
    WARNING:Xst:382 - Register Mtrien_ctrl_data_bus<4>_0 is equivalent to
    Mtrien_ctrl_data_bus<3>_0
    WARNING:Xst:382 - Register Mtrien_ctrl_data_bus<7>_0 is equivalent to
    Mtrien_ctrl_data_bus<3>_0
    WARNING:Xst:382 - Register Mtrien_ctrl_data_bus<2>_0 is equivalent to
    Mtrien_ctrl_data_bus<1>_0


    I don't know why, and I don't know how to correct them.

    Any idea?

    thanks
     
    Max, Sep 4, 2003
    #1
    1. Advertising

  2. (Max) writes:

    > the following code:
    >
    > global_read: process (reset, reg_en, rd)
    > begin
    > if reset = '1' then
    > ctrl_data_bus <= (others => 'Z'); -- all warnings are here!
    > else


    No default assignment for the output signals(s) here. This is the
    safest way to assure that you won't get a latch.

    > if rd = '1' then
    > case reg_en is
    > when "001" =>
    > ctrl_data_bus <= CONV_STD_LOGIC_VECTOR(prescaler_reg,8);
    > when "010" =>
    > ctrl_data_bus(0) <= ch_en;


    What should happen to the other elements of ctrl_data_bus
    (ctrl_data_bus'high downto 1)?

    > when "100" =>
    > ctrl_data_bus(2 downto 0) <= probe_bus;


    Same here.

    > when others =>
    > ctrl_data_bus <= (others => 'Z');
    > end case;


    If you don't use a default assignment, you need an else path here for
    the case that rd /= '1'.

    > end if;
    > end if;
    > end process;
    >
    > give the following woranings:
    >
    > WARNING:Xst:736 - Found 1-bit latch for signal
    > <Mtridata_ctrl_data_bus<7>> created at line 129.


    *Always* assign *all* elements of a vector, as shown above.

    HTH,
    Colin
     
    Colin Marquardt, Sep 4, 2003
    #2
    1. Advertising

  3. Max

    eadgbe Guest

    The equivalences warnings just mean that your prescaler_reg is
    fixed at all 0's and the syn tool is tying them all together.

    And as Colm has said, you coded up a latch. If that's what you intended,
    fine, but synthesis tools like to warn you when you do it.

    Bob

    "Max" <> wrote in message news:...
    > the following code:
    >
    > global_read: process (reset, reg_en, rd)
    > begin
    > if reset = '1' then
    > ctrl_data_bus <= (others => 'Z'); -- all warnings are here!
    > else
    > if rd = '1' then
    > case reg_en is
    > when "001" =>
    > ctrl_data_bus <= CONV_STD_LOGIC_VECTOR(prescaler_reg,8);
    > when "010" =>
    > ctrl_data_bus(0) <= ch_en;
    > when "100" =>
    > ctrl_data_bus(2 downto 0) <= probe_bus;
    > when others =>
    > ctrl_data_bus <= (others => 'Z');
    > end case;
    > end if;
    > end if;
    > end process;
    >
    > give the following woranings:
    >
    > WARNING:Xst:736 - Found 1-bit latch for signal
    > <Mtridata_ctrl_data_bus<7>> created at line 129.
    > WARNING:Xst:736 - Found 1-bit latch for signal
    > <Mtridata_ctrl_data_bus<6>> created at line 129.
    > WARNING:Xst:736 - Found 1-bit latch for signal
    > <Mtridata_ctrl_data_bus<5>> created at line 129.
    > WARNING:Xst:736 - Found 1-bit latch for signal
    > <Mtridata_ctrl_data_bus<4>> created at line 129.
    > WARNING:Xst:736 - Found 1-bit latch for signal
    > <Mtridata_ctrl_data_bus<3>> created at line 129.
    > WARNING:Xst:736 - Found 1-bit latch for signal
    > <Mtridata_ctrl_data_bus<2>> created at line 129.
    > WARNING:Xst:736 - Found 1-bit latch for signal
    > <Mtridata_ctrl_data_bus<1>> created at line 129.
    > WARNING:Xst:736 - Found 1-bit latch for signal
    > <Mtridata_ctrl_data_bus<0>> created at line 129.
    > WARNING:Xst:736 - Found 1-bit latch for signal
    > <Mtrien_ctrl_data_bus<7>> created at line 129.
    > WARNING:Xst:736 - Found 1-bit latch for signal
    > <Mtrien_ctrl_data_bus<6>> created at line 129.
    > WARNING:Xst:736 - Found 1-bit latch for signal
    > <Mtrien_ctrl_data_bus<5>> created at line 129.
    > WARNING:Xst:736 - Found 1-bit latch for signal
    > <Mtrien_ctrl_data_bus<4>> created at line 129.
    > WARNING:Xst:736 - Found 1-bit latch for signal
    > <Mtrien_ctrl_data_bus<3>> created at line 129.
    > WARNING:Xst:736 - Found 1-bit latch for signal
    > <Mtrien_ctrl_data_bus<2>> created at line 129.
    > WARNING:Xst:736 - Found 1-bit latch for signal
    > <Mtrien_ctrl_data_bus<1>> created at line 129.
    > WARNING:Xst:736 - Found 1-bit latch for signal
    > <Mtrien_ctrl_data_bus<0>> created at line 129.
    >
    >
    > WARNING:Xst:382 - Register Mtrien_ctrl_data_bus<7>_0 is equivalent to
    > Mtrien_ctrl_data_bus<6>_0
    > WARNING:Xst:382 - Register Mtrien_ctrl_data_bus<6>_0 is equivalent to
    > Mtrien_ctrl_data_bus<5>_0
    > WARNING:Xst:382 - Register Mtrien_ctrl_data_bus<7>_0 is equivalent to
    > Mtrien_ctrl_data_bus<5>_0
    > WARNING:Xst:382 - Register Mtrien_ctrl_data_bus<6>_0 is equivalent to
    > Mtrien_ctrl_data_bus<4>_0
    > WARNING:Xst:382 - Register Mtrien_ctrl_data_bus<5>_0 is equivalent to
    > Mtrien_ctrl_data_bus<4>_0
    > WARNING:Xst:382 - Register Mtrien_ctrl_data_bus<7>_0 is equivalent to
    > Mtrien_ctrl_data_bus<4>_0
    > WARNING:Xst:382 - Register Mtrien_ctrl_data_bus<6>_0 is equivalent to
    > Mtrien_ctrl_data_bus<3>_0
    > WARNING:Xst:382 - Register Mtrien_ctrl_data_bus<5>_0 is equivalent to
    > Mtrien_ctrl_data_bus<3>_0
    > WARNING:Xst:382 - Register Mtrien_ctrl_data_bus<4>_0 is equivalent to
    > Mtrien_ctrl_data_bus<3>_0
    > WARNING:Xst:382 - Register Mtrien_ctrl_data_bus<7>_0 is equivalent to
    > Mtrien_ctrl_data_bus<3>_0
    > WARNING:Xst:382 - Register Mtrien_ctrl_data_bus<2>_0 is equivalent to
    > Mtrien_ctrl_data_bus<1>_0
    > WARNING:Xst:382 - Register Mtrien_ctrl_data_bus<7>_0 is equivalent to
    > Mtrien_ctrl_data_bus<6>_0
    > WARNING:Xst:382 - Register Mtrien_ctrl_data_bus<6>_0 is equivalent to
    > Mtrien_ctrl_data_bus<5>_0
    > WARNING:Xst:382 - Register Mtrien_ctrl_data_bus<7>_0 is equivalent to
    > Mtrien_ctrl_data_bus<5>_0
    > WARNING:Xst:382 - Register Mtrien_ctrl_data_bus<6>_0 is equivalent to
    > Mtrien_ctrl_data_bus<4>_0
    > WARNING:Xst:382 - Register Mtrien_ctrl_data_bus<5>_0 is equivalent to
    > Mtrien_ctrl_data_bus<4>_0
    > WARNING:Xst:382 - Register Mtrien_ctrl_data_bus<7>_0 is equivalent to
    > Mtrien_ctrl_data_bus<4>_0
    > WARNING:Xst:382 - Register Mtrien_ctrl_data_bus<6>_0 is equivalent to
    > Mtrien_ctrl_data_bus<3>_0
    > WARNING:Xst:382 - Register Mtrien_ctrl_data_bus<5>_0 is equivalent to
    > Mtrien_ctrl_data_bus<3>_0
    > WARNING:Xst:382 - Register Mtrien_ctrl_data_bus<4>_0 is equivalent to
    > Mtrien_ctrl_data_bus<3>_0
    > WARNING:Xst:382 - Register Mtrien_ctrl_data_bus<7>_0 is equivalent to
    > Mtrien_ctrl_data_bus<3>_0
    > WARNING:Xst:382 - Register Mtrien_ctrl_data_bus<2>_0 is equivalent to
    > Mtrien_ctrl_data_bus<1>_0
    >
    >
    > I don't know why, and I don't know how to correct them.
    >
    > Any idea?
    >
    > thanks
     
    eadgbe, Sep 4, 2003
    #3
    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. Mike Treseler

    Re: Quartus warning in NUMERIC_STD.vhd

    Mike Treseler, Jul 11, 2003, in forum: VHDL
    Replies:
    2
    Views:
    1,884
    Clyde R. Shappee
    Jul 13, 2003
  2. Pete Becker
    Replies:
    0
    Views:
    1,406
    Pete Becker
    Feb 10, 2005
  3. B. Williams

    warning C4267 and warning C4996

    B. Williams, Oct 26, 2006, in forum: C++
    Replies:
    17
    Views:
    2,678
  4. WARNING! Prosoftstore.com is a SCAM! WARNING!

    , Jul 8, 2007, in forum: ASP .Net Web Services
    Replies:
    0
    Views:
    346
  5. Julian Mehnle
    Replies:
    17
    Views:
    954
    Julian Mehnle
    May 18, 2006
Loading...

Share This Page