move SVP64RM CSV class to new module
authorLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Wed, 27 Jan 2021 12:38:35 +0000 (12:38 +0000)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Wed, 27 Jan 2021 12:38:35 +0000 (12:38 +0000)
src/soc/decoder/power_svp64.py [new file with mode: 0644]
src/soc/sv/trans/svp64.py

diff --git a/src/soc/decoder/power_svp64.py b/src/soc/decoder/power_svp64.py
new file mode 100644 (file)
index 0000000..b7c7cde
--- /dev/null
@@ -0,0 +1,19 @@
+# SPDX-License-Identifier: LGPLv3+
+# Copyright (C) 2021 Luke Kenneth Casson Leighton <lkcl@lkcl.net>
+# Funded by NLnet http://nlnet.nl
+
+from soc.decoder.power_enums import get_csv, find_wiki_dir
+import os
+
+# gets SVP64 ReMap information
+class SVP64RM:
+    def __init__(self):
+        self.instrs = {}
+        pth = find_wiki_dir()
+        for fname in os.listdir(pth):
+            if fname.startswith("RM") or fname.startswith("LDSTRM"):
+                for entry in get_csv(fname):
+                    self.instrs[entry['insn']] = entry
+
+
+
index 0cb14a78d900d99cb8a864de80af77dd7f17d32e..2e54f708580d6bcfd123c57a6403d14e7249c775 100644 (file)
@@ -18,7 +18,7 @@ import os, sys
 from collections import OrderedDict
 
 from soc.decoder.pseudo.pagereader import ISA
-from soc.decoder.power_enums import get_csv, find_wiki_dir
+from soc.decoder.power_svp64 import SVP64RM
 
 
 # identifies register by type
@@ -129,16 +129,6 @@ def decode_ffirst(encoding):
     return decode_bo(encoding)
 
 
-# gets SVP64 ReMap information
-class SVP64RM:
-    def __init__(self):
-        self.instrs = {}
-        pth = find_wiki_dir()
-        for fname in os.listdir(pth):
-            if fname.startswith("RM") or fname.startswith("LDSTRM"):
-                for entry in get_csv(fname):
-                    self.instrs[entry['insn']] = entry
-
 
 # decodes svp64 assembly listings and creates EXT001 svp64 prefixes
 class SVP64: