Skip to content

Commit

Permalink
TranscriptOpen now all call the same procedure
Browse files Browse the repository at this point in the history
  • Loading branch information
JimLewis committed Jan 15, 2016
1 parent 993056e commit 9934df0
Showing 1 changed file with 15 additions and 8 deletions.
23 changes: 15 additions & 8 deletions TranscriptPkg.vhd
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):
Expand All @@ -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.
Expand Down Expand Up @@ -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] ;
Expand Down Expand Up @@ -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 ;

------------------------------------------------------------
Expand Down

0 comments on commit 9934df0

Please sign in to comment.