Skip to content

Commit ebe1694

Browse files
committed
RFC #77: Final touches.
1 parent 5eaa985 commit ebe1694

File tree

1 file changed

+9
-11
lines changed

1 file changed

+9
-11
lines changed

text/0077-stream-port-name-conventions.md

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
- Start Date: (fill in with date at which the RFC is merged, YYYY-MM-DD)
1+
- Start Date: 2025-06-09
22
- RFC PR: [amaranth-lang/rfcs#77](https://github.com/amaranth-lang/rfcs/pull/77)
3-
- Amaranth Issue: [amaranth-lang/amaranth#0000](https://github.com/amaranth-lang/amaranth/issues/0000)
3+
- Amaranth Issue: [amaranth-lang/amaranth#1615](https://github.com/amaranth-lang/amaranth/issues/1615)
44

55
# Stream port name conventions
66

@@ -17,16 +17,19 @@ Having a name convention for stream ports makes stream components easier to work
1717
```
1818
pipeline = [component_a, component_b, component_c]
1919
for upstream, downstream in itertools.pairwise(pipeline):
20-
wiring.connect(m, upstream.output, downstream.input)
20+
wiring.connect(m, upstream.o, downstream.i)
2121
```
2222

2323
## Guide- and reference-level explanation
2424
[guide-level-explanation]: #guide-level-explanation
2525

2626
Document the following conventions:
2727

28-
- When a component has a single primary input stream, the port should be named *TBD*.
29-
- When a component has a single primary output stream, the port should be named *TBD*.
28+
- Whenever the name of a stream member of the component interface includes an indication of its direction, the indication must match one of the following forms:
29+
- For `In` members, either the complete name is `i` (for components that have one primary input), or the name must start with `i_` (for more complex components).
30+
- For `Out` members, either the complete name is `o` (for components that have one primary input), or the name must start with `o_` (for more complex components).
31+
32+
- It is also acceptable to have a name that doesn't indicate directionality explicitly, e.g. `requests` or `packets`.
3033

3134
Update existing stream components to follow these conventions.
3235

@@ -48,12 +51,7 @@ Stream ports in LiteX components are conventionally named `sink` and `source`.
4851
## Unresolved questions
4952
[unresolved-questions]: #unresolved-questions
5053

51-
- Which exact names should we settle on?
52-
- `i` / `o`
53-
- `input` / `output`
54-
- `w_stream` / `r_stream`
55-
- `sink` / `source`
56-
- Others?
54+
None.
5755

5856
## Future possibilities
5957
[future-possibilities]: #future-possibilities

0 commit comments

Comments
 (0)