hdl.xfrm: avoid cycles in union-find graph in LHSGroupAnalyzer.
This commit is contained in:
parent
3448953f61
commit
621dddebfd
2 changed files with 16 additions and 0 deletions
|
|
@ -186,6 +186,20 @@ class LHSGroupAnalyzerTestCase(FHDLTestCase):
|
|||
SignalSet((a, b)),
|
||||
])
|
||||
|
||||
def test_no_loops(self):
|
||||
a = Signal()
|
||||
b = Signal()
|
||||
stmts = [
|
||||
a.eq(0),
|
||||
Cat(a, b).eq(0),
|
||||
Cat(a, b).eq(0),
|
||||
]
|
||||
|
||||
groups = LHSGroupAnalyzer()(stmts)
|
||||
self.assertEqual(list(groups.values()), [
|
||||
SignalSet((a, b)),
|
||||
])
|
||||
|
||||
def test_switch(self):
|
||||
a = Signal()
|
||||
b = Signal()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue