back.rtlil: support slicing on Parts
authorIrides <irides@irides.network>
Sat, 11 Dec 2021 16:27:12 +0000 (10:27 -0600)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Fri, 31 Dec 2021 20:19:23 +0000 (20:19 +0000)
Fixes #605.

nmigen/back/rtlil.py

index 0802b367e6d73dd3f8124528ef8f0b4c48ec2ae6..0990e42d5a31da42719acb6bc7336a5421e29f26 100644 (file)
@@ -664,7 +664,7 @@ class _LHSValueCompiler(_ValueCompiler):
         return wire_next or wire_curr
 
     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, ast.Part))
         return self(value)
 
     def on_Part(self, value):