Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit221323d

Browse files
authored
RFC#78: "Internal I/O ports"
2 parents277281d +1513e33 commit221323d

File tree

1 file changed

+69
-0
lines changed

1 file changed

+69
-0
lines changed

‎text/0078-internal-port.md‎

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
- Start Date: 2025-06-02
2+
- RFC PR:[amaranth-lang/rfcs#78](https://github.com/amaranth-lang/rfcs/pull/78)
3+
- Amaranth Issue:[amaranth-lang/amaranth#1639](https://github.com/amaranth-lang/amaranth/issues/1639)
4+
5+
#Internal I/O ports
6+
7+
##Summary
8+
[summary]:#summary
9+
10+
`SimulationPort` is renamed to`InternalPort`, and using it outside of simulation is allowed. It allows for connecting I/O port-expecting components to internal signals instead of external I/O ports.
11+
12+
##Motivation
13+
[motivation]:#motivation
14+
15+
[RFC 55](https://amaranth-lang.org/rfcs/0055-lib-io.html) has made way for a variety of reusable I/O components, capable of attaching to arbitrary`PortLike`s. However, their reusability is limitted by requiring external ports for all of their interface. This limitation comes up in two scenerios:
16+
17+
1. The component is used internally, to interface with other gateware within the same design.
18+
2. One of the optional pins of the I/O interface is unused and should be discarded (for outputs), or tied to a constant value (for inputs).
19+
20+
Having a way to connect such gateware to internal signals resolves both issues. Since we already have such capability in simulation, we only need to extend it to allow synthesis usage.
21+
22+
##Guide-level and reference-level explanation
23+
[guide-level-explanation]:#guide-level-explanation
24+
25+
`lib.io.SimulationPort` is renamed to`lib.io.InternalPort`. The old name is deprecated and will be removed in Amaranth 0.7.
26+
27+
Use of`InternalPort` is allowed with`lib.io.Buffer` and`lib.io.FFBuffer` regardless of the platform (and bypassing the platform hooks).
28+
29+
Use of`InternalPort` with`lib.io.DDRBuffer` is forbidden in synthesis. If a need to abstract over unknown implementations of DDR buffer exists for a component, this should be done by using`io.DDRBuffer.signature` in the component interface rather than using`InternalPort` or similar objects.
30+
31+
Use of`InternalPort` with`lib.io.DDRBuffer` is allowed in simulation. The buffer will elaborate to an unspecified glitch-free model driving the port triple.
32+
33+
To simplify tying off unused input ports to constant values,`init=` keyword-only argument is added to the`InternalPort` constructor. Is is passed directly to the`init=` argument of the port's`i` signal. It is an error to use this argument with an output-only port.
34+
35+
##Drawbacks
36+
[drawbacks]:#drawbacks
37+
38+
- more complex I/O subsystem
39+
- the tie-off case could be better served by other means
40+
41+
##Rationale and alternatives
42+
[rationale-and-alternatives]:#rationale-and-alternatives
43+
44+
This is a fairly simple solution leveraging existing code. For the internal connection case, no other design is apparent. For tie-off, there are two other possibilities:
45+
46+
1. Have a separate`TieoffPort` class.
47+
48+
Such class could serve as a marker that the port output will always be discarded, or that input will always have the tieoff value, allowing for simplification in controller logic.
49+
50+
Further, fancy platform-specific buffer types (such as high data rate SERDES) could be trivially instantiated for tie-off ports (by simply doing nothing for discarded output, or replicating the tieoff value for input), which is not in general possible for arbitrary`InternalPort`.
51+
52+
2. Have an out-of-band mechanism that removes the unused port from the component's signature.
53+
54+
##Prior art
55+
[prior-art]:#prior-art
56+
57+
This RFC reuses existing`SimulationPort` machinery.
58+
59+
Passing around a triple of`(I, O, OE)` is a fairly standard way of connecting an I/O controller to other logic.
60+
61+
##Unresolved questions
62+
[unresolved-questions]:#unresolved-questions
63+
64+
None.
65+
66+
##Future possibilities
67+
[future-possibilities]:#future-possibilities
68+
69+
None.

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp