AdvancedPrimeTime guide question 2 of 65Source PDF page 3

Explain the precedence interaction when an explicit -sms_scenarios option and an active push_sms_scenario context both apply to a command.

From PDVerse PrimeTime STA Interview Guide · pdVerse Mentor Guide

Ten-second Interview Answer

Explicit references have the highest precedence, so the command's own -sms_scenarios wins and the pushed context is ignored entirely for that command. get_current_sms_scenario still reports the pushed context, but it has no effect on the explicitly scoped command.

Complete Technical Explanation

There are two ways a scenario reaches a command: explicitly, as -sms_scenarios on the command itself, or implicitly, from the surrounding context - including a context established by push_sms_scenario . The precedence rule is that explicit references sit at the top and implicit context references sit below them. When both apply, the explicit option on the command wins and the pushed context is completely ignored for that command. Not merged with it, not intersected - ignored. This is deliberate, and it follows the same principle you see throughout constraint handling: the closest, most specific specification governs. A pushed context is a broad statement about a region of your script; an option typed on one command is a narrow statement about that command. When the two disagree, the narrower one is what the author most likely meant. One detail catches people during debug. get_current_sms_scenario continues to report the pushed context, because that query is describing the context stack, not the scoping decision any particular command made. So you can be inside a pushed context, query it, get the pushed scenario back, and still have the command on the next line operating under an entirely different scenario. That is not an inconsistency - the two are answering different questions. If you want to know what scoped a command, look at the command, not at the context query.

In Pd / Signoff

This matters when you wrap a shared constraint procedure in push_sms_scenario to retarget it. Any command inside that procedure carrying its own -sms_scenarios will ignore your push, so the retargeting silently only affects part of the procedure. Grep the procedure body for explicit -sms_scenarios before assuming a pushed context governs all of it.

Common Trap

Expecting a pushed context to override or combine with a command's explicit -sms_scenarios, or using get_current_sms_scenario as evidence of what scoped a command. The query reports the pushed context even when the command ignored it, which makes the debug trail look consistent while the scoping is not.

Expect Next

Given that explicit options override a pushed context, how would you write a reusable constraint procedure whose scenario scoping the caller can actually control?

Topic And Primetime Commands

SMVA / SMVA Reporting. get_current_sms_scenario
Original guide diagramAn explicit scenario list beats an active push

Keep building interview depth

Continue practising STA

Continue learning free

Get a practical low-power chapter

Receive the existing “Low Power and Multivoltage Fundamentals” PDF chapter and its download link by email.