Hi,

> Example:
> I found out one  assertion warning came from the line:
>
> warning:
>
> ../../../src/ieee/numeric_std-body.v93:1032:7:@18500ps:(assertion warning):
> NUMERIC_STD.">": metavalue detected, returning FALSE
>
> code:
>  if signed(path_a) > signed(path_b) then
>      compare(2) <= '1';
>    else
>
> accident:
> In a situation is path_a="UUUUUU". The greather than is undefined. The
> warning is correct.

FYI, i don't think that is undefined, it just returns false.
see following snippet from numeric_std-body.vhdl:

 982   -- Id: C.2
 983   function ">" (L, R: SIGNED) return BOOLEAN is
 984     constant L_LEFT: INTEGER := L'LENGTH-1;
 985     constant R_LEFT: INTEGER := R'LENGTH-1;
 986     alias XL: SIGNED(L_LEFT downto 0) is L;
 987     alias XR: SIGNED(R_LEFT downto 0) is R;
 988     constant SIZE: NATURAL := MAX(L'LENGTH, R'LENGTH);
 989     variable L01 : SIGNED(L_LEFT downto 0);
 990     variable R01 : SIGNED(R_LEFT downto 0);
 991   begin
 992     if ((L'LENGTH < 1) or (R'LENGTH < 1)) then
 993       assert NO_WARNING
 994           report "NUMERIC_STD."">"": null argument detected,
returning FALSE"
 995           severity WARNING;
 996       return FALSE;
 997     end if;
 998     L01 := TO_01(XL, 'X');
 999     R01 := TO_01(XR, 'X');
1000     if ((L01(L01'LEFT)='X') or (R01(R01'LEFT)='X')) then
1001       assert NO_WARNING
1002           report "NUMERIC_STD."">"": metavalue detected, returning FALSE"
1003           severity WARNING;
1004       return FALSE;
1005     end if;
1006     return not SIGNED_LESS_OR_EQUAL(RESIZE(L01, SIZE), RESIZE(R01, SIZE));
1007   end ">";

after seeing line 1000-1005, you will realized.

> My interesting is now:
> What is the code linie in my code and what signal is incorrect?

IMHO, if you'd like to know which ">" warns you to identify which
signal goes wrong, use custom numeric_std-body.vhdl which is altered
the report contents with 'instance_name or something as diogratia@
stated.

Peace,

_______________________________________________
Ghdl-discuss mailing list
[email protected]
https://mail.gna.org/listinfo/ghdl-discuss

Reply via email to