using the report statement inside package

C

chris

Guest
I've got a VHDL package file containing all the constants
declaration of my project and I'd like to put some report
in it in case some people would change the value of some constants
that can't be change.
I've tried the following example but it does not compile. Do someone
can tell me how to do this correctly ?

package my_package is

constant a : positive := 5;
constant b : positive := 3;

assert a < b
report "a < b"
severity error;

end;

Thanks, Christophe.
 
chris wrote:
I've got a VHDL package file containing all the constants
declaration of my project and I'd like to put some report
in it in case some people would change the value of some constants
that can't be change.
I've tried the following example but it does not compile. Do someone
can tell me how to do this correctly ?

package my_package is

constant a : positive := 5;
constant b : positive := 3;

assert a < b
report "a < b"
severity error;

end;

Thanks, Christophe.
Maybe this works for you:

package my_package is

constant a : positive := 5;
constant b : positive := 3;

FUNCTION init_check (CONSTANT a, b : positive)
RETURN boolean;

constant init : boolean := init_check(a, b);

end my_package;

package body my_package is

FUNCTION init_check (CONSTANT a, b : positive)
RETURN boolean IS
BEGIN -- abc
assert a < b report "a < b" severity error;
return true;
END init_check;

end my_package;


-Eyck
 

Welcome to EDABoard.com

Sponsor

Back
Top