Skip to content

Commit

Permalink
Merge pull request #48 from YosysHQ/jix/fix-issue-40
Browse files Browse the repository at this point in the history
  • Loading branch information
jix authored Sep 25, 2023
2 parents 7a453ce + dcda610 commit 4faef63
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/eqy.py
Original file line number Diff line number Diff line change
Expand Up @@ -1080,19 +1080,23 @@ def prmkf(*args, **kwargs): print(*args, file=make_f, **kwargs)
exit_with_error(f"No configured strategy supports partition {partition.name}")
final_targets.append(prev_strategy)

with open(f"{args.workdir}/summary_targets.list", "w") as targets_f:
for target in final_targets:
print(target, file=targets_f)

prmkf(f".PHONY: all summary")
prmkf(f"all: {' '.join(sorted(final_targets))}")
prmkf(f"\t$(MAKE) -f strategies.mk summary")
prmkf(f"""summary:""")
prmkf(f"""\t@rc=0 ; \\""")
prmkf(f"""\tfor f in {" ".join(final_targets)} ; do \\""")
prmkf(f"""\twhile read f; do \\""")
prmkf(f"""\t\tp=$${{f#strategies/}} ; p=$${{p%/*/status}} ; \\""")
prmkf(f"""\t\tif grep -q "PASS" $$f ; then \\""")
prmkf(f"""\t\t\techo "* Successfully proved equivalence of partition $$p" ; \\""")
prmkf(f"""\t\telse \\""")
prmkf(f"""\t\t\techo "* Failed to prove equivalence of partition $$p" ; rc=1 ; \\""")
prmkf(f"""\t\tfi ; \\""")
prmkf(f"""\tdone ; \\""")
prmkf(f"""\tdone < summary_targets.list ; \\""")
prmkf(f"""\tif [ "$$rc" -eq 0 ] ; then \\""")
prmkf(f"""\t\techo "* Successfully proved designs equivalent" ; \\""")
prmkf(f"""\tfi""")
Expand Down

0 comments on commit 4faef63

Please sign in to comment.