R
Rolf Kemper
Dear All,
may be some one has a good idea for the follwoing problem.
In the xml data below you see a kind of abstract netlist as we use it
for chip design. Where the H tag stands for a logical hierarchy level,
the M tag for a physical macro and the p tag for a pin of the macro
which has to be bound to a Net ( named by @Net).
The existing netlist is described without the Hierarchy. Hence, I must
know which nets I have to pass trough the Hierarchy interface (H
tags).
Imagine I'm on the node <H id=5>
Then all nets which are above are ancestor::*/M/p/@Net
The Nets in and below this Level are decendant::*/p/@Net
What I would need is a list of Nets which are in the ancestor nets AND
in the decendant nets. This nets are exactly the ones we need in the
interface.
ancestor::/M/p[@Net=descedant::*/p]/@Net does not return any net.
I feel the approach to have = betwenn to nodesets may be bad.
What is the right solution here ???
I would expect the Nets A,C and D
Thanks a lot for your help
Rolf
########################## DATA ############################
<TOP>
<H id="1">
<M id="2">
<p net="A"/>
<p net="B"/>
<p net="E"/>
</M>
<H id="3">
<M id="4">
<p net="C"/>
<p net="B"/>
</M>
<H id="5">
<M id="6">
<p net="D"/>
<p net="C"/>
</M>
<H id="7">
<M id="8">
<p net="A"/>
<p net="C"/>
</M>
</H>
</H>
<M id="9">
<p net="D"/>
<p net="A"/>
</M>
<H id="10">
<M id="11">
<p net="B"/>
<p net="E"/>
</M>
</H>
<M id="12">
<p net="E"/>
<p net="B"/>
</M>
</H>
</H>
</TOP>
may be some one has a good idea for the follwoing problem.
In the xml data below you see a kind of abstract netlist as we use it
for chip design. Where the H tag stands for a logical hierarchy level,
the M tag for a physical macro and the p tag for a pin of the macro
which has to be bound to a Net ( named by @Net).
The existing netlist is described without the Hierarchy. Hence, I must
know which nets I have to pass trough the Hierarchy interface (H
tags).
Imagine I'm on the node <H id=5>
Then all nets which are above are ancestor::*/M/p/@Net
The Nets in and below this Level are decendant::*/p/@Net
What I would need is a list of Nets which are in the ancestor nets AND
in the decendant nets. This nets are exactly the ones we need in the
interface.
ancestor::/M/p[@Net=descedant::*/p]/@Net does not return any net.
I feel the approach to have = betwenn to nodesets may be bad.
What is the right solution here ???
I would expect the Nets A,C and D
Thanks a lot for your help
Rolf
########################## DATA ############################
<TOP>
<H id="1">
<M id="2">
<p net="A"/>
<p net="B"/>
<p net="E"/>
</M>
<H id="3">
<M id="4">
<p net="C"/>
<p net="B"/>
</M>
<H id="5">
<M id="6">
<p net="D"/>
<p net="C"/>
</M>
<H id="7">
<M id="8">
<p net="A"/>
<p net="C"/>
</M>
</H>
</H>
<M id="9">
<p net="D"/>
<p net="A"/>
</M>
<H id="10">
<M id="11">
<p net="B"/>
<p net="E"/>
</M>
</H>
<M id="12">
<p net="E"/>
<p net="B"/>
</M>
</H>
</H>
</TOP>