Skip to content

Commit ad4b1d3

Browse files
authored
[FIRRTL][NFC] Use underscores in documentation. (#6860)
In the only supported mechanism for using intrinsics, the name must be an identifier so just document that. Periods are nice, we can adjust the FIRRTL grammar / syntax to allow this in the future if we miss them.
1 parent 5c10769 commit ad4b1d3

File tree

1 file changed

+11
-19
lines changed

1 file changed

+11
-19
lines changed

docs/Dialects/FIRRTL/FIRRTLIntrinsics.md

+11-19
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,7 @@
33
Intrinsics provide an implementation-specific way to extend the FIRRTL language
44
with new operations.
55

6-
Intrinsics are currently implemented as annotated external modules. We expect
7-
that native FIRRTL support for intrinsics will be added to the language.
6+
Intrinsics are currently implemented as `intmodule`'s.
87

98
## Motivation
109

@@ -15,15 +14,8 @@ and type checking.
1514

1615
## Supported Intrinsics
1716

18-
Annotations here are written in their JSON format. A "reference target"
19-
indicates that the annotation could target any object in the hierarchy,
20-
although there may be further restrictions in the annotation.
2117

22-
We also accept the `intmodule` version of any of these annotation strings used
23-
as the intrinsic name. To work with the requirement of the intrinsic name being
24-
an identifier, replace any period is with an underscore in the intrinsic name.
25-
26-
### circt.sizeof
18+
### circt_sizeof
2719

2820
Returns the size of a type. The input port is not read from and may be any
2921
type, including uninferred types.
@@ -36,7 +28,7 @@ type, including uninferred types.
3628
| i | input | Any | value whose type is to be returned |
3729
| size | output | UInt<32> | Size of type of i |
3830

39-
### circt.isX
31+
### circt_isX
4032

4133
Tests if the value is a literal `x`. FIRRTL doesn't have a notion of 'x per-se,
4234
but x can come in to the system from external modules and from SV constructs.
@@ -50,7 +42,7 @@ Verification constructs need to explicitly test for 'x.
5042
| i | input | Any | value test |
5143
| found | output | UInt<1> | i is `x` |
5244

53-
### circt.plusargs.value
45+
### circt_plusargs_value
5446

5547
Tests and extracts a value from simulator command line options with SystemVerilog
5648
`$value$plusargs`. This is described in SystemVerilog 2012 section 21.6.
@@ -67,7 +59,7 @@ type of the result.
6759
| found | output | UInt<1> | found in args |
6860
| result | output | AnyType | found in args |
6961

70-
### circt.plusargs.test
62+
### circt_plusargs_test
7163

7264
Tests simulator command line options with SystemVerilog `$test$plusargs`. This
7365
is described in SystemVerilog 2012 section 21.6.
@@ -80,7 +72,7 @@ is described in SystemVerilog 2012 section 21.6.
8072
| ---------- | --------- | -------- | ----------------------------------- |
8173
| found | output | UInt<1> | found in args |
8274

83-
### circt.clock_gate
75+
### circt_clock_gate
8476

8577
Enables and disables a clock safely, without glitches, based on a boolean enable value. If the enable input is 1, the output clock produced by the clock gate is identical to the input clock. If the enable input is 0, the output clock is a constant zero.
8678

@@ -95,7 +87,7 @@ The enable input is sampled at the rising edge of the input clock; any changes o
9587
| en | input | UInt<1> | enable for the output clock |
9688
| out | output | Clock | gated output clock |
9789

98-
### circt.chisel_assert
90+
### circt_chisel_assert
9991

10092
Generate a clocked SV assert statement, with optional formatted error message.
10193

@@ -118,7 +110,7 @@ wire _GEN = ~enable | cond;
118110
assert__label: assert property (@(posedge clock) _GEN) else $error("message");
119111
```
120112

121-
### circt.chisel_ifelsefatal
113+
### circt_chisel_ifelsefatal
122114

123115
Generate a particular Verilog sequence that's similar to an assertion.
124116

@@ -152,7 +144,7 @@ Example SV output:
152144
`endif // not def SYNTHESIS
153145
```
154146

155-
### circt.chisel_assume
147+
### circt_chisel_assume
156148

157149
Generate a clocked SV assume statement, with optional formatted error message.
158150

@@ -175,7 +167,7 @@ Example SV output:
175167
assume__label: assume property (@(posedge clock) ~enable | cond) else $error("message");
176168
```
177169

178-
### circt.chisel_cover
170+
### circt_chisel_cover
179171

180172
Generate a clocked SV cover statement.
181173

@@ -195,7 +187,7 @@ Example SV output:
195187
cover__label: cover property (@(posedge clock) enable & cond);
196188
```
197189

198-
### circt.unclocked_assume
190+
### circt_unclocked_assume
199191

200192
Generate a SV assume statement whose predicate is used in a sensitivity list of the enclosing always block.
201193

0 commit comments

Comments
 (0)