3
0
Fork 0
mirror of https://github.com/YosysHQ/sby.git synced 2025-04-11 00:13:33 +00:00

Pre-format conditional flags in write_btor

Make `-x` flag dependent on `btor_aig on`, and combine with `-c` flag into single `btor_flags` string.
This commit is contained in:
Krystine Sherwin 2024-04-06 13:40:01 +13:00
parent 99e704e6cb
commit b7bb1466d2
No known key found for this signature in database

View file

@ -1137,9 +1137,11 @@ class SbyTask(SbyConfig):
print("delete -output", file=f)
print("dffunmap", file=f)
print("stat", file=f)
#TODO: put -x in a conditional
print("write_btor -x {}-i design_{m}.info -ywmap design_btor.ywb design_{m}.btor".format("-c " if self.opt_mode == "cover" else "", m=model_name), file=f)
print("write_btor -s {}-i design_{m}_single.info -ywmap design_btor_single.ywb design_{m}_single.btor".format("-c " if self.opt_mode == "cover" else "", m=model_name), file=f)
btor_flags = ""
if self.opt_mode == "cover": btor_flags += "-c "
if self.opt_btor_aig: btor_flags += "-x "
print("write_btor {}-i design_{m}.info -ywmap design_btor.ywb design_{m}.btor".format(btor_flags, m=model_name), file=f)
print("write_btor -s {}-i design_{m}_single.info -ywmap design_btor_single.ywb design_{m}_single.btor".format(btor_flags, m=model_name), file=f)
proc = SbyProc(
self,