Next: , Previous: PRS Loop Expressions, Up: PRS


11.4 Rule Macros

Please read this section carefully.

Macros in PRS may be shorthand for other expanded rules or they may mean something different that isn't expressible in the PRS base language. CAST provided some built-in macros into its PRS language, which have been relocated into HAC's spec language (Spec Directives). For example, given ‘exclhi(x,y)’ in CAST-PRS (not to be confused with CAST-spec's exclhi), the result of cflat would direct prsim to force nodes {x,y} to be exclusive high at all times. Namely the exclhi, excllo PRS macros have been renamed as mk_exclhi and mk_excllo spec directives. Q: were there any other PRS macros in CAST?

HAC has added support for emulating unidirectional pass-gates: passn and passp. The interpretation of these macros is tool-dependent.

Developers may define their own PRS macros by following the examples in the source code. Generalized macros also support a syntax for taking parameter values as arguments in addition to instance references. (We refrain from getting into that for this document.)