Package: Vital_Memory

Constants

Name Type Value Description
DefaultNumBitsPerSubword INTEGER -1
VitalDefaultPortFlag VitalPortFlagType ( MemoryCurrent => READ,
MemoryPrevious => UNDEF,
DataCurrent => READ,
DataPrevious => UNDEF,
OutputDisable => FALSE )

Types

Name Type Description
VitalMemoryArcType (ParallelArc,
CrossArc,
SubwordArc)
OutputRetainBehaviorType (BitCorrupt,
WordCorrupt)
VitalMemoryMsgFormatType (Vector,
Scalar,
VectorEnum)
X01ArrayT ARRAY (NATURAL RANGE <> ) OF X01
X01ArrayPT
VitalMemoryViolationType
VitalMemoryScheduleDataType Data type storing path delay and schedule information for output bits
VitalMemoryTimingDataType
VitalPeriodDataArrayType ARRAY (NATURAL RANGE <>) OF VitalPeriodDataType
VitalMemoryScheduleDataVectorType ARRAY (NATURAL RANGE <> ) OF VitalMemoryScheduleDataType Data type storing path delay and schedule information for output vectors
VitalPortStateType ( UNDEF,
READ,
WRITE,
CORRUPT,
HIGHZ )
VitalPortFlagType records runtime mode of port sub-word slices TYPE VitalPortFlagType IS ( UNDEF, READ, WRITE, CORRUPT, HIGHZ, NOCHANGE ); VitalPortFlagType records runtime mode of port sub-word slices
VitalPortFlagType
VitalPortFlagVectorType ARRAY (NATURAL RANGE <>) OF VitalPortFlagType VitalPortFlagVectorType to be same width i as enables of a port or j multiples thereof, where j is the number of cross ports
MemoryWordType ARRAY (NATURAL RANGE <>) OF UX01 ---------------------------------------------------------------------------- Functionality Section ---------------------------------------------------------------------------- ---------------------------------------------------------------------------- All Memory Types and Record definitions. ----------------------------------------------------------------------------
MemoryWordPtr
MemoryArrayType ARRAY (NATURAL RANGE <>) OF MemoryWordPtr
MemoryArrayPtrType
VitalMemoryArrayRecType
VitalMemoryDataType
VitalTimingDataVectorType ARRAY (NATURAL RANGE <>) OF VitalTimingDataType
VitalMemoryViolFlagSizeType ARRAY (NATURAL RANGE <>) OF INTEGER
VitalMemorySymbolType ( '/',
-- 0 -> 1 '\',
-- 1 -> 0 'P',
-- Union of '/' and '^' (any edge to 1) 'N',
-- Union of '\' and 'v' (any edge to 0) 'r',
-- 0 -> X 'f',
-- 1 -> X 'p',
-- Union of '/' and 'r' (any edge from 0) 'n',
-- Union of '\' and 'f' (any edge from 1) 'R',
-- Union of '^' and 'p' (any possible rising edge) 'F',
-- Union of 'v' and 'n' (any possible falling edge) '^',
-- X -> 1 'v',
-- X -> 0 'E',
-- Union of 'v' and '^' (any edge from X) 'A',
-- Union of 'r' and '^' (rising edge to or from 'X') 'D',
-- Union of 'f' and 'v' (falling edge to or from 'X') '*',
-- Union of 'R' and 'F' (any edge) 'X',
-- Unknown level '0',
-- low level '1',
-- high level 'B',
-- 0 or 1 'Z',
-- High Impedance 'S',
-- steady value 'g',
-- Good address (no transition) 'u',
-- Unknown address (no transition) 'i',
-- Invalid address (no transition) 'G',
-- Good address (with transition) 'U',
-- Unknown address (with transition) 'I',
-- Invalid address (with transition) 'w',
-- Write data to memory 's',
-- Retain previous memory contents 'c',
-- Corrupt entire memory with 'X' 'l',
-- Corrupt a word in memory with 'X' 'd',
-- Corrupt a single bit in memory with 'X' 'e',
-- Corrupt a word with 'X' based on data in 'C',
-- Corrupt a sub-word entire memory with 'X' 'L',
-- Corrupt a sub-word in memory with 'X' 'M',
-- Implicit read data from memory 'm',
-- Read data from memory 't' -- Immediate assign/transfer data in )
---------------------------------------------------------------------------- Symbol Literals used for Memory Table Modeling ---------------------------------------------------------------------------- Symbol literals from '/' to 'S' are closely related to MemoryTableMatch lookup matching and the order cannot be arbitrarily changed. The remaining symbol literals are interpreted directly and matchting is handled in the MemoryMatch procedure itself.
VitalMemoryTableType ARRAY ( NATURAL RANGE <>,
NATURAL RANGE <> ) OF VitalMemorySymbolType
VitalMemoryViolationSymbolType ( 'X',
-- Unknown level '0',
-- low level )
VitalMemoryViolationTableType ARRAY ( NATURAL RANGE <>,
NATURAL RANGE <> ) OF VitalMemoryViolationSymbolType
VitalPortType ( UNDEF,
READ,
WRITE,
RDNWR )
VitalCrossPortModeType ( CpRead,
-- CpReadOnly,
WriteContention,
-- WrContOnly,
ReadWriteContention,
-- CpContention CpReadAndWriteContention,
-- WrContAndCpRead,
CpReadAndReadContention )
VitalAddressValueVectorType ARRAY (NATURAL RANGE <>) OF VitalAddressValueType

Functions

Description


Functions : VitalMemory path delay procedures
- VitalMemoryInitPathDelay
- VitalMemoryAddPathDelay
- VitalMemorySchedulePathDelay

Description: VitalMemoryInitPathDelay, VitalMemoryAddPathDelay and
VitalMemorySchedulePathDelay are Level 1 routines used
for selecting the propagation delay paths based on
path condition, transition type and delay values and
schedule a new output value.

          Following features are implemented in these procedures:
          o condition dependent path selection
          o Transition dependent delay selection
          o shortest delay path selection from multiple 
            candidate paths
          o Scheduling of the computed values on the specified 
            signal.
          o output retain behavior if outputRetain flag is set
          o output mapping to alternate strengths to model 
            pull-up, pull-down etc. 

          <More details to be added here>

Following is information on overloading of the procedures.

VitalMemoryInitPathDelay is overloaded for ScheduleDataArray and
OutputDataArray


       ScheduleDataArray        OutputDataArray

          Scalar                    Scalar
          Vector                    Vector

VitalMemoryAddPathDelay is overloaded for ScheduleDataArray,
PathDelayArray, InputSignal and delaytype.


DelayType InputSignal ScheduleData PathDelay
Array Array


VitalDelayType Scalar Scalar Scalar
VitalDelayType Scalar Vector Vector
VitalDelayType Vector Scalar Vector
VitalDelayType Vector Vector Vector
VitalDelayType01 Scalar Scalar Scalar
VitalDelayType01 Scalar Vector Vector
VitalDelayType01 Vector Scalar Vector
VitalDelayType01 Vector Vector Vector
VitalDelayType01Z Scalar Scalar Scalar
VitalDelayType01Z Scalar Vector Vector
VitalDelayType01Z Vector Scalar Vector
VitalDelayType01Z Vector Vector Vector
VitalDelayType01XZ Scalar Scalar Scalar
VitalDelayType01XZ Scalar Vector Vector
VitalDelayType01XZ Vector Scalar Vector
VitalDelayType01XZ Vector Vector Vector


VitalMemorySchedulePathDelay is overloaded for ScheduleDataArray,
and OutSignal


       OutSignal                 ScheduleDataArray     

         Scalar                      Scalar
         Vector                      Vector

Procedure Declarations:

Function : VitalMemoryInitPathDelay

Arguments:

INOUT Type Description

ScheduleDataArray/ VitalMemoryScheduleDataVectorType/
ScheduleData VitalMemoryScheduleDataType
Internal data variable for
storing delay and schedule
information for each output bit

IN

OutputDataArray/ STD_LOGIC_VECTOR/Array containing current output
OutputData STD_ULOGIC value

NumBitsPerSubWord INTEGER Number of bits per subword.
Default value of this argument
is DefaultNumBitsPerSubword
which is interpreted as no
subwords


ScheduleDataArray - Vector
OutputDataArray - Vector

Description

ScheduleDataArray - Scalar
OutputDataArray - Scalar

Description


Function : VitalMemoryAddPathDelay

Arguments

INOUT Type Description

ScheduleDataArray/ VitalMemoryScheduleDataVectorType/
ScheduleData VitalMemoryScheduleDataType
Internal data variable for
storing delay and schedule
information for each output bit

InputChangeTimeArray/ VitaltimeArrayT/Time
InputChangeTime Holds the time since the last
input change

IN

InputSignal STD_LOGIC_VECTOR
STD_ULOGIC/ Array holding the input value

OutputSignalName STRING The output signal name

PathDelayArray/ VitalDelayArrayType01ZX,
PathDelay VitalDelayArrayType01Z,
VitalDelayArrayType01,
VitalDelayArrayType/
VitalDelayType01ZX,
VitalDelayType01Z,
VitalDelayType01,
VitalDelayType Array of delay values

ArcType VitalMemoryArcType
Indicates the Path type. This
can be SubwordArc, CrossArc or
ParallelArc

PathCondition BOOLEAN If True, the transition in
the corresponding input signal
is considered while
caluculating the prop. delay
else the transition is ignored.

OutputRetainFlag BOOLEAN If specified TRUE,output retain
(hold) behavior is implemented.


#1
DelayType - VitalDelayType
Input - Scalar
Output - Scalar
Delay - Scalar
Condition - Scalar

Description
#2
DelayType - VitalDelayType
Input - Scalar
Output - Vector
Delay - Vector
Condition - Scalar

Description
#3
DelayType - VitalDelayType
Input - Scalar
Output - Vector
Delay - Vector
Condition - Vector

Description
#4
DelayType - VitalDelayType
Input - Vector
Output - Scalar
Delay - Vector
Condition - Scalar

Description
#5
DelayType - VitalDelayType
Input - Vector
Output - Vector
Delay - Vector
Condition - Scalar

Description
#6
DelayType - VitalDelayType
Input - Vector
Output - Vector
Delay - Vector
Condition - Vector

Description
#7
DelayType - VitalDelayType01
Input - Scalar
Output - Scalar
Delay - Scalar
Condition - Scalar

Description
#8
DelayType - VitalDelayType01
Input - Scalar
Output - Vector
Delay - Vector
Condition - Scalar

Description
#9
DelayType - VitalDelayType01
Input - Scalar
Output - Vector
Delay - Vector
Condition - Vector

Description
#10
DelayType - VitalDelayType01
Input - Vector
Output - Scalar
Delay - Vector
Condition - Scalar

Description
#11
DelayType - VitalDelayType01
Input - Vector
Output - Vector
Delay - Vector
Condition - Scalar

Description
#12
DelayType - VitalDelayType01
Input - Vector
Output - Vector
Delay - Vector
Condition - Vector

Description
#13
DelayType - VitalDelayType01Z
Input - Scalar
Output - Scalar
Delay - Scalar
Condition - Scalar

Description
#14
DelayType - VitalDelayType01Z
Input - Scalar
Output - Vector
Delay - Vector
Condition - Scalar

Description
#15
DelayType - VitalDelayType01Z
Input - Scalar
Output - Vector
Delay - Vector
Condition - Vector

Description
#16
DelayType - VitalDelayType01Z
Input - Vector
Output - Scalar
Delay - Vector
Condition - Scalar

Description
#17
DelayType - VitalDelayType01Z
Input - Vector
Output - Vector
Delay - Vector
Condition - Scalar

Description
#18
DelayType - VitalDelayType01Z
Input - Vector
Output - Vector
Delay - Vector
Condition - Vector

Description
#19
DelayType - VitalDelayType01ZX
Input - Scalar
Output - Scalar
Delay - Scalar
Condition - Scalar

Description
#20
DelayType - VitalDelayType01ZX
Input - Scalar
Output - Vector
Delay - Vector
Condition - Scalar

Description
#21
DelayType - VitalDelayType01ZX
Input - Scalar
Output - Vector
Delay - Vector
Condition - Vector

Description
#22
DelayType - VitalDelayType01ZX
Input - Vector
Output - Scalar
Delay - Vector
Condition - Scalar

Description
#23
DelayType - VitalDelayType01ZX
Input - Vector
Output - Vector
Delay - Vector
Condition - Scalar

Description
#24
DelayType - VitalDelayType01ZX
Input - Vector
Output - Vector
Delay - Vector
Condition - Vector

Description


Function : VitalMemorySchedulePathDelay

Arguments:

OUT Type Description
OutSignal STD_LOGIC_VECTOR/ The output signal for
STD_ULOGIC scheduling

IN
OutputSignalName STRING The name of the output signal

IN
PortFlag VitalPortFlagType Port flag variable from
functional procedures

IN
OutputMap VitalOutputMapType For VitalPathDelay01Z, the
output can be mapped to
alternate strengths to model
tri-state devices, pull-ups
and pull-downs.

INOUT
ScheduleDataArray/ VitalMemoryScheduleDataVectorType/
ScheduleData VitalMemoryScheduleDataType
Internal data variable for
storing delay and schedule
information for each
output bit


ScheduleDataArray - Vector
OutputSignal - Vector

Description

ScheduleDataArray - Vector
OutputSignal - Vector

Description

ScheduleDataArray - Scalar
OutputSignal - Scalar

Description


Description


Function Name: VitalMemorySetupHoldCheck

Description: The VitalMemorySetupHoldCheck procedure detects a setup or a
hold violation on the input test signal with respect
to the corresponding input reference signal. The timing
constraints are specified through parameters
representing the high and low values for the setup and
hold values for the setup and hold times. This
procedure assumes non-negative values for setup and hold
timing constraints.

             It is assumed that negative timing constraints
             are handled by internally delaying the test or
             reference signals.  Negative setup times result in
             a delayed reference signal.  Negative hold times
             result in a delayed test signal.  Furthermore, the
             delays and constraints associated with these and
             other signals may need to be appropriately
             adjusted so that all constraint intervals overlap
             the delayed reference signals and all constraint
             values (with respect to the delayed signals) are
             non-negative.

             This function is overloaded based on the input
             TestSignal and reference signals. Parallel, Subword and
             Cross Arc relationships between test and reference
             signals are supported.

TestSignal XXXXXXXXXXXX____________________________XXXXXXXXXXXXXXXXXXXXXX
:
: -->| error region |<-- : _______________________________ RefSignal \______________________________ : | | | : | -->| |<-- thold : -->| tsetup |<--

Arguments:

IN Type Description
TestSignal std_logic_vector Value of test signal
TestSignalName STRING Name of test signal
TestDelay VitalDelayArrayType Model's internal delay associated
with TestSignal
RefSignal std_ulogic Value of reference signal
std_logic_vector
RefSignalName STRING Name of reference signal
RefDelay TIME Model's internal delay associated
VitalDelayArrayType with RefSignal
SetupHigh VitalDelayArrayType Absolute minimum time duration
before the transition of RefSignal
for which transitions of
TestSignal are allowed to proceed
to the "1" state without causing
a setup violation.
SetupLow VitalDelayArrayType Absolute minimum time duration
before the transition of RefSignal
for which transitions of
TestSignal are allowed to proceed
to the "0" state without causing
a setup violation.
HoldHigh VitalDelayArrayType Absolute minimum time duration
after the transition of RefSignal
for which transitions of
TestSignal are allowed to
proceed to the "1" state without
causing a hold violation.
HoldLow VitalDelayArrayType Absolute minimum time duration
after the transition of RefSignal
for which transitions of
TestSignal are allowed to
proceed to the "0" state without
causing a hold violation.
CheckEnabled BOOLEAN Check performed if TRUE.
RefTransition VitalEdgeSymbolType
Reference edge specified. Events
on the RefSignal which match the
edge spec. are used as reference
edges.
ArcType VitalMemoryArcType
NumBitsPerSubWord INTEGER
HeaderMsg STRING String that will accompany any
assertion messages produced.
XOn BOOLEAN If TRUE, Violation output
parameter is set to "X".
Otherwise, Violation is always
set to "0."
MsgOn BOOLEAN If TRUE, set and hold violation
message will be generated.
Otherwise, no messages are
generated, even upon violations.
MsgSeverity SEVERITY_LEVEL Severity level for the assertion.
MsgFormat VitalMemoryMsgFormatType
Format of the Test/Reference
signals in violation messages.

INOUT
TimingData VitalMemoryTimingDataType
VitalMemorySetupHoldCheck information
storage area. This is used
internally to detect reference
edges and record the time of the
last edge.

OUT
Violation X01 This is the violation flag returned.
X01ArrayT Overloaded for array type.


Description
------------- following are not needed --------------------------

Description


Function Name: VitalPeriodPulseCheck

Description: VitalPeriodPulseCheck checks for minimum and maximum
periodicity and pulse width for "1" and "0" values of
the input test signal. The timing constraint is
specified through parameters representing the minimal
period between successive rising and falling edges of
the input test signal and the minimum pulse widths
associated with high and low values.

             VitalPeriodCheck's accepts rising and falling edges
             from 1 and 0 as well as transitions to and from 'X.'

                _______________         __________
   ____________|               |_______|

               |<--- pw_hi --->|
               |<-------- period ----->|
                            -->| pw_lo |<--

Arguments:
IN Type Description
TestSignal std_logic_vector Value of test signal
TestSignalName STRING Name of the test signal
TestDelay VitalDelayArrayType
Model's internal delay associated
with TestSignal
Period VitalDelayArrayType
Minimum period allowed between
consecutive rising ('P') or
falling ('F') transitions.
PulseWidthHigh VitalDelayArrayType
Minimum time allowed for a high
pulse ('1' or 'H')
PulseWidthLow VitalDelayArrayType
Minimum time allowed for a low
pulse ('0' or 'L')
CheckEnabled BOOLEAN Check performed if TRUE.
HeaderMsg STRING String that will accompany any
assertion messages produced.
XOn BOOLEAN If TRUE, Violation output parameter
is set to "X". Otherwise, Violation
is always set to "0."
MsgOn BOOLEAN If TRUE, period/pulse violation
message will be generated.
Otherwise, no messages are generated,
even though a violation is detected.
MsgSeverity SEVERITY_LEVEL Severity level for the assertion.
MsgFormat VitalMemoryMsgFormatType
Format of the Test/Reference signals
in violation messages.

INOUT
PeriodData     VitalPeriodDataArrayType 
                                 VitalPeriodPulseCheck information
                                 storage area.  This is used
                                 internally to detect reference edges
                                 and record the pulse and period
                                 times.
OUT
Violation      X01               This is the violation flag returned. 
               X01ArrayT         Overloaded for array type.

Description


Procedure: VitalMemoryTable
Parameters: DataOutBus - Output candidate zero delay data bus out
MemoryData - Pointer to memory data structure
PrevControls - Previous data in for edge detection
PrevEnableBus - Previous enables for edge detection
PrevDataInBus - Previous data bus for edge detection
PrevAddressBus - Previous address bus for edge detection
PortFlag - Indicates port operating mode
PortFlagArray - Vector form of PortFlag for sub-word
Controls - Agregate of scalar control lines
EnableBus - Concatenation of vector control lines
DataInBus - Input value of data bus in
AddressBus - Input value of address bus in
AddressValue - Decoded value of the AddressBus
MemoryTable - Input memory action table
PortType - The type of port (currently not used)
PortName - Port name string for messages
HeaderMsg - Header string for messages
MsgOn - Control the generation of messages
MsgSeverity - Control level of message generation
Description: This procedure implements the majority of the memory
modeling functionality via lookup of the memory action
tables and performing the specified actions if matches
are found, or the default actions otherwise. The
overloadings are provided for the word and sub-word
(using the EnableBus and PortFlagArray arguments) addressing
cases.


Description


Procedure: VitalMemoryCrossPorts
Parameters: DataOutBus - Output candidate zero delay data bus out
MemoryData - Pointer to memory data structure
SamePortFlag - Operating mode for same port
SamePortAddressValue - Decoded AddressBus for same port
CrossPortFlagArray - Operating modes for cross ports
CrossPortAddressArray - Decoded AddressBus for cross ports
CrossPortMode - Write contention and crossport read control
PortName - Port name string for messages
HeaderMsg - Header string for messages
MsgOn - Control the generation of messages

Description: These procedures control the effect of memory operations
on a given port due to operations on other ports in a
multi-port memory.
This includes data write through when reading and writing
to the same address, as well as write contention when
there are multiple write to the same address.
If addresses do not match then data bus is unchanged.
The DataOutBus can be diabled with 'Z' value.


Description


Procedure: VitalMemoryViolation
Parameters: DataOutBus - Output zero delay data bus out
MemoryData - Pointer to memory data structure
PortFlag - Indicates port operating mode
DataInBus - Input value of data bus in
AddressValue - Decoded value of the AddressBus
ViolationFlags - Aggregate of scalar violation vars
ViolationFlagsArray - Concatenation of vector violation vars
ViolationTable - Input memory violation table
PortType - The type of port (currently not used)
PortName - Port name string for messages
HeaderMsg - Header string for messages
MsgOn - Control the generation of messages
MsgSeverity - Control level of message generation
Description: This procedure is intended to implement all actions on the
memory contents and data out bus as a result of timing viols.
It uses the memory action table to perform various corruption
policies specified by the user.