-- -- 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 11:13:55.35 -- -- CHANGES: -- 21 DEC 89 L SHOMBERT -- Changed library specifications. Libraries are now: -- WAVES_SLIB -> WAVES_STANDARD -- WAVES_PLIB -> WAVES_PORT -- MATCH function reads WAVES_MATCH_LIST type rather than -- WAVES_PORT_LIST type. -- -- 21 FEB 90 A WILMOT -- Removed specific context clause which makes declarations of -- of WAVES_PORT and WAVES_MATCH visible. Although needed -- in order to analyze, the library and package do not -- (yet) have a 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 into this package from the -- WAVES_OBJECTS 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 and TAG was -- changed from inout to out. -- The library in which package WAVES_STANDARD resides was -- changed to be WAVES_STANDARD (analogous to STD) pending a -- better standard name. -- -- library WAVES_STANDARD; use WAVES_STANDARD.WAVES_STANDARD.all; --TBD A context clause must be inserted here that makes WAVES_PORT directly -- visible; however, a library and package name for that context clause are -- not currently part of the standard; thus, the context clause does not -- appear as part of the controlled text. An example is given in the -- comment below: --library WAVES_PLIB; --use WAVES_PLIB.WAVES_PORT.all; -- -- The following two lines were inserted by Gordon Newell on 06-28-90 library EVENTS; use EVENTS.WAVES_PORT.all; -- --TBD A context clause must be inserted here that makes LOGIC_VALUE declaration -- of WAVES dataset directly visible; however, a library and package name for -- that context clause are not standardized; thus, the 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.EVENTS.all; -- -- The following two lines were inserted by Gordon Newell on 06-28-90 library EVENTS; use EVENTS.WAVES_EVENTS.all; -- package WAVES_INTERFACE is -- -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- -- -- This is the basic interface type (based on the local definition of -- WAVES_PORT). -- type WAVES_PORT_LIST is array (POSITIVE range <>) of WAVES_PORT; type WAVES_MATCH_LIST is array (POSITIVE range <>) of WAVES_MATCH; -- -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- -- -- An EVENT_TIME consists of a nominal time and an earliest and latest -- possible deviation. The EARLIEST and LATEST fields are only -- significant if TOLERANCES_SPECIFIED is TRUE. -- type EVENT_TIME is record NOMINAL : TIME; TOLERANCES_SPECIFIED : BOOLEAN; EARLIEST : TIME; LATEST : TIME; end record; -- -=-=-=-=-=-=-=-=-=-=-=-=-=-=- FUNCTIONS -=-=-=-=-=-=-=-=-=-=-=-=-=- -- -- The following three functions make it easy to declare an EVENT_TIME. -- -- The first function returns an event time with no tolerances. The -- nominal time defaults to 0 ns. -- -- The second function returns an event time with symmetric bounds. -- -- The third function allows the bounds to be specified independently. -- function ETIME ( NOMINAL : TIME := 0 ns ) return EVENT_TIME; function ETIME ( NOMINAL : TIME; EARLIEST_AND_LATEST : TIME ) return EVENT_TIME; function ETIME ( NOMINAL : TIME; EARLIEST : TIME; LATEST : TIME ) return EVENT_TIME; function MERGE_ETIME ( A : EVENT_TIME; B : EVENT_TIME ) return EVENT_TIME; -- -- -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- -- -- A TAGGED_EVENT is an EVENT with a flag indicating that the EVENT -- really is not there. If the VALUE is non-negative then it represents -- true event value, otherwise it indicates an empty placeholder. -- -- A FRAME is a list of TAGGED_EVENTs. The frame "ends" at the end of -- the array or at the first event that is unspecified. -- -- A FRAME_SET is a two dimensional list of TAGGED EVENTS. The first -- index is meant to select frames and the second index is meant to -- select (tagged) events within a frame. -- -- A FRAME SET ARRAY is a three dimensional list of TAGGED EVENTS. The -- first index is meant to select frame sets. -- type TAGGED_EVENT is record VALUE : INTEGER; TIME : EVENT_TIME; end record; type FRAME is array (POSITIVE range <>) of TAGGED_EVENT; type FRAME_SET is array (POSITIVE range <>, POSITIVE range <>) of TAGGED_EVENT; type FRAME_SET_ARRAY is array (POSITIVE range <>, POSITIVE range <>, POSITIVE range <>) of TAGGED_EVENT; -- -- -=-=-=-=-=-=-=-=-=-=-=-=-=-=- FUNCTIONS -=-=-=-=-=-=-=-=-=-=-=-=-=-=- -- -- The following functions are used by to create and manipulate frames, -- frame sets, and frame set arrays. The first set of functions return -- the incoming object with its last index range adjusted to be (1 to L), -- truncating or padding with unspecified tagged events, as appropriate. -- The second set of operations are array concatenation, treating a -- frame set as an array of frames and a frame set array as an array of -- frame sets. -- -- The subtype definitions of FRAME_1, FRAME_2, and FRAME_3 are provided -- for convenience. -- subtype FRAME_1 is FRAME; subtype FRAME_2 is FRAME_SET; subtype FRAME_3 is FRAME_SET_ARRAY; function PROMOTE ( DATA : FRAME_1 ) return FRAME_2; function PROMOTE ( DATA : FRAME_2 ) return FRAME_3; function RESIZE ( DATA : FRAME_1; LENGTH_1 : POSITIVE ) return FRAME_1; function RESIZE ( DATA : FRAME_2; LENGTH_2 : POSITIVE; LENGTH_1 : POSITIVE ) return FRAME_2; function RESIZE ( DATA : FRAME_3; LENGTH_3 : POSITIVE; LENGTH_2 : POSITIVE; LENGTH_1 : POSITIVE ) return FRAME_3; -- function TRIM ( DATA : FRAME_1 ) return FRAME_1; function TRIM ( DATA : FRAME_2 ) return FRAME_2; function TRIM ( DATA : FRAME_3 ) return FRAME_3; function CONCAT(A, B : FRAME_1) return FRAME_1; function CONCAT(A, B : FRAME_2) return FRAME_2; function CONCAT(A, B : FRAME_3) return FRAME_3; function "+"(A : FRAME_1; B : FRAME_1) return FRAME_2; function "+"(A : FRAME_2; B : FRAME_1) return FRAME_2; function "+"(A : FRAME_1; B : FRAME_2) return FRAME_2; function "+"(A : FRAME_2; B : FRAME_2) return FRAME_2; -- -=-=-=-=-=-=-=-=-=-=-=-=-=-=- FUNCTIONS -=-=-=-=-=-=-=-=-=-=-=-=-=-=- -- -- The following functions convert a single tagged event into a frame -- (a list of tagged events). The empty case returns a frame of length -- one with the tagged event marked unspecified. -- function FRAME_TAGGED_EVENT return FRAME; function FRAME_TAGGED_EVENT ( EVENTS : TAGGED_EVENT ) return FRAME; -- -- -=-=-=-=-=-=-=-=-=-=-=-=-=-=- FUNCTIONS -=-=-=-=-=-=-=-=-=-=-=-=-=-=- -- -- An EVENT is a record containing a LOGIC_VALUE and an EVENT_TIME. The -- LOGIC_VALUE, of course, may be converted into a TAGGED_EVENT through -- the required VALUE_DICTIONARY function. -- -- The following functions convert a single event or a single event list -- into a frame (a list of tagged events). The empty case returns a -- frame of length one with the tagged event marked unspecified. -- type EVENT is record VALUE : LOGIC_VALUE; TIME : EVENT_TIME; end record; type EVENT_LIST is array (POSITIVE range <>) of EVENT; function FRAME_EVENT return FRAME; function FRAME_EVENT ( EVENTS : EVENT ) return FRAME; function FRAME_ELIST return FRAME; function FRAME_ELIST ( EVENTS : EVENT_LIST ) return FRAME; -- -- -=-=-=-=-=-=-=-=-=-=-=-=-=-=- PROCEDURE -=-=-=-=-=-=-=-=-=-=-=-=-=-=- -- -- This subprogram performs signal assignments to the CONNECT parameter -- based on the PERIOD and EVENTS parameters. If the CODES parameter is -- not null, then the character codes are applied to CONNECT as well. -- The dimensions of CONNECT, EVENTS, and CODES (if present) must be -- identical. The subprogram waits for PERIOD.NOMINAL before returning -- to the caller. Event times must be non-decreasing. Application of -- the EVENTS parameter stops for a given signal when the tagged event -- time is not specified (the flag is set to FALSE). -- procedure APPLY ( signal CONNECT : out WAVES_PORT_LIST; PERIOD : in EVENT_TIME; EVENTS : in FRAME_SET; CODES : in STRING := ""); -- -=-=-=-=-=-=-=-=-=-=-=-=-=-=- PROCEDURE -=-=-=-=-=-=-=-=-=-=-=-=-=-=- -- -- This subprogram performs signal assignments to the CONNECT parameter -- based on the TAG_LABEL parameter. The string in this parameter is -- sent through the CONNECT parameter to the outside simulation -- environment, and is used to pass messages (labels), mostly for debug -- purposes. -- procedure TAG ( signal CONNECT : out WAVES_PORT_LIST; TAG_LABEL : in STRING ); -- -=-=-=-=-=-=-=-=-=-=-=-=-=-=- FUNCTION -=-=-=-=-=-=-=-=-=-=-=-=-=-=- -- -- This function returns the logical AND of the match values for every -- element in the CONNECT parameter. -- function MATCH ( CONNECT : in WAVES_MATCH_LIST ) return BOOLEAN; end WAVES_INTERFACE;