[comp.lsi] Chapter 02 - 1076 DoD translated VHDL test suite

grout@cadillac.stars.flab.Fujitsu.JUNET (Steve Grout) (07/13/88)

This is Chapter 02 of a 1076-1987 VHDL test suite which was translated
from an 7.2 VHDL version test suite
developed by Intermetrics under funding by the DoD.  These tests
have been verified todate mainly against a VHDL 'recognizer' so they
may yet have problems with VHDL semantics.  They consist of two
classes of tests, 

  ERROR Tests: - those which start with 'e' should result in VHDL errors
   at the spot in them where there is a comment about error being expected.

  SIMPLE Tests: - those which start with 's' should analyze or compile cleanly.

These tests are being shared back to industry in hopes of getting together
a joint set of tests, checked out and verified, which we can all use to 
make sure our various VHDL CAD tools work correctly.

Your comments and especially constructive criticism is urgently requested
via any way we can get it.  All replies and resulting changes/updates will
be posted back to the same places these tests were originally posted.

Thanks for your support!

--Steve Grout, MCC CAD Program. (512)338-3516, grout@mcc.com


---- Cut Here and unpack ----
#!/bin/sh
#
# This is a 'shar' archive.  Cut out everything above the line
# and unpack them with /bin/sh, i.e., using a command like:
#     % sh < {the contents of this message after cutting}
#
#
echo "--------------------------------------------------"
echo "Starting to extract Chapter 02 of a 1076-1987 VHDL"
echo "    translated DoD/Intermetrics test suite...."
echo "--------------------------------------------------"
echo x - TEST-SYNOPSIS.text
sed 's/^X//' >TEST-SYNOPSIS.text <<'*-*-END-of-TEST-SYNOPSIS.text-*-*'
X------------------------------------------------------------------------
XChapter:  02-Subprograms And Packages
X------------------------------------------------------------------------
X
X
X  Paragraph: Subprogram Declarations - 2.1 --> 2.1
X------------------------------------------------------------------------
XTest:       s-02-1-0-0001a.vhdl
X-- Check that the formal parameters of a subprogram specification is optional.
XTest:       s-02-1-0-0002a.vhdl
X-- Check that in a function specification, any return type is permitted: 
X-- scalars (constrained or unconstrained), 
X-- arrays (constrained or unconstrained), record.
X
X------------------------------------------------------------------------
X  Paragraph: Formal Parameter Modes - 2.2 --> 2.1.1
X------------------------------------------------------------------------
XTest:       e-02-1-1-0001a.vhdl
X-- Check that the only modes permitted in a procedure parameter interface
X-- list are "in", "inout", and "
XTest:       e-02-1-1-0002a.vhdl
X-- Check that the only mode permitted for a function formal parameter is 
X-- mode "in".
XTest:       e-02-1-1-0003a.vhdl
X-- Check that the only object class of subprogram formal parameters
X-- of mode "in" must be "constant" or "signal".
XTest:       e-02-1-1-0004a.vhdl
X-- Check that the object class of procedure formal parameters of
X-- mode "inout"
X-- or "out" must be "variable".
XTest:       e-02-1-1-0005a.vhdl
X-- Check that for subprogram formal paramters of mode "in", object class
X-- "constant" is assumed if not explicitly given.
XTest:       e-02-1-1-0006a.vhdl
X-- Check that in a procedure specification if no object class is explicitly
X-- given for an "inout" or "out" formal parameter then "variable" is assumed.
XTest:       e-02-1-1-0007a.vhdl
X-- Check that in subprogram calls the actual corresponding to
X-- formal parameter
X-- Of mode "in" must be a readable expression.
XTest:       e-02-1-1-0008a.vhdl
X-- Check that in procedure calls the actual corresponding to a formal parameter
X-- of mode "out" or "inout" must be a variable.
X       e-02-1-1-0009a.vhdl
X-- Check that a return clause is required in a function specification.
X       e-02-1-1-0010a.vhdl
X-- Check that range constraints and index constraints are not permitted in
X-- result clause of function specifications.
X       s-02-1-1-0001a.vhdl
X--Check that parameter interface elements of mode "in" are permitted in a 
X-- function or procedure specificiation if object class is "constant".
X       s-02-1-1-0002a.vhdl
X-- Check that parameter interface elements of mode  "inout" or "out" are
X-- permitted in a procedure specification if object class is 
X-- "variable". Note: "in" parameters must have constant object class.
X
X------------------------------------------------------------------------
X  Paragraph: Constants and Variable Parameters --> 2.1.1.1
X------------------------------------------------------------------------
X   (...No tests available from 7.2 suite.)    
X
X------------------------------------------------------------------------
X  Paragraph: Signal Parameters - --> 2.1.1.2
X------------------------------------------------------------------------
X        (...No tests available from 7.2 suite.)    
X
X------------------------------------------------------------------------
X  Paragraph: Subprogram Bodies - 2.3 --> 2.2
X------------------------------------------------------------------------
XTest:       e-02-2-0-0001a.vhdl
X-- Check that if the function name is repeated at the end of the declaration,
X-- it must be the same as the name given after the reserved word "function".
XTest:       e-02-2-0-0002a.vhdl
X-- Check that the following are not permitted within a subprogram: port
X-- declaration, generic declaration, signal declaration,
X-- interface declaration, body declaration, component declaration,
X-- package declaration, assert directive, configuration specification.
XTest:       e-02-2-0-0003a.vhdl
X-- Check that generate statements, component instantiations, process statement
X-- and signal assignment statements enable statements, disable statments,
X-- concurrent assertion statements, and concurrent signal assignment statements
X-- are not permitted within a function.
X       s-02-2-0-0001a.vhdl
X-- Check that variable ,constant, and alias declarations are permitted 
X-- within a subprogram.
X       s-02-2-0-0002a.vhdl
X-- Check that the repeating of the subprogram name at the end of the subprogram
X-- declaration is optional.
X       s-02-2-0-0003a.vhdl
X-- Check that the following kinds of statements are permitted within a
X-- subprogram: variable assignment, if, case, loop, next, exit, return, null,
X-- assertion, procedure call.
X
X------------------------------------------------------------------------
X  Paragraph: Subprogram Overloading - --> 2.3
X------------------------------------------------------------------------
X        (...No tests available from 7.2 suite.)    
X
X------------------------------------------------------------------------
X  Paragraph: Operator Overloading - --> 2.3.1
X------------------------------------------------------------------------
X        (...No tests available from 7.2 suite.)    
X
X------------------------------------------------------------------------
X  Paragraph: Resolution functions - --> 2.4
X------------------------------------------------------------------------
X        (...No tests available from 7.2 suite.)    
X       ................
X
X------------------------------------------------------------------------
X  Paragraph: Package Declarations - --> 2.5
X------------------------------------------------------------------------
XTest:       e-02-5-0-0001a.vhdl
X-- Check that the package given at the end of the package declaration must be
X-- the same as the name given after the reserved word "package".
XTest:       e-02-5-0-0002a.vhdl
X-- Check that the package declarative part may not be null.
XTest:       e-02-5-0-0003a.vhdl
X-- Check that the following are not permitted in a package: interface,,
X-- body, generic, package, assertion, configuration, initialize and
X-- port statements.
XTest:       s-02-5-0-0001a.vhdl
X-- Check that the following are permitted in a package: type, subtype,
X-- attribute , subprogram declarations, constant, alias,  
X-- component declaration, and attribute specification.
XTest:       s-02-5-0-0002a.vhdl
X-- Check that the package name at the end of a package declaration
X-- is optional.
X
X------------------------------------------------------------------------
X  Paragraph: Package Bodies - --> 2.6
X------------------------------------------------------------------------
X        (...No tests available from 7.2 suite.)    
X
X------------------------------------------------------------------------
X  Paragraph: Conformance Rules - --> 2.7
X------------------------------------------------------------------------
X        (...No tests available from 7.2 suite.)    
X
*-*-END-of-TEST-SYNOPSIS.text-*-*
echo x - e-02-1-1-0001a.vhdl
sed 's/^X//' >e-02-1-1-0001a.vhdl <<'*-*-END-of-e-02-1-1-0001a.vhdl-*-*'
X
X-------------------------------------------------------------------------------
X	--
X	--		Copyright Intermetrics 1986
X	--
X	-- 	This material may be reproduced by or for the 
X	--      U.S. Government pursuant to the copyright license 
X	-- 	under DAR clause 7-104.9(a) (1981 May)
X	--
X	--
X-------------------------------------------------------------------------------
X-- File: %P%
X-- Original file name: E-02-1-1-0001A.VHDL
X-- Version: %W% - last modified %E%
X-- sccsid:  -- %G% %W% --
X-- Description:
X-- Check that the only modes permitted in a procedure parameter interface
X-- list are "in", "inout", and "
X-- 
X-- Modification History:
X-- ---------------------------------------------------------------------------
X-- Updated to 1076-1987 VHDL, checked w/Recognizer. (Deene)ogden@mcc.com 20jun88
X-- ***************************************************************************
X-- Begin test: >>>
X
Xpackage P is
Xprocedure  F1 (B1 : integer) ;
Xprocedure F2 ( B2 : integer) ;
Xend P;
X
Xpackage body P is
Xprocedure  F1 (B1 : linkage integer) is
X-- ERROR: linkage is not allowed in a procedure parameter list.
X
X begin
X  null;
X end F1;
X
Xprocedure F2 ( B2 : buffer integer) is
X-- ERROR: buffer is not allowed in a procedure parameter list.
X
X begin
X  null;
X end F2;
X
Xend P;
*-*-END-of-e-02-1-1-0001a.vhdl-*-*
echo x - e-02-1-1-0002a.vhdl
sed 's/^X//' >e-02-1-1-0002a.vhdl <<'*-*-END-of-e-02-1-1-0002a.vhdl-*-*'
X
X-------------------------------------------------------------------------------
X	--
X	--		Copyright Intermetrics 1986
X	--
X	-- 	This material may be reproduced by or for the 
X	--      U.S. Government pursuant to the copyright license 
X	-- 	under DAR clause 7-104.9(a) (1981 May)
X	--
X	--
X-------------------------------------------------------------------------------
X-- File: %P%
X-- Original file name: E-02-1-1-0002A.VHDL
X-- Version: %W% - last modified %E%
X-- sccsid:  -- %G% %W% --
X-- Description:
X-- Check that the only mode permitted for a function formal parameter is 
X-- mode "in".
X-- 
X-- Modification History:
X-- ---------------------------------------------------------------------------
X-- Updated to 1076-1987 VHDL, checked w/Recognizer. (Deene)ogden@mcc.com 20jun88
X-- ***************************************************************************
X-- Begin test: >>>
X
Xpackage P is
Xfunction F1 (A : integer;
X             B : integer;
X             C : integer;
X	     D : integer) return boolean;
Xend P;
X
Xpackage body P is
Xfunction F1 ( A : inout integer; 
X--ERROR: only mode "in" allowed for function formal parameter list
X  	      
X	      B : out integer ;
X--ERROR: only mode "in" allowed for function formal parameter list
X
X	      C : buffer integer;
X--ERROR: only mode "in" allowed for function formal parameter list
X
X	      D : linkage integer)return boolean  is
X--ERROR: only mode "in" allowed for function formal parameter list
X
X   begin
X    return false;
X end F1;
X
Xend P;
*-*-END-of-e-02-1-1-0002a.vhdl-*-*
echo x - e-02-1-1-0003a.vhdl
sed 's/^X//' >e-02-1-1-0003a.vhdl <<'*-*-END-of-e-02-1-1-0003a.vhdl-*-*'
X
X-------------------------------------------------------------------------------
X	--
X	--		Copyright Intermetrics 1986
X	--
X	-- 	This material may be reproduced by or for the 
X	--      U.S. Government pursuant to the copyright license 
X	-- 	under DAR clause 7-104.9(a) (1981 May)
X	--
X	--
X-------------------------------------------------------------------------------
X-- File: %P%
X-- Original file name: E-02-1-2-0003A.VHDL
X-- Version: %W% - last modified %E%
X-- sccsid:  -- %G% %W% --
X-- Description:
X-- Check that the only object class of subprogram formal parameters
X-- of mode "in" must be "constant" or "signal".
X-- 
X-- Modification History:
X-- ---------------------------------------------------------------------------
X-- Updated to 1076-1987 VHDL, checked w/Recognizer. (Deene)ogden@mcc.com 20jun88
X-- ***************************************************************************
X-- Begin test: >>>
X
Xpackage P is
Xprocedure P1 ( variable A :  integer) ;
Xprocedure P2 ( signal A :  integer) ;
Xend P;
X
Xpackage body P is
Xprocedure P1 ( variable A : in integer) is
X-- ERROR: parameters of mode in must be constant or signal
X
X  begin
X   null;
X end P1;
X
Xprocedure P2 ( signal A : in integer) is
X-- ERROR: parameters of mode in must be constant or signal
X
X  begin
X   null;
X end P2;
X
Xend P;
*-*-END-of-e-02-1-1-0003a.vhdl-*-*
echo x - e-02-1-1-0004a.vhdl
sed 's/^X//' >e-02-1-1-0004a.vhdl <<'*-*-END-of-e-02-1-1-0004a.vhdl-*-*'
X
X-------------------------------------------------------------------------------
X	--
X	--		Copyright Intermetrics 1986
X	--
X	-- 	This material may be reproduced by or for the 
X	--      U.S. Government pursuant to the copyright license 
X	-- 	under DAR clause 7-104.9(a) (1981 May)
X	--
X	--
X-------------------------------------------------------------------------------
X-- File: %P%
X-- Original file name: E-02-1-1-0004A.VHDL
X-- Version: %W% - last modified %E%
X-- sccsid:  -- %G% %W% --
X-- Description:
X-- Check that the object class of procedure formal parameters of
X-- mode "inout"
X-- or "out" must be "variable".
X-- 
X-- Modification History:
X-- ---------------------------------------------------------------------------
X-- Updated to 1076-1987 VHDL, checked w/Recognizer. (Deene)ogden@mcc.com 20jun88
X-- ***************************************************************************
X-- Begin test: >>>
X
Xpackage P is
Xprocedure P1 (C1 : integer;
X    	      C2 : integer;
X	      S1 : integer;
X	      S2 : integer) ;
Xend P;
X
Xpackage body P is	   
Xprocedure P1 ( constant C1 : inout Integer;
X              -- ERROR: for inout formal parameter must be variable
X
X               constant C2 : out integer;
X              -- ERROR: for inout formal parameter must be variable
X
X               signal S1 : inout integer;
X              -- ERROR: for inout formal parameter must be variable
X
X	       signal S2 : out integer) is
X              -- ERROR: for inout formal parameter must be variable
X begin
X  null;
X end P1;
X
Xend P;
*-*-END-of-e-02-1-1-0004a.vhdl-*-*
echo x - e-02-1-1-0005a.vhdl
sed 's/^X//' >e-02-1-1-0005a.vhdl <<'*-*-END-of-e-02-1-1-0005a.vhdl-*-*'
X
X-------------------------------------------------------------------------------
X	--
X	--		Copyright Intermetrics 1986
X	--
X	-- 	This material may be reproduced by or for the 
X	--      U.S. Government pursuant to the copyright license 
X	-- 	under DAR clause 7-104.9(a) (1981 May)
X	--
X	--
X-------------------------------------------------------------------------------
X-- File: %P%
X-- Original file name: E-02-1-1-0005A.VHDL
X-- Version: %W% - last modified %E%
X-- sccsid:  -- %G% %W% --
X-- Description:
X-- Check that for subprogram formal paramters of mode "in", object class
X-- "constant" is assumed if not explicitly given.
X-- 
X-- Modification History:
X-- ---------------------------------------------------------------------------
X-- Updated to 1076-1987 VHDL, checked w/Recognizer. (Deene)ogden@mcc.com 20jun88
X-- ***************************************************************************
X-- Begin test: >>>
X
Xpackage P is
Xprocedure P1 ( A,B : integer) ;
Xend P;
X
Xpackage body P is
Xprocedure P1 ( A,B : integer ) is
X  begin
X  A := 2 ;
X--ERROR: formal paramters not explicitly given are constant and therfore
X-- this assignment is illegal.
X
X  B := B * A;
X--ERROR: formal paramters not explicitly given are constant and therfore
X-- this assignment is illegal.
X
X end P1;
X
Xend P;
*-*-END-of-e-02-1-1-0005a.vhdl-*-*
echo x - e-02-1-1-0006a.vhdl
sed 's/^X//' >e-02-1-1-0006a.vhdl <<'*-*-END-of-e-02-1-1-0006a.vhdl-*-*'
X
X-------------------------------------------------------------------------------
X	--
X	--		Copyright Intermetrics 1986
X	--
X	-- 	This material may be reproduced by or for the 
X	--      U.S. Government pursuant to the copyright license 
X	-- 	under DAR clause 7-104.9(a) (1981 May)
X	--
X	--
X-------------------------------------------------------------------------------
X-- File: %P%
X-- Original file name: E-02-1-1-0006A.VHDL
X-- Version: %W% - last modified %E%
X-- sccsid:  -- %G% %W% --
X-- Description:
X-- Check that in a procedure specification if no object class is explicitly
X-- given for an "inout" or "out" formal parameter then "variable" is assumed.
X-- 
X-- Modification History:
X-- ---------------------------------------------------------------------------
X-- Updated to 1076-1987 VHDL, checked w/Recognizer. (Deene)ogden@mcc.com 20jun88
X-- ***************************************************************************
X-- Begin test: >>>
X
Xpackage P is
Xprocedure P1 ( B : integer;
X               C :   integer) ;
Xend P;
X
Xpackage body P is	  	  
Xprocedure P1 ( B :inout integer;
X               C : out  integer) is
X
X type T2 is range B to C;
X-- ERROR: a range must not be variable.
X
X  begin
X    null;
X  end P1;
X
Xend P;
X
*-*-END-of-e-02-1-1-0006a.vhdl-*-*
echo x - e-02-1-1-0007a.vhdl
sed 's/^X//' >e-02-1-1-0007a.vhdl <<'*-*-END-of-e-02-1-1-0007a.vhdl-*-*'
X
X-------------------------------------------------------------------------------
X	--
X	--		Copyright Intermetrics 1986
X	--
X	-- 	This material may be reproduced by or for the 
X	--      U.S. Government pursuant to the copyright license 
X	-- 	under DAR clause 7-104.9(a) (1981 May)
X	--
X	--
X-------------------------------------------------------------------------------
X-- File: %P%
X-- Original file name: E-02-1-1-0007A.VHDL
X-- Version: %W% - last modified %E%
X-- sccsid:  -- %G% %W% --
X-- Description:
X-- Check that in subprogram calls the actual corresponding to
X-- formal parameter
X-- Of mode "in" must be a readable expression.
X-- ADO 06/13/88
X-- 
X-- Modification History:
X-- ---------------------------------------------------------------------------
X-- Updated to 1076-1987 VHDL, checked w/Recognizer. (Deene)ogden@mcc.com 20jun88
X-- ***************************************************************************
X-- Begin test: >>>
X
Xpackage utilities is
X constant X: Bit := "0";
X procedure P2 (V1: in interger);
X function F1 (V2: boolean) return boolean;
Xend utilities;
X
Xpackage body utilities is
X
X	procedure P2 ( V1 : in integer) is
X 	begin
X   		null;
X 	end P2;
X
X	function F1 ( V2 : boolean) return boolean is
X	 begin
X   		return false;
X	end F1;
X	
Xprocedure P28 ( V28 : out integer; B28 : out boolean ) is
X
X  variable TBOOL : boolean;
X	
X
X  begin
X    P2( V28 );
X       -- ERROR: V28 cannot be read
X    TBOOL := F1( B28 );
X       -- ERROR: B28 cannot be read
X       
Xend P28;
Xend utilities;
X
*-*-END-of-e-02-1-1-0007a.vhdl-*-*
echo x - e-02-1-1-0008a.vhdl
sed 's/^X//' >e-02-1-1-0008a.vhdl <<'*-*-END-of-e-02-1-1-0008a.vhdl-*-*'
X
X-------------------------------------------------------------------------------
X	--
X	--		Copyright Intermetrics 1986
X	--
X	-- 	This material may be reproduced by or for the 
X	--      U.S. Government pursuant to the copyright license 
X	-- 	under DAR clause 7-104.9(a) (1981 May)
X	--
X	--
X-------------------------------------------------------------------------------
X-- File: %P%
X-- Original file name: E-02-1-1-0008A.VHDL
X-- Version: %W% - last modified %E%
X-- sccsid:  -- %G% %W% --
X-- Description:
X-- Check that in procedure calls the actual corresponding to a formal parameter
X-- of mode "out" or "inout" must be a variable.
X-- 
X-- Modification History:
X-- ---------------------------------------------------------------------------
X-- Updated to 1076-1987 VHDL, checked w/Recognizer. (Deene)ogden@mcc.com 20jun88
X-- ***************************************************************************
X-- Begin test: >>>
X
Xpackage more_utils is
X procedure P1  ( A :inout integer;
X                   B : out integer);
Xend more_utils;
X
Xpackage body more_utils is
X    procedure P1 ( A :inout integer;
X                   B : out integer) is
X     begin
X	null;
X    end P1;
Xend more_utils;
X
X
X-- with package more_utils;  
Xuse more_utils.all; 
X
Xentity E  is
X    port ( G : in Bit ) ;
Xend E;
X
Xarchitecture AB of E is
X-- L_X_1: block
X
X     type T1 is range 1 to 100000;
X     constant AA : T1 := 5;
X     constant BB : T1 := 6;
X
X begin
X   process
X    begin
X      P1 (AA,BB);
X	-- ERROR: actual parameters must be variable if they correspond to 
X	-- formal parameter of mode inout or out
X
X      P1 (2,4);
X	-- ERROR: actual parameters must be variable if they correspond to 
X	-- formal parameter of mode inout or out
X
X    end process;
X--    end block;
X end AB;
*-*-END-of-e-02-1-1-0008a.vhdl-*-*
echo x - e-02-1-1-0009a.vhdl
sed 's/^X//' >e-02-1-1-0009a.vhdl <<'*-*-END-of-e-02-1-1-0009a.vhdl-*-*'
X
X-------------------------------------------------------------------------------
X	--
X	--		Copyright Intermetrics 1986
X	--
X	-- 	This material may be reproduced by or for the 
X	--      U.S. Government pursuant to the copyright license 
X	-- 	under DAR clause 7-104.9(a) (1981 May)
X	--
X	--
X-------------------------------------------------------------------------------
X-- File: %P%
X-- Original file name: E-02-1-1-0009A.VHLD
X-- Version: %W% - last modified %E%
X-- sccsid:  -- %G% %W% --
X-- Description:
X-- Check that a return clause is required in a function specification.
X-- 
X-- Modification History:
X-- ---------------------------------------------------------------------------
X-- Updated to 1076-1987 VHDL, checked w/Recognizer. (Deene)ogden@mcc.com 20jun88
X-- ***************************************************************************
X-- Begin test: >>>
X
Xpackage P is
X function F1 ( P1 : integer) return boolean;
Xend P;
X
Xpackage body P is
X function F1 ( P1 : integer) return boolean is
X   begin
X	null;
X        -- ERROR: missing return clause
X   end F1;
X
Xend P;
X
X
*-*-END-of-e-02-1-1-0009a.vhdl-*-*
echo x - e-02-1-1-0010a.vhdl
sed 's/^X//' >e-02-1-1-0010a.vhdl <<'*-*-END-of-e-02-1-1-0010a.vhdl-*-*'
X
X-------------------------------------------------------------------------------
X	--
X	--		Copyright Intermetrics 1986
X	--
X	-- 	This material may be reproduced by or for the 
X	--      U.S. Government pursuant to the copyright license 
X	-- 	under DAR clause 7-104.9(a) (1981 May)
X	--
X	--
X-------------------------------------------------------------------------------
X-- File: %P%
X-- Original file name: E-02-1-1-0010A.VHDL
X-- Version: %W% - last modified %E%
X-- sccsid:  -- %G% %W% --
X-- Description:
X-- Check that range constraints and index constraints are not permitted in
X-- result clause of function specifications.
X-- 
X-- Modification History:
X-- ---------------------------------------------------------------------------
X-- Updated to 1076-1987 VHDL, checked w/Recognizer. (Deene)ogden@mcc.com 20jun88
X-- ***************************************************************************
X-- Begin test: >>>
X
Xpackage P is
X    function F (X,Y:INTEGER) return INTEGER;
X    function G (Z:BOOLEAN) return BOOLEAN;
X    function H (A,B,C:BIT) return BIT;
Xend P;
X
Xpackage body P is
X    function F (X,Y:INTEGER)
X     return REAL range 0.0 to 0.5 is   -- ERROR : range constraint not allowed
X    begin
X        return 0.1234;
X    end F;
X
X    function G (Z:BOOLEAN)
X     return STRING(5 to 10) is            -- ERROR : index constraint not allowed
X    begin
X        return "AB098Z";
X  end G;
X
Xfunction H (A,B,C:BIT)
X return INTEGER range 10 downto 2 is      -- ERROR : range constraint not allowe
Xbegin
X    return 2;
Xend H;
Xend P;
*-*-END-of-e-02-1-1-0010a.vhdl-*-*
echo x - e-02-2-0-0001a.vhdl
sed 's/^X//' >e-02-2-0-0001a.vhdl <<'*-*-END-of-e-02-2-0-0001a.vhdl-*-*'
X
X-------------------------------------------------------------------------------
X	--
X	--		Copyright Intermetrics 1986
X	--
X	-- 	This material may be reproduced by or for the 
X	--      U.S. Government pursuant to the copyright license 
X	-- 	under DAR clause 7-104.9(a) (1981 May)
X	--
X	--
X-------------------------------------------------------------------------------
X-- File: %P%
X-- Original file name: E-02-2-0-0001A.VHDL
X-- Version: %W% - last modified %E%
X-- sccsid:  -- %G% %W% --
X-- Description:
X-- Check that if the function name is repeated at the end of the declaration,
X-- it must be the same as the name given after the reserved word "function".
X-- 
X-- Modification History:
X-- ---------------------------------------------------------------------------
X-- Updated to 1076-1987 VHDL, checked w/Recognizer. (Deene)ogden@mcc.com 20jun88
X-- ***************************************************************************
X-- Begin test: >>>
X
Xpackage P is
X    function F(X,Y:INTEGER) return REAL;
X    function G(Z:REAL) return BOOLEAN;
Xend P;
X
Xpackage body P is
X    function F(X,Y:INTEGER) return REAL is
X    begin
X        return 3.6;
X    end K;      -- ERROR : name at end not same as function name
X
X
Xfunction G(Z:REAL) return BOOLEAN is
Xbegin
X    return TRUE;
Xend H;          -- ERROR : name at end not same as function name
X
Xend P;
*-*-END-of-e-02-2-0-0001a.vhdl-*-*
echo x - e-02-2-0-0002a.vhdl
sed 's/^X//' >e-02-2-0-0002a.vhdl <<'*-*-END-of-e-02-2-0-0002a.vhdl-*-*'
X
X-------------------------------------------------------------------------------
X	--
X	--		Copyright Intermetrics 1986
X	--
X	-- 	This material may be reproduced by or for the 
X	--      U.S. Government pursuant to the copyright license 
X	-- 	under DAR clause 7-104.9(a) (1981 May)
X	--
X	--
X-------------------------------------------------------------------------------
X-- File: %P%
X-- Original file name: E-02-3-0-0002A.VHD
X-- Version: %W% - last modified %E%
X-- sccsid:  -- %G% %W% --
X-- Description:
X-- Check that the following are not permitted within a subprogram: port
X-- declaration, generic declaration, signal declaration,
X-- interface declaration, body declaration, component declaration,
X-- package declaration, assert directive, configuration specification.
X-- JB  (DB 7/11/85)
X-- 
X-- Modification History:
X-- ---------------------------------------------------------------------------
X-- Updated to 1076-1987 VHDL, checked w/Recognizer. (Deene)ogden@mcc.com 20jun88
X-- ***************************************************************************
X-- Begin test: >>>
X
Xpackage P is
Xfunction F  return REAL;
Xfunction G return BOOLEAN;
Xfunction H return CHARACTER;
Xfunction J (Z:BOOLEAN) return INTEGER;
Xfunction L return POSITIVE;
Xfunction M return BOOLEAN;
Xfunction N return REAL;
Xfunction O return STRING;
Xfunction Q return BIT;
Xfunction S return INTEGER;
Xend P;
X
Xpackage body P is
Xfunction F (X: INTEGER) (Y:STRING)             -- ERROR : port declaration
X return REAL is
Xbegin
X    return 3.5;
Xend F;
X
Xfunction G return BOOLEAN is
X    generic (Z:TIME);                          -- ERROR : generic declaration
Xbegin
X    return 'A'='a';
Xend G;
X
Xfunction H return CHARACTER is
X    signal S1 : BIT;                           -- ERROR : signal declaration
Xbegin
X    return 'A';
Xend H;
X
X--function I return TIME is
X--    function F return BIT is
X--    begin
X--        return '0';
X--    end F;                                     -- ERROR : function declaration
X--begin
X--    return 10 MIN;
X--end I;
X
X--function R return SEVERITY_LEVEL is
X--    procedure P is
X--    begin
X--        null;
X--    end;                                       -- ERROR : procedure declaration
X--begin
X--    return NOTE;
X--end R;
X
Xfunction J (Z:BOOLEAN) return INTEGER is
X    entity E (PT:BIT) is
X    end E;                                     -- ERROR : interface declaration
Xbegin
X    return 10;
Xend J;
X
Xfunction L return POSITIVE is
X    architecture AB of E is
X--L_X_1:     block
X        signal S : REAL;
X     begin
X        S <= 2.4;
X--     end block
X    end AB;                                    -- ERROR : body declaration
Xbegin
X    return 10;
Xend L;
X
Xfunction M return BOOLEAN is
X    component C port (I:out REAL);                 -- ERROR : component declaration
Xbegin
X    return FALSE;
Xend M;
X
Xfunction N return REAL is
X    package P is
X        type T is range 10 to 20;
X    end P;                                    -- ERROR : package declaration
Xbegin
X    return -5.5;
Xend N;
X
Xfunction O return STRING is
X    assert CHARACTER'('1')/=BIT'('1') report "oops"; -- ERROR : assert directive
Xbegin
X    return "OKAY";
Xend O;
X
Xfunction Q return BIT is
X     for all : COMP_NAME
X       use
X         entity (open)
X         architecture(open);
X     end for;                             -- ERROR : configuration specification
Xbegin
X     return '0';
Xend Q;
X
Xfunction S return INTEGER is
X    for BLOCK_LABEL
X    end for;                              -- ERROR : configuration specification
Xbegin
X    return 12345;
Xend S;
X
Xend P
*-*-END-of-e-02-2-0-0002a.vhdl-*-*
echo x - e-02-2-0-0003a.vhdl
sed 's/^X//' >e-02-2-0-0003a.vhdl <<'*-*-END-of-e-02-2-0-0003a.vhdl-*-*'
X
X-------------------------------------------------------------------------------
X	--
X	--		Copyright Intermetrics 1986
X	--
X	-- 	This material may be reproduced by or for the 
X	--      U.S. Government pursuant to the copyright license 
X	-- 	under DAR clause 7-104.9(a) (1981 May)
X	--
X	--
X-------------------------------------------------------------------------------
X-- File: %P%
X-- Original file name: E-02-3-0-0004A.VHD
X-- Version: %W% - last modified %E%
X-- sccsid:  -- %G% %W% --
X-- Description:
X-- Check that generate statements, component instantiations, process statement
X-- and signal assignment statements enable statements, disable statments,
X-- concurrent assertion statements, and concurrent signal assignment statements
X-- are not permitted within a function.
X-- JB (DB 9/5/85)
X-- 
X-- Modification History:
X-- ---------------------------------------------------------------------------
X-- Updated to 1076-1987 VHDL, checked w/Recognizer. (Deene)ogden@mcc.com 20jun88
X-- ***************************************************************************
X-- Begin test: >>>
X
Xpackage P is 
Xfunction F (X,Y:INTEGER) return REAL;
Xfunction I return BIT;
Xprocedure J (R1 : real);
Xfunction TOTAL (E1,E2 : boolean) return Boolean;
Xend P;
X
Xpackage body P is 
Xfunction F (X,Y:INTEGER) return REAL is
X    component C port (X,Y:linkage BOOLEAN);
Xbegin
X    for I in INTEGER generate
X        C_1: C port(1=2,TRUE);
X    end generate;                         -- ERROR : generate statement
X    return 3.5;
Xend F;
X
Xfunction I return BIT is
X    component D port (Z:INTEGER);
Xbegin
X    D_1: D port(10+15/5);                          -- ERROR : component instantiation
X    return '0';
Xend I;
X
Xprocedure J (R1 : real) is
X    
Xbegin
X    S1 <= 9.99;                            -- ERROR : signal assignment
Xend J;
X
Xfunction TOTAL (E1,E2 : boolean) return Boolean is
X begin
X  enable E1;
X  disable E2;
X  S1,S2 <= 2;
X  return false;
X end TOTAL;
X
Xend P;
*-*-END-of-e-02-2-0-0003a.vhdl-*-*
echo x - e-02-5-0-0001a.vhdl
sed 's/^X//' >e-02-5-0-0001a.vhdl <<'*-*-END-of-e-02-5-0-0001a.vhdl-*-*'
X
X-------------------------------------------------------------------------------
X	--
X	--		Copyright Intermetrics 1986
X	--
X	-- 	This material may be reproduced by or for the 
X	--      U.S. Government pursuant to the copyright license 
X	-- 	under DAR clause 7-104.9(a) (1981 May)
X	--
X	--
X-------------------------------------------------------------------------------
X-- File: %P%
X-- Original file name: E-02-5-0-0001A.VHDL
X-- Version: %W% - last modified %E%
X-- sccsid:  -- %G% %W% --
X-- Description:
X-- Check that the package given at the end of the package declaration must be
X-- the same as the name given after the reserved word "package".
X-- 
X-- Modification History:
X-- ---------------------------------------------------------------------------
X-- Updated to 1076-1987 VHDL, checked w/Recognizer. (Deene)ogden@mcc.com 20jun88
X-- ***************************************************************************
X-- Begin test: >>>
X
Xpackage RIGHT_PACKAGE_NAME is
X    type Tri is ('0', '1', 'Z');
Xend WRONG_PACKAGE_NAME
X
X-- ERROR: THE NAME GIVEN AT THE END MUST BE THE SAME AS THE PACKAGE NAME
X-- GIVEN AFTER THE RESERVED WORD "PACKAGE"
X;
*-*-END-of-e-02-5-0-0001a.vhdl-*-*
echo x - e-02-5-0-0002a.vhdl
sed 's/^X//' >e-02-5-0-0002a.vhdl <<'*-*-END-of-e-02-5-0-0002a.vhdl-*-*'
X
X-------------------------------------------------------------------------------
X	--
X	--		Copyright Intermetrics 1986
X	--
X	-- 	This material may be reproduced by or for the 
X	--      U.S. Government pursuant to the copyright license 
X	-- 	under DAR clause 7-104.9(a) (1981 May)
X	--
X	--
X-------------------------------------------------------------------------------
X-- File: %P%
X-- Original file name: E-02-5-0-0002A.VHDL
X-- Version: %W% - last modified %E%
X-- sccsid:  -- %G% %W% --
X-- Description:
X-- Check that the package declarative part may not be null.
X-- 
X-- Modification History:
X-- ---------------------------------------------------------------------------
X-- Updated to 1076-1987 VHDL, checked w/Recognizer. (Deene)ogden@mcc.com 20jun88
X-- ***************************************************************************
X-- Begin test: >>>
X
Xpackage PACK is
Xend PACK
X--ERROR: THERE MUST BE AT LEAST ONE DECLARATION IN A PACKAGE
X;
*-*-END-of-e-02-5-0-0002a.vhdl-*-*
echo x - e-02-5-0-0003a.vhdl
sed 's/^X//' >e-02-5-0-0003a.vhdl <<'*-*-END-of-e-02-5-0-0003a.vhdl-*-*'
X
X-------------------------------------------------------------------------------
X	--
X	--		Copyright Intermetrics 1986
X	--
X	-- 	This material may be reproduced by or for the 
X	--      U.S. Government pursuant to the copyright license 
X	-- 	under DAR clause 7-104.9(a) (1981 May)
X	--
X	--
X-------------------------------------------------------------------------------
X-- File: %P%
X-- Original file name: E-02-5-0-0003A.VHDL
X-- Version: %W% - last modified %E%
X-- sccsid:  -- %G% %W% --
X-- Description:
X-- Check that the following are not permitted in a package: interface,,
X-- body, generic, package, assertion, configuration, initialize and
X-- port statements.
X-- JB  (DB 11/85)
X-- 
X-- Modification History:
X-- ---------------------------------------------------------------------------
X-- Updated to 1076-1987 VHDL, checked w/Recognizer. (Deene)ogden@mcc.com 20jun88
X-- ***************************************************************************
X-- Begin test: >>>
X
Xpackage P3 is
X    entity E  is
X            port (PT: BOOLEAN) ;
X    end E;
X    --ERROR: INTERFACE DECLARATIONS ARE NOT ALLOWED IN PACKAGES
Xend P3;
X
Xpackage P4 is
X    architecture AB of E is
X-- L_X_1:     block
X     begin
X         process
X         begin
X             null;
X         end process;
X--      end block;
X    end AB;
X    --ERROR: BODY DECLARATIONS ARE NOT ALLOWED IN PACKAGES
Xend P4;
X
Xpackage P5 is 
X
X    -- ERROR: GENERIC DECLARATIONS NOT ALLOWED IN PACKAGES
Xend P5;
X
Xpackage P6 is
X    package P2 is
X	type INIT_1 is RANGE 1 to 10;
X    end P2;
X    --ERROR: PACKAGE DECLARATIONS ARE NOT ALLOWED IN PACKAGES
Xend P6;
X
Xpackage P7 is
X    assert V2 >= 10;
X    --ERROR: ASSERT DIRECTIVES ARE NOT ALLOWED IN PACKAGES
Xend P7;
X
Xpackage P8 is
X    for BLOCK_LABEL1
X    end for;
X    --ERROR: CONFIGURATION SPECIFICATIONS NOT ALLOWED IN PACKAGES
Xend P8;
X
Xpackage P9 is
X    for all : COMP_NAME
X    end for;
X    --ERROR: CONFIGURATION SPECIFICATIONS NOT ALLOWED IN PACKAGES
Xend P9;
X
Xpackage P10 is
X    initialize REAL to 3.4922;
X    --ERROR: INITIALIZE DIRECTIVES NOT ALLOWED IN PACKAGES
Xend P10;
X
Xpackage P11 is
X       port (PT : BOOLEAN);    
X       type INIT_2 is range 1 to 10;
Xend P11;
X--ERROR: PORT DECLARATIONS ARE NOT ALLOWED IN PACKAGES
*-*-END-of-e-02-5-0-0003a.vhdl-*-*
echo x - s-02-1-0-0001a.vhdl
sed 's/^X//' >s-02-1-0-0001a.vhdl <<'*-*-END-of-s-02-1-0-0001a.vhdl-*-*'
X
X-------------------------------------------------------------------------------
X	--
X	--		Copyright Intermetrics 1986
X	--
X	-- 	This material may be reproduced by or for the 
X	--      U.S. Government pursuant to the copyright license 
X	-- 	under DAR clause 7-104.9(a) (1981 May)
X	--
X	--
X-------------------------------------------------------------------------------
X-- File: %P%
X-- Original file name: S-02-1-0-0001A.VHD
X-- Version: %W% - last modified %E%
X-- sccsid:  -- %G% %W% --
X-- Description:
X-- Check that the formal parameters of a subprogram specification is optional.
X-- 
X-- Modification History:
X-- ---------------------------------------------------------------------------
X-- Updated to 1076-1987 VHDL, checked w/Recognizer. (Deene)ogden@mcc.com 20jun88
X-- ***************************************************************************
X-- Begin test: >>>
X
Xpackage P is
Xfunction F1 (i : integer) return Boolean;
Xfunction F2 return Boolean;
Xprocedure P1 ( Pt :integer);
Xprocedure P2;
Xend P;
X
Xpackage body P is
Xfunction F1 (i : integer) return Boolean is
X  begin
X    return TRUE;
X end F1;
X
Xfunction F2 return Boolean is
X  begin
X    return FALSE;
X end F2;
X
X
Xprocedure P1 ( Pt :integer) is
X begin
X   null;
X end P1;
X
X
Xprocedure P2 is
X begin
X   null;
X end P2;
X
Xend P;
*-*-END-of-s-02-1-0-0001a.vhdl-*-*
echo x - s-02-1-0-0002a.vhdl
sed 's/^X//' >s-02-1-0-0002a.vhdl <<'*-*-END-of-s-02-1-0-0002a.vhdl-*-*'
X
X-------------------------------------------------------------------------------
X	--
X	--		Copyright Intermetrics 1986
X	--
X	-- 	This material may be reproduced by or for the 
X	--      U.S. Government pursuant to the copyright license 
X	-- 	under DAR clause 7-104.9(a) (1981 May)
X	--
X	--
X-------------------------------------------------------------------------------
X-- File: %P%
X-- Original file name: S-02-1-0-0004A.VHD
X-- Version: %W% - last modified %E%
X-- sccsid:  -- %G% %W% --
X-- Description:
X-- Check that in a function specification, any return type is permitted: 
X-- scalars (constrained or unconstrained), 
X-- arrays (constrained or unconstrained), record.
X-- 
X-- Modification History:
X-- ---------------------------------------------------------------------------
X-- Updated to 1076-1987 VHDL, checked w/Recognizer. (Deene)ogden@mcc.com 20jun88
X-- ***************************************************************************
X-- Begin test: >>>
X
Xpackage P1 is
X    type E is (A,B,C,D);
X    type I is range -10 to 10;
X    type FP is range -7.0 to 7.0;
X    type PH is range 1 to 24
X        units
X            U;
X            X=3U;
X            Y=2X;
X        end units;
X    type R is
X        record
X            RE : BOOLEAN;
X        end record;
X--    type AR1 is array (POSITIVE range <>) of REAL;
X    type AR1 is array (1 to 67853) of REAL;
X    type AR2 is array (0 to 7) of BIT;
Xend P1;
X
X-- with package P1; 
Xuse P1.all;
Xpackage P2 is
X    function F return E;
X    function G return CHARACTER;
X    function H return BIT;
X    function J return BOOLEAN;
X    function K return I;
X    function L return INTEGER;
X    function M return FP;
X    function N return REAL;
Xend P2;
X
Xpackage body P2 is
X    function F return E is
X    begin
X        return C;
X    end F;
X    function G return CHARACTER is
X    begin
X        return 'Z';
X    end G;
X    function H return BIT is
X    begin
X        return '1';
X    end H;
X    function J return BOOLEAN is
X    begin
X        return TRUE;
X    end J;
X    function K return I is
X    begin
X        return 10;
X    end K;
X    function L return INTEGER is
X    begin
X        return -15000;
X    end L;
X    function M return FP is
X    begin
X        return -3.2514;
X    end M;
X    function N return REAL is
X    begin
X        return 6343.6;
X    end N;
Xend P2;
X
X-- with package P1; 
Xuse P1.all;
Xpackage P3 is
Xfunction F return PH;
Xfunction G return TIME;
Xfunction H return R;
Xfunction K return AR2;
X
Xend P3;
X
Xpackage body P3 is
Xfunction F return PH is
Xbegin
X    return Y;
Xend F;
X
Xfunction G return TIME is
Xbegin
X    return 50PS;
Xend G;
X
X--with package P1; use P1;
Xfunction H return R is
X	variable R1 : R;
Xbegin
X	return R1;
X--    return (RE=>FALSE);
Xend H;
X
X-- Uncomment when aggragates work
X--  Can't dcl a variable of type
X--  AR1 since it is unconstrained
X--with package P1; use P1;
X--function J return AR1 is
X--begin
X--    return (1=>0.21,2=>-0.9);
X--end J;
X
X--with package P1; use P1;
Xfunction K return AR2 is
X    variable S : AR2;
Xbegin
X    return S;
X--    return (0|2|3=>'0',others=>'1');
X  end K;
X
X--function L return BIT_VECTOR is
X--begin
X--    return O"074";
X--end L;
X
X--function M return STRING is
X--begin
X--    return "HELLO";
X--end M;
Xend P3;
X
Xwith package P1; use P1;
Xentity E (PT:inout REAL) is
Xend E;
X
*-*-END-of-s-02-1-0-0002a.vhdl-*-*
echo x - s-02-1-1-0001a.vhdl
sed 's/^X//' >s-02-1-1-0001a.vhdl <<'*-*-END-of-s-02-1-1-0001a.vhdl-*-*'
X
X-------------------------------------------------------------------------------
X	--
X	--		Copyright Intermetrics 1986
X	--
X	-- 	This material may be reproduced by or for the 
X	--      U.S. Government pursuant to the copyright license 
X	-- 	under DAR clause 7-104.9(a) (1981 May)
X	--
X	--
X-------------------------------------------------------------------------------
X-- File: %P%
X-- Original file name: S-02-1-0-0002A.VHD
X-- Version: %W% - last modified %E%
X-- sccsid:  -- %G% %W% --
X-- Description:
X--Check that parameter interface elements of mode "in" are permitted in a 
X-- function or procedure specificiation if object class is "constant".
X-- 
X-- Modification History:
X-- ---------------------------------------------------------------------------
X-- Updated to 1076-1987 VHDL, checked w/Recognizer. (Deene)ogden@mcc.com 20jun88
X-- ***************************************************************************
X-- Begin test: >>>
X
Xpackage P is
Xfunction F1 (C2 : boolean) return Boolean;
Xend P;
X
Xpackage body P is
X
Xfunction F1 ( constant C2 : in boolean) return Boolean is
X begin
X  return true;
Xend F1;
X
Xend P;
*-*-END-of-s-02-1-1-0001a.vhdl-*-*
echo x - s-02-1-1-0002a.vhdl
sed 's/^X//' >s-02-1-1-0002a.vhdl <<'*-*-END-of-s-02-1-1-0002a.vhdl-*-*'
X
X-------------------------------------------------------------------------------
X	--
X	--		Copyright Intermetrics 1986
X	--
X	-- 	This material may be reproduced by or for the 
X	--      U.S. Government pursuant to the copyright license 
X	-- 	under DAR clause 7-104.9(a) (1981 May)
X	--
X	--
X-------------------------------------------------------------------------------
X-- File: %P%
X-- Original file name: S-02-1-0-0003A.VHD
X-- Version: %W% - last modified %E%
X-- sccsid:  -- %G% %W% --
X-- Description:
X-- Check that parameter interface elements of mode  "inout" or "out" are
X-- permitted in a procedure specification if object class is 
X-- "variable". Note: "in" parameters must have constant object class.
X-- 
X-- Modification History:
X-- ---------------------------------------------------------------------------
X-- Updated to 1076-1987 VHDL, checked w/Recognizer. (Deene)ogden@mcc.com 20jun88
X-- ***************************************************************************
X-- Begin test: >>>
X
Xpackage P is
X procedure P1 ( C5 : integer;
X	        C3 : Integer; 
X	        C4 : integer);
Xend P;
X
Xpackage body P is
X
X procedure P1 (constant C5 : in integer;
X	       		C3 : inout Integer; 
X	       variable C4 : out integer) is
X   begin
X     null;
X end P1;
X
Xend P;
*-*-END-of-s-02-1-1-0002a.vhdl-*-*
echo x - s-02-2-0-0001a.vhdl
sed 's/^X//' >s-02-2-0-0001a.vhdl <<'*-*-END-of-s-02-2-0-0001a.vhdl-*-*'
X
X-------------------------------------------------------------------------------
X	--
X	--		Copyright Intermetrics 1986
X	--
X	-- 	This material may be reproduced by or for the 
X	--      U.S. Government pursuant to the copyright license 
X	-- 	under DAR clause 7-104.9(a) (1981 May)
X	--
X	--
X-------------------------------------------------------------------------------
X-- File: %P%
X-- Original file name: S-02-3-0-0001A.VHD
X-- Version: %W% - last modified %E%
X-- sccsid:  -- %G% %W% --
X-- Description:
X-- Check that variable ,constant, and alias declarations are permitted 
X-- within a subprogram.
X-- 
X-- Modification History:
X-- ---------------------------------------------------------------------------
X-- Updated to 1076-1987 VHDL, checked w/Recognizer. (Deene)ogden@mcc.com 20jun88
X-- ***************************************************************************
X-- Begin test: >>>
X
Xpackage P is
X    function F(X,Y:INTEGER) return REAL;
Xfunction G(Z:BOOLEAN) return INTEGER;    
Xend P;
X
Xpackage body P is
X    function F(X,Y:INTEGER) return REAL is
X       subtype BV1 is BIT_VECTOR(1 to 8);
X       variable V1 : INTEGER := 5;
X       variable V2 : BV1;
X       variable VR : REAL;
X       constant C1 : integer := 4;
X       alias V5 : integer is V1;
X
X    begin
X        VR := 3.5;
X	return VR;
X    end F;
X
Xfunction G(Z:BOOLEAN) return INTEGER is
X   type AR1 is array (1 to 20) of TIME;
X   variable V1,V2,V3 : BOOLEAN;
X   variable V4 : AR1;
X   variable I : integer;
Xbegin
X    return I;
Xend G;
X
Xend P;
*-*-END-of-s-02-2-0-0001a.vhdl-*-*
echo x - s-02-2-0-0002a.vhdl
sed 's/^X//' >s-02-2-0-0002a.vhdl <<'*-*-END-of-s-02-2-0-0002a.vhdl-*-*'
X
X-------------------------------------------------------------------------------
X	--
X	--		Copyright Intermetrics 1986
X	--
X	-- 	This material may be reproduced by or for the 
X	--      U.S. Government pursuant to the copyright license 
X	-- 	under DAR clause 7-104.9(a) (1981 May)
X	--
X	--
X-------------------------------------------------------------------------------
X-- File: %P%
X-- Original file name: S-02-3-0-0002A.VHD
X-- Version: %W% - last modified %E%
X-- sccsid:  -- %G% %W% --
X-- Description:
X-- Check that the repeating of the subprogram name at the end of the subprogram
X-- declaration is optional.
X-- 
X-- Modification History:
X-- ---------------------------------------------------------------------------
X-- Updated to 1076-1987 VHDL, checked w/Recognizer. (Deene)ogden@mcc.com 20jun88
X-- ***************************************************************************
X-- Begin test: >>>
X
Xpackage P is
Xfunction F1 return boolean;
Xfunction F2 return boolean;
Xprocedure P1;
Xprocedure P21;
Xend P;
X
Xpackage body P is
Xfunction F1 return boolean is
X begin
X  return true;
Xend F1;
X
Xfunction F2 return boolean is
X begin
X  return true;
Xend ;
X
Xprocedure P1 is
X begin
X   null;
X end P1;
X
Xprocedure P21 is
X begin
X   null;
X end ;
X
Xend P;
*-*-END-of-s-02-2-0-0002a.vhdl-*-*
echo x - s-02-2-0-0003a.vhdl
sed 's/^X//' >s-02-2-0-0003a.vhdl <<'*-*-END-of-s-02-2-0-0003a.vhdl-*-*'
X
X-------------------------------------------------------------------------------
X	--
X	--		Copyright Intermetrics 1986
X	--
X	-- 	This material may be reproduced by or for the 
X	--      U.S. Government pursuant to the copyright license 
X	-- 	under DAR clause 7-104.9(a) (1981 May)
X	--
X	--
X-------------------------------------------------------------------------------
X-- File: %P%
X-- Original file name: S-02-3-0-0003A.VHD
X-- Version: %W% - last modified %E%
X-- sccsid:  -- %G% %W% --
X-- Description:
X-- Check that the following kinds of statements are permitted within a
X-- subprogram: variable assignment, if, case, loop, next, exit, return, null,
X-- assertion, procedure call.
X-- 
X-- Modification History:
X-- ---------------------------------------------------------------------------
X-- Updated to 1076-1987 VHDL, checked w/Recognizer. (Deene)ogden@mcc.com 20jun88
X-- ***************************************************************************
X-- Begin test: >>>
X
Xpackage P is
X    function F (X,Y:INTEGER) return REAL;
X    function G (W,Z:BOOLEAN) return INTEGER;
X    procedure Cat;
Xend P;
X
Xpackage body P is
X    function F (X,Y:INTEGER) return REAL is
X	variable V : integer;
X    begin
X	V := 5;
X        if X /=1 then return 1.0;
X        elsif X = Y then return 2.0;
X        else return 3.0;
X        end if;
X        null;
X    end F;
X
Xfunction G (W,Z:BOOLEAN) return INTEGER is
Xbegin
X    assert W = TRUE severity Note;
X    loop
X        next;
X        exit;
X    end loop;
X    case Z is
X        when TRUE => return 4;
X        when others => return 5;
X    end case;
Xend G;
X
Xprocedure Cat is
X   variable banna  : boolean;
X   variable greely : boolean;
X   variable flo    : integer;
Xbegin
X	banna  := True;
X	greely := True;
X	flo := G(banna,greely);
Xend Cat;
Xend P;
*-*-END-of-s-02-2-0-0003a.vhdl-*-*
echo x - s-02-5-0-0001a.vhdl
sed 's/^X//' >s-02-5-0-0001a.vhdl <<'*-*-END-of-s-02-5-0-0001a.vhdl-*-*'
X
X-------------------------------------------------------------------------------
X	--
X	--		Copyright Intermetrics 1986
X	--
X	-- 	This material may be reproduced by or for the 
X	--      U.S. Government pursuant to the copyright license 
X	-- 	under DAR clause 7-104.9(a) (1981 May)
X	--
X	--
X-------------------------------------------------------------------------------
X-- File: %P%
X-- Original file name: S-02-5-0-0001A.VHDL
X-- Version: %W% - last modified %E%
X-- sccsid:  -- %G% %W% --
X-- Description:
X-- Check that the following are permitted in a package: type, subtype,
X-- attribute , subprogram declarations, constant, alias,  
X-- component declaration, and attribute specification.
X-- ADO 06/06/88
X--*************
X-- 
X-- Modification History:
X-- ---------------------------------------------------------------------------
X-- Updated to 1076-1987 VHDL, checked w/Recognizer. (Deene)ogden@mcc.com 20jun88
X-- ***************************************************************************
X-- Begin test: >>>
X
Xentity E  is
X    port (A:BIT; B:out BIT;
X          C,D : Boolean) ;
X    type Q is range 10.5 to 11.5;
X    subtype R is REAL;
X    alias SA :BIT is A;
X    constant C1 :REAL := 1.39;
X
X--    assert (not (C and D))
X--         report " Signals to high raise the dam";
X
X--    assert A = '0'  severity warning;
X--    initialize Q to 11.0, 11.1 after 1 ns;
X
Xprocedure P1 is
X begin
X  return;
Xend P1;
X
Xfunction F1 return BIT is
Xbegin
X  return '0';
Xend F1;
X
Xsignal S:BIT;
Xdisconnect S:T after 0ns;
Xuse P.all;
X
Xend E;
X
X
X--*************
X
Xpackage P1 is
X type BIT is ('0', '1');
Xend P1;
X
Xpackage P is
X
X    type INIT_1 is range 1 to 10;
X    subtype SUBI_1 is INIT_1 range 1 to 5;
X    type ARAY_1 is array (INTEGER range <>) of BOOLEAN;
X    subtype ARAY_LOW is ARAY_1 (1 to 10);
X    type REC_1 is record
X		RE1 : INIT_1;
X		RE2 : SUBI_1;
X	     end record;
X    type ENUM_1 is (ONE,TWO,THREE);
X    subtype SUBE_1 is ENUM_1 range ONE to ONE;
X    type REAL_1 is range 10.1E+2 to 50.1E+2;
X    subtype SUBR_1 is REAL_1 range 10.1E+2 to 30.1E+2;
X    type PHYS_1 is range 1 to 3
X	units
X	    single;
X	    double = 2 single;
X	    triple = 3 single;
X	end units;
X    subtype SUBP_1 is PHYS_1;
X    type MEMORY is array (INTEGER range <>) of CHARACTER;
X    type COORDINATE is record
X	    X,Y : INTEGER;
X	end record;
X    attribute PIN_NO of A:signal is 10;
X    function F return BOOLEAN;  -- is
X--       for NUMB of function F use 6;
X--	type INIT_1 is range 10 to 100;
X--    begin
X--	return FALSE;
X--    end F;
X
X
X    constant CC : INIT_1 := 5;
X-- file declaration not checked at this time
X    alias BB : INIT_1 is CC;  
X    component A_COMPONENT
X    end component;
X--    configuration C1 of A1 is
X--    use P1.all;
X--    end C1;
X    procedure P2 ;  --is
X--	begin
X--           null;
X--    end P2;
X    disconnect S:T after 0ns;
X    use P1.all;
X
Xend P;
*-*-END-of-s-02-5-0-0001a.vhdl-*-*
echo x - s-02-5-0-0002a.vhdl
sed 's/^X//' >s-02-5-0-0002a.vhdl <<'*-*-END-of-s-02-5-0-0002a.vhdl-*-*'
X
X-------------------------------------------------------------------------------
X	--
X	--		Copyright Intermetrics 1986
X	--
X	-- 	This material may be reproduced by or for the 
X	--      U.S. Government pursuant to the copyright license 
X	-- 	under DAR clause 7-104.9(a) (1981 May)
X	--
X	--
X-------------------------------------------------------------------------------
X-- File: %P%
X-- Original file name: S-02-5-0-0002A.VHDL
X-- Version: %W% - last modified %E%
X-- sccsid:  -- %G% %W% --
X-- Description:
X-- Check that the package name at the end of a package declaration
X-- is optional.
X-- ADO 06/9/88
X-- 
X-- Modification History:
X-- ---------------------------------------------------------------------------
X-- Updated to 1076-1987 VHDL, checked w/Recognizer. (Deene)ogden@mcc.com 20jun88
X-- ***************************************************************************
X-- Begin test: >>>
X
Xpackage P1 is
X type J is range 1 to 1000;
Xend;
*-*-END-of-s-02-5-0-0002a.vhdl-*-*
exit

--
Steve Grout @ MCC VLSI CAD Program, Austin TX.  [512] 343-0860 
ARPA: grout@mcc.arpa
UUCP: {ihnp4,seismo,harvard,gatech,pyramid}!ut-sally!im4u!milano!grout