b7c7cde1ef1ed37f2837a0723818f75f87e88dcf
[soc.git] / src / soc / decoder / power_svp64.py
1 # SPDX-License-Identifier: LGPLv3+
2 # Copyright (C) 2021 Luke Kenneth Casson Leighton <lkcl@lkcl.net>
3 # Funded by NLnet http://nlnet.nl
4
5 from soc.decoder.power_enums import get_csv, find_wiki_dir
6 import os
7
8 # gets SVP64 ReMap information
9 class SVP64RM:
10 def __init__(self):
11 self.instrs = {}
12 pth = find_wiki_dir()
13 for fname in os.listdir(pth):
14 if fname.startswith("RM") or fname.startswith("LDSTRM"):
15 for entry in get_csv(fname):
16 self.instrs[entry['insn']] = entry
17
18
19