From: Luke Kenneth Casson Leighton Date: Sat, 4 Apr 2020 12:45:56 +0000 (+0100) Subject: add imports for helper functions to pywriter X-Git-Tag: div_pipeline~1539 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=75675bd0f2da86f5ab4f5fe8c67442f08a12d3c8;p=soc.git add imports for helper functions to pywriter --- 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]