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(); //check if chip has an attention which has not been analyzed as yet if( sysdbug.isActiveAttentionPending( l_pchipHandle, RECOVERABLE ) ) { // Find severity level. ExtensibleChipFunction * l_extFunc = l_fabChip->getExtensibleFunction( "CheckForRecoveredSev"); (*l_extFunc)(l_fabChip, bindParm<uint32_t &>( l_sev[i] )); } } // Find item with highest severity. MoveToFront(std::distance(&l_sev[0], std::max_element(&l_sev[0], &l_sev[GetSize()], __prdfFabricDomain::lessThanOperator)) ); }
void FabricDomain::Order(ATTENTION_TYPE attentionType) { 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) { RuleChip * l_fabChip = LookUp(i); TARGETING::TargetHandle_t l_pchipHandle = l_fabChip->GetChipHandle(); bool l_analysisPending = sysdbug.isActiveAttentionPending(l_pchipHandle, attentionType ); if ( l_analysisPending ) { MoveToFront(i); break; } } } }
bool RuleChipDomain::Query( ATTENTION_TYPE i_attnType ) { bool o_rc = false; using PluginDef::bindParm; SYSTEM_DEBUG_CLASS sysdbug; for ( uint32_t i = 0; i < GetSize(); i++ ) { RuleChip * chip = LookUp(i); TARGETING::TargetHandle_t l_pchipHandle = LookUp(i)->GetChipHandle(); if ( sysdbug.isActiveAttentionPending( l_pchipHandle, i_attnType ) ) { // If the attention type is a checkstop, check if the chip is // reporting based on an externally signaled error condition. If // so, ignore this chip (the chip reporting the checkstop will // be found later). const char * funcName; switch(i_attnType) { case CHECK_STOP: case UNIT_CS: funcName = "IgnoreCheckstopAttn"; break; case RECOVERABLE: funcName = "IgnoreRecoveredAttn"; break; case SPECIAL: funcName = "IgnoreSpecialAttn"; break; default: continue; } ExtensibleChipFunction * ef = chip->getExtensibleFunction( funcName, true ); bool ignore = false; (*ef)( chip, bindParm<bool &, const ATTENTION_TYPE> (ignore, i_attnType) ); if ( ignore ) continue; o_rc = true; break; } } return o_rc; }
void RuleChipDomain::Order( ATTENTION_TYPE i_attnType ) { using PluginDef::bindParm; SYSTEM_DEBUG_CLASS sysdbug; const char * funcName; //mp01 a for ( int32_t i = (GetSize() - 1); i >= 0; i-- ) { RuleChip * chip = LookUp(i); TARGETING::TargetHandle_t l_pchipHandle = LookUp(i)->GetChipHandle(); if ( sysdbug.isActiveAttentionPending( l_pchipHandle, i_attnType ) ) { switch(i_attnType) { case CHECK_STOP: case UNIT_CS: funcName = "IgnoreCheckstopAttn"; break; case RECOVERABLE: funcName = "IgnoreRecoveredAttn"; break; case SPECIAL: funcName = "IgnoreSpecialAttn"; break; default: continue; } ExtensibleChipFunction * ef = chip->getExtensibleFunction( funcName, true ); bool ignore = false; (*ef)( chip, bindParm<bool &, const ATTENTION_TYPE> (ignore, i_attnType) ); if ( ignore ) continue; MoveToFront(i); break; } } }