Fix for assertion error when expanding macro.
[iverilog.git] / attributes.txt
blobed8280196a023eeeca15411eb7057385f86a94aa
2 ATTRIBUTE NAMING CONVENTIONS
4 Attributes that are specific to Icarus Verilog, and are intended to be
5 of use to programmers, start with the prefix "ivl_".
7 Attributes with the "_ivl_" prefix are set aside for internal
8 use. They may be generated internally by the compiler. They need not
9 be documented here.
11 ATTRIBUTES TO CONTROL SYNTHESIS
13 The following is a summary of Verilog attributes that Icarus Verilog
14 understands within Verilog source files to control synthesis
15 behavior. This section documents generic synthesis attributes. For
16 target specific attributes, see target specific documentation.
18 These attributes only effect the behavior of the synthesizer. For
19 example, the ivl_combinational will not generate an error message
20 if the Verilog is being compiled for simulation. (It may generate a
21 warning.)
24 * Attributes for "always" and "initial" statements
26 (* ivl_combinational *)
28     This attribute tells the compiler that the statement models
29     combinational logic. If the compiler finds that it cannot make
30     combinational logic out of a marked always statement, it will
31     report an error.
33     This attribute can be used to prevent accidentally inferring
34     latches or flip-flops where the user intended combinational
35     logic.
37 (* ivl_synthesis_on *)
39     This attribute tells the compiler that the marked always statement
40     is synthesizable. The compiler will attempt to synthesize the
41     code in the marked "always" statement. If it cannot in any way
42     synthesize it, then it will report an error.
44 (* ivl_synthesis_off *)
46     If this value is attached to an "always" statement, then the
47     compiler will *not* synthesize the "always" statement. This can be
48     used, for example, to mark embedded test bench code.
51 * Attributes for modules
53 (* ivl_synthesis_cell *)
55     If this value is attached to a module during synthesis, that
56     module will be considered a target architecture primitive, and
57     its interior will not be synthesized further.  The module can
58     therefore hold a model for simulation purposes.
61 * Attributes for signals (wire/reg/integer/tri/etc.)
63 (* PAD = "<pad assignment list>" *)
65     If this attribute is attached to a signal that happens to be a
66     root module port, then targets that support it will use the string
67     value as a list of pin assignments for the port/signal. The format
68     is a comma separated list of location tokens, with the format of
69     the token itself defined by the back-end tools in use.
71 * Other Attributes
73 [ none defined yet ]
76 MISC
78 (* _ivl_schedule_push *)
80     If this attribute is attached to a thread object (always or
81     initial statement) then the vvp code generator will generate code
82     that causes the scheduler to push this thread at compile time. The
83     compiler may internally add this attribute to always statements if
84     it detects that it is combinational. This helps resolve time-0
85     races.