Skip to content

Commit

Permalink
restructured codebase
Browse files Browse the repository at this point in the history
Signed-off-by: Myrausman <[email protected]>
  • Loading branch information
Myrausman committed Nov 7, 2024
1 parent 359a943 commit 444ab19
Show file tree
Hide file tree
Showing 110 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
EXTENSIONS := "rv*" "unratified/rv*"
EXTENSIONS := "/rv*" "unratified/rv*"
ISASIM_H := ../riscv-isa-sim/riscv/encoding.h
PK_H := ../riscv-pk/machine/encoding.h
ENV_H := ../riscv-tests/env/encoding.h
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"

Check warning on line 578 in shared_utils.py

View check run for this annotation

Codecov / codecov/patch

shared_utils.py#L578

Added line #L578 was not covered by tests
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 444ab19

Please sign in to comment.