|
@@ -63,16 +63,20 @@ def main(argv: list[str] | None = None) -> int:
|
|
|
parser.add_argument(
|
|
parser.add_argument(
|
|
|
"profiles",
|
|
"profiles",
|
|
|
nargs="*",
|
|
nargs="*",
|
|
|
- choices=("control", "identification", "host_protocol"),
|
|
|
|
|
- default=("control", "identification", "host_protocol"),
|
|
|
|
|
|
|
+ metavar="PROFILE",
|
|
|
)
|
|
)
|
|
|
args = parser.parse_args(argv)
|
|
args = parser.parse_args(argv)
|
|
|
|
|
+ supported = {"control", "identification", "host_protocol"}
|
|
|
|
|
+ invalid = [profile for profile in args.profiles if profile not in supported]
|
|
|
|
|
+ if invalid:
|
|
|
|
|
+ parser.error(f"unsupported profile: {invalid[0]}")
|
|
|
|
|
+ profiles = args.profiles or ("control", "identification", "host_protocol")
|
|
|
stimulus = {"control": 0, "identification": 1, "host_protocol": 0}
|
|
stimulus = {"control": 0, "identification": 1, "host_protocol": 0}
|
|
|
with tempfile.TemporaryDirectory(prefix="prod2u-6400-cocotb-") as directory:
|
|
with tempfile.TemporaryDirectory(prefix="prod2u-6400-cocotb-") as directory:
|
|
|
root = Path(directory)
|
|
root = Path(directory)
|
|
|
- for profile in args.profiles:
|
|
|
|
|
|
|
+ for profile in profiles:
|
|
|
run_profile(profile, stimulus[profile], root / profile)
|
|
run_profile(profile, stimulus[profile], root / profile)
|
|
|
- print(f"PASS: 6400 cocotb integration profiles: {', '.join(args.profiles)}")
|
|
|
|
|
|
|
+ print(f"PASS: 6400 cocotb integration profiles: {', '.join(profiles)}")
|
|
|
return 0
|
|
return 0
|
|
|
|
|
|
|
|
|
|
|