📄 vital_timing.vhdl
字号:
SIGNAL TestSignal : IN std_ulogic; CONSTANT TestSignalName: IN STRING := ""; CONSTANT TestDelay : IN TIME := 0 ns; SIGNAL RefSignal : IN std_ulogic; CONSTANT RefSignalName : IN STRING := ""; CONSTANT RefDelay : IN TIME := 0 ns; CONSTANT SetupHigh : IN TIME := 0 ns; CONSTANT SetupLow : IN TIME := 0 ns; CONSTANT HoldHigh : IN TIME := 0 ns; CONSTANT HoldLow : IN TIME := 0 ns; CONSTANT CheckEnabled : IN BOOLEAN := TRUE; CONSTANT RefTransition : IN VitalEdgeSymbolType; CONSTANT HeaderMsg : IN STRING := " "; CONSTANT XOn : IN BOOLEAN := TRUE; CONSTANT MsgOn : IN BOOLEAN := TRUE; CONSTANT MsgSeverity : IN SEVERITY_LEVEL := WARNING ); PROCEDURE VitalSetupHoldCheck ( VARIABLE Violation : OUT X01; VARIABLE TimingData : INOUT VitalTimingDataType; SIGNAL TestSignal : IN std_logic_vector; CONSTANT TestSignalName: IN STRING := ""; CONSTANT TestDelay : IN TIME := 0 ns; SIGNAL RefSignal : IN std_ulogic; CONSTANT RefSignalName : IN STRING := ""; CONSTANT RefDelay : IN TIME := 0 ns; CONSTANT SetupHigh : IN TIME := 0 ns; CONSTANT SetupLow : IN TIME := 0 ns; CONSTANT HoldHigh : IN TIME := 0 ns; CONSTANT HoldLow : IN TIME := 0 ns; CONSTANT CheckEnabled : IN BOOLEAN := TRUE; CONSTANT RefTransition : IN VitalEdgeSymbolType; CONSTANT HeaderMsg : IN STRING := " "; CONSTANT XOn : IN BOOLEAN := TRUE; CONSTANT MsgOn : IN BOOLEAN := TRUE; CONSTANT MsgSeverity : IN SEVERITY_LEVEL := WARNING ); -- ------------------------------------------------------------------------ -- -- Function Name: VitalRecoveryRemovalCheck -- -- Description: The VitalRecoveryRemovalCheck detects the presence of -- a recovery or removal violation on the input test -- signal with respect to the corresponding input reference -- signal. It assumes non-negative values of setup and -- hold timing constraints. The timing constraint is -- specified through parameters representing the recovery -- and removal times associated with a reference edge of -- the reference signal. A flag indicates whether a test -- signal is asserted when it is high or when it is low. -- -- It is assumed that negative timing constraints -- are handled by internally delaying the test or -- reference signals. Negative recovery times result in -- a delayed reference signal. Negative removal 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. -- -- Arguments: -- -- IN Type Description -- TestSignal std_ulogic Value of TestSignal. The routine is -- TestSignalName STRING Name of TestSignal -- TestDelay TIME Model internal delay associated with -- the TestSignal -- RefSignal std_ulogic Value of RefSignal -- RefSignalName STRING Name of RefSignal -- RefDelay TIME Model internal delay associated with -- the RefSignal -- Recovery TIME A change to an unasserted value on -- the asynchronous TestSignal must -- precede reference edge (on RefSignal) -- by at least this time. -- Removal TIME An asserted condition must be present -- on the asynchronous TestSignal for at -- least the removal time following a -- reference edge on RefSignal. -- ActiveLow BOOLEAN A flag which indicates if TestSignal -- is asserted when it is low - "0." -- FALSE indicate that TestSignal is -- asserted when it has a value "1." -- CheckEnabled BOOLEAN The check in enabled when the value -- is TRUE, otherwise the constraints -- are not checked. -- RefTransition VitalEdgeSymbolType -- Reference edge specifier. Events on -- RefSignal will match the edge -- specified. -- HeaderMsg STRING A header message that will accompany -- any assertion message. -- XOn BOOLEAN When TRUE, the output Violation is -- set to "X." When FALSE, it is always -- "0." -- MsgOn BOOLEAN When TRUE, violation messages are -- output. When FALSE, no messages are -- generated. -- MsgSeverity SEVERITY_LEVEL Severity level of the asserted -- message. -- -- INOUT -- TimingData VitalTimingDataType -- VitalRecoveryRemovalCheck 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. -- -- Returns -- none -- -- ------------------------------------------------------------------------- PROCEDURE VitalRecoveryRemovalCheck ( VARIABLE Violation : OUT X01; VARIABLE TimingData : INOUT VitalTimingDataType; SIGNAL TestSignal : IN std_ulogic; CONSTANT TestSignalName: IN STRING := ""; CONSTANT TestDelay : IN TIME := 0 ns; SIGNAL RefSignal : IN std_ulogic; CONSTANT RefSignalName : IN STRING := ""; CONSTANT RefDelay : IN TIME := 0 ns; CONSTANT Recovery : IN TIME := 0 ns; CONSTANT Removal : IN TIME := 0 ns; CONSTANT ActiveLow : IN BOOLEAN := TRUE; CONSTANT CheckEnabled : IN BOOLEAN := TRUE; CONSTANT RefTransition : IN VitalEdgeSymbolType; CONSTANT HeaderMsg : IN STRING := " "; CONSTANT XOn : IN BOOLEAN := TRUE; CONSTANT MsgOn : IN BOOLEAN := TRUE; CONSTANT MsgSeverity : IN SEVERITY_LEVEL := WARNING ); -- ------------------------------------------------------------------------ -- -- 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_ulogic Value of test signal -- TestSignalName STRING Name of the test signal -- TestDelay TIME Model's internal delay associated -- with TestSignal -- Period TIME Minimum period allowed between -- consecutive rising ('P') or -- falling ('F') transitions. -- PulseWidthHigh TIME Minimum time allowed for a high -- pulse ('1' or 'H') -- PulseWidthLow TIME 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. -- -- INOUT -- PeriodData VitalPeriodDataType -- 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. -- -- Returns -- none -- -- ------------------------------------------------------------------------ PROCEDURE VitalPeriodPulseCheck ( VARIABLE Violation : OUT X01; VARIABLE PeriodData : INOUT VitalPeriodDataType; SIGNAL TestSignal : IN std_ulogic; CONSTANT TestSignalName : IN STRING := ""; CONSTANT TestDelay : IN TIME := 0 ns; CONSTANT Period : IN TIME := 0 ns; CONSTANT PulseWidthHigh : IN TIME := 0 ns; CONSTANT PulseWidthLow : IN TIME := 0 ns; CONSTANT CheckEnabled : IN BOOLEAN := TRUE; CONSTANT HeaderMsg : IN STRING := " "; CONSTANT XOn : IN BOOLEAN := TRUE; CONSTANT MsgOn : IN BOOLEAN := TRUE; CONSTANT MsgSeverity : IN SEVERITY_LEVEL := WARNING ); END VITAL_Timing;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -