Skip to content

Commit

Permalink
RFC #36: Fix example.
Browse files Browse the repository at this point in the history
  • Loading branch information
zyp committed Mar 17, 2024
1 parent 5468750 commit b13d192
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions text/0036-async-testbench-functions.md
Original file line number Diff line number Diff line change
Expand Up @@ -124,12 +124,12 @@ sim.add_process(adder)

DDR IO buffer as a process:
```python
o = Signal(2); pin = Signal()
clk = Signal(); o = Signal(2); pin = Signal()
async def ddr_buffer(sim):
while True: # could be extended to pre-capture next `o` on posedge
await sim.negedge()
await sim.negedge(clk)
await sim.set(pin, o[0])
await sim.posedge()
await sim.posedge(clk)
await sim.set(pin, o[1])
sim.add_process(ddr_buffer)
```
Expand Down

0 comments on commit b13d192

Please sign in to comment.