<sf-slack>
<timo.callahan> I seem to have a workaround to the above issue. But it's still puzzling. The expression is fine; I confirm it's being used in other designs and works correctly. Somehow in the context of my new design, lxml.etree.xpath doesn't like it. But I have an alternate way of finding the XML nodes that seems to work.
Bertl is now known as Bertl_zZ
citypw has quit [Ping timeout: 240 seconds]
az0re has joined #symbiflow
_whitelogger has joined #symbiflow
_whitelogger has joined #symbiflow
citypw has joined #symbiflow
kgugala__ has joined #symbiflow
kgugala_ has quit [Ping timeout: 258 seconds]
andrewb1999 has quit [Ping timeout: 240 seconds]
Bill86 has joined #symbiflow
OmniMancer1 has joined #symbiflow
OmniMancer has quit [Ping timeout: 246 seconds]
OmniMancer1 has quit [Read error: Connection reset by peer]
OmniMancer has joined #symbiflow
<sf-slack>
<timo.callahan> My theory is that there are too many matches to the xpath query. My workaround is to break up the search by subtree.
yeti has quit [Read error: Connection timed out]
yeti has joined #symbiflow
<sf-slack>
<mkurc> @timo.callahan Me and @rwinkler encountered that problem some time ago. It looks like a bug / shortcoming in the libxml XPath module. When an XML file is big enough it runs out of memory (somehow). It that the Python wrapper interprets this error incorrectly and throws the exception that you see.
lopsided98 has quit [Quit: No Ping reply in 180 seconds.]
lopsided98 has joined #symbiflow
<sf-slack>
<timo.callahan> Thanks @mkurc, that is what it was looking like to me. I solved it by changing code like this: ```for block in net_root.xpath( "//block[@instance='inpad[0]'] | //block[@instance='outpad[0]']" ):```
kgugala__ has quit [Read error: Connection reset by peer]
<sf-slack>
<timo.callahan> to code like this: ``` for tblock in net_root.xpath("./block"): for ublock in tblock.xpath("./block"): for block in ublock.xpath(".//block[@instance='outpad[0]'] | .//block[@instance='inpad[0]']"):```
kgugala has joined #symbiflow
<sf-slack>
<timo.callahan> so that the big "//block" queries are limited to a subtree. Just one level of break-up wasn't sufficient, so I had to break it up going down a couple of levels.
<sf-slack>
<timo.callahan> And yes, the misleading error message caused me to look in the wrong direction for quite a while...
<sf-slack>
<timo.callahan> Ah, I see you have a different workaround suggested in the comment above. Perhaps that approach is more direct and easier to understand.
<sf-slack>
<timo.callahan> I encountered an analogous issue in vpr_place_constraints.py at the line: ```for attr in net_root.xpath("//attribute[@name='LOC']"):```
<sf-slack>
<mkurc> Mhm, that makes sense. BTW how big is the .net file? The one for OpenTitan, when I've encountered the error, was roughly above 350MB.
<sf-slack>
<mkurc> Another approach would be to completely get rid of XPath and just loop over "block" tags in Python selecting ones with the correct instance name pattern.
Bill86 has quit [Ping timeout: 245 seconds]
madushan1000[m] has quit [Quit: Idle for 30+ days]
hzeller[m] has quit [Quit: Idle for 30+ days]
Bertl_zZ is now known as Bertl
andrewb1999 has joined #symbiflow
<sf-slack>
<timo.callahan> My top.net is only 208M.
<sf-slack>
<timo.callahan> Yeah, getting rid of xPath is probably the safest. With my workaround anyway using xpath on subtrees, I can't guarantee we won't encounter the same issue at some point down the road if one of the subtrees is very large. Do we already have code for traversing XML?
gsmecher has joined #symbiflow
shadtorrie has joined #symbiflow
citypw has quit [Ping timeout: 240 seconds]
shadtorrie has quit [Remote host closed the connection]
OmniMancer has quit [Quit: Leaving.]
OmniMancer has joined #symbiflow
OmniMancer has quit [Client Quit]
andrewb1999 has quit [Ping timeout: 272 seconds]
kgugala_ has joined #symbiflow
kgugala has quit [Ping timeout: 260 seconds]
kgugala_ has quit [Read error: Connection reset by peer]
kgugala has joined #symbiflow
kgugala_ has joined #symbiflow
kgugala has quit [Ping timeout: 272 seconds]
lopsided98 has quit [Remote host closed the connection]
lopsided98 has joined #symbiflow
kgugala has joined #symbiflow
kgugala_ has quit [Ping timeout: 272 seconds]
kgugala_ has joined #symbiflow
kgugala has quit [Ping timeout: 256 seconds]
kgugala has joined #symbiflow
kgugala_ has quit [Ping timeout: 258 seconds]
QDX45 has quit [Remote host closed the connection]
kgugala_ has joined #symbiflow
kgugala_ has quit [Read error: Connection reset by peer]
kgugala_ has joined #symbiflow
kgugala has quit [Ping timeout: 246 seconds]
miek has quit [Quit: miek]
andrewb1999 has joined #symbiflow
<mithro>
@timo.callahan / andrewb1999: I pushed the non-SDF changes to prjxray-db