forked from OSVVM/OSVVM
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
TranscriptOpen now all call the same procedure
- Loading branch information
Showing
1 changed file
with
15 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
-- | ||
-- File Name: TranscriptPkg.vhd | ||
-- Design Unit Name: TranscriptPkg | ||
-- Revision: STANDARD VERSION, revision 2015.01 | ||
-- Revision: STANDARD VERSION | ||
-- | ||
-- Maintainer: Jim Lewis email: [email protected] | ||
-- Contributor(s): | ||
|
@@ -22,9 +22,10 @@ | |
-- Revision History: | ||
-- Date Version Description | ||
-- 01/2015: 2015.01 Initial revision | ||
-- 01/2016: 2016.01 TranscriptOpen function now calls procedure of same name | ||
-- | ||
-- | ||
-- Copyright (c) 2015 by SynthWorks Design Inc. All rights reserved. | ||
-- Copyright (c) 2015-2016 by SynthWorks Design Inc. All rights reserved. | ||
-- | ||
-- Verbatim copies of this source file may be used and | ||
-- distributed without restriction. | ||
|
@@ -57,6 +58,7 @@ package TranscriptPkg is | |
procedure TranscriptOpen (Status: out FILE_OPEN_STATUS; ExternalName: STRING; OpenKind: WRITE_APPEND_OPEN_KIND := WRITE_MODE) ; | ||
procedure TranscriptOpen (ExternalName: STRING; OpenKind: WRITE_APPEND_OPEN_KIND := WRITE_MODE) ; | ||
impure function TranscriptOpen (ExternalName: STRING; OpenKind: WRITE_APPEND_OPEN_KIND := WRITE_MODE) return FILE_OPEN_STATUS ; | ||
|
||
procedure TranscriptClose ; | ||
impure function IsTranscriptOpen return boolean ; | ||
alias IsTranscriptEnabled is IsTranscriptOpen [return boolean] ; | ||
|
@@ -103,25 +105,30 @@ package body TranscriptPkg is | |
------------------------------------------------------------ | ||
begin | ||
file_open(Status, TranscriptFile, ExternalName, OpenKind) ; | ||
TranscriptEnable.Set(TRUE) ; | ||
if Status = OPEN_OK then | ||
TranscriptEnable.Set(TRUE) ; | ||
end if ; | ||
end procedure TranscriptOpen ; | ||
|
||
------------------------------------------------------------ | ||
procedure TranscriptOpen (ExternalName: STRING; OpenKind: WRITE_APPEND_OPEN_KIND := WRITE_MODE) is | ||
------------------------------------------------------------ | ||
variable Status : FILE_OPEN_STATUS ; | ||
begin | ||
file_open(TranscriptFile, ExternalName, OpenKind) ; | ||
TranscriptEnable.Set(TRUE) ; | ||
TranscriptOpen(Status, ExternalName, OpenKind) ; | ||
if Status /= OPEN_OK then | ||
report "TranscriptPkg.TranscriptOpen file: " & | ||
ExternalName & " status is: " & to_string(status) & " and is not OPEN_OK" severity FAILURE ; | ||
end if ; | ||
end procedure TranscriptOpen ; | ||
|
||
------------------------------------------------------------ | ||
impure function TranscriptOpen (ExternalName: STRING; OpenKind: WRITE_APPEND_OPEN_KIND := WRITE_MODE) return FILE_OPEN_STATUS is | ||
------------------------------------------------------------ | ||
variable Status : FILE_OPEN_STATUS ; | ||
begin | ||
file_open(Status, TranscriptFile, ExternalName, OpenKind) ; | ||
TranscriptEnable.Set(TRUE) ; | ||
return status ; | ||
TranscriptOpen(Status, ExternalName, OpenKind) ; | ||
return Status ; | ||
end function TranscriptOpen ; | ||
|
||
------------------------------------------------------------ | ||
|