3 Replies Latest reply on Jul 13, 2018 12:43 PM by samantha_lizak

    (vcom-1078) Identifier "signed" is not directly visible

    joniengr081

      I get the following error

       

      (vcom-1078) Identifier "signed" is not directly visible

       

      v_random := to_integer(signed(random)) + 2048;

        • 1. Re: (vcom-1078) Identifier "signed" is not directly visible
          joniengr081

          v_random is a variable

          random is a signal

           

          The following libraries are added

          LIBRARY ieee;

          USE ieee.std_logic_1164.ALL;

          USE ieee.numeric_std.ALL;

          • 2. Re: (vcom-1078) Identifier "signed" is not directly visible
            joniengr081

            I get the error with following libraries and packages. 

             

            LIBRARY ieee;

            USE ieee.std_logic_1164.ALL;

            use std.textio.all;

            use ieee.std_logic_textio.all;

            USE ieee.numeric_std.ALL;

            use IEEE.std_logic_arith.all;

             

            # ** Error: ./(vcom-1078) Identifier "signed" is not directly visible.

             

            If I disable use IEEE.std_logic_arith.all; then I get the following warning.

            # ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0

            #    Time: 2480 ns  Iteration: 0

             

            How critical is this warning ?

            • 3. Re: (vcom-1078) Identifier "signed" is not directly visible
              samantha_lizak

              That depends; if it were always critical, it would be an error.

               

              Discussion on StackOverflow and EDA Board indicate it happens when a vector that has a value of X or Z is cast to an integer, and that if you are getting this after resetting your design (when variables should be re-initialized) it can be an indicator of a serious problem.

               

              In the ModelSim User's Manual, under "Miscellaneous Messages," there is this chunk:

               

              Metavalue detected warning

              Warning: NUMERIC_STD.">": metavalue detected, returning FALSE

              • Description — This warning is an assertion being issued by the IEEE numeric_std

              package. It indicates that there is an 'X' in the comparison.

              • Suggested action — The message does not indicate which comparison is reporting the

              problem since the assertion is coming from a standard package. To track the problem,

              note the time the warning occurs, restart the simulation, and run to one time unit before

              the noted time. At this point, start stepping the simulator until the warning appears. The

              location of the blue arrow in a Source window will be pointing at the line following the

              line with the comparison.

              These messages can be turned off by setting the NumericStdNoWarnings variable to 1

              from the command line or in the modelsim.ini file.

               

              So, is it critical?  Only you (or someone who can help you poke at the design) can say for sure.

               

              Best-

               

              Sam.