We are trying to asses how many layout cells in our current design library have constraints.
I am trying to write a skill code to open every layout cell in my design library and check if it has constraints.
What I am doing :
cv=dbOpenCellViewByType(libName cellName "layout")
cache = ciCacheFind(cv)
when(cache~>constraints printf("Found constraints\n")
But unfortunately ciCacheFind(cv) can't find anythig because I am opening cell in the memory(dbOpen) without building constraints cache.
I was told that it works only when you physically open layout XL window.But in this case it is painfull to do foreach(cell library~>cells geOpen(...)).
Painfull because I need to open Virtuoso XL and I didn't find any other way than to use deInstallApp(getCurrentWindow() "Virtuoso XL") function.And deInstallApp(getCurrentWindow() "Virtuoso XL") fails if layout doesn't have corresponding schematic(I don't need schematic to open VXL manually if I choose too).Painfull because it opens 1000+ windows.I can purge them, but here is another pain.When I do hiGetWindowList() I am getting list of windows including CIW and others which I can't purge.Trying to purge CIW gives an error.
I was wondering if somebody knows how to check constraint existance in more easy way.
It looks like a simple skill, but not a simple way to implement.
Thanks a lot,
Use ciCacheGet() instead of ciCacheFind().
Works fine.The only disadvantage :creates constraint view if it missing.I don't want to add anything to my library,just want to check if schematic or layout have constraints.
I submitted SR to discuss possible fix for ciCacheFind() function.
ciCacheGet() shouldn't create a constraint view AFAIK - for a layout view at least. For a schematic view, it does though. However, that will get auto-removed if you do a ciCachePurge() afterwards.
The point is that ciCacheFind is supposed to return the cache if it already exists in memory - whereas ciCacheGet will get hold of one or create one if it is not in memory. There has to be somewhere to store it - it's either in the layout view or the constraint view if it's a schematic. So the functions are doing the right thing, in my opinion. ciCacheFind should not return a cache if there isn't one already in memory - it's a bit like comparing dbFindOpenCellView() with dbOpenCellViewByType() - one returns the cvId if it's already open, and the other actually opens it.
However, there doesn't seem to be an API to ask for whether there are constraints available or not - at least not without creating the cache first.