|
8 | 8 | -- Jim Lewis SynthWorks
|
9 | 9 | -- Matthias Alles Creonic. Inspired GetMinBinVal, GetMinPoint, GetCov
|
10 | 10 | -- Jerry Kaczynski Aldec. Inspired GetBin function
|
11 |
| --- |
| 11 | +-- Sebastian Dunst Inspired GetBinName function |
12 | 12 | --
|
13 | 13 | -- Package Defines
|
14 | 14 | -- Functional coverage modeling utilities and data structure
|
|
43 | 43 | -- 01/2015 2015.01 Use AlertLogPkg to count assertions and filter log messages
|
44 | 44 | -- 06/2015 2015.06 AddCross[CovMatrix?Type], Mirroring for WriteBin
|
45 | 45 | -- 01/2016 2016.01 Fixes for pure functions. Added bounds checking on ICover
|
| 46 | +-- 03/2016 2016.03 Added GetBinName(Index) to retrieve a bin's name |
46 | 47 | --
|
47 | 48 | -- Development Notes:
|
48 | 49 | -- The coverage procedures are named ICover to avoid conflicts with
|
@@ -436,6 +437,7 @@ package CoveragePkg is
|
436 | 437 | impure function GetBin ( BinIndex : integer ) return CovMatrix7BaseType ;
|
437 | 438 | impure function GetBin ( BinIndex : integer ) return CovMatrix8BaseType ;
|
438 | 439 | impure function GetBin ( BinIndex : integer ) return CovMatrix9BaseType ;
|
| 440 | + impure function GetBinName ( BinIndex : integer; DefaultName : string := "" ) return string ; |
439 | 441 |
|
440 | 442 | ------------------------------------------------------------
|
441 | 443 | procedure WriteBin (
|
@@ -2716,6 +2718,17 @@ package body CoveragePkg is
|
2716 | 2718 | result.Weight := CovBinPtr(BinIndex).Weight;
|
2717 | 2719 | return result ;
|
2718 | 2720 | end function GetBin ;
|
| 2721 | + |
| 2722 | + -- ------------------------------------------------------------ |
| 2723 | + impure function GetBinName ( BinIndex : integer; DefaultName : string := "" ) return string is |
| 2724 | + -- ------------------------------------------------------------ |
| 2725 | + begin |
| 2726 | + if CovBinPtr(BinIndex).Name.all /= "" then |
| 2727 | + return CovBinPtr(BinIndex).Name.all ; |
| 2728 | + else |
| 2729 | + return DefaultName ; |
| 2730 | + end if; |
| 2731 | + end function GetBinName; |
2719 | 2732 |
|
2720 | 2733 | ------------------------------------------------------------
|
2721 | 2734 | -- pt local for now -- file formal parameter not allowed with method
|
|
0 commit comments