Skip to content

Commit

Permalink
Merge pull request #316 from Myrausman/repo_structure
Browse files Browse the repository at this point in the history
Restructured codebase
  • Loading branch information
aswaterman authored Nov 12, 2024
2 parents d9e9069 + 383cbca commit 4d8d260
Show file tree
Hide file tree
Showing 110 changed files with 5 additions and 7 deletions.
6 changes: 1 addition & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,8 @@ PK_H := ../riscv-pk/machine/encoding.h
ENV_H := ../riscv-tests/env/encoding.h
OPENOCD_H := ../riscv-openocd/src/target/riscv/encoding.h
INSTALL_HEADER_FILES := $(ISASIM_H) $(PK_H) $(ENV_H) $(OPENOCD_H)
PSEUDO_FLAG := $(if $(PSEUDO),-pseudo,)

ifdef PSEUDO
PSEUDO_FLAG := -pseudo
else
PSEUDO_FLAG :=
endif

default: everything

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
6 changes: 4 additions & 2 deletions shared_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -457,7 +457,7 @@ def process_pseudo_instructions(
logging.debug(f"Processing pseudo line: {line}")
ext, orig_inst, pseudo_inst, line_content = pseudo_regex.findall(line)[0]
ext_file = find_extension_file(ext, opcodes_dir)

# print("ext_file",ext_file)
validate_instruction_in_extension(orig_inst, ext_file, file_name, pseudo_inst)

name, single_dict = process_enc_line(f"{pseudo_inst} {line_content}", file_name)
Expand Down Expand Up @@ -514,6 +514,7 @@ def find_extension_file(ext: str, opcodes_dir: str):
ext_file = f"{opcodes_dir}/unratified/{ext}"
if not os.path.exists(ext_file):
log_and_exit(f"Extension {ext} not found.")
# print(ext_file)
return ext_file


Expand Down Expand Up @@ -574,7 +575,7 @@ def create_inst_dict(
if include_pseudo_ops is None:
include_pseudo_ops = []

opcodes_dir = os.path.dirname(os.path.realpath(__file__))
opcodes_dir = os.path.dirname(os.path.realpath(__file__)) + "/extensions"
instr_dict: InstrDict = {}

file_names = [
Expand Down Expand Up @@ -603,6 +604,7 @@ def create_inst_dict(
)

logging.debug("Collecting imported instructions")

for file_name in file_names:
logging.debug(f"Parsing File: {file_name} for imported instructions")
lines = read_lines(file_name)
Expand Down

0 comments on commit 4d8d260

Please sign in to comment.