-
Notifications
You must be signed in to change notification settings - Fork 11
Open
Description
I have developed some timing checks based on the OSVVM lecture material that integrates the basic timing check processes into the AlertLog hierarchy and allows OSVVM-based verification models to add timing checks by instantiating these checks.
Example:
library ieee ;
use ieee.std_logic_1164.all ;
library osvvm ;
context osvvm.OsvvmContext ;
entity SetupTimeCheck is
generic(
MaxCount : positive;
SignalName : string;
Message : string := "Setup Violation on"
);
port(
ParentAlertLogID : in AlertLogIDType;
SetupTime : in time;
Clock : in std_logic;
Data : in std_logic
) ;
end entity;
architecture checker of SetupTimeCheck is
constant MODEL_INSTANCE_NAME : string := PathTail(SetupTimeCheck'PATH_NAME);
signal ModelID : AlertLogIDType;
begin
InitProc: process
begin
wait on ParentAlertLogID;
ModelID <= GetAlertLogID(MODEL_INSTANCE_NAME, ParentAlertLogID);
wait;
end process;
SetupTimeCheckProc: process
variable count : natural := MaxCount;
begin
wait until Clock = '1';
if (Data'last_event <= SetupTime)then
count := count - 1;
Alert(ModelID, ("Model: " & Message & " '" & SignalName & "'"));
end if;
if (count = 0) then
wait;
end if;
end process;
end architecture;Proposed locations:
- in OSVVM-Common (as it holds already common verification components and packages supporting various VCs)
- as separate repository (might be to complex)
The following checks can be offered in a first iteration:
- Setup time check
- Hold time check
- Cycle time check (clock period)
- Pulse width check
Possible other checkers:
- Duty cycle
- Response check
(rise in A → rise on B after X ns but within Y ns)
Possible enhancements:
- Change specific timing to a range of Min/Max (e.g. account for jitter on a clock line).
- Configurable polarity
The following additions to AlertLog would be great to support a better user experience:
- Add an attribute to each AlertLogID to stop reporting messages after N occurrences, but keep counting for the final AlertLog report
- Allow ordering of AlertLogIDs (lines in the AlertLog report).
Currently, the log reports has in indeterministic order of items due to registering all timing checks in the same Δ-cycle. I currently do some ordering usingblockstatements and Δ-cycle delays onModelIDs, so timing checks are registers Δ+1 compared to e.g. an SPI controller in an DAC verification component.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels