Exemplo n.º 1
0
void FabricDomain::SortForRecov()
{
    using namespace PluginDef;

    SYSTEM_DEBUG_CLASS sysdbug;
    uint32_t l_sev[GetSize()];
    std::fill(&l_sev[0], &l_sev[GetSize()], 0);

    // Loop through all chips.
    for (uint32_t i = 0; i < GetSize(); ++i)
    {
        RuleChip * l_fabChip = LookUp(i);
        TARGETING::TargetHandle_t l_pchipHandle = l_fabChip->GetChipHandle();
        if (sysdbug.IsAttentionActive(l_pchipHandle))  // If at attention, check.
        {

            if (RECOVERABLE == sysdbug.GetAttentionType( l_pchipHandle))
            {
                // Recovered, set sev 1.
                l_sev[i] = 1;
            }
            else if (CHECK_STOP == sysdbug.GetAttentionType(l_pchipHandle))
            {
                // Check for recovered error at checkstop.
                ExtensibleChipFunction * l_extFunc
                    = l_fabChip->getExtensibleFunction("CheckForRecovered");

                bool l_hasRer = false;

                (*l_extFunc)(l_fabChip, bindParm<bool &>(l_hasRer));

                if (l_hasRer)
                {
                    // Has a recovered error, sev 1.
                    l_sev[i] = 1;
                }
            }

            // Find real severity level.
            if (0 != l_sev[i])
            {
                ExtensibleChipFunction * l_extFunc
                        = l_fabChip->getExtensibleFunction(
                                                    "CheckForRecoveredSev");

                uint32_t l_cSev = 1;
                (*l_extFunc)(l_fabChip, bindParm<uint32_t &>(l_cSev));

                l_sev[i] = l_cSev;
            }
        }
    }

    // Find item with highest severity.
    MoveToFront(std::distance(&l_sev[0],
                       std::max_element(&l_sev[0],
                                        &l_sev[GetSize()],
                                        __prdfFabricDomain::lessThanOperator))
               ); //pw03
}
Exemplo n.º 2
0
void FabricDomain::Order(ATTENTION_TYPE attentionType)
{
    using PluginDef::bindParm;

    if (attentionType == MACHINE_CHECK)
    {
        SortForXstop();

    }
    else if (attentionType == RECOVERABLE)
    {
        SortForRecov();
    }
    else // Recovered or Special
    {
        SYSTEM_DEBUG_CLASS sysdbug;
        for (int32_t i = (GetSize() - 1); i >= 0; --i) //pw03
        {
            RuleChip * l_fabChip = LookUp(i);
            TARGETING::TargetHandle_t l_pchipHandle = l_fabChip->GetChipHandle();
            if ((sysdbug.IsAttentionActive(l_pchipHandle)) &&
                    (sysdbug.GetAttentionType(l_pchipHandle ) == attentionType))
            {
                MoveToFront(i);  //pw03
                break;
            }
        }
    }
}
Exemplo n.º 3
0
inline
bool DomainContainer<T>::Query(ATTENTION_TYPE attentionType)     // DG03
{
  bool rc = false;

  SYSTEM_DEBUG_CLASS sysdebug;
  unsigned int size = GetSize();
  for(unsigned int i = 0;(i < size) && (rc == false);i++)
  {
    TARGETING::TargetHandle_t l_pchipHandle = LookUp(i)->GetChipHandle();
    if(sysdebug.IsAttentionActive(l_pchipHandle) == true)
    {
      if(sysdebug.GetAttentionType(l_pchipHandle) == attentionType) rc = true;
    }
  }

  return(rc);
}