Assert API and when initial values of assert enables are established
Is your capability/feature request related to a problem?
SetVhdlAssertEnable Initial value says:
Unless overridden by tool settings, after elaboration of a design, all severity levels are enabled.
Hence initial values are established sometime during elaboration. This lack of clarity may prevent a user from calling SetVhdlAssertEnable (via a function wrapper) in a declaration region (in which functions as part of a constant declaration are evaluated).
Describe the solution you'd like
I would like it clear that the initial values are established prior to elaboration starting.
Update statement to: Unless overridden by tool settings, at the start of elaboration, all severity levels are enabled.
It would also be appropriate to add a function form of SetVhdlAssertEnable:
impure function SetVhdlAssertEnable(Enable : BOOLEAN := TRUE) return boolean is
begin
SetVhdlAssertEnable(Enable) ;
return Enable ;
end function SetVhdlAssertEnable ;
impure function SetVhdlAssertEnable(Level : SEVERITY_LEVEL := NOTE; Enable : BOOLEAN := TRUE) return boolean is
begin
SetVhdlAssertEnable(Level, Enable) ;
return Enable ;
end function SetVhdlAssertEnable ;This then allows these features to be set in the declarative region:
constant ASSERT_ALL_ENABLED : boolean := SetVhdlAssertEnable(TRUE) ;
# Describe alternatives you've considered
<!--
Add a clear and concise description of any alternative solutions or features you've considered.
-->
# Additional context
<!--
Add any other context about the capability/feature request here.
-->
<!-- automatically applied issue settings -->
/label ~"New"