• Skip to main content
  • Skip to search
  • Skip to footer
Cadence Home
  • This search text may be transcribed, used, stored, or accessed by our third-party service providers per our Cookie Policy and Privacy Policy.

  1. Blogs
  2. Digital Design
  3. How To: Purge Interactive Constraints in MMMC Mode
BobD
BobD

Community Member

Blog Activity
Options
  • Subscribe by email
  • More
  • Cancel
CDNS - RequestDemo

Have a question? Need more information?

Contact Us
timing constraints
Digital Implementation
mmmc
Encounter Digital Implementation System 8.1
tcl

How To: Purge Interactive Constraints in MMMC Mode

23 Oct 2009 • 3 minute read

These tips are applicable to the Encounter Digital Implementation System.

Back in the good old days, I remember asking designers at the beginning of a silicon virtual prototyping evaluation "Where is your timing constraints file?"  Note the singular form of the word file- was it really that simple?  Didn't seem so easy at the time.  While the complexity of timing constraints in terms of their content has increased, managing the actual files that contain the constraints, how they apply to multiple constraint modes in the tool, and dealing with incremental additions to the active constraint set is increasingly complex.

A scenario came up with a customer I was working with recently that led to a solution that I thought would be good to share.  The designer was using MMMC (multi-mode/multi-corner) timing analysis, and wrote a script to query the timing graph, add timing constraints that would alter the timing graph, and then write out a list of ECOs that needed to be made to the design based on what his script found.  He wanted a way to clear out the interactive timing constraints his script used while retaining the timing constraints associated with each of the views as defined in the viewDefinition.tcl file.

Interactive constraints are simply the constraints entered at the command line (or sourced in a file) that aren't part of the files associated with the create_constraint_mode command:

create_constraint_mode -name common_constraint_mode -sdc_files testcase.sdc

When we're in MMMC mode, and we want to apply a timing constraint at the command line, we need to tell the tool which of the constraint modes we'd like the interactively-entered constraints to apply to:

encounter 2> set_false_path -from i0 -to i1
**ERROR: (TCLCMD-1048): There is no interactive constraint mode. The constraint will be ignored. Please use 'set_interactive_constraint_modes' command.

Tip #1: When I get this message, I find the quickest way to get past it (and ask the tool to consider the constraints I give it for all active views) is to apply the constraints to all the active constraint modes.  This can be time consuming if you need to recall all of the names of the constraint modes via cut and paste, so we can retrieve these modes programmatically like this:

encounter 6> set_interactive_constraint_modes [all_constraint_modes -active]

Now the tool will accept the interactive constraint and apply it to all the active views. My simple design only has 2 registers so if I false_path -from/-to the registers I'll see no constrained paths:

encounter 7> set_false_path -from i0 -to i1                                 
encounter 8> report_timing
No constrained timing paths found.

Tip #2: So now if I wanted to ask the tool to forget this interactive constraint (the false_path) and revert back to the sdc files associated with the constraint_mode, here's how I'd do it.  We can make use of the update_constraint_mode command (which is primarily used to append/delete sdc files to the current list and replaces the unloadTimingCon command when not in MMMC mode).  Specifically, we'll leverage a nuance regarding whether interactive constraints are retained or purged when you reset the sdc files:

encounter 11> update_constraint_mode -name common_constraint_mode -sdc_files testcase.sdc
**WARN: (TCLCMD-1122):  The update_constraint_mode command will reset all interactive constraints for all views. Any interactive constraints entered before this command will be lost.

Let's confirm that the design is again timed as we'd expect it to be:

encounter 12> report_timing
Path 1: MET Setup Check with Pin i1/CK
Endpoint:   i1/D (v) checked with  leading edge of 'clk'
Beginpoint: i0/Q (v) triggered by  leading edge of 'clk'

If we wanted to use this approach to reset the sdc files associated with all of the active views, we could do that.  But again, this could be laborious to keep track of in contemporary designs were we have dozens of modes and even more sdc files.

Tip #3: A better way would be to retrieve the sdc files associated with all of the active views and re-point each constraint mode to the current sdc files (thus purging the interactive constraints as previously described).  Here's how to do it:

foreach constraint_mode [all_constraint_modes -active] {
  set constraint_files [get_constraint_mode $constraint_mode -sdc_files]
  update_constraint_mode -name $constraint_mode -sdc_files $constraint_files
}

Tip 4: To refine things a bit, we could wrap this up into a procedure that we could call any time we wanted to purge the interactive constraints we've entered.  We could share this procedure across other designers we work with:

proc user_purge_interactive_constraints {} {
  foreach constraint_mode [all_constraint_modes -active] {
    set constraint_files [get_constraint_mode $constraint_mode -sdc_files]
    update_constraint_mode -name $constraint_mode -sdc_files $constraint_files
  }
}

I hope this was generally useful in understanding how interactive constraints work in MMMC mode, and in describing an efficient way to manage interactive constraints.


Bob Dwyer

 


CDNS - RequestDemo

Try Cadence Software for your next design!

Free Trials

© 2025 Cadence Design Systems, Inc. All Rights Reserved.

  • Terms of Use
  • Privacy
  • Cookie Policy
  • US Trademarks
  • Do Not Sell or Share My Personal Information