path: root/src/import/hwpf
diff options
authorJoachim Fenkes <>2019-03-19 18:21:51 +0100
committerChristian R. Geddes <>2019-04-04 09:28:13 -0500
commita6ab2972787fd4662a69ec7c76834d320bff704a (patch)
tree4fca8f987106a5141f4f835d2661aad7b493218c /src/import/hwpf
parentf6f5d7720e3c49b3ccfa497773c214efd8aa5253 (diff)
FAPI2: Add method to Target to query core select vector from CORE targets
Add fapi2::Target::getCoreSelect() which will return the core select bits for a TARGET_TYPE_CORE target or a TARGET_TYPE_CORE|TARGET_TYPE_MULTICAST target. Other target types don't have the notion of a core select value, so attempting to call getCoreSelect() will result in a compile-time error. Change-Id: I427028876b18126493192db53686707c662bafd7 Reviewed-on: Tested-by: Jenkins Server <> Reviewed-by: Matt K. Light <> Reviewed-by: Gregory S. Still <> Reviewed-by: Jennifer A. Stofer <> Reviewed-on: Tested-by: Jenkins OP Build CI <> Tested-by: FSP CI Jenkins <> Tested-by: Jenkins OP HW <> Reviewed-by: Christian R. Geddes <>
Diffstat (limited to 'src/import/hwpf')
1 files changed, 17 insertions, 1 deletions
diff --git a/src/import/hwpf/fapi2/include/fapi2_target.H b/src/import/hwpf/fapi2/include/fapi2_target.H
index 444fe3396..9c7c97cd3 100644
--- a/src/import/hwpf/fapi2/include/fapi2_target.H
+++ b/src/import/hwpf/fapi2/include/fapi2_target.H
@@ -379,6 +379,19 @@ class Target
getChipletNumber(void) const;
+ /// @brief Returns the core select vector associated with a Core target
+ /// @return The core select value for the target. For unicast core targets
+ /// the return value will have exactly one bit set. For multicast core
+ /// targets it will have between one and four bits set.
+ ///
+ inline MulticastCoreSelect
+ getCoreSelect(void) const
+ {
+ static_assert(K & TARGET_TYPE_CORE, "getCoreSelect is only applicable to TARGET_TYPE_CORE targets");
+ return _getCoreSelect();
+ }
+ ///
/// @brief Copy from a Target<O, MO> to a Target<K, M>
/// @tparam O the target type of the other
/// @tparam MO the multicast type of the other
@@ -410,7 +423,10 @@ class Target
V iv_handle;
/// @brief if iv_handle is a multicast target, update its multicast type to M
- inline void mcUpdateHandle();
+ inline void mcUpdateHandle(void);
+ /// @brief Internal implementation of getCoreSelect, filtered for CORE targets
+ inline MulticastCoreSelect _getCoreSelect(void) const;
// EX threads map to CORE threads:
OpenPOWER on IntegriCloud