back.rtlil: allow record slices on LHS.
authorwhitequark <whitequark@whitequark.org>
Sat, 20 Apr 2019 08:12:29 +0000 (08:12 +0000)
committerwhitequark <whitequark@whitequark.org>
Sat, 20 Apr 2019 08:12:29 +0000 (08:12 +0000)
nmigen/back/rtlil.py

index b338491c6d9cbb0c1d8217b83055564fb0c60f9e..fd3bfe8bd95aca80cb6e21102d09e90b8122b645 100644 (file)
@@ -4,7 +4,7 @@ from collections import defaultdict, OrderedDict
 from contextlib import contextmanager
 
 from ..tools import bits_for
-from ..hdl import ast, ir, mem, xfrm
+from ..hdl import ast, rec, ir, mem, xfrm
 
 
 __all__ = ["convert"]
@@ -563,7 +563,7 @@ class _LHSValueCompiler(_ValueCompiler):
         return wire_next
 
     def _prepare_value_for_Slice(self, value):
-        assert isinstance(value, (ast.Signal, ast.Slice, ast.Cat))
+        assert isinstance(value, (ast.Signal, ast.Slice, ast.Cat, rec.Record))
         return self(value)
 
     def on_Part(self, value):