using the report statement inside package

C

chris

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.
 
E

Eyck Jentzsch

chris said:
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,159
Messages
2,570,883
Members
47,419
Latest member
ArturoBres

Latest Threads

Top