add "undefined" to namespace
authorLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Tue, 7 Apr 2020 18:13:38 +0000 (19:13 +0100)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Tue, 7 Apr 2020 18:13:38 +0000 (19:13 +0100)
src/soc/decoder/isa/caller.py

index 6000786f4d83fe6e7d35e58a3d05981ad455c702..8a4da033d3affb12942d5864ea01e0ed58661fa7 100644 (file)
@@ -150,12 +150,16 @@ class ISACaller:
         # create CR then allow portions of it to be "selectable" (below)
         self.cr = SelectableInt(0, 32)
 
+        # "undefined", just set to variable-bit-width int (use exts "max")
+        self.undefined = SelectableInt(0, 256) # TODO, not hard-code 256!
+
         self.namespace = {'GPR': self.gpr,
                           'MEM': self.mem,
                           'memassign': self.memassign,
                           'NIA': self.pc.NIA,
                           'CIA': self.pc.CIA,
                           'CR': self.cr,
+                          'undefined': self.undefined,
                           }
 
         # field-selectable versions of Condition Register TODO check bitranges?