Skip to content
Browse files

Add TEXTIO package (not built yet)

  • Loading branch information...
1 parent ea34fae commit 1381a9310eb4815f9e13255dda7d9f37b1b27b7c @nickg committed May 5, 2012
Showing with 72 additions and 1 deletion.
  1. +4 −1 lib/std/Makefile.am
  2. +68 −0 lib/std/textio.vhd
View
5 lib/std/Makefile.am
@@ -1,7 +1,7 @@
nvc = $(top_builddir)/src/nvc
stddir = $(pkgdatadir)/std
-std_DATA = std/_NVC_LIB std/STD.STANDARD
+std_DATA = std/_NVC_LIB std/STD.STANDARD #std/STD.TEXTIO
bootstrap: $(std_DATA)
@@ -10,5 +10,8 @@ std/_NVC_LIB: std/STD.STANDARD
std/STD.STANDARD: $(srcdir)/standard.vhd
$(nvc) --work=std -a --bootstrap $(srcdir)/standard.vhd
+std/STD.TEXTIO: $(srcdir)/textio.vhd
+ $(nvc) --work=std -a $(srcdir)/textio.vhd
+
clean-local:
-test -d std && $(RM) -r std
View
68 lib/std/textio.vhd
@@ -0,0 +1,68 @@
+--
+-- TEXTIO package as defined by IEEE 1076-1993
+--
+package TEXTIO is
+
+ type LINE is access STRING;
+
+ type TEXT is file of STRING;
+
+ type SIDE is (RIGHT, LEFT);
+
+ subtype WIDTH is NATURAL;
+
+ file INPUT : TEXT open READ_MODE is "STD_INPUT";
+
+ file OUTPUT : TEXT open WRITE_MODE is "STD_OUTPUT";
+
+ procedure READLINE (file F: TEXT; L: out LINE);
+
+ procedure READ (L : inout LINE;
+ VALUE : out BIT;
+ GOOD : out BOOLEAN );
+ procedure READ (L : inout LINE;
+ VALUE : out BIT );
+
+ procedure READ (L : inout LINE;
+ VALUE : out BIT_VECTOR;
+ GOOD : out BOOLEAN );
+ procedure READ (L : inout LINE;
+ VALUE : out BIT_VECTOR );
+
+ procedure READ (L : inout LINE;
+ VALUE : out BOOLEAN;
+ GOOD : out BOOLEAN );
+ procedure READ (L : inout LINE;
+ VALUE : out BOOLEAN );
+
+ procedure READ (L : inout LINE;
+ VALUE : out CHARACTER;
+ GOOD : out BOOLEAN );
+ procedure READ (L : inout LINE;
+ VALUE : out CHARACTER );
+
+ procedure READ (L : inout LINE;
+ VALUE : out INTEGER;
+ GOOD : out BOOLEAN );
+ procedure READ (L : inout LINE;
+ VALUE : out INTEGER );
+
+ --procedure READ (L : inout LINE;
+ -- VALUE : out REAL;
+ -- GOOD : out BOOLEAN );
+ --procedure READ (L : inout LINE;
+ -- VALUE : out REAL );
+
+ procedure READ (L : inout LINE;
+ VALUE : out STRING;
+ GOOD : out BOOLEAN );
+ procedure READ (L : inout LINE;
+ VALUE : out STRING );
+
+ procedure READ (L : inout LINE;
+ VALUE : out TIME;
+ GOOD : out BOOLEAN );
+ procedure READ (L : inout LINE;
+ VALUE : out TIME );
+
+end package;

0 comments on commit 1381a93

Please sign in to comment.
Something went wrong with that request. Please try again.