hdl.dsl: forbid m.next= inside of FSM but outside of FSM state, too.
This commit is contained in:
parent
934546e633
commit
35a44f017f
2 changed files with 17 additions and 12 deletions
|
|
@ -392,8 +392,12 @@ class DSLTestCase(FHDLTestCase):
|
|||
msg="Only assignment to `m.next` is permitted"):
|
||||
m.next
|
||||
with self.assertRaises(SyntaxError,
|
||||
msg="`m.next = <...>` is only permitted inside an FSM"):
|
||||
msg="`m.next = <...>` is only permitted inside an FSM state"):
|
||||
m.next = "FOO"
|
||||
with self.assertRaises(SyntaxError,
|
||||
msg="`m.next = <...>` is only permitted inside an FSM state"):
|
||||
with m.FSM():
|
||||
m.next = "FOO"
|
||||
|
||||
def test_auto_pop_ctrl(self):
|
||||
m = Module()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue