-
Notifications
You must be signed in to change notification settings - Fork 87
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' of github.com:siliconcompiler/siliconcompiler int…
…o tasks
- Loading branch information
Showing
33 changed files
with
809 additions
and
479 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,6 @@ | ||
#!/usr/bin/env bash | ||
|
||
sc -input "rtl verilog blinky.v" \ | ||
-input "fpga pcf icebreaker.pcf" \ | ||
sc blinky.v icebreaker.pcf \ | ||
-fpga_partname "ice40up5k-sg48" \ | ||
-target "fpgaflow_demo" \ | ||
-design "blinky" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,7 @@ | ||
#!/usr/bin/env bash | ||
|
||
sc -input "rtl verilog blinky_fusesoc.v" \ | ||
sc blinky_fusesoc.v blinky_fusesoc.xdc \ | ||
-fpga_partname "xc7a35ticsg324" \ | ||
-target "fpgaflow_demo" \ | ||
-relax \ | ||
-input "fpga xdc blinky_fusesoc.xdc" \ | ||
-design "blinky" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{ | ||
"openroad": { | ||
"git-url": "https://github.com/The-OpenROAD-Project/OpenROAD.git", | ||
"git-commit": "5e7c6c4294ca9e337d8aa6270e503ff9cf6a8f5c" | ||
}, | ||
"yosys": { | ||
"git-url": "https://github.com/YosysHQ/yosys.git", | ||
"git-commit": "956c4e485a9463863f60c4dd03372db3fa8332a4" | ||
}, | ||
"surelog": { | ||
"git-url": "https://github.com/chipsalliance/Surelog.git", | ||
"git-commit": "ad83eedc7de32ec15a3f7b4e271c6b45ddf547eb" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
#!/usr/bin/env python3 | ||
# Copyright 2023 Silicon Compiler Authors. All Rights Reserved. | ||
|
||
import argparse | ||
import json | ||
import os | ||
|
||
def bump_commit(tools, tool): | ||
if "git-url" not in tools[tool]: | ||
return None | ||
|
||
import git, tempfile | ||
|
||
with tempfile.TemporaryDirectory(prefix=tool) as repo_work_dir: | ||
repo = git.Repo.clone_from(tools[tool]["git-url"], repo_work_dir) | ||
|
||
return repo.head.commit.hexsha | ||
|
||
return None | ||
|
||
if __name__ == "__main__": | ||
tools = None | ||
data_file = os.path.join(os.path.dirname(__file__), "_tools.json") | ||
with open(data_file, "r") as f: | ||
tools = json.load(f) | ||
|
||
supported_tools = ", ".join(tools.keys()) | ||
supported_fields = set() | ||
for tool, fields in tools.items(): | ||
for field in fields: | ||
supported_fields.add(field) | ||
supported_fields = ", ".join(supported_fields) | ||
|
||
parser = argparse.ArgumentParser( | ||
prog = "SiliconCompiler Tool Helper", | ||
description = "Maintains current known good versions for all install scripts to use") | ||
parser.add_argument("--tool", type=str, required=True, help=f"Tool name, supported options: {supported_tools}") | ||
group = parser.add_mutually_exclusive_group(required=True) | ||
group.add_argument("--field", type=str, help=f"Field to get information from, supported options: {supported_fields}") | ||
group.add_argument("--bump_commit", action="store_true", help="Flag to indicate that the speficied tool should be updated.") | ||
|
||
args = parser.parse_args() | ||
|
||
if args.tool not in tools: | ||
print(f"{args.tool} is not a supported tool.") | ||
print(f"Supported tools are: {supported_tools}") | ||
exit(1) | ||
|
||
if not args.bump_commit: | ||
tool_fields = tools[args.tool] | ||
if args.field not in tool_fields: | ||
print(f"{args.field} is not a supported field for {args.tool}.") | ||
tool_supported_fields = ", ".join(tool_fields.keys()) | ||
print(f"Supported fields are: {tool_supported_fields}") | ||
exit(1) | ||
|
||
print(tool_fields[args.field]) | ||
exit(0) | ||
|
||
new_value = bump_commit(tools, args.tool) | ||
if new_value and tools[args.tool]["git-commit"] != new_value: | ||
print(f"Updating {args.tool} to {new_value}") | ||
tools[args.tool]["git-commit"] = new_value | ||
|
||
with open(data_file, "w") as f: | ||
f.write(json.dumps(tools, indent=2)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.