📄 memory_p.vhdl
字号:
-- ------------------------------------------------------------------------------ Title : Standard VITAL Memory Package-- :-- Library : Vital_Memory-- :-- Developers : IEEE DASC Timing Working Group (TWG), PAR 1076.4-- : Ekambaram Balaji, LSI Logic Corporation-- : Jose De Castro, Consultant-- : Prakash Bare, GDA Technologies-- : William Yam, LSI Logic Corporation-- : Dennis Brophy, Model Technology-- :-- Purpose : This packages defines standard types, constants, functions-- : and procedures for use in developing ASIC memory models.-- : -- -------------------------------------------------------------------------------- ------------------------------------------------------------------------------ Modification History : -- ------------------------------------------------------------------------------ Ver:|Auth:| Date:| Changes Made:-- 0.1 | eb |071796| First prototye as part of VITAL memory proposal-- 0.2 | jdc |012897| Initial prototyping with proposed MTM scheme -- 0.3 | jdc |090297| Extensive updates for TAG review (functional)-- 0.4 | eb |091597| Changed naming conventions for VitalMemoryTable -- | | | Added interface of VitalMemoryCrossPorts() & -- | | | VitalMemoryViolation().-- 0.5 | jdc |092997| Completed naming changes thoughout package body.-- | | | Testing with simgle port test model looks ok.-- 0.6 | jdc |121797| Major updates to the packages:-- | | | - Implement VitalMemoryCrossPorts()-- | | | - Use new VitalAddressValueType-- | | | - Use new VitalCrossPortModeType enum-- | | | - Overloading without SamePort args-- | | | - Honor erroneous address values-- | | | - Honor ports disabled with 'Z'-- | | | - Implement implicit read 'M' table symbol-- | | | - Cleanup buses to use (H DOWNTO L)-- | | | - Message control via MsgOn,HeaderMsg,PortName-- | | | - Tested with 1P1RW,2P2RW,4P2R2W,4P4RW cases-- 0.7 | jdc |052698| Bug fixes to the packages:-- | | | - Fix failure with negative Address values-- | | | - Added debug messages for VMT table search-- | | | - Remove 'S' for action column (only 's')-- | | | - Remove 's' for response column (only 'S')-- | | | - Remove 'X' for action and response columns-- 0.8 | jdc |061298| Implemented VitalMemoryViolation()-- | | | - Minimal functionality violation tables-- | | | - Missing:-- | | | - Cannot handle wide violation variables-- | | | - Cannot handle sub-word cases-- | | | Fixed IIC version of MemoryMatch-- | | | Fixed 'M' vs 'm' switched on debug output-- | | | TO BE DONE:-- | | | - Implement 'd' corrupting a single bit-- | | | - Implement 'D' corrupting a single bit-- 0.9 |eb/sc|080498| Added UNDEF value for VitalPortFlagType-- 0.10|eb/sc|080798| Added CORRUPT value for VitalPortFlagType-- 0.11|eb/sc|081798| Added overloaded function interface for-- | | | VitalDeclareMemory-- 0.14| jdc |113198| Merging of memory functionality and version-- | | | 1.4 9/17/98 of timing package from Prakash-- 0.15| jdc |120198| Major development of VMV functionality-- 0.16| jdc |120298| Complete VMV functionlality for initial testing-- | | | - New ViolationTableCorruptMask() procedure-- | | | - New MemoryTableCorruptMask() procedure-- | | | - HandleMemoryAction():-- | | | - Removed DataOutBus bogus output-- | | | - Replaced DataOutTmp with DataInTmp-- | | | - Added CorruptMask input handling-- | | | - Implemented 'd','D' using CorruptMask-- | | | - CorruptMask on 'd','C','L','D','E'-- | | | - CorruptMask ignored on 'c','l','e'-- | | | - Changed 'l','d','e' to set PortFlag to CORRUPT-- | | | - Changed 'L','D','E' to set PortFlag to CORRUPT-- | | | - Changed 'c','l','d','e' to ignore HighBit, LowBit-- | | | - Changed 'C','L','D','E' to use HighBit, LowBit-- | | | - HandleDataAction():-- | | | - Added CorruptMask input handling-- | | | - Implemented 'd','D' using CorruptMask-- | | | - CorruptMask on 'd','C','L','D','E'-- | | | - CorruptMask ignored on 'l','e'-- | | | - Changed 'l','d','e' to set PortFlag to CORRUPT-- | | | - Changed 'L','D','E' to set PortFlag to CORRUPT-- | | | - Changed 'l','d','e' to ignore HighBit, LowBit-- | | | - Changed 'L','D','E' to use HighBit, LowBit-- | | | - MemoryTableLookUp():-- | | | - Added MsgOn table debug output-- | | | - Uses new MemoryTableCorruptMask()-- | | | - ViolationTableLookUp():-- | | | - Uses new ViolationTableCorruptMask()-- 0.17| jdc |120898| - Added VitalMemoryViolationSymbolType,-- | | | VitalMemoryViolationTableType data -- | | | types but not used yet (need to discuss)-- | | | - Added overload for VitalMemoryViolation()-- | | | which does not have array flags-- | | | - Bug fixes for VMV functionality:-- | | | - ViolationTableLookUp() not handling '-' in-- | | | scalar violation matching-- | | | - VitalMemoryViolation() now normalizes-- | | | VFlagArrayTmp'LEFT as LSB before calling-- | | | ViolationTableLookUp() for proper scanning-- | | | - ViolationTableCorruptMask() had to remove -- | | | normalization of CorruptMaskTmp and-- | | | ViolMaskTmp for proper MSB:LSB corruption-- | | | - HandleMemoryAction(), HandleDataAction() -- | | | - Removed 'D','E' since not being used-- | | | - Use XOR instead of OR for corrupt masks-- | | | - Now 'd' is sensitive to HighBit, LowBit-- | | | - Fixed LowBit overflow in bit writeable case-- | | | - MemoryTableCorruptMask()-- | | | - ViolationTableCorruptMask()-- | | | - VitalMemoryTable()-- | | | - VitalMemoryCrossPorts()-- | | | - Fixed VitalMemoryViolation() failing on-- | | | error AddressValue from earlier VMT()-- | | | - Minor cleanup of code formatting-- 0.18| jdc |032599| - In VitalDeclareMemory()-- | | | - Added BinaryLoadFile formal arg and -- | | | modified LoadMemory() to handle bin-- | | | - Added NOCHANGE to VitalPortFlagType-- | | | - For VitalCrossPortModeType-- | | | - Added CpContention enum-- | | | - In HandleDataAction()-- | | | - Set PortFlag := NOCHANGE for 'S' -- | | | - In HandleMemoryAction()-- | | | - Set PortFlag := NOCHANGE for 's' -- | | | - In VitalMemoryTable() and-- | | | VitalMemoryViolation()-- | | | - Honor PortFlag = NOCHANGE returned -- | | | from HandleMemoryAction()-- | | | - In VitalMemoryCrossPorts()-- | | | - Fixed Address = AddressJ for all-- | | | conditions of DoWrCont & DoCpRead -- | | | - Handle CpContention like WrContOnly-- | | | under CpReadOnly conditions, with-- | | | associated memory message changes-- | | | - Handle PortFlag = NOCHANGE like-- | | | PortFlag = READ for actions-- | | | - Modeling change:-- | | | - Need to init PortFlag every delta-- | | | PortFlag_A := (OTHES => UNDEF);-- | | | - Updated InternalTimingCheck code-- 0.19| jdc |042599| - Fixes for bit-writeable cases-- | | | - Check PortFlag after HandleDataAction-- | | | in VitalMemoryViolation()-- 0.20| jdc |042599| - Merge PortFlag changes from Prakash-- | | | and Willian:-- | | | VitalMemorySchedulePathDelay()-- | | | VitalMemoryExpandPortFlag()-- 0.21| jdc |072199| - Changed VitalCrossPortModeType enums,-- | | | added new CpReadAndReadContention.-- | | | - Fixed VitalMemoryCrossPorts() parameter-- | | | SamePortFlag to INOUT so that it can-- | | | set CORRUPT or READ value.-- | | | - Fixed VitalMemoryTable() where PortFlag-- | | | setting by HandleDataAction() is being-- | | | ignored when HandleMemoryAction() sets-- | | | PortFlagTmp to NOCHANGE.-- | | | - Fixed VitalMemoryViolation() to set-- | | | all bits of PortFlag when violating.-- 0.22| jdc |072399| - Added HIGHZ to PortFlagType. HandleData-- | | | checks whether the previous state is HIGHZ.-- | | | If yes then portFlag should be NOCHANGE-- | | | for VMPD to ignore IORetain corruption.-- | | | The idea is that the first Z should be-- | | | propagated but later ones should be ignored.-- | | |-- 0.23| jdc |100499| - Took code checked in by Dennis 09/28/99-- | | | - Changed VitalPortFlagType to record of-- | | | new VitalPortStateType to hold current,-- | | | previous values and separate disable.-- | | | Also created VitalDefaultPortFlag const.-- | | | Removed usage of PortFlag NOCHANGE-- | | | - VitalMemoryTable() changes:-- | | | Optimized return when all curr = prev-- | | | AddressValue is now INOUT to optimize-- | | | Transfer PF.MemoryCurrent to MemoryPrevious-- | | | Transfer PF.DataCurrent to DataPrevious-- | | | Reset PF.OutputDisable to FALSE-- | | | Expects PortFlag init in declaration-- | | | No need to init PortFlag every delta-- | | | - VitalMemorySchedulePathDelay() changes:-- | | | Initialize with VitalDefaultPortFlag-- | | | Check PortFlag.OutputDisable-- | | | - HandleMemoryAction() changes:-- | | | Set value of PortFlag.MemoryCurrent-- | | | Never set PortFlag.OutputDisable-- | | | - HandleDataAction() changes:-- | | | Set value of PortFlag.DataCurrent-- | | | Set PortFlag.DataCurrent for HIGHZ-- | | | - VitalMemoryCrossPorts() changes:-- | | | Check/set value of PF.MemoryCurrent-- | | | Check value of PF.OutputDisable-- | | | - VitalMemoryViolation() changes:-- | | | Fixed bug - not reading inout PF value-- | | | Clean up setting of PortFlag-- 0.24| jdc |100899| - Modified update of PF.OutputDisable-- | | | to correctly accomodate 2P1W1R case:-- | | | the read port should not exhibit-- | | | IO retain corrupt when reading-- | | | addr unrelated to addr being written.-- 0.25| jdc |100999| - VitalMemoryViolation() change:-- | | | Fixed bug with RDNWR mode incorrectly-- | | | updating the PF.OutputDisable-- 0.26| jdc |100999| - VitalMemoryCrossPorts() change:-- | | | Fixed bugs with update of PF-- 0.27| jdc |101499| - VitalMemoryCrossPorts() change:-- | | | Added DoRdWrCont message (ErrMcpRdWrCo,-- | | | Memory cross port read/write data only-- | | | contention)-- | | | - VitalMemoryTable() change:-- | | | Set PF.OutputDisable := TRUE for the-- | | | optimized cases.-- 0.28| pb |112399| - Added 8 VMPD procedures for vector -- | | | PathCondition support. Now the total-- | | | number of overloadings for VMPD is 24.-- | | | - Number of overloadings for SetupHold-- | | | procedures increased to 5. Scalar violations-- | | | are not supported anymore. Vector checkEnabled-- | | | support is provided through the new overloading-- 0.29| jdc |120999| - HandleMemoryAction() HandleDataAction()-- | | | Reinstated 'D' and 'E' actions but-- | | | with new PortFlagType-- | | | - Updated file handling syntax, must compile-- | | | with -93 syntax now.-- 0.30| jdc |022300| - Formated for 80 column max width-- ----------------------------------------------------------------------------LIBRARY IEEE;USE IEEE.STD_LOGIC_1164.ALL;USE IEEE.Vital_Timing.ALL;USE IEEE.Vital_Primitives.ALL;LIBRARY STD;USE STD.TEXTIO.ALL;PACKAGE Vital_Memory IS-- ------------------------------------------------------------------------------ Timing Section-- ------------------------------------------------------------------------------ ------------------------------------------------------------------------------ Types and constants for Memory timing procedures-- ----------------------------------------------------------------------------TYPE VitalMemoryArcType IS (ParallelArc, CrossArc, SubwordArc);TYPE OutputRetainBehaviorType IS (BitCorrupt, WordCorrupt);TYPE VitalMemoryMsgFormatType IS (Vector, Scalar, VectorEnum);TYPE X01ArrayT IS ARRAY (NATURAL RANGE <> ) OF X01;TYPE X01ArrayPT IS ACCESS X01ArrayT;TYPE VitalMemoryViolationType IS ACCESS X01ArrayT;CONSTANT DefaultNumBitsPerSubword : INTEGER := -1;-- Data type storing path delay and schedule information for output bitsTYPE VitalMemoryScheduleDataType IS RECORD OutputData : std_ulogic; NumBitsPerSubWord : INTEGER; ScheduleTime : TIME; ScheduleValue : std_ulogic; LastOutputValue : std_ulogic; PropDelay : TIME; OutputRetainDelay : TIME; InputAge : TIME;END RECORD;TYPE VitalMemoryTimingDataType IS RECORD NotFirstFlag : BOOLEAN; RefLast : X01; RefTime : TIME; HoldEn : BOOLEAN; TestLast : std_ulogic; TestTime : TIME; SetupEn : BOOLEAN; TestLastA : VitalLogicArrayPT; TestTimeA : VitalTimeArrayPT; RefLastA : X01ArrayPT; RefTimeA : VitalTimeArrayPT; HoldEnA : VitalBoolArrayPT; SetupEnA : VitalBoolArrayPT;END RECORD;TYPE VitalPeriodDataArrayType IS ARRAY (NATURAL RANGE <>) OF VitalPeriodDataType;-- Data type storing path delay and schedule information for output -- vectorsTYPE VitalMemoryScheduleDataVectorType IS ARRAY (NATURAL RANGE <> ) OF VitalMemoryScheduleDataType;-- VitalPortFlagType records runtime mode of port sub-word slices
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -