Skip to content

YosysJson Object #367

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

Draft
wants to merge 3 commits into
base: FABulous2.0-development
Choose a base branch
from

Conversation

KelvinChung2000
Copy link
Collaborator

Add typing to yosys json file to aid development



BitVector = list[int | Literal["0", "1", "x", "z"]]

Choose a reason for hiding this comment

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

Please provide some documentation for these classes and methods in this file.

@@ -136,9 +138,6 @@ def parseFabricCSV(fileName: str) -> Fabric:
if i[0].startswith("Tile"):
if "GENERATE" in i:
# import here to avoid circular import
from FABulous.fabric_generator.fabric_automation import (

Choose a reason for hiding this comment

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

Removing this import will break the custom tile generation. Please add it again.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

We should try to avoid that. We can resolve this later when I do the file splitting.

@@ -1024,20 +1023,17 @@ def parseBelFile(
json_file = filename.with_suffix(".json")
runCmd = [
"yosys",
"-qp"
f"read_verilog -sv {filename}; proc -noopt; write_json -compat-int {json_file}",
f"-qpread_verilog -sv {filename}; proc -noopt; write_json -compat-int {json_file}",

Choose a reason for hiding this comment

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

Please use the FAB_YOSYS_PATH, instead of calling yosys directly, and add the check_if_application_exists function.

We could also think of moving all these yosys calls to the yosys_obj.py and make it a general yosys handler.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Sure, I can do the move for better encapsulation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants