You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Write `value` to `address` in `instance` when awaited. If `mask` is given, only the corresponding bits are written.
169
-
-`delay(interval)`
169
+
-`delay(interval: float)`
170
170
- Create a trigger object for advancing simulation by `interval` seconds.
171
171
-`tick(domain="sync", *, context=None)`
172
-
- Create a trigger object for advancing simulation by one tick of `domain`.
172
+
- Create a trigger object for advancing simulation until the next active edge of the `domain` clock.
173
173
When an elaboratable is passed to `context`, `domain` will be resolved from its perspective.
174
-
- If `domain` is asynchronously reset while this is being awaited, `AsyncReset` is raised.
174
+
- If `domain` is asynchronously reset while this is being awaited, `amaranth.sim.AsyncReset` is raised.
175
175
-`changed(*signals)`
176
176
- Create a trigger object for advancing simulation until any signal in `signals` changes.
177
177
-`edge(signal, value)`
@@ -180,19 +180,18 @@ The simulator context have the following methods:
180
180
-`posedge(signal)`
181
181
-`negedge(signal)`
182
182
- Aliases for `edge(signal, 1)` and `edge(signal, 0)` respectively.
183
-
184
-
`signal` is changed to `value`. `None` is a wildcard and will trigger on any change.
185
183
-`critical()`
186
-
- Return a context manager that ensures simulation won't terminate in the middle of the enclosed scope.
184
+
- Context manager.
185
+
If the current process is a background process, `async with sim.critical():` makes it a non-background process for the duration of the statement.
187
186
188
187
A trigger object has the following methods:
189
188
-`__await__()`
190
189
- Advance simulation and return the value(s) of the trigger(s).
191
-
-`delay`and `tick` triggers return `True` when they are hit, otherwise `False`.
192
-
-`changed`and `edge`triggers return the current value of the signals they are monitoring.
190
+
-`delay`, `tick`and `edge` triggers return `True` when they are hit, otherwise `False`.
191
+
-`changed` triggers return the current value of the signals they are monitoring.
193
192
-`__aiter__()`
194
-
- Return an async generator that repeatedly invokes `__await__()` and yields the returned values.
195
-
-`delay(interval)`
193
+
- Return an async generator that is equivalent to repeatedly awaiting the trigger object in an infinite loop.
194
+
-`delay(interval: float)`
196
195
-`tick(domain="sync", *, context=None)`
197
196
-`changed(*signals)`
198
197
-`edge(signal, value)`
@@ -203,6 +202,7 @@ A trigger object has the following methods:
203
202
- Repeat the trigger until `condition` is true.
204
203
`condition` is an arbitrary Amaranth expression.
205
204
If `condition` is initially true, `await` will return immediately without advancing simulation.
205
+
The return value is an unspecified awaitable with `await` as the only defined operation.
206
206
207
207
`Tick()`, `Delay()`, `Active()` and `Passive()` as well as the ability to pass generator coroutines as `process` are deprecated and removed in a future version.
208
208
@@ -226,6 +226,7 @@ Other python libraries like [cocotb](https://docs.cocotb.org/en/stable/coroutine
226
226
[unresolved-questions]: #unresolved-questions
227
227
228
228
- Bikeshed all the names.
229
+
- (@whitequark) Should we go for `posedge` (Verilog convention) or `pos_edge` (Python convention)?
0 commit comments