Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Restructured codebase #316

Merged
merged 3 commits into from
Nov 12, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
IIITM-Jay marked this conversation as resolved.
Show resolved Hide resolved
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 @@
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)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Delete

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 @@
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)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Delete

return ext_file


Expand Down Expand Up @@ -574,7 +575,7 @@
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 @@
)

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