back.pysim: don't crash when trying to drive a nonexistent domain clock.
This commit is contained in:
parent
9350620f89
commit
906385c7f8
2 changed files with 11 additions and 0 deletions
|
|
@ -451,6 +451,10 @@ class Simulator:
|
|||
for domain_obj in self._domains:
|
||||
if not domain_obj.local and domain_obj.name == domain:
|
||||
clk = domain_obj.clk
|
||||
break
|
||||
else:
|
||||
raise ValueError("Domain '{}' is not present in simulation"
|
||||
.format(domain))
|
||||
def clk_process():
|
||||
yield Passive()
|
||||
yield Delay(phase)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue