-- -- Copyright 1989 by --- -- -- This code is distributed for the purposes of evaluating the -- Waveform And Vector Exchange Specification (WAVES) proposal -- presented to the IEEE by the WAVES Analysis Group. This code -- may not be used for commercial purposes and may not be -- redistributed without permission of the Chairman of the WAVES -- Analysis Group, Mr Robert Hillman. -- -- Address comments or questions to -- Robert Hillman Lee Shombert -- RADC/RBRP Harris Corporation -- Griffis AFB, NY PO Box 94000 MS 16/4010 -- (315) 330-2241 Melbourne, FL 32902 -- (407) 727-6040 -- -- -- -- TIMESTAMP: 13-DEC-1989 12:48:50.26 -- -- CHANGES: -- 11 DEC 89 L SHOMBERT -- Replaced single NEW_TIME_DATA function having a -- defaulted PERIOD_TOLERANCE with two overloaded -- functions, one without a PERIOD_TOLERANCE and one with a -- mandatory (no default) PERIOD_TOLERANCE. There is no -- effect on WAVES datasets but this fixes a possible bug -- in the MCC simulator. -- 21 FEB 90 A WILMOT -- The library in which package WAVES_STANDARD resides was -- changed to be WAVES_STANDARD (analogous to STD) pending a -- better standard name. -- Removed specific context clauses which make declarations of -- of TEST_PINS, PIN_CODES and WAVES_INTERFACE visible. -- Although needed in order to analyze, the library and -- package names are not standardized. A VHDL user must -- modify these packages to have the appropriate context -- clauses in their system. -- The declarations for EVENT, EVENT_LIST, FRAME_EVENT and -- FRAME_ELIST were moved from this package from the -- WAVES_INTERFACE package. This reflects current usage in -- the examples and boilerplates, where frames and frame_sets -- are defined without reference to WAVES_OBJECTS (and its -- dependence on the TEST_PINS declaration). -- The mode of the CONNECT parameter to APPLY_SLICE and -- APPLY_LIST was changed from inout to out. -- The parameter to the MATCH functions was changed to be -- of type WAVES_MATCH_LIST and of mode in -- The record type FILE_INPUT_DATA was renamed FILE_SLICE -- and the procedure READ_WAVE_SLICE renamed READ_FILE_SLICE -- to reflect the LRM wording. -- The mode of the WAVES_PORT_LIST parameters to the TAG -- procedures was changed from inout to out. (The meaining -- of these functions is unclear at the present.) -- use STD.TEXTIO.all; library WAVES_STANDARD; use WAVES_STANDARD.WAVES_STANDARD.all; --TBD A context clause must be inserted here that makes the contents of -- WAVES_INTERFACE directly visible; however, a library name for that context -- clause is not standardized; thus, such a context clause does not appear -- as part of the controlled text. An example is given in the comment below: --library EVENT_LIBRARY; --use EVENT_LIBRARY.WAVES_INTERFACE.all; -- -- The following two lines were inserted by Gordon Newell on 06-28-90 library EVENTS; use EVENTS.WAVES_INTERFACE.all; -- --TBD A context clause (or context clauses) must be inserted here that make(s) -- the PIN_CODES and TEST_PINS declarations directly visible; however, library -- and package names for the context clause(s) are not standardized; thus, such -- a context clause (or context clauses) does (do) not appear as part of the -- controlled text. An example is given in the comment below: --library DEVICE_LIBRARY; --use DEVICE_LIBRARY.WAVES_GENERATOR.all; --use WORK.WAVES_GENERATOR.all; -- -- The following four lines were inserted by Gordon Newell on 06-28-90 library DEVICE; use DEVICE.WAVES_DEVICE.all; library FRAMES; use FRAMES.WAVES_FRAMES.all; -- package WAVES_OBJECTS is -- -- START OF WAVES_OBJECTS PACKAGE SPECIFICATION -- -- -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- -- -- These definitions create ranges used in dimensioning arrays. They -- depend on values defined in the WAVES_GENERATOR specification. The -- associated functions return the index of a TEST_PINS element in any -- array dimensioned by TEST_PIN_RANGE, and the index of a character -- code in the PIN_CODES string (-1 if not present). -- subtype TEST_PIN_RANGE is INTEGER range TEST_PINS'POS(TEST_PINS'LEFT) + 1 to TEST_PINS'POS(TEST_PINS'RIGHT) + 1; subtype PIN_CODE_RANGE is INTEGER range PIN_CODES'LEFT to PIN_CODES'RIGHT; function INDEX ( VALUE : TEST_PINS ) return INTEGER; function INDEX ( VALUE : CHARACTER ) return INTEGER; -- -- -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- -- -- The following definitions build up to a WAVE SLICE. -- -- A FRAME SET ARRAY POINTER points to a FRAME SET ARRAY -- -- A TIME_DATA_BLOCK contains a FRAME_SET_ARRAY_POINTER and an EVENT_TIME. -- When associated with a WAVE_SLICE, the EVENT_TIME provides tolerances -- for the PERIOD. -- -- A TIME DATA is a pointer to a TIME_DATA_BLOCK. A pointer is used to -- save space, since only a few TIME_DATA_BLOCKs are typically defined, -- but these are referenced in many places. -- -- A WAVE_TIMING contains all timing information needed for a -- WAVE_SLICE. It contains a period which specifies the duration of a -- slice. It contains a time data object which specifies the frame sets -- associated with all the pins in the dataset for that slice. WAVE_ -- TIMING is an object similar in concept to time sets in AMTE. -- -- A WAVE_SLICE is a record that contains all information needed to -- generate a waveform across a set of pins. The CODES field -- carries a character for every pin. It is an error if any character -- does not appear in the package specification constant PIN_CODES. -- The TIMING field carries all the timing for the slice. -- type FRAME_SET_ARRAY_POINTER is access FRAME_SET_ARRAY; type TIME_DATA_BLOCK is record FRAME_SET_DATA : FRAME_SET_ARRAY_POINTER; PERIOD_TOLERANCE : EVENT_TIME; end record; type TIME_DATA is access TIME_DATA_BLOCK; type WAVE_TIMING is record PERIOD : TIME; TIMING : TIME_DATA; end record; type WAVE_SLICE is record CODES : STRING (TEST_PIN_RANGE); TIMING : WAVE_TIMING; end record; type WAVE_SLICE_LIST is array (POSITIVE range <>) of WAVE_SLICE; -- -- -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- -- -- The following definitions allow unconstrained arrays of WAVES -- objects. -- type TIME_LIST is array (POSITIVE range <>) of TIME; type EVENT_TIME_LIST is array (POSITIVE range <>) of EVENT_TIME; type TIME_DATA_LIST is array (POSITIVE range <>) of TIME_DATA; type WAVE_TIMING_LIST is array (POSITIVE range <>) of WAVE_TIMING; type TEST_PINS_LIST is array (POSITIVE range <>) of TEST_PINS; type EVENT_VALUE_LIST is array (POSITIVE range <>) of EVENT_VALUE; -- -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- -- -- The following definitions provide support for pinsets. A PINSET is -- an array of booleans, one for each test pin. Two deferred constants -- are defined, ALL PINS and NO PINS. -- -- A TEST_PINS_LIST is an array of TEST_PINS. Objects of this type are -- used as parameters to functions that create pinsets. -- type PINSET is array (TEST_PIN_RANGE) of BOOLEAN; constant ALL_PINS : PINSET; constant NO_PINS : PINSET; -- -- -=-=-=-=-=-=-=-=-=-=-=-=-=-=- FUNCTIONS -=-=-=-=-=-=-=-=-=-=-=-=-=-=- -- -- Two functions are provided to create a pinset. The first takes a -- single test pin and returns a pinset containing only that test pin. -- The second contains a list of test pins and returns a pinset -- containing all of the listed test pins. These are overloaded to -- reduce the name space. -- -- Pinsets may be added and subtracted using the predefined VHDL logical -- operators, which operate on boolean arrays. These are: -- function or ( A, B : PINSET ) return PINSET; -- function and ( A, B : PINSET ) return PINSET; -- function not ( A, B : PINSET ) return PINSET; -- function NEW_PINSET ( PIN : in TEST_PINS ) return PINSET; function NEW_PINSET ( PINS : in TEST_PINS_LIST ) return PINSET; -- -- -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- -- -- The first procedure applies a single wave slice to the outputs of the -- waveform generator package. The MATCH functions scan all or some of -- the waveform generator signals returning TRUE if every signal matches. -- The TAG procedures apply the string parameter to the output signals, -- in effect labeling (tagging) the next call to APPLY. -- procedure APPLY_SLICE ( signal CONNECT : out WAVES_PORT_LIST (TEST_PIN_RANGE); variable DATA : in WAVE_SLICE ); procedure APPLY_LIST ( signal CONNECT : out WAVES_PORT_LIST (TEST_PIN_RANGE); variable DATA : in WAVE_SLICE_LIST ); function MATCH ( CONNECT : in WAVES_MATCH_LIST (TEST_PIN_RANGE); PINS : PINSET ) return BOOLEAN; function MATCH ( CONNECT : in WAVES_MATCH_LIST (TEST_PIN_RANGE); PINS : TEST_PINS ) return BOOLEAN; procedure TAG ( signal CONNECT : out WAVES_PORT_LIST (TEST_PIN_RANGE); TAG_LABEL : STRING; PINS : PINSET ); procedure TAG ( signal CONNECT : out WAVES_PORT_LIST (TEST_PIN_RANGE); TAG_LABEL : STRING; PINS : TEST_PINS ); -- -- -=-=-=-=-=-=-=-=-=-=-=-=-=-=- FUNCTIONS -=-=-=-=-=-=-=-=-=-=-=-=-=-=- -- -- The following functions are used to create the objects required for a -- TIME_DATA object. -- function NEW_FRAME_SET_ARRAY ( PINS : TEST_PINS; FRAMES : FRAME_SET ) return FRAME_SET_ARRAY; function NEW_FRAME_SET_ARRAY ( PINS : PINSET; FRAMES : FRAME_SET ) return FRAME_SET_ARRAY; function ADD_FRAME_SET_ARRAY ( A : FRAME_SET_ARRAY; B : FRAME_SET_ARRAY ) return FRAME_SET_ARRAY; function NEW_TIME_DATA ( FRAMES : FRAME_SET_ARRAY ) return TIME_DATA; function NEW_TIME_DATA ( FRAMES : FRAME_SET_ARRAY; PERIOD_TOLERANCE : EVENT_TIME ) return TIME_DATA; -- -- -=-=-=-=-=-=-=-=-=-=-=-=-=-=- FUNCTIONS -=-=-=-=-=-=-=-=-=-=-=-=-=- -- -- The following function converts an integer into a binary code. The -- length of the result is specified in the parameter WIDTH and the -- character codes to be used for binary 0 and binary 1 are in the -- parameter KEY. -- function BIT_STRING ( VALUE : INTEGER; KEY : STRING (1 to 2); WIDTH : NATURAL ) return STRING; -- -- -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- -- -- The following definitions support the fixed file format of Level 1 -- WAVES. The FILE INPUT DATA record stores information most recently -- read by the READ WAVE SLICE procedure. A flag, PERIOD NOT INDEX, is -- set to indicate whether the file contained a time or an integer most -- recently. The flag END_OF_FILE is set if an EOF is encountered while -- scanning for the current wave slice. END_OF_FILE is always FALSE if -- a wave slice is successfully (no errors) read. -- -- -- White space is permitted between any of the tokens in the following -- syntax. -- -- waves_file ::= -- { slice } [ '#' ]. -- slice ::= -- [ quoted_string ] { adjusted_string } { timing } ';'. -- adjusted_string ::= -- ( '=' integer | '&' ) quoted_string. -- timing ::= -- ':' ( integer | time ). -- -- White space is disallowed in the following syntax except where -- specifically permitted. -- -- quoted_string ::= -- ( '"' character | alphanum ) non_blank_string. -- integer ::= -- vhdl_integer. -- time ::= -- vhdl_time. -- type FILE_SLICE is record CODES : STRING (TEST_PIN_RANGE); PERIOD_SET : BOOLEAN; PERIOD : TIME; INDEX_SET : BOOLEAN; INDEX : INTEGER; END_OF_FILE : BOOLEAN; end record; procedure READ_FILE_SLICE ( variable IFILE : in TEXT; ACCUMULATOR : inout FILE_SLICE ); -- -- END OF WAVES_OBJECTS PACKAGE SPECIFICATION -- end WAVES_OBJECTS;