summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/include/usr/fapi2/target.H25
-rw-r--r--src/include/usr/targeting/common/target.H5
-rw-r--r--src/include/usr/targeting/common/targetservice.H2
-rw-r--r--src/include/usr/targeting/common/utilFilter.H42
-rw-r--r--src/usr/fapi2/test/fapi2GetChildrenTest.H19
-rw-r--r--src/usr/fapi2/test/fapi2TestUtils.H5
-rw-r--r--src/usr/targeting/common/utilFilter.C23
-rw-r--r--src/usr/targeting/common/xmltohb/attribute_types.xml14
-rw-r--r--src/usr/targeting/common/xmltohb/simics_AXONE.system.xml64
-rw-r--r--src/usr/targeting/common/xmltohb/target_types.xml3
-rwxr-xr-xsrc/usr/targeting/common/xmltohb/xmltohb.pl59
11 files changed, 254 insertions, 7 deletions
diff --git a/src/include/usr/fapi2/target.H b/src/include/usr/fapi2/target.H
index b67c1187d..d2f58d62b 100644
--- a/src/include/usr/fapi2/target.H
+++ b/src/include/usr/fapi2/target.H
@@ -704,6 +704,15 @@ inline Target<K_PARENT, V> Target<T_SELF, V>::getParent(void) const
requiredPType,
TARGETING::UTIL_FILTER_ALL);
}
+ else if(K_PARENT == fapi2::TARGET_TYPE_OMIC)
+ {
+ TARGETING::getParentOmicTargetsByState(
+ l_parentList,
+ static_cast<TARGETING::Target*>(this->get()),
+ TARGETING::CLASS_NA,
+ requiredPType,
+ TARGETING::UTIL_FILTER_ALL);
+ }
else
{
TARGETING::getParentAffinityTargetsByState(
@@ -957,6 +966,14 @@ inline std::vector<Target<K_CHILD, V> >
l_type,
TARGETING::UTIL_FILTER_ALL);
}
+ else if(T_SELF == fapi2::TARGET_TYPE_OMIC)
+ {
+ TARGETING::getChildOmiTargetsByState(l_childList,
+ static_cast<TARGETING::Target*>(this->get()),
+ TARGETING::CLASS_NA,
+ l_type,
+ TARGETING::UTIL_FILTER_ALL);
+ }
// DIMMs need to use PRESENT so that we don't report things
// that aren't installed
else if(K_CHILD == fapi2::TARGET_TYPE_DIMM)
@@ -988,6 +1005,14 @@ inline std::vector<Target<K_CHILD, V> >
l_type,
TARGETING::UTIL_FILTER_FUNCTIONAL);
}
+ else if(T_SELF == fapi2::TARGET_TYPE_OMIC)
+ {
+ TARGETING::getChildOmiTargetsByState(l_childList,
+ static_cast<TARGETING::Target*>(this->get()),
+ TARGETING::CLASS_NA,
+ l_type,
+ TARGETING::UTIL_FILTER_FUNCTIONAL);
+ }
else
{
TARGETING::getChildAffinityTargetsByState(l_childList,
diff --git a/src/include/usr/targeting/common/target.H b/src/include/usr/targeting/common/target.H
index f462581de..16622adf9 100644
--- a/src/include/usr/targeting/common/target.H
+++ b/src/include/usr/targeting/common/target.H
@@ -770,14 +770,15 @@ class Target
// Array of pointers to target handles. Currently there is one pointer
// for each supported association type. The currently supported
// association types are PARENT, CHILD, PARENT_BY_AFFINITY,
- // CHILD_BY_AFFINTY, PERVASIVE_CHILD, and PARENT_PERVASIVE.
+ // CHILD_BY_AFFINTY, PERVASIVE_CHILD, PARENT_PERVASIVE,
+ // OMI_CHILD, and OMIC_PARENT.
// The number of pointers should exactly equal value
// of TargetService::MAX_ASSOCIATION_TYPES defined in
// targeting/common/targetservice.H. Due to the huge code changes
// necessary to directly use that enum value, a compile time assert in
// targeting/common/targetservice.C enforces that restriction.
TARGETING::AbstractPointer< AbstractPointer<Target> >
- iv_ppAssociations[6];
+ iv_ppAssociations[8];
private: // Private CTORs/DTORs/Operators
diff --git a/src/include/usr/targeting/common/targetservice.H b/src/include/usr/targeting/common/targetservice.H
index 4c6f78996..157372126 100644
--- a/src/include/usr/targeting/common/targetservice.H
+++ b/src/include/usr/targeting/common/targetservice.H
@@ -210,6 +210,8 @@ class TargetService
///< associated with a pervasive target
PARENT_PERVASIVE, ///< The result target should be a pervasive
///< target
+ OMI_CHILD, ///< The result target(s) should be an OMI target
+ OMIC_PARENT, ///< The result target should be an OMIC target
MAX_ASSOCIATION_TYPES, ///< Number of types, must always be last
};
diff --git a/src/include/usr/targeting/common/utilFilter.H b/src/include/usr/targeting/common/utilFilter.H
index 9d840a450..b54c5f8ac 100644
--- a/src/include/usr/targeting/common/utilFilter.H
+++ b/src/include/usr/targeting/common/utilFilter.H
@@ -262,6 +262,48 @@ void getParentPervasiveTargetsByState (
ResourceState i_state);
/**
+ * @brief Given an input target, finds all the targets linked to it via a
+ * OMIC_PARENT relationship and writes them to the output vector.
+ * The class, type, and resource state further filter the set of results.
+ * Note: It is expected that only 1 target will be added to the output
+ * vector for getParentOmicTargetsByState calls.
+ *
+ * @parm[out] o_vector, reference to vector of target pointers
+ * @parm[in] i_target, source target to search from
+ * @parm[in] i_class, class of the targets to be obtained
+ * @parm[in] i_type, type of the targets to be obtained
+ * @parm[in] i_state, specifies state the target should be in
+ *
+ * @return N/A
+ */
+void getParentOmicTargetsByState (
+ TARGETING::TargetHandleList& o_vector,
+ const Target* i_target,
+ CLASS i_class,
+ TYPE i_type,
+ ResourceState i_state);
+
+/**
+ * @brief Given an input target, finds all the targets linked to it via a
+ * OMI_CHILD relationship and writes them to the output vector.
+ * The class, type, and resource state further filter the set of results.
+ *
+ * @parm[out] o_vector, reference to vector of target pointers
+ * @parm[in] i_target, source target to search from
+ * @parm[in] i_class, class of the targets to be obtained
+ * @parm[in] i_type, type of the targets to be obtained
+ * @parm[in] i_state, specifies state the target should be in
+ *
+ * @return N/A
+ */
+void getChildOmiTargetsByState (
+ TARGETING::TargetHandleList& o_vector,
+ const Target* i_target,
+ CLASS i_class,
+ TYPE i_type,
+ ResourceState i_state);
+
+/**
* @brief Populate the o_vector with target object pointers which are
* affinity parents of the input target
*
diff --git a/src/usr/fapi2/test/fapi2GetChildrenTest.H b/src/usr/fapi2/test/fapi2GetChildrenTest.H
index 6dbe88e86..04f3863ba 100644
--- a/src/usr/fapi2/test/fapi2GetChildrenTest.H
+++ b/src/usr/fapi2/test/fapi2GetChildrenTest.H
@@ -233,6 +233,25 @@ void test_fapi2GetChildren()
}
}
+ if (isHwValid(l_proc, MY_OMIC)
+ && isHwValid(l_proc, MY_OMI))
+ {
+ l_childOMIs = fapi2_omicTarget.getChildren<fapi2::TARGET_TYPE_OMI>(TARGET_STATE_PRESENT);
+ l_targetHuid = TARGETING::get_huid(targeting_targets[MY_OMIC]);
+ l_actualSize = l_childOMIs.size();
+
+ //Set expected size to be the number of OMIs per proc
+ l_expectedSize = MAX_OMI_PER_OMIC;
+ numTests++;
+ if(l_actualSize != l_expectedSize)
+ {
+ FAPI_INF("fapi2TargetTest:: # OMIs foound for OMIC0 proc is %d and not %d",
+ l_actualSize, l_expectedSize);
+ numFails++;
+ break;
+ }
+ }
+
if (isHwValid(l_proc, MY_OMI)
&& isHwValid(l_proc, MY_OCMB))
{
diff --git a/src/usr/fapi2/test/fapi2TestUtils.H b/src/usr/fapi2/test/fapi2TestUtils.H
index 2d51330c2..cb88a1d6e 100644
--- a/src/usr/fapi2/test/fapi2TestUtils.H
+++ b/src/usr/fapi2/test/fapi2TestUtils.H
@@ -53,6 +53,11 @@
#define OCMB_PER_OMI 1
#define MEM_PORT_PER_OCMB 1
+// Note that OMIC can either have 2 or 3 child OMI
+// targets. There are 3 OMIC targets per MC, OMIC0
+// and OMIC1 have 3 children, OMIC2 has 2 children
+#define MAX_OMI_PER_OMIC 3
+
#define SIMULATED_GOOD_CORES 4
// non-core and non-cache chiplet ids
diff --git a/src/usr/targeting/common/utilFilter.C b/src/usr/targeting/common/utilFilter.C
index 3675dfb04..7f2c02074 100644
--- a/src/usr/targeting/common/utilFilter.C
+++ b/src/usr/targeting/common/utilFilter.C
@@ -400,6 +400,18 @@ void getPervasiveChildTargetsByState(
TargetService::PERVASIVE_CHILD);
}
+void getChildOmiTargetsByState(
+ TARGETING::TargetHandleList& o_vector,
+ const Target* i_target,
+ CLASS i_class,
+ TYPE i_type,
+ ResourceState i_state )
+
+{
+ getAffinityTargets(o_vector, i_target, i_class, i_type, i_state,
+ TargetService::OMI_CHILD);
+}
+
void getParentAffinityTargetsByState(
TARGETING::TargetHandleList& o_vector,
const Target* i_target,
@@ -423,6 +435,17 @@ void getParentPervasiveTargetsByState(
TargetService::PARENT_PERVASIVE);
}
+void getParentOmicTargetsByState(
+ TARGETING::TargetHandleList& o_vector,
+ const Target* i_target,
+ CLASS i_class,
+ TYPE i_type,
+ ResourceState i_state )
+{
+ getAffinityTargets(o_vector, i_target, i_class, i_type, i_state,
+ TargetService::OMIC_PARENT);
+}
+
const Target * getParentChip( const Target * i_pChiplet )
{
diff --git a/src/usr/targeting/common/xmltohb/attribute_types.xml b/src/usr/targeting/common/xmltohb/attribute_types.xml
index b42bf793e..18e7b7588 100644
--- a/src/usr/targeting/common/xmltohb/attribute_types.xml
+++ b/src/usr/targeting/common/xmltohb/attribute_types.xml
@@ -5071,6 +5071,20 @@
</attribute>
<attribute>
+ <description>
+ Physical entity path an OMI's associated OMIC parent target
+ </description>
+ <id>OMIC_PARENT</id>
+ <nativeType>
+ <name>EntityPath</name>
+ </nativeType>
+ <persistency>non-volatile</persistency>
+ <readable/>
+ <virtual/>
+ <no_export/>
+ </attribute>
+
+ <attribute>
<description>Ordinal ID of a target</description>
<id>ORDINAL_ID</id>
<persistency>non-volatile</persistency>
diff --git a/src/usr/targeting/common/xmltohb/simics_AXONE.system.xml b/src/usr/targeting/common/xmltohb/simics_AXONE.system.xml
index 6fdd560e5..e90a616e7 100644
--- a/src/usr/targeting/common/xmltohb/simics_AXONE.system.xml
+++ b/src/usr/targeting/common/xmltohb/simics_AXONE.system.xml
@@ -7345,6 +7345,10 @@
<default>physical:sys-0/node-0/proc-0/perv-7</default>
</attribute>
<attribute>
+ <id>OMIC_PARENT</id>
+ <default>physical:sys-0/node-0/proc-0/mc-0/omic-2</default>
+ </attribute>
+ <attribute>
<id>PHYS_PATH</id>
<default>physical:sys-0/node-0/proc-0/mc-0/mi-0/mcc-0/omi-0</default>
</attribute>
@@ -7407,6 +7411,10 @@
<default>physical:sys-0/node-0/proc-0/perv-7</default>
</attribute>
<attribute>
+ <id>OMIC_PARENT</id>
+ <default>physical:sys-0/node-0/proc-0/mc-0/omic-2</default>
+ </attribute>
+ <attribute>
<id>PHYS_PATH</id>
<default>physical:sys-0/node-0/proc-0/mc-0/mi-0/mcc-0/omi-1</default>
</attribute>
@@ -7469,6 +7477,10 @@
<default>physical:sys-0/node-0/proc-0/perv-7</default>
</attribute>
<attribute>
+ <id>OMIC_PARENT</id>
+ <default>physical:sys-0/node-0/proc-0/mc-0/omic-1</default>
+ </attribute>
+ <attribute>
<id>PHYS_PATH</id>
<default>physical:sys-0/node-0/proc-0/mc-0/mi-0/mcc-1/omi-0</default>
</attribute>
@@ -7531,6 +7543,10 @@
<default>physical:sys-0/node-0/proc-0/perv-7</default>
</attribute>
<attribute>
+ <id>OMIC_PARENT</id>
+ <default>physical:sys-0/node-0/proc-0/mc-0/omic-1</default>
+ </attribute>
+ <attribute>
<id>PHYS_PATH</id>
<default>physical:sys-0/node-0/proc-0/mc-0/mi-0/mcc-1/omi-1</default>
</attribute>
@@ -7597,6 +7613,10 @@
<default>physical:sys-0/node-0/proc-0/mc-0/mi-1/mcc-0/omi-0</default>
</attribute>
<attribute>
+ <id>OMIC_PARENT</id>
+ <default>physical:sys-0/node-0/proc-0/mc-0/omic-0</default>
+ </attribute>
+ <attribute>
<id>PRIMARY_CAPABILITIES</id>
<default>
<field><id>reserved</id><value>0</value></field>
@@ -7655,6 +7675,10 @@
<default>physical:sys-0/node-0/proc-0/perv-7</default>
</attribute>
<attribute>
+ <id>OMIC_PARENT</id>
+ <default>physical:sys-0/node-0/proc-0/mc-0/omic-0</default>
+ </attribute>
+ <attribute>
<id>PHYS_PATH</id>
<default>physical:sys-0/node-0/proc-0/mc-0/mi-1/mcc-0/omi-1</default>
</attribute>
@@ -7717,6 +7741,10 @@
<default>physical:sys-0/node-0/proc-0/perv-7</default>
</attribute>
<attribute>
+ <id>OMIC_PARENT</id>
+ <default>physical:sys-0/node-0/proc-0/mc-0/omic-0</default>
+ </attribute>
+ <attribute>
<id>PHYS_PATH</id>
<default>physical:sys-0/node-0/proc-0/mc-0/mi-1/mcc-1/omi-0</default>
</attribute>
@@ -7779,6 +7807,10 @@
<default>physical:sys-0/node-0/proc-0/perv-7</default>
</attribute>
<attribute>
+ <id>OMIC_PARENT</id>
+ <default>physical:sys-0/node-0/proc-0/mc-0/omic-1</default>
+ </attribute>
+ <attribute>
<id>PHYS_PATH</id>
<default>physical:sys-0/node-0/proc-0/mc-0/mi-1/mcc-1/omi-1</default>
</attribute>
@@ -7841,6 +7873,10 @@
<default>physical:sys-0/node-0/proc-0/perv-8</default>
</attribute>
<attribute>
+ <id>OMIC_PARENT</id>
+ <default>physical:sys-0/node-0/proc-0/mc-1/omic-2</default>
+ </attribute>
+ <attribute>
<id>PHYS_PATH</id>
<default>physical:sys-0/node-0/proc-0/mc-1/mi-0/mcc-0/omi-0</default>
</attribute>
@@ -7903,6 +7939,10 @@
<default>physical:sys-0/node-0/proc-0/perv-8</default>
</attribute>
<attribute>
+ <id>OMIC_PARENT</id>
+ <default>physical:sys-0/node-0/proc-0/mc-1/omic-2</default>
+ </attribute>
+ <attribute>
<id>PHYS_PATH</id>
<default>physical:sys-0/node-0/proc-0/mc-1/mi-0/mcc-0/omi-1</default>
</attribute>
@@ -7965,6 +8005,10 @@
<default>physical:sys-0/node-0/proc-0/perv-8</default>
</attribute>
<attribute>
+ <id>OMIC_PARENT</id>
+ <default>physical:sys-0/node-0/proc-0/mc-1/omic-1</default>
+ </attribute>
+ <attribute>
<id>PHYS_PATH</id>
<default>physical:sys-0/node-0/proc-0/mc-1/mi-0/mcc-1/omi-0</default>
</attribute>
@@ -8027,6 +8071,10 @@
<default>physical:sys-0/node-0/proc-0/perv-8</default>
</attribute>
<attribute>
+ <id>OMIC_PARENT</id>
+ <default>physical:sys-0/node-0/proc-0/mc-1/omic-1</default>
+ </attribute>
+ <attribute>
<id>PHYS_PATH</id>
<default>physical:sys-0/node-0/proc-0/mc-1/mi-0/mcc-1/omi-11</default>
</attribute>
@@ -8089,6 +8137,10 @@
<default>physical:sys-0/node-0/proc-0/perv-8</default>
</attribute>
<attribute>
+ <id>OMIC_PARENT</id>
+ <default>physical:sys-0/node-0/proc-0/mc-1/omic-0</default>
+ </attribute>
+ <attribute>
<id>PHYS_PATH</id>
<default>physical:sys-0/node-0/proc-0/mc-1/mi-1/mcc-0/omi-0</default>
</attribute>
@@ -8151,6 +8203,10 @@
<default>physical:sys-0/node-0/proc-0/perv-8</default>
</attribute>
<attribute>
+ <id>OMIC_PARENT</id>
+ <default>physical:sys-0/node-0/proc-0/mc-1/omic-0</default>
+ </attribute>
+ <attribute>
<id>PHYS_PATH</id>
<default>physical:sys-0/node-0/proc-0/mc-1/mi-1/mcc-0/omi-1</default>
</attribute>
@@ -8213,6 +8269,10 @@
<default>physical:sys-0/node-0/proc-0/perv-8</default>
</attribute>
<attribute>
+ <id>OMIC_PARENT</id>
+ <default>physical:sys-0/node-0/proc-0/mc-1/omic-0</default>
+ </attribute>
+ <attribute>
<id>PHYS_PATH</id>
<default>physical:sys-0/node-0/proc-0/mc-1/mi-1/mcc-1/omi-0</default>
</attribute>
@@ -8275,6 +8335,10 @@
<default>physical:sys-0/node-0/proc-0/perv-8</default>
</attribute>
<attribute>
+ <id>OMIC_PARENT</id>
+ <default>physical:sys-0/node-0/proc-0/mc-1/omic-1</default>
+ </attribute>
+ <attribute>
<id>PHYS_PATH</id>
<default>physical:sys-0/node-0/proc-0/mc-1/mi-1/mcc-1/omi-1</default>
</attribute>
diff --git a/src/usr/targeting/common/xmltohb/target_types.xml b/src/usr/targeting/common/xmltohb/target_types.xml
index f1e95b9d4..9e8bc0bf8 100644
--- a/src/usr/targeting/common/xmltohb/target_types.xml
+++ b/src/usr/targeting/common/xmltohb/target_types.xml
@@ -2515,6 +2515,9 @@
<id>HWAS_STATE_CHANGED_SUBSCRIPTION_MASK</id>
</attribute>
<attribute>
+ <id>OMIC_PARENT</id>
+ </attribute>
+ <attribute>
<id>PARENT_PERVASIVE</id>
</attribute>
<attribute>
diff --git a/src/usr/targeting/common/xmltohb/xmltohb.pl b/src/usr/targeting/common/xmltohb/xmltohb.pl
index a0be4e3e7..1d929a3a9 100755
--- a/src/usr/targeting/common/xmltohb/xmltohb.pl
+++ b/src/usr/targeting/common/xmltohb/xmltohb.pl
@@ -157,11 +157,14 @@ use constant PARENT_BY_AFFINITY => "ParentByAffinity";
use constant CHILD_BY_AFFINITY => "ChildByAffinity";
use constant PERVASIVE_CHILD => "PervasiveChild";
use constant PARENT_PERVASIVE => "ParentPervasive";
+use constant OMIC_PARENT => "OmicParent";
+use constant OMI_CHILD => "OmiChild";
my @associationTypes = ( PARENT_BY_CONTAINMENT,
CHILD_BY_CONTAINMENT, PARENT_BY_AFFINITY, CHILD_BY_AFFINITY,
- PERVASIVE_CHILD, PARENT_PERVASIVE );
+ PERVASIVE_CHILD, PARENT_PERVASIVE, OMIC_PARENT, OMI_CHILD );
# Constants for attribute names (minus ATTR_ prefix)
+use constant ATTR_OMIC_PARENT => "OMIC_PARENT";
use constant ATTR_PARENT_PERVASIVE => "PARENT_PERVASIVE";
use constant ATTR_PHYS_PATH => "PHYS_PATH";
use constant ATTR_AFFINITY_PATH => "AFFINITY_PATH";
@@ -6297,6 +6300,8 @@ sub generateTargetingImage {
my $ptrToChildByAffinityAssociations = INVALID_POINTER;
my $ptrToPervasiveChildAssociations = INVALID_POINTER;
my $ptrToParentPervasiveAssociations = INVALID_POINTER;
+ my $ptrToOmiChildAssociations = INVALID_POINTER;
+ my $ptrToOmicParentAssociations = INVALID_POINTER;
my $id = $targetInstance->{id};
$targetAddrHash{$id}{offsetToPtrToParentByContainmentAssociations} =
@@ -6323,12 +6328,22 @@ sub generateTargetingImage {
$offsetWithinTargets + length $data;
$data .= pack8byte($ptrToParentPervasiveAssociations);
+ $targetAddrHash{$id}{offsetToPtrToOmiChildAssociations} =
+ $offsetWithinTargets + length $data;
+ $data .= pack8byte($ptrToOmiChildAssociations);
+
+ $targetAddrHash{$id}{offsetToPtrToOmicParentAssociations} =
+ $offsetWithinTargets + length $data;
+ $data .= pack8byte($ptrToOmicParentAssociations);
+
$targetAddrHash{$id}{ParentByContainmentAssociations} = [@NullPtrArray];
$targetAddrHash{$id}{ChildByContainmentAssociations} = [@NullPtrArray];
$targetAddrHash{$id}{ParentByAffinityAssociations} = [@NullPtrArray];
$targetAddrHash{$id}{ChildByAffinityAssociations} = [@NullPtrArray];
$targetAddrHash{$id}{PervasiveChildAssociations} = [@NullPtrArray];
$targetAddrHash{$id}{ParentPervasiveAssociations} = [@NullPtrArray];
+ $targetAddrHash{$id}{OmiChildAssociations} = [@NullPtrArray];
+ $targetAddrHash{$id}{OmicParentAssociations} = [@NullPtrArray];
if($id =~/^sys\d+$/)
{
@@ -6358,6 +6373,10 @@ sub generateTargetingImage {
. "$targetAddrHash{$id}{offsetToPtrToPervasiveChildAssociations}");
ASSOC_DBG("Offset within targets to ptr to parent pervasive list = "
. "$targetAddrHash{$id}{offsetToPtrToParentPervasiveAssociations}");
+ ASSOC_DBG("Offset within targets to ptr to omi child list = "
+ . "$targetAddrHash{$id}{offsetToPtrToOmiChildAssociations}");
+ ASSOC_DBG("Offset within targets to ptr to omic parent list = "
+ . "$targetAddrHash{$id}{offsetToPtrToOmicParentAssociations}");
$attrAddr += $attributeListTypeHoH{$targetInstance->{type}}{elements}
* (length pack8byte(0));
@@ -6498,7 +6517,8 @@ sub generateTargetingImage {
# path for association processing later on
if( ($attributeId eq ATTR_PHYS_PATH)
|| ($attributeId eq ATTR_AFFINITY_PATH)
- || ($attributeId eq ATTR_PARENT_PERVASIVE))
+ || ($attributeId eq ATTR_PARENT_PERVASIVE)
+ || ($attributeId eq ATTR_OMIC_PARENT))
{
$targetAddrHash{$targetInstance->{id}}{$attributeId} =
$attrhash{$attributeId}->{default};
@@ -6630,9 +6650,10 @@ sub generateTargetingImage {
# Each target is 4 bytes # attributes, 8 bytes pointer
# to attribute list, 8 bytes pointer to attribute pointer
- # list, 6 x 8 byte pointers to association lists, for total
- # of 20 + 48 = 68 bytes per target
- $index *= (20 + 48); # length(N + quad + quad + 6x quad)
+ # list, num associations x 8 byte pointers to association lists
+
+ # length(double + quad + quad + # associations x quad)
+ $index *= (20 + 8 * (scalar @associationTypes));
$attrhash{$attributeId}->{default} = $index + $firstTgtPtr;
}
@@ -6942,6 +6963,7 @@ sub generateTargetingImage {
my $phys_attr = ATTR_PHYS_PATH;
my $affn_attr = ATTR_AFFINITY_PATH;
my $parent_pervasive = ATTR_PARENT_PERVASIVE;
+ my $omic_parent = ATTR_OMIC_PARENT;
my $phys_path = $targetAddrHash{$id}{$phys_attr};
my $parent_phys_path = substr $phys_path, 0, (rindex $phys_path, "/");
@@ -6949,6 +6971,33 @@ sub generateTargetingImage {
my $affn_path = $targetAddrHash{$id}{$affn_attr};
my $parent_affn_path = substr $affn_path, 0, (rindex $affn_path, "/");
+ # If this target has an associated OMIC target, create a
+ # bidirectional relationship between this target and the specified
+ # OMIC target. This target will point to the OMIC target via
+ # a "OMIC_PARENT" association, and the pervasive target will
+ # point to this target via a "OMI_CHILD" association.
+ if(defined $targetAddrHash{$id}{$omic_parent})
+ {
+ my $parent_omic_path =
+ $targetAddrHash{$id}{$omic_parent};
+
+ if(defined $targetPhysicalPath{$parent_omic_path})
+ {
+ my $parent = $targetPhysicalPath{$parent_omic_path};
+ unshift
+ @ { $targetAddrHash{$id}
+ {OmicParentAssociations} },
+ $firstTgtPtr + $targetAddrHash{$parent}
+ {OffsetToTargetWithinTargetList};
+
+ unshift
+ @ { $targetAddrHash{$parent}
+ {OmiChildAssociations} },
+ $firstTgtPtr + $targetAddrHash{$id}
+ {OffsetToTargetWithinTargetList};
+ }
+ }
+
# If this target has an associated pervasive target, create a
# bidirectional relationship between this target and the specified
# pervasive target. This target will point to the pervasive target via
OpenPOWER on IntegriCloud