Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: m-labs/nmigen
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 2c80f35de46d
Choose a base ref
...
head repository: m-labs/nmigen
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: b5d3960691da
Choose a head ref
  • 3 commits
  • 3 files changed
  • 1 contributor

Commits on Jan 22, 2019

  1. Copy the full SHA
    eeb023a View commit details
  2. Copy the full SHA
    1782b84 View commit details

Commits on Jan 25, 2019

  1. back.pysim: fix behavior of initial cycle for sync processes.

    The current behavior was introduced in 6570271, which was a wrong
    fix for an issue that was actually fixed in 12e04e4. This commit
    effectively reverts 6570271.
    whitequark committed Jan 25, 2019
    Copy the full SHA
    b5d3960 View commit details
Showing with 18 additions and 7 deletions.
  1. +3 −3 nmigen/back/pysim.py
  2. +14 −3 nmigen/compat/genlib/fifo.py
  3. +1 −1 nmigen/lib/fifo.py
6 changes: 3 additions & 3 deletions nmigen/back/pysim.py
Original file line number Diff line number Diff line change
@@ -414,13 +414,13 @@ def add_sync_process(self, process, domain="sync"):
process = self._check_process(process)
def sync_process():
try:
result = None
cmd = None
while True:
self._process_loc[sync_process] = self._name_process(process)
cmd = process.send(result)
if cmd is None:
cmd = Tick(domain)
result = yield cmd
self._process_loc[sync_process] = self._name_process(process)
cmd = process.send(result)
except StopIteration:
pass
sync_process = sync_process()
17 changes: 14 additions & 3 deletions nmigen/compat/genlib/fifo.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
from ...lib.fifo import FIFOInterface as _FIFOInterface, \
SyncFIFO, SyncFIFOBuffered
from ...tools import deprecated
from ...lib.fifo import FIFOInterface as NativeFIFOInterface, \
SyncFIFO, SyncFIFOBuffered, AsyncFIFO, AsyncFIFOBuffered


__all__ = ["_FIFOInterface", "SyncFIFO", "SyncFIFOBuffered"]
__all__ = ["_FIFOInterface", "SyncFIFO", "SyncFIFOBuffered", "AsyncFIFO", "AsyncFIFOBuffered"]


@deprecated("attribute `fwft` must be provided to FIFOInterface constructor")
class CompatFIFOInterface(NativeFIFOInterface):
def __init__(self, width, depth):
super().__init__(width, depth, fwft=False)
del self.fwft


_FIFOInterface = CompatFIFOInterface
2 changes: 1 addition & 1 deletion nmigen/lib/fifo.py
Original file line number Diff line number Diff line change
@@ -72,9 +72,9 @@ def __init__(self, width, depth, fwft):

def read(self):
"""Read method for simulation."""
assert (yield self.readable)
yield self.re.eq(1)
yield
assert (yield self.readable)
value = (yield self.dout)
yield self.re.eq(0)
return value