Coverage deriving verification
SPV Coverage classes enable achieve 100 % coverage with 100 % efficiency by using the coverage classes queries.
When SPV coming up, it's start collect info on the history coverage.
Even in middle test, The new cover combination add to current status.
Each coverage item is object that enable call GenerateUnCoverElement() that return new combination that not cover yet.
In the generation code we could call this query and use the information to generate new transaction that not cover yet, this is how SPV implement Coverage deriving verification.
In the example above we could see that the requirement was to cover any combination 10 times, and by query we achieve this request, with 100% efficiency.
Using this method called active coverage, while there is an option to work with passive coverage that only collect event and transaction and update coverage data base. user could combine these 2 method any where any time.
SPV coverage is very flexible, and enable do what ever you want in case of any event, it is because the event of any coverage call to virtual function, in this function you could manage any information to cover.
Example:
Coverage deriving verification
//Select the least covered object
for(unsigned i=1;i<CovList.size();i++)
{
if (CovList[i]->CoverPercent() < lessPercent) {
lessPercent = CovList[i]->CoverPercent();
lessPercentInd = i;//The index of least covered object
}
}
//Code for case index 2 is the least covered object
} else if (lessPercentInd == 2) {//m_CovRdWrInc
cmd->m_WrPolicyType = AddrIncrType;
cmd->m_RdPolicyType = AddrIncrType;
cmd->m_BlockLength = ((m_GenBlockSize->Gen()%8192)/4)*4;//do it X*4
// The main engin, get combination that not cover yet.
vec<uint>&wrRdUnCov = CovList[lessPercentInd]->GenerateUnCoverElement();
//Calculate the start aligment , that not cover yet.
cmd->m_SAddr = ((m_GenAddrRead.Gen()/4)*4) + wrRdIncUnCov[0];
//Calculate the end aligment, that not cover yet.
cmd->m_BlockLength = cmd->m_BlockLength - wrRdIncUnCov[0]+ wrRdIncUnCov[1];
cmd->m_DAddr = ((m_GenAddrWrite.Gen()/4)*4) + wrRdIncUnCov[2];