本文整理汇总了C++中fapi::Target::isChiplet方法的典型用法代码示例。如果您正苦于以下问题:C++ Target::isChiplet方法的具体用法?C++ Target::isChiplet怎么用?C++ Target::isChiplet使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类fapi::Target
的用法示例。
在下文中一共展示了Target::isChiplet方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: fapiGetParentChip
//******************************************************************************
// fapiGetParentChip function
//******************************************************************************
fapi::ReturnCode fapiGetParentChip(
const fapi::Target& i_chiplet,
fapi::Target & o_chip)
{
FAPI_DBG(ENTER_MRK "fapiGetParentChip");
fapi::ReturnCode l_rc;
// Extract the HostBoot Target pointer for the input chiplet
TARGETING::Target * l_pChiplet =
reinterpret_cast<TARGETING::Target*>(i_chiplet.get());
// Check that the input target is a chiplet
if (!i_chiplet.isChiplet())
{
FAPI_ERR("fapiGetParentChip. Input target type 0x%08x is not a chiplet",
i_chiplet.getType());
/*@
* @errortype
* @moduleid fapi::MOD_FAPI_GET_PARENT_CHIP
* @reasoncode fapi::RC_INVALID_REQUEST
* @userdata1 Type of input target
* @userdata2 Input Target HUID
* @devdesc fapiGetParentChip request for non-chiplet
*/
const bool hbSwError = true;
errlHndl_t l_pError = new ERRORLOG::ErrlEntry(
ERRORLOG::ERRL_SEV_UNRECOVERABLE,
fapi::MOD_FAPI_GET_PARENT_CHIP,
fapi::RC_INVALID_REQUEST,
i_chiplet.getType(),
TARGETING::get_huid(l_pChiplet),
hbSwError);
// Attach the error log to the fapi::ReturnCode
l_rc.setPlatError(reinterpret_cast<void *> (l_pError));
}
else
{
if (l_pChiplet == NULL)
{
/*@
* @errortype
* @moduleid fapi::MOD_FAPI_GET_PARENT_CHIP
* @reasoncode fapi::RC_EMBEDDED_NULL_TARGET_PTR
* @devdesc Target has embedded null target pointer
*/
const bool hbSwError = true;
errlHndl_t l_pError = new ERRORLOG::ErrlEntry(
ERRORLOG::ERRL_SEV_UNRECOVERABLE,
fapi::MOD_FAPI_GET_PARENT_CHIP,
fapi::RC_EMBEDDED_NULL_TARGET_PTR,
0, 0, hbSwError);
// Attach the error log to the fapi::ReturnCode
l_rc.setPlatError(reinterpret_cast<void *> (l_pError));
}
else
{
const TARGETING::Target * l_pChip =
TARGETING::getParentChip(l_pChiplet);
if (l_pChip == NULL)
{
FAPI_ERR("fapiGetParentChip. Parent not found");
/*@
* @errortype
* @moduleid fapi::MOD_FAPI_GET_PARENT_CHIP
* @reasoncode fapi::RC_NO_SINGLE_PARENT
* @userdata1 Input Chiplet Target HUID
* @devdesc fapiGetParentChip did not find one parent
*/
const bool hbSwError = true;
errlHndl_t l_pError = new ERRORLOG::ErrlEntry(
ERRORLOG::ERRL_SEV_UNRECOVERABLE,
fapi::MOD_FAPI_GET_PARENT_CHIP,
fapi::RC_NO_SINGLE_PARENT,
TARGETING::get_huid(l_pChiplet),
0, hbSwError);
// Attach the error log to the fapi::ReturnCode
l_rc.setPlatError(reinterpret_cast<void *> (l_pError));
}
else
{
// Set the output chip type
if (l_pChip->getAttr<TARGETING::ATTR_TYPE>() ==
TARGETING::TYPE_PROC)
{
o_chip.setType(fapi::TARGET_TYPE_PROC_CHIP);
}
else
{
o_chip.setType(fapi::TARGET_TYPE_MEMBUF_CHIP);
}
//.........这里部分代码省略.........