hdl.dsl: reject name mismatch in m.domains.<name> +=.
This would violate invariants later in the elaboration process. Fixes #282.
This commit is contained in:
parent
86b57fe6b6
commit
3df429703c
2 changed files with 10 additions and 0 deletions
|
|
@ -716,6 +716,12 @@ class DSLTestCase(FHDLTestCase):
|
|||
msg="Only clock domains may be added to `m.domains`, not 1"):
|
||||
m.domains += 1
|
||||
|
||||
def test_domain_add_wrong_name(self):
|
||||
m = Module()
|
||||
with self.assertRaises(NameError,
|
||||
msg="Clock domain name 'bar' must match name in `m.domains.foo += ...` syntax"):
|
||||
m.domains.foo = ClockDomain("bar")
|
||||
|
||||
def test_lower(self):
|
||||
m1 = Module()
|
||||
m1.d.comb += self.c1.eq(self.s1)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue