pdbg util to get chip/unit target from unit/chip
Signed-off-by: Zane Shelley <zshelle@us.ibm.com>
Change-Id: Ia5c72c5667b7f6eb1ecb02c044dca5208a211c70
diff --git a/util/pdbg.hpp b/util/pdbg.hpp
index 10a4694..e9cdad8 100644
--- a/util/pdbg.hpp
+++ b/util/pdbg.hpp
@@ -61,12 +61,23 @@
/** @return The absolute position of the given chip. */
uint32_t getChipPos(const libhei::Chip& i_chip);
+/** @return The unit position of a target within a chip. */
+uint8_t getUnitPos(pdbg_target* i_trgt);
+
/** @return The target type of the given target. */
uint8_t getTrgtType(pdbg_target* i_trgt);
/** @return The target type of the given chip. */
uint8_t getTrgtType(const libhei::Chip& i_chip);
+/** @return The parent chip target of the given unit target. */
+pdbg_target* getParentChip(pdbg_target* i_unitTarget);
+
+/** @return The unit target within chip of the given unit type and position
+ * relative to the chip. */
+pdbg_target* getChipUnit(pdbg_target* i_parentChip, TargetType_t i_unitType,
+ uint8_t i_unitPos);
+
/**
* @return The connected target on the other side of the given bus.
* @param i_rxTarget The target on the receiving side (RX) of the bus.