A macro is a container element and is the encapsulation mechanism of automata networks. Macros are intended to encourage hierarchical design and facilitate reuse and sharing of useful designs among the development community.
Macros can be thought of as user-defined resources within an automata network. Like the other ANML elements, macros may accept inputs and may produce outputs. The function they perform is determined by a designer through the connection of the internal elements to each other and to other elements within the automata network outside the macro definition.
A macro is used within an automata network by instantiating it as a macro reference. A macro contains one syntax for creating macro definitions and another for creating macro references.
A macro definition is the ANML statements that describe the content of the macro and the interface to that macro. A macro definition does not consume any resources in the design until it is instantiated; it only provides the description of the hardware and the connection ports that will be used by a macro instance.
A macro reference is the unique identifier associated with each instance of a macro. The reference thus becomes the one and only actual physical realization of the macro in the automata network. This reference provides a way for other network resources to address this specific macro instantiation.
Instantiating a Macro
Instantiation involves taking a macro definition and assigning specific automata network elements to implement that macro definition. A macro definition may be instantiated multiple times within an automata network. Each instantiation is distinct, consumes its own resources, and has its own identifier.