Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
config:generic [2025/05/27 18:02] – [Specification directives] rajit | config:generic [2025/05/27 18:12] (current) – [Attributes] rajit | ||
---|---|---|---|
Line 135: | Line 135: | ||
==== Attributes ==== | ==== Attributes ==== | ||
+ | ACT supports attributes on both instances and production rules. An ACT instance can be assigned an attribute in the following way: | ||
+ | |||
+ | <code act> | ||
+ | bool v @ [attr=0]; | ||
+ | bool w; | ||
+ | w @ [attr=5]; | ||
+ | </ | ||
+ | In these two examples, the signal '' | ||
+ | |||
+ | < | ||
+ | begin act | ||
+ | string_table instance_attr " | ||
+ | end | ||
+ | </ | ||
+ | |||
+ | This specifies three instance attributes: '' | ||
+ | * The first component ''// | ||
+ | * The second component ''// | ||
+ | * '' | ||
+ | * '' | ||
+ | * '' | ||
+ | * '' | ||
+ | * '' | ||
+ | * ''&'': | ||
+ | |||
+ | A second set of attributes can be specified per-production rule. | ||
+ | |||
+ | < | ||
+ | string_table prs_attr " | ||
+ | </ | ||
+ | The syntax for these is the same, except the attributes are applied per production rule. These attributes are interpreted by the [[tools: | ||
+ | |||
+ | |||
+ | ==== Verilog global signal prefix ==== | ||
+ | |||
+ | Since ACT can refer to global signals, this functionality may be needed when converting ACT files into Verilog netlists. Different systems may have different ways that a user can access signals | ||
+ | |||
+ | < | ||
+ | begin act | ||
+ | string global_signal_prefix " | ||
+ | end | ||
+ | </ | ||
+ | |||
+ | This specifies that a global signal '' | ||