Package: AlertLogPkg
- File: AlertLogPkg.vhd
Constants
Name | Type | Value | Description |
---|---|---|---|
ALERTLOG_BASE_ID | AlertLogIDType | 0 | Careful as some code may assume this is 0. |
ALERTLOG_DEFAULT_ID | AlertLogIDType | ALERTLOG_BASE_ID + 1 | |
OSVVM_ALERTLOG_ID | AlertLogIDType | ALERTLOG_BASE_ID + 2 | reporting for packages |
REQUIREMENT_ALERTLOG_ID | AlertLogIDType | ALERTLOG_BASE_ID + 3 | |
OSVVM_SCOREBOARD_ALERTLOG_ID | AlertLogIDType | OSVVM_ALERTLOG_ID | May have its own ID or OSVVM_ALERTLOG_ID as default - most scoreboards allocate their own ID |
ALERT_DEFAULT_ID | AlertLogIDType | ALERTLOG_DEFAULT_ID | Same as ALERTLOG_DEFAULT_ID |
LOG_DEFAULT_ID | AlertLogIDType | ALERTLOG_DEFAULT_ID | |
ALERTLOG_ID_NOT_FOUND | AlertLogIDType | -1 | alternately integer'right |
ALERTLOG_ID_NOT_ASSIGNED | AlertLogIDType | -1 | |
MIN_NUM_AL_IDS | AlertLogIDType | 32 | Number IDs initially allocated |
Types
Name | Type | Description |
---|---|---|
AlertLogIDVectorType | array (integer range <>) of AlertLogIDType | |
AlertType | (FAILURE, ERROR, WARNING) |
NEVER |
AlertCountType | ||
AlertEnableType | ||
LogType | (ALWAYS, DEBUG, FINAL, INFO, PASSED) |
NEVER -- See function IsLogEnableType |
LogEnableType |
Functions
- Alert ( AlertLogID : AlertLogIDType ;
Message : string ;
Level : AlertType := ERROR ) return ()
Description
Alert always goes to the transcript file
- Alert ( Message : string ;
Level : AlertType := ERROR ) return ()
- IncAlertCount ( -- A silent form of alert AlertLogID : AlertLogIDType ;
Level : AlertType := ERROR ) return ()
Description
- IncAlertCount ( Level : AlertType := ERROR ) return ()
- AlertIf ( AlertLogID : AlertLogIDType ;
condition : boolean ;
Message : string ;
Level : AlertType := ERROR ) return ()
Description
Similar to assert, except condition is positive
- AlertIf ( condition : boolean ;
Message : string ;
Level : AlertType := ERROR ) return ()
- AlertIfNot ( AlertLogID : AlertLogIDType ;
condition : boolean ;
Message : string ;
Level : AlertType := ERROR ) return ()
Description
Direct replacement for assert
- AlertIfNot ( condition : boolean ;
Message : string ;
Level : AlertType := ERROR ) return ()
- AlertIfEqual ( AlertLogID : AlertLogIDType ;
L,
R : std_logic ;
Message : string ;
Level : AlertType := ERROR ) return ()
Description
overloading for common functionality
- AlertIfEqual ( AlertLogID : AlertLogIDType ;
L,
R : std_logic_vector ;
Message : string ;
Level : AlertType := ERROR ) return ()
- AlertIfEqual ( AlertLogID : AlertLogIDType ;
L,
R : unsigned ;
Message : string ;
Level : AlertType := ERROR ) return ()
- AlertIfEqual ( AlertLogID : AlertLogIDType ;
L,
R : signed ;
Message : string ;
Level : AlertType := ERROR ) return ()
- AlertIfEqual ( AlertLogID : AlertLogIDType ;
L,
R : integer ;
Message : string ;
Level : AlertType := ERROR ) return ()
- AlertIfEqual ( AlertLogID : AlertLogIDType ;
L,
R : real ;
Message : string ;
Level : AlertType := ERROR ) return ()
- AlertIfEqual ( AlertLogID : AlertLogIDType ;
L,
R : character ;
Message : string ;
Level : AlertType := ERROR ) return ()
- AlertIfEqual ( AlertLogID : AlertLogIDType ;
L,
R : string ;
Message : string ;
Level : AlertType := ERROR ) return ()
- AlertIfEqual ( AlertLogID : AlertLogIDType ;
L,
R : time ;
Message : string ;
Level : AlertType := ERROR ) return ()
- AlertIfEqual ( L,
R : std_logic ;
Message : string ;
Level : AlertType := ERROR ) return ()
- AlertIfEqual ( L,
R : std_logic_vector ;
Message : string ;
Level : AlertType := ERROR ) return ()
- AlertIfEqual ( L,
R : unsigned ;
Message : string ;
Level : AlertType := ERROR ) return ()
- AlertIfEqual ( L,
R : signed ;
Message : string ;
Level : AlertType := ERROR ) return ()
- AlertIfEqual ( L,
R : integer ;
Message : string ;
Level : AlertType := ERROR ) return ()
- AlertIfEqual ( L,
R : real ;
Message : string ;
Level : AlertType := ERROR ) return ()
- AlertIfEqual ( L,
R : character ;
Message : string ;
Level : AlertType := ERROR ) return ()
- AlertIfEqual ( L,
R : string ;
Message : string ;
Level : AlertType := ERROR ) return ()
- AlertIfEqual ( L,
R : time ;
Message : string ;
Level : AlertType := ERROR ) return ()
- AlertIfNotEqual ( AlertLogID : AlertLogIDType ;
L,
R : std_logic ;
Message : string ;
Level : AlertType := ERROR ) return ()
- AlertIfNotEqual ( AlertLogID : AlertLogIDType ;
L,
R : std_logic_vector ;
Message : string ;
Level : AlertType := ERROR ) return ()
- AlertIfNotEqual ( AlertLogID : AlertLogIDType ;
L,
R : unsigned ;
Message : string ;
Level : AlertType := ERROR ) return ()
- AlertIfNotEqual ( AlertLogID : AlertLogIDType ;
L,
R : signed ;
Message : string ;
Level : AlertType := ERROR ) return ()
- AlertIfNotEqual ( AlertLogID : AlertLogIDType ;
L,
R : integer ;
Message : string ;
Level : AlertType := ERROR ) return ()
- AlertIfNotEqual ( AlertLogID : AlertLogIDType ;
L,
R : real ;
Message : string ;
Level : AlertType := ERROR ) return ()
- AlertIfNotEqual ( AlertLogID : AlertLogIDType ;
L,
R : character ;
Message : string ;
Level : AlertType := ERROR ) return ()
- AlertIfNotEqual ( AlertLogID : AlertLogIDType ;
L,
R : string ;
Message : string ;
Level : AlertType := ERROR ) return ()
- AlertIfNotEqual ( AlertLogID : AlertLogIDType ;
L,
R : time ;
Message : string ;
Level : AlertType := ERROR ) return ()
- AlertIfNotEqual ( L,
R : std_logic ;
Message : string ;
Level : AlertType := ERROR ) return ()
- AlertIfNotEqual ( L,
R : std_logic_vector ;
Message : string ;
Level : AlertType := ERROR ) return ()
- AlertIfNotEqual ( L,
R : unsigned ;
Message : string ;
Level : AlertType := ERROR ) return ()
- AlertIfNotEqual ( L,
R : signed ;
Message : string ;
Level : AlertType := ERROR ) return ()
- AlertIfNotEqual ( L,
R : integer ;
Message : string ;
Level : AlertType := ERROR ) return ()
- AlertIfNotEqual ( L,
R : real ;
Message : string ;
Level : AlertType := ERROR ) return ()
- AlertIfNotEqual ( L,
R : character ;
Message : string ;
Level : AlertType := ERROR ) return ()
- AlertIfNotEqual ( L,
R : string ;
Message : string ;
Level : AlertType := ERROR ) return ()
- AlertIfNotEqual ( L,
R : time ;
Message : string ;
Level : AlertType := ERROR ) return ()
- AlertIfDiff (AlertLogID : AlertLogIDType ;
Name1,
Name2 : string;
Message : string := "" ;
Level : AlertType := ERROR ) return ()
Description
Simple Diff for file comparisons
- AlertIfDiff (Name1,
Name2 : string;
Message : string := "" ;
Level : AlertType := ERROR ) return ()
- AlertIfDiff (AlertLogID : AlertLogIDType ;
file File1,
File2 : text;
Message : string := "" ;
Level : AlertType := ERROR ) return ()
- AlertIfDiff (file File1,
File2 : text;
Message : string := "" ;
Level : AlertType := ERROR ) return ()
- AffirmIf ( AlertLogID : AlertLogIDType ;
condition : boolean ;
ReceivedMessage : string ;
ExpectedMessage : string ;
Enable : boolean := FALSE -- override internal enable ) return ()
Description
----------------------------------------------------------
- AffirmIf ( condition : boolean ;
ReceivedMessage,
ExpectedMessage : string ;
Enable : boolean := FALSE ) return ()
- AffirmIf ( AlertLogID : AlertLogIDType ;
condition : boolean ;
Message : string ;
Enable : boolean := FALSE -- override internal enable ) return ()
- AffirmIf (condition : boolean ;
Message : string ;
Enable : boolean := FALSE ) return ()
- AffirmIfNot ( AlertLogID : AlertLogIDType ;
condition : boolean ;
ReceivedMessage,
ExpectedMessage : string ;
Enable : boolean := FALSE ) return ()
Description
- AffirmIfNot ( condition : boolean ;
ReceivedMessage,
ExpectedMessage : string ;
Enable : boolean := FALSE ) return ()
- AffirmIfNot ( AlertLogID : AlertLogIDType ;
condition : boolean ;
Message : string ;
Enable : boolean := FALSE ) return ()
Description
- AffirmIfNot ( condition : boolean ;
Message : string ;
Enable : boolean := FALSE ) return ()
- AffirmPassed ( AlertLogID : AlertLogIDType ;
Message : string ;
Enable : boolean := FALSE ) return ()
Description
- AffirmPassed ( Message : string ;
Enable : boolean := FALSE ) return ()
- AffirmError ( AlertLogID : AlertLogIDType ;
Message : string ) return ()
- AffirmError ( Message : string ) return ()
- AffirmIfEqual ( AlertLogID : AlertLogIDType ;
Received,
Expected : boolean ;
Message : string := "" ;
Enable : boolean := FALSE ) return ()
Description
- AffirmIfEqual ( AlertLogID : AlertLogIDType ;
Received,
Expected : std_logic ;
Message : string := "" ;
Enable : boolean := FALSE ) return ()
- AffirmIfEqual ( AlertLogID : AlertLogIDType ;
Received,
Expected : std_logic_vector ;
Message : string := "" ;
Enable : boolean := FALSE ) return ()
- AffirmIfEqual ( AlertLogID : AlertLogIDType ;
Received,
Expected : unsigned ;
Message : string := "" ;
Enable : boolean := FALSE ) return ()
- AffirmIfEqual ( AlertLogID : AlertLogIDType ;
Received,
Expected : signed ;
Message : string := "" ;
Enable : boolean := FALSE ) return ()
- AffirmIfEqual ( AlertLogID : AlertLogIDType ;
Received,
Expected : integer ;
Message : string := "" ;
Enable : boolean := FALSE ) return ()
- AffirmIfEqual ( AlertLogID : AlertLogIDType ;
Received,
Expected : real ;
Message : string := "" ;
Enable : boolean := FALSE ) return ()
- AffirmIfEqual ( AlertLogID : AlertLogIDType ;
Received,
Expected : character ;
Message : string := "" ;
Enable : boolean := FALSE ) return ()
- AffirmIfEqual ( AlertLogID : AlertLogIDType ;
Received,
Expected : string ;
Message : string := "" ;
Enable : boolean := FALSE ) return ()
- AffirmIfEqual ( AlertLogID : AlertLogIDType ;
Received,
Expected : time ;
Message : string := "" ;
Enable : boolean := FALSE ) return ()
- AffirmIfEqual ( Received,
Expected : boolean ;
Message : string := "" ;
Enable : boolean := FALSE ) return ()
Description
Without AlertLogID
- AffirmIfEqual ( Received,
Expected : std_logic ;
Message : string := "" ;
Enable : boolean := FALSE ) return ()
- AffirmIfEqual ( Received,
Expected : std_logic_vector ;
Message : string := "" ;
Enable : boolean := FALSE ) return ()
- AffirmIfEqual ( Received,
Expected : unsigned ;
Message : string := "" ;
Enable : boolean := FALSE ) return ()
- AffirmIfEqual ( Received,
Expected : signed ;
Message : string := "" ;
Enable : boolean := FALSE ) return ()
- AffirmIfEqual ( Received,
Expected : integer ;
Message : string := "" ;
Enable : boolean := FALSE ) return ()
- AffirmIfEqual ( Received,
Expected : real ;
Message : string := "" ;
Enable : boolean := FALSE ) return ()
- AffirmIfEqual ( Received,
Expected : character ;
Message : string := "" ;
Enable : boolean := FALSE ) return ()
- AffirmIfEqual ( Received,
Expected : string ;
Message : string := "" ;
Enable : boolean := FALSE ) return ()
- AffirmIfEqual ( Received,
Expected : time ;
Message : string := "" ;
Enable : boolean := FALSE ) return ()
- AffirmIfDiff (AlertLogID : AlertLogIDType ;
Name1,
Name2 : string;
Message : string := "" ;
Enable : boolean := FALSE ) return ()
Description
- AffirmIfDiff (Name1,
Name2 : string;
Message : string := "" ;
Enable : boolean := FALSE ) return ()
- AffirmIfDiff (AlertLogID : AlertLogIDType ;
file File1,
File2 : text;
Message : string := "" ;
Enable : boolean := FALSE ) return ()
- AffirmIfDiff (file File1,
File2 : text;
Message : string := "" ;
Enable : boolean := FALSE ) return ()
- AffirmIf ( RequirementsIDName : string ;
condition : boolean ;
ReceivedMessage,
ExpectedMessage : string ;
Enable : boolean := FALSE ) return ()
Description
Support for Specification / Requirements Tracking
- AffirmIf ( RequirementsIDName : string ;
condition : boolean ;
Message : string ;
Enable : boolean := FALSE ) return ()
- SetAlertLogJustify (Enable : boolean := TRUE) return ()
Description
- ReportAlerts ( Name : String ;
AlertCount : AlertCountType ) return ()
- ReportRequirements () return ()
- ReportAlerts ( Name : string := OSVVM_STRING_INIT_PARM_DETECT ;
AlertLogID : AlertLogIDType := ALERTLOG_BASE_ID ;
ExternalErrors : AlertCountType := (others => 0) ) return ()
- ReportNonZeroAlerts ( Name : string := OSVVM_STRING_INIT_PARM_DETECT ;
AlertLogID : AlertLogIDType := ALERTLOG_BASE_ID ;
ExternalErrors : AlertCountType := (others => 0) ) return ()
- WriteTestSummary ( FileName : string ;
OpenKind : File_Open_Kind := APPEND_MODE ) return ()
- WriteTestSummaries ( FileName : string ;
OpenKind : File_Open_Kind := WRITE_MODE ) return ()
- ReportTestSummaries () return ()
- WriteAlerts ( FileName : string ;
AlertLogID : AlertLogIDType := ALERTLOG_BASE_ID ;
OpenKind : File_Open_Kind := WRITE_MODE ) return ()
- WriteRequirements ( FileName : string ;
AlertLogID : AlertLogIDType := REQUIREMENT_ALERTLOG_ID ;
OpenKind : File_Open_Kind := WRITE_MODE ) return ()
- ReadSpecification (FileName : string ;
PassedGoal : integer := -1) return ()
- ReadRequirements ( FileName : string ;
ThresholdPassed : boolean := FALSE ) return ()
- ReadTestSummaries (FileName : string) return ()
- ClearAlerts () return ()
- ClearAlertStopCounts () return ()
- ClearAlertCounts () return ()
- Log ( AlertLogID : AlertLogIDType ;
Message : string ;
Level : LogType := ALWAYS ;
Enable : boolean := FALSE -- override internal enable ) return ()
Description
log filtering for verbosity control, optionally has a separate file parameter
- Log ( Message : string ;
Level : LogType := ALWAYS ;
Enable : boolean := FALSE) return ()
- SetAlertEnable (Level : AlertType ;
Enable : boolean) return ()
Description
Alert Enables
- SetAlertEnable (AlertLogID : AlertLogIDType ;
Level : AlertType ;
Enable : boolean ;
DescendHierarchy : boolean := TRUE) return ()
- SetLogEnable (Level : LogType ;
Enable : boolean) return ()
Description
Log Enables
- SetLogEnable (AlertLogID : AlertLogIDType ;
Level : LogType ;
Enable : boolean ;
DescendHierarchy : boolean := TRUE) return ()
- ReportLogEnables () return ()
Description
same as GetLogEnable
- SetAlertLogName (Name : string ) return ()
- DeallocateAlertLogStruct () return ()
Description
synthesis translate_on
- InitializeAlertLogStruct () return ()
- SetPassedGoal (AlertLogID : AlertLogIDType ;
PassedGoal : integer ) return ()
- SetAlertLogPrefix (AlertLogID : AlertLogIDType;
Name : string ) return ()
- UnSetAlertLogPrefix (AlertLogID : AlertLogIDType) return ()
- SetAlertLogSuffix (AlertLogID : AlertLogIDType;
Name : string ) return ()
Description
synthesis translate_on
- UnSetAlertLogSuffix (AlertLogID : AlertLogIDType) return ()
- SetGlobalAlertEnable (A : boolean := TRUE) return ()
Description
synthesis translate_on
Accessor Methods
- IncAffirmCount (AlertLogID : AlertLogIDType := ALERTLOG_BASE_ID) return ()
- IncAffirmPassedCount (AlertLogID : AlertLogIDType := ALERTLOG_BASE_ID) return ()
- SetAlertStopCount (AlertLogID : AlertLogIDType ;
Level : AlertType ;
Count : integer) return ()
- SetAlertStopCount (Level : AlertType ;
Count : integer) return ()
- SetAlertLogOptions ( FailOnWarning : AlertLogOptionsType := OPT_INIT_PARM_DETECT ;
FailOnDisabledErrors : AlertLogOptionsType := OPT_INIT_PARM_DETECT ;
FailOnRequirementErrors : AlertLogOptionsType := OPT_INIT_PARM_DETECT ;
ReportHierarchy : AlertLogOptionsType := OPT_INIT_PARM_DETECT ;
WriteAlertErrorCount : AlertLogOptionsType := OPT_INIT_PARM_DETECT ;
WriteAlertLevel : AlertLogOptionsType := OPT_INIT_PARM_DETECT ;
WriteAlertName : AlertLogOptionsType := OPT_INIT_PARM_DETECT ;
WriteAlertTime : AlertLogOptionsType := OPT_INIT_PARM_DETECT ;
WriteLogErrorCount : AlertLogOptionsType := OPT_INIT_PARM_DETECT ;
WriteLogLevel : AlertLogOptionsType := OPT_INIT_PARM_DETECT ;
WriteLogName : AlertLogOptionsType := OPT_INIT_PARM_DETECT ;
WriteLogTime : AlertLogOptionsType := OPT_INIT_PARM_DETECT ;
PrintPassed : AlertLogOptionsType := OPT_INIT_PARM_DETECT ;
PrintAffirmations : AlertLogOptionsType := OPT_INIT_PARM_DETECT ;
PrintDisabledAlerts : AlertLogOptionsType := OPT_INIT_PARM_DETECT ;
PrintRequirements : AlertLogOptionsType := OPT_INIT_PARM_DETECT ;
PrintIfHaveRequirements : AlertLogOptionsType := OPT_INIT_PARM_DETECT ;
DefaultPassedGoal : integer := integer'left ;
AlertPrefix : string := OSVVM_STRING_INIT_PARM_DETECT ;
LogPrefix : string := OSVVM_STRING_INIT_PARM_DETECT ;
ReportPrefix : string := OSVVM_STRING_INIT_PARM_DETECT ;
DoneName : string := OSVVM_STRING_INIT_PARM_DETECT ;
PassName : string := OSVVM_STRING_INIT_PARM_DETECT ;
FailName : string := OSVVM_STRING_INIT_PARM_DETECT ) return ()
Description
- ReportAlertLogOptions () return ()
- IsLogEnableType (Name : String) return boolean
Description
File Reading Utilities
- ReadLogEnables (file AlertLogInitFile : text) return ()
- ReadLogEnables (FileName : string) return ()
- PathTail (A : string) return string
Description
String Helper Functions -- This should be in a more general string package
- MetaMatch (l,
r : std_ulogic) return boolean
Description
MetaMatch
Similar to STD_MATCH, except
it returns TRUE for U=U, X=X, Z=Z, and W=W
All other values are consistent with STD_MATCH
MetaMatch, BooleanTableType, and MetaMatchTable are derivatives
of STD_MATCH from IEEE.Numeric_Std copyright by IEEE.
Numeric_Std is also released under the Apache License, Version 2.0.
Coding Styles were updated to match OSVVM
- MetaMatch (L,
R : std_ulogic_vector) return boolean
- MetaMatch (L,
R : unresolved_unsigned) return boolean
- MetaMatch (L,
R : unresolved_signed) return boolean
- AlertIf ( condition : boolean ;
AlertLogID : AlertLogIDType ;
Message : string ;
Level : AlertType := ERROR ) return ()
Description
synthesis translate_on
Deprecated
deprecated
- AlertIfNot ( condition : boolean ;
AlertLogID : AlertLogIDType ;
Message : string ;
Level : AlertType := ERROR ) return ()
Description
deprecated
- AffirmIf ( AlertLogID : AlertLogIDType ;
condition : boolean ;
Message : string ;
LogLevel : LogType ;
-- := PASSED AlertLevel : AlertType := ERROR ) return ()
Description
deprecated
- AffirmIf ( AlertLogID : AlertLogIDType ;
condition : boolean ;
Message : string ;
AlertLevel : AlertType ) return ()
- AffirmIf (condition : boolean ;
Message : string ;
LogLevel : LogType ;
AlertLevel : AlertType := ERROR) return ()
- AffirmIf (condition : boolean ;
Message : string ;
AlertLevel : AlertType ) return ()