Intelligent TEMPORAL Coverage with OSVVM

Why OSVVM?ForumsOSVVMIntelligent TEMPORAL Coverage with OSVVM

Tagged: 

This topic has 1 voice, contains 0 replies, and was last updated by Avatar of Dave Ansell Dave Ansell 180 days ago.

Viewing 1 post
Author Posts
Author Posts
December 1, 2016 at 04:06 #1232
Avatar of Dave Ansell
Dave Ansell

Intelligent TEMPORAL Coverage with OSVVM
—————————————-

OSVVM is so flexible that it CAN DO Temporal Coverage with the Existing Packages.

What this code fragment was intended for was Temporal Coverage of a RANDOM Phase Shift between Groups of Packets.

REASON
The variation in RELATIVE ARRIVAL TIMES tests whether there are circumstances in which the System Receiving the Pkts is too BUSY to handle handle them

Actual Stimulus is provided by 2 Packet Generators whose Phase Shift between their Start Times is determined by TRANSACTION Times obtained
from
RandCovPoint Intelligent CrossCoverage.

The number of ManHours required to do this in UVM/SystemVerilog is probably quite LARGE.
Using OSVVM it took LESS than ONE Hour to Think about it, Plan it & DO IT.

The SMALL code fragment below shows how simple this can be with OSVVM.

————————————————————-
ARCHITECTURE tc1 OF pkt_start_temporal_cov_tb IS
DECLARATIONS…….

begin
Stim: process
DECLARATIONS…….

begin
– CksPerPkt x CksPerPkt Cross Split into PktStartXBins & PktStartYBins
svPktSTime.AddCross(GenBin(0,CksPerPkt,PStXBins),GenBin(0,CksPerPkt,PStYBins));
– Add Cross Bins for CORNER cases
svPktSTime.AddCross(GenBin(0), GenBin(0));
svPktSTime.AddCross(GenBin(0), GenBin(CksPerPkt));
svPktSTime.AddCross(GenBin(CksPerPkt), GenBin(0));
svPktSTime.AddCross(GenBin(CksPerPkt), GenBin(CksPerPkt));
– Add CORNER case Cross Bins for Starting at End of Header & 1Ck Before & After
svPktSTime.AddCross(GenBin(CksPerHdr-1,CksPerHdr+1),GenBin(0,CksPerPkt,PStHdrYBins));
svPktSTime.AddCross(GenBin(0,CksPerPkt,PStHdrXBins),GenBin(CksPerHdr-1,CksPerHdr+1));

Cov_NOT_DONE := TRUE; — FALSE when simulation is complete
wait until rising_edge(Ck);

CovPt_Lp: while Cov_NOT_DONE AND (NOW < 3 ms) loop — Loop til Coverage DONE or TIMEOUT
 wait until rising_edge(Ck);
 (StrtPktX, StrtPktY) := svPktSTime.RandCovPoint; — Get Rand Pkt Start Time Vals

 – Calc Start Time of Last Pkt of 2ndGrp in CovPoint
 LastPktStrt := (Maximum(StrtPktX, StrtPktY)) + ((PktGrpSiz-1)*(CksPerPkt+PktGap));
 End2ndGrp   := LastPktStrt + CksPerPkt; — End Time of Last Pkt of 2ndGrp in CovPoint
 CovPntCkCnt := 0; — Reset Progress Timer for this CovPoint

 PGrp_Lp: LOOP — This Whole Loop Does an Rnd OffSet Group of Pkts for PktGenX & Y
   IF (CovPntCkCnt = StrtPktX) THEN RunPktGenX(RunON); END IF; — TRANSACTION Run is ON
   IF (CovPntCkCnt = StrtPktY) THEN RunPktGenY(RunON); END IF; — TRANSACTION Run is ON
   wait until rising_edge(Ck);
   CovPntCkCnt := CovPntCkCnt+1; — Inc Progress Timer for this CovPoint
   IF (CovPntCkCnt = LastPktStrt) THEN RunPktGenX(RunOFF); END IF; — FINISH Curnt Pkt
   IF (CovPntCkCnt = LastPktStrt) THEN RunPktGenY(RunOFF); END IF; — FINISH Curnt Pkt
   DunPGrp_Lp: EXIT PGrp_Lp WHEN (CovPntCkCnt=End2ndGrp); — Reached End of Last Pkt 2ndGrp
 END LOOP PGrp_Lp;

 svPktSTime.ICover( (StrtPktX, StrtPktY) );
 – Quit While Loop when All Start Pkt Times Required by svPktSTime have been COVERED
 Cov_NOT_DONE := NOT svPktSTime.isCovered;
 NumBinsDone := NumBinsDone + 1;
end loop CovPt_Lp;
wait;
end process Stim;
END ARCHITECTURE tc1;

  • This reply was modified 180 days ago by Avatar of Dave Ansell Dave Ansell.
Viewing 1 post

You must be logged in to reply to this topic.