-from .hdl.ast import Value, Const, C, Mux, Cat, Repl, Array, Signal, ClockSignal, ResetSignal
+from .hdl.ast import Value, Const, C, Mux, Cat, Repl, Array, Signal, ClockSignal, ResetSignal, Assert, Assume
from .hdl.dsl import Module
from .hdl.cd import ClockDomain
from .hdl.ir import Fragment, Instance
self._pop_ctrl()
for assign in Statement.wrap(assigns):
- if not compat_mode and not isinstance(assign, Assign):
+ if not compat_mode and not isinstance(assign, (Assign, Assert, Assume)):
raise SyntaxError(
- "Only assignments may be appended to d.{}"
+ "Only assignments, asserts, and assumes may be appended to d.{}"
.format(domain_name(domain)))
for signal in assign._lhs_signals():
def test_d_asgn_wrong(self):
m = Module()
with self.assertRaises(SyntaxError,
- msg="Only assignments may be appended to d.sync"):
+ msg="Only assignments, asserts, and assumes may be appended to d.sync"):
m.d.sync += Switch(self.s1, {})
def test_comb_wrong(self):