Default Module Attributes

Default Module Attributes:

You can advertise the relevant attributes/parameters for a module (or super-node). The list of attribute names, proper spellings, and optionally - their suggested default settings will be viewable from the GUI. The default attribute list is attached to the definition of a module-type (diagram). Therefore, it is specified once, and becomes visible for all instances. Default module attributes work identically for hardware graphs and for DFG diagrams.

A module's default attributes are viewable in the GUI by selecting a module instance, then clicking Properties / Attributes / Default Attributes.

Note 1: Presently, default attributes for modules are used only for advertising/prompting relevant attribute names for users of the GUI. They are ignored by the CSIM preprocessor and SCHEDULER. Therefore, they are not inherited by the underlying objects of a module, unless you select them and press Ok. (Future plans are to inherit them in the down-stream tools.)

Note 2: Presently, there is no method to create default module attributes from the GUI. They must be added by a text editor. (Future plans are to provide GUI features for creating them.)

The default attribute declaration(s) should be placed near the top of the module definition block; preferably between the PORT_LIST and the NODE_INSTANCE lists.
The syntax is as follows:

<DEFAULT_ATTRIBUTE>   {attribute}   </DEFAULT_ATTRIBUTE>

For example:

   <DEFINE_MODULE> xyz <child>
     <PORT_LIST> in1, in2, out </PORT_LIST>
     <DEFAULT_ATTRIBUTE> clock_speed = 300 </DEFAULT_ATTRIBUTE>
     <DEFAULT_ATTRIBUTE> parity </DEFAULT_ATTRIBUTE>

     <DEFINE_NODE_INSTANCES>
	...
     </DEFINE_NODE_INSTANCES>

   </DEFINE_MODULE>


Example for DFG Modules:
   <DEFINE_GRAPH> xyz <child>
     <PORT_LIST> in1, in2, out </PORT_LIST>
     <DEFAULT_ATTRIBUTE> clock_speed = 300 </DEFAULT_ATTRIBUTE>
     <DEFAULT_ATTRIBUTE> parity </DEFAULT_ATTRIBUTE>

     <DEFINE_NODE_INSTANCES>
        ...
     </DEFINE_NODE_INSTANCES>

   </DEFINE_GRAPH>