Menu

#106 Annoying warnings during initialization when "out" ports in components are not initialized in entity declaration

1.0
open
nobody
None
2016-07-26
2016-07-26
No

Hi,

If signals produced by components are used by functions from numeric_std package, the annoying warnings are generated during initialization of the simulation.

It is especially disturbing, when one runs the simulation via gdb, with "--assert-level=warning" and with "break __ghdl_fatal" to isolate causes of other warnings.
(As the debugging info displayed by the testebench is very sparse, I usually use dbg, and check the stack with "bt" to resolve problems.) The mentioned problem however allows to check only the first warning, as simulation is interrupted after it.

I attach the simplistic problem (bug?) reproducer.
If you run make, you'll get:

ghdl -a -g  --std=93c  --ieee=standard top.vhd top_tb.vhd  
ghdl -e -g  --std=93c  --ieee=standard top_tb 
./top_tb 
../../../src/ieee/numeric_std-body.v93:1613:7:@0ms:(assertion warning): NUMERIC_STD."=": metavalue detected, returning FALSE
./top_tb:info: simulation stopped by --stop-time

The only way to avoid the warning it is to change the declaration of the "top" entity, adding the initialization of the addr port as below:

entity top is
  port (
    clk       : in  std_logic;
    reset     : in  std_logic;
    addr : out unsigned(15 downto 0) := (others => '0')
    );

Unfortunately this modification is very inconvenient in case of multiple third party components...

With best regards,
Wojtek

1 Attachments

Discussion

  • Tristan Gingold

    Tristan Gingold - 2016-07-26

    What about --ieee-asserts=disable ?
    (http://ghdl.readthedocs.io/en/latest/Simulation_and_runtime.html#cmdoption--ieee-asserts)

    Tristan.

     
  • Wojciech Zabolotny

    Yes, using --ieee-asserts=disable may be a viable option. However sometimes those warnings are useful for finding potential problems, so I'm trying to clean my design so that ieee-asserts do not generate any warnings.
    I'll have to check --ieee-asserts=disable-at-0
    Hopefully this will allow to avoid warnings at the initialization without sacrifying sensitivity to real problems.

    Wojtek

     

Log in to post a comment.

MongoDB Logo MongoDB