-
Notifications
You must be signed in to change notification settings - Fork 49
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Unai Martinez-Corral <[email protected]>
- Loading branch information
Showing
5 changed files
with
177 additions
and
42 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,43 +1,120 @@ | ||
# Python entrypoint for the shell wrappers moved from arch-defs | ||
|
||
from sys import stdout, stderr | ||
from pathlib import Path | ||
from subprocess import check_call | ||
|
||
|
||
ROOT = Path(__file__).resolve().parent | ||
|
||
|
||
def generate_constraints(): | ||
print("F4PGA (old) generate constraints") | ||
stdout.flush() | ||
stderr.flush() | ||
wrapper = ROOT / "xc7/generate_constraints.f4pga.sh" | ||
check_call(str(wrapper)) | ||
|
||
|
||
def pack(): | ||
print("F4PGA (old) pack") | ||
stdout.flush() | ||
stderr.flush() | ||
wrapper = ROOT / "xc7/pack.f4pga.sh" | ||
check_call(str(wrapper)) | ||
|
||
|
||
def place(): | ||
print("F4PGA (old) place") | ||
stdout.flush() | ||
stderr.flush() | ||
wrapper = ROOT / "xc7/place.f4pga.sh" | ||
check_call(str(wrapper)) | ||
|
||
|
||
def route(): | ||
print("F4PGA (old) route") | ||
stdout.flush() | ||
stderr.flush() | ||
wrapper = ROOT / "xc7/route.f4pga.sh" | ||
check_call(str(wrapper)) | ||
|
||
|
||
def synth(): | ||
print("F4PGA (old) synth") | ||
stdout.flush() | ||
stderr.flush() | ||
wrapper = ROOT / "xc7/synth.f4pga.sh" | ||
check_call(str(wrapper)) | ||
|
||
|
||
def write_bitstream(): | ||
print("F4PGA (old) write bitstream") | ||
stdout.flush() | ||
stderr.flush() | ||
wrapper = ROOT / "xc7/write_bitstream.f4pga.sh" | ||
check_call(str(wrapper)) | ||
|
||
|
||
def write_fasm(): | ||
print("F4PGA (old) write fasm") | ||
stdout.flush() | ||
stderr.flush() | ||
wrapper = ROOT / "xc7/write_fasm.f4pga.sh" | ||
check_call(str(wrapper)) | ||
|
||
|
||
def write_xml_rr_graph(): | ||
print("F4PGA (old) write xlm rr graph") | ||
stdout.flush() | ||
stderr.flush() | ||
wrapper = ROOT / "xc7/write_xml_rr_graph.f4pga.sh" | ||
check_call(str(wrapper)) | ||
|
||
|
||
def vpr_common(): | ||
print("F4PGA (old) vpr common") | ||
stdout.flush() | ||
stderr.flush() | ||
wrapper = ROOT / "xc7/vpr_common.f4pga.sh" | ||
check_call(str(wrapper)) | ||
|
||
|
||
def analysis(): | ||
print("F4PGA (old) analysis") | ||
stdout.flush() | ||
stderr.flush() | ||
wrapper = ROOT / "quicklogic/analysis.f4pga.sh" | ||
check_call(str(wrapper)) | ||
|
||
|
||
def repack(): | ||
print("F4PGA (old) repack") | ||
stdout.flush() | ||
stderr.flush() | ||
wrapper = ROOT / "quicklogic/repack.f4pga.sh" | ||
check_call(str(wrapper)) | ||
|
||
|
||
def generate_bitstream(): | ||
print("F4PGA (old) generate_bitstream") | ||
stdout.flush() | ||
stderr.flush() | ||
wrapper = ROOT / "quicklogic/generate_bitstream.f4pga.sh" | ||
check_call(str(wrapper)) | ||
|
||
|
||
def generate_libfile(): | ||
print("F4PGA (old) generate_libfile") | ||
stdout.flush() | ||
stderr.flush() | ||
wrapper = ROOT / "quicklogic/generate_libfile.f4pga.sh" | ||
check_call(str(wrapper)) | ||
|
||
|
||
def ql(): | ||
print("F4PGA (old) ql") | ||
stdout.flush() | ||
stderr.flush() | ||
wrapper = ROOT / "quicklogic/ql.f4pga.sh" | ||
check_call(str(wrapper)) |
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 @@ | ||
pytest |
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,46 @@ | ||
from pytest import mark | ||
from sys import stdout, stderr | ||
|
||
from subprocess import check_call | ||
|
||
|
||
@mark.xfail | ||
@mark.parametrize("wrapper", ['place', 'route', 'synth', 'write-fasm']) | ||
def test_wrappers(wrapper): | ||
print(f"\n::group::Test {wrapper}") | ||
stdout.flush() | ||
stderr.flush() | ||
try: | ||
check_call(f"f4pga-{wrapper}") | ||
finally: | ||
print("\n::endgroup::") | ||
|
||
|
||
@mark.xfail | ||
@mark.parametrize( | ||
"wrapper", | ||
[ | ||
'symbiflow_generate_constraints', | ||
'symbiflow_pack', | ||
'symbiflow_place', | ||
'symbiflow_route', | ||
'symbiflow_synth', | ||
'symbiflow_write_bitstream', | ||
'symbiflow_write_fasm', | ||
'symbiflow_write_xml_rr_graph', | ||
'vpr_common', | ||
'symbiflow_analysis', | ||
'symbiflow_repack', | ||
'symbiflow_generate_bitstream', | ||
'symbiflow_generate_libfile', | ||
'ql_symbiflow' | ||
] | ||
) | ||
def test_shell_wrapper(wrapper): | ||
print(f"\n::group::Test {wrapper}") | ||
stdout.flush() | ||
stderr.flush() | ||
try: | ||
check_call(f"{wrapper}") | ||
finally: | ||
print("\n::endgroup::") |