I would like to branch my pcell code based on whether the code is running inside IC6 (OA) or IC51 (CDBA). What is the preferred, or recommended way of doing this. I have thought of a few ways, but I want to use something, which will be supported for the lifetime of both platforms. ... Thanks!
I use the following:
procedure(mydbIsOA() prog(() if(getd('dbGetDatabaseType) && dbGetDatabaseType() == "OpenAccess" then return(t) else return(nil) ) ) ;let) ;proc
This works with very old Cadence versions that don't even have dbGetDatabaseType yet defined.
We have a lot of skill code and getting all of our designs on 6.1.x will take quite some time (we don't have any parts there yet). I presented a paper at an Si2 conference about the effort we have been doing to try not to "branch" our code, but rather to make it compatible with both 5.1 and 6.1. The power point is available here: http://www.si2.org/events_dir/2006/oaconfspring2006/micron.pdf
As you can see, I presented that in 2006 and we still haven't moved any parts to OA. We have wrapper functions in our Skill that allow us to easily test each new 6.1 release while only maintaining one stream of code.
In reply to dmay:
Nice presentation Derek, thanks for sharing!
So far I've been using my custom "isOA()" function, much like what Derek suggested. My function looks like this (a little more optimized):
procedure( YYisOA() when( getd('dbGetDatabaseType) && dbGetDatabaseType() == "OpenAccess" t ))
Yes, thanks for the tip and the presentation, Derek!
Since we are offering condensed functions...
procedure(isOA() getd('dbGetDatabaseType) && dbGetDatabaseType() == "OpenAccess")
If anybody else has a function that relies on a different mechanism, please let me know. There's wisdom in a multitude of counselors. :)