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: 625c55a3b899
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: 1655b59d1bd0
Choose a head ref
  • 1 commit
  • 1 file changed
  • 1 contributor

Commits on Dec 14, 2018

  1. Copy the full SHA
    1655b59 View commit details
Showing with 10 additions and 6 deletions.
  1. +10 −6 nmigen/back/pysim.py
16 changes: 10 additions & 6 deletions nmigen/back/pysim.py
Original file line number Diff line number Diff line change
@@ -435,6 +435,10 @@ def _commit_sync_signals(self, domains):
# Otherwise, do one more round of updates.

def _run_process(self, process):
def format_process(process):
frame = process.gi_frame
return "{}:{}".format(inspect.getfile(frame), inspect.getlineno(frame))

try:
cmd = process.send(None)
while True:
@@ -462,14 +466,14 @@ def _run_process(self, process):
lhs_signals = cmd.lhs._lhs_signals()
for signal in lhs_signals:
if not signal in self._signals:
raise ValueError("Process {!r} sent a request to set signal '{!r}', "
raise ValueError("Process '{}' sent a request to set signal '{!r}', "
"which is not a part of simulation"
.format(process, signal))
.format(format_process(process), signal))
if signal in self._comb_signals:
raise ValueError("Process {!r} sent a request to set signal '{!r}', "
raise ValueError("Process '{}' sent a request to set signal '{!r}', "
"which is a part of combinatorial assignment in "
"simulation"
.format(process, signal))
.format(format_process(process), signal))

funclet = _StatementCompiler()(cmd)
funclet(self._state)
@@ -480,8 +484,8 @@ def _run_process(self, process):
self._commit_sync_signals(domains)

else:
raise TypeError("Received unsupported command '{!r}' from process {!r}"
.format(cmd, process))
raise TypeError("Received unsupported command '{!r}' from process '{}'"
.format(cmd, format_process(process)))

break