Commit 4636517f authored by Christina Yu's avatar Christina Yu
Browse files

lab7 start

parent 4ef4189d
......@@ -20,7 +20,7 @@ def regNumToName(num):
instrDict = {
"I": ["lw", "addi", "slti", "ori", "andi", "slli", "sltiu", "xori", "srli",
"srai","ecall", "jalr", "lbu", "fence"],
"srai","ecall", "jalr", "lbu", "fence", "CSRRW", "CSRRS", "CSRRC", "CSRRW1", "CSRRS1", "CSRRC1"],
"R": ["sub", "add", "sll", "slt", "sltu", "xor", "srl",
"sra", "or", "and"],
"U": ["lui", "auipc"],
import os, sys
if not sys.argv[1].endswith("\\"): sys.argv[1] += "\\"
if not os.path.isdir(sys.argv[1]):
exit("ERROR: provided path is not a directory")
for elf_file in os.listdir(sys.argv[1]):
print(f"TESTING: --- {elf_file}")
os.system(f"python {sys.argv[1]}{elf_file} -t -s")
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment