From 75675bd0f2da86f5ab4f5fe8c67442f08a12d3c8 Mon Sep 17 00:00:00 2001 From: Luke Kenneth Casson Leighton Date: Sat, 4 Apr 2020 13:45:56 +0100 Subject: [PATCH] add imports for helper functions to pywriter --- src/soc/decoder/pseudo/pywriter.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/soc/decoder/pseudo/pywriter.py b/src/soc/decoder/pseudo/pywriter.py index 2934ab44..ad0b09e0 100644 --- a/src/soc/decoder/pseudo/pywriter.py +++ b/src/soc/decoder/pseudo/pywriter.py @@ -29,7 +29,11 @@ class PyISAWriter(ISA): fname = os.path.join(isadir, "%s.py" % pagename) with open(fname, "w") as f: iinf = '' + f.write("# auto-generated by pywriter.py, do not edit or commit\n") f.write("from soc.decoder.isa import ISACaller\n\n") + f.write("from soc.decoder.helpers import " + \ + "(EXTS64, EXTZ64, ROTL64, ROTL32, MASK,)\n") + f.write("class %s(ISACaller):\n" % pagename) for page in instrs: d = self.instr[page] -- 2.30.2