Cadence® system design and verification solutions, integrated under our System Development Suite, provide the simulation, acceleration, emulation, and management capabilities.
System Development Suite Related Products A-Z
Cadence® digital design and signoff solutions provide a fast path to design closure and better predictability, helping you meet your power, performance, and area (PPA) targets.
Full-Flow Digital Solution Related Products A-Z
Cadence® custom, analog, and RF design solutions can help you save time by automating many routine tasks, from block-level and mixed-signal simulation to routing and library characterization.
Overview Related Products A-Z
Driving efficiency and accuracy in advanced packaging, system planning, and multi-fabric interoperability, Cadence® package implementation products deliver the automation and accuracy.
Cadence® PCB design solutions enable shorter, more predictable design cycles with greater integration of component design and system-level simulation for a constraint-driven flow.
An open IP platform for you to customize your app-driven SoC design.
Comprehensive solutions and methodologies.
Helping you meet your broader business goals.
A global customer support infrastructure with around-the-clock help.
24/7 Support - Cadence Online Support
Locate the latest software updates, service request, technical documentation, solutions and more in your personalized environment.
Cadence offers various software services for download. This page describes our offerings, including the Allegro FREE Physical Viewer.
The Cadence Academic Network helps build strong relationships between academia and industry, and promotes the proliferation of leading-edge technologies and methodologies at universities renowned for their engineering and design excellence.
Participate in CDNLive
A huge knowledge exchange platform for academia to network with industry. We are looking for academic speakers to talk about their research to the industry attendees at the Academic Track at CDNLive EMEA and Silicon Valley.
Come & Meet Us @ Events
A huge knowledge exchange platform for academia. We are looking for academic speakers to talk about their research to industry attendees.
Americas University Software Program
Join the 250+ qualified Americas member universities who have already incorporated Cadence EDA software into their classrooms and academic research projects.
EMEA University Software Program
In EMEA, Cadence works with EUROPRACTICE to ensure cost-effective availability of our extensive electronic design automation (EDA) tools for non-commercial activities.
Apply Now For Jobs
If you are a recent college graduate or a student looking for internship. Visit our exclusive job search page for interns and recent college graduate jobs.
Cadence is a Great Place to do great work
Learn more about our internship program and visit our careers page to do meaningful work and make a great impact.
Get the most out of your investment in Cadence technologies through a wide range of training offerings.
Overview All Courses Asia Pacific EMEANorth America
Instructor-led training [ILT] are live classes that are offered in our state-of-the-art classrooms at our worldwide training centers, at your site, or as a Virtual classroom.
Online Training is delivered over the web to let you proceed at your own pace, anytime and anywhere.
Exchange ideas, news, technical information, and best practices.
The community is open to everyone, and to provide the most value, we require participants to follow our Community Guidelines that facilitate a quality exchange of ideas and information.
It's not all about the technlogy. Here we exchange ideas on the Cadence Academic Network and other subjects of general interest.
Cadence is a leading provider of system design tools, software, IP, and services.
I have many layout cells in my library in which I need to do two changes
You have a lot of questions, so I highly recommend you read some Skill documentation. I am including some "untested" skill code. It should be almost ready to run. You should take a look at what I have done and look at some documentation to make sure you understand it. Your description of what you wanted is somewhat vague. It is unclear to me if "xxx", "yyy" and "zzz" are literal, or if wildcard matching is necessary. I assumed wildcards since that is the more complicated scenario. If the names are literal, then a simple == comparison is all that is needed in the check rather than a rexMatchp. Also, if it is literal, then you could skip the rexReplace and rexCompile commands altogether and do simple string assignments.
I broke the code into a routine that runs on a cellview. This makes code testing easier. Run the "changeCell" routine on the current open layout cellview to make sure your labels and cellview are change appropriately. Since the save takes place in the calling routine, you can discard your edits, adjust the code and retest. If you change the value of the badLibrary in the optional arguments to whatever you are referring to in #3, then you can actually run "changeCell()" with no arguments and it will get the current open cellview and use the bad library name that you wish to check for.
;You must define myLibary and badRefLibrary
procedure(doAllCells(myLibrary badRefLibrary) let((libId cv) libId = ddGetObj(myLibrary) foreach(cell libId~>cells~>name when(ddGetObj(myLibrary cell "layout") printf("Working on cell %s\n" cell) cv = dbOpenCellViewByType(myLibrary cell "layout" nil "a") changeCellView(cv badRefLibrary) dbSave(cv) dbClose(cv) ) ) ) ;let) ;proc
procedure(changeCellView(@optional (cv geGetEditCellView()) (badRefLibrary "myBadLibrary")) let((labels newLabel insts cellName newCellName badRefs) labels = setof(x cv~>shapes x~>objType=="label") rexCompile("AB") foreach(lbl labels ;If only replacing labels that are currently m1 then use this when statement when(lbl~>lpp == list("m1" "drawing") newLabel = rexReplace(lbl~>theLabel "CD" 0) lbl~>theLabel = newLabel ) ;OR if wanting to convert the label to m1, use this lbl~>lpp = list("m1" "drawing") )
insts = setof(x cv~>instances x~>libName == "YYYY" && rexMatchp("AB" x~>cellName)) foreach(inst insts cellName = inst~>cellName rexCompile("yyy") newCellName = rexReplace(cellName "zzz" 0) rexCompile("AB") newCellName = rexReplace(newCellName "CD" 0) leReplaceAnyInstMaster(inst "ZZZZ" newCellName nil) )
;You must specify badRefLibrary badRefs = setof(x cv~>instances x~>libName == badRefLibrary) when(badRefs foreach(r badRefs printf("**ERROR: Found reference from library %s in %s\n" badRefLibrary r~>cellName) ) ) ) ;let) ;proc
In reply to dmay:
Thanks Derek. The examples provided by you have provided me clarity to proceed. But I am having some syntax problem while using the foreach ...
procedure(checkWireCell(libname wireCellList) let((outfNameError outfError error libid cellList cellId cell cv inst) libid=ddGetObj(libname) foreach(cell wireCellList if(member("layout" dbAllCellViews(libid cell~>name)) then cv=dbOpenCellViewByType(libname cell~>name "layout" nil "r") if(length(cv~>instances)!=0 foreach(inst cv~>instances if((inst~>libName!=libname && inst~>libName!="ALL_PARTS" ) then fprintf(outfError "\nWARNING: INSTANCE %s Of Cell %s points to a different Library (%s)" inst~>cellName cell~>name inst~>libName) error = 1 ) ; if ) ; foreach ) ; if dbClose(cv) else fprintf(outfError "\nWARNING: Cell %s does not contain a layout view" cell~>name) error = 1 ) ) ) ; let) ; proc
In reply to AnuJoamon:
0 am trying the point 3 first, to check whether the instance comes from any other library. I I add the libray names in the if condition, I can get the thing going, but got stuck with the foreach syntax ... it says
*Error* foreach: second argument must be a list - "list"
Your second argument needs to be in this form: list("a" "b" "c") or list(obj1 obj2 obj3)
In your example, wireCellList must be a list of items, even if it is a list of only one item. The second foreach in the code you posted is using cv~>instances which will either be nil (a valid list), or a list of object ids like: list(db:421865904 db:421865868 db:421865832 db:421865796)
If you have a string that has multiple items separated by a space, you can convert this to a list using parseString.
From the error, it looks like you are passing in the string "list". This is what needs to change.
I'd like to make one suggestion about your piece of code. You have two if statements without a then clause. This syntax is perfectly legal, but will only work if there is only one statement within the if. If you add a second statement, it becomes an implied else statement unless you add a then. I find that it is a clearer coding practice to use when if my if clause is not going to have an else.
if(a==1 doThis())if(a==1 then doThis())
All three of the above will do the same thing, but the when statement is the most clear and can avoid the following coding mistake which is difficult to catch:
if(a==1 doThis() doThisAlso())
The above statement is actually an implied if/else. The doThisAlso() will only be called if a does not equal 1, unless you add the then to the syntax. I will use the above statement in my code only if it is clear in the context of what I am doing so I avoid confusing anyone who edits my code.
if(a==1 b = t b = nil)
Notice that it is clear this is two different actions since I wouldn't set b to t and then set it to nil.
Just my opinion.
And a good opinion it is, Derek.
The use of the if statement without a then or else is a common source of costly errors. I had a customer who modified such a statement by putting in a third statement which turns it from an if/then/else to an if/then. They were desparate as it was holding up a tapeout.
After I found the problem and sent the fixed code and a very big bill, they complained that all I added was two words, then and else and should not pay hunderds of dollars for two words. The bill was sent back to them listing $.50 cents per word and the rest for the knowledge where to place them. They paid.