Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
16 years ago

Warning message while design compile

Does anyone know how to get rid of the following message?

warning (10542): vhdl variable declaration warning at altera_europa_support_lib.vhd(340): used initial value expression for variable "arg_copy" because variable was never assigned a value

Thanx for every notice!!

6 Replies

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    hmm...I have never seen that before, is 'arg_copy' one of your design variables or is it a part of the altera lib file ??

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    With sopc and other automated code generations I get tons of warnings...

    I wouldn't care as long as things work and keep managers off my shoulder.
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    --- Quote Start ---

    I wouldn't care as long as things work and keep managers off my shoulder.

    --- Quote End ---

    i enjoyed this post. :D
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Don't get me wrong. I like my managers, they are under more pressure from those fat cats. But what I don't understand is why they always walk in pairs?

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    it was just a funny statement. :)

    there are some companies that are very strict about Warning messages during compilation for their products.
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    arg_copy is part of the libary:

      -- a_ext is the Altera version of the EXT function.  It is used to both
      -- zero-extend a signal to a new length, and to extract a signal of 'size'
      -- length from a larger signal.
      FUNCTION a_ext (arg : STD_LOGIC_VECTOR; size : INTEGER) RETURN STD_LOGIC_VECTOR IS
        VARIABLE arg_copy : STD_LOGIC_VECTOR ((arg'length - 1)DOWNTO 0) :=  arg ;
        VARIABLE result : STD_LOGIC_VECTOR((size-1) DOWNTO 0) := (others => '0');
        VARIABLE i : integer := 0;  
        VARIABLE bits_to_copy : integer := 0;
        VARIABLE arg_length : integer := arg'length ;
        VARIABLE LSB_bit : integer := 0;
      BEGIN 
        bits_to_copy := a_min(arg_length, size);
        FOR i IN 0 TO (bits_to_copy - 1) LOOP 
          result(i) := arg_copy(i);
        end LOOP;
        
        RETURN(result);   
      END;