diff options
author | Clifford Wolf <clifford@clifford.at> | 2019-08-15 22:47:59 +0200 |
---|---|---|
committer | Clifford Wolf <clifford@clifford.at> | 2019-08-15 22:47:59 +0200 |
commit | eb80d3d43fdb070fe99718501d3b0fbdca61ab8d (patch) | |
tree | f97457eed7149818833675c423c408df666a202b /passes/pmgen/pmgen.py | |
parent | 03f98d9176357b73455cf0b2c44ec3897864e893 (diff) | |
download | yosys-eb80d3d43fdb070fe99718501d3b0fbdca61ab8d.tar.gz yosys-eb80d3d43fdb070fe99718501d3b0fbdca61ab8d.tar.bz2 yosys-eb80d3d43fdb070fe99718501d3b0fbdca61ab8d.zip |
Change pmgen default rule to reject, switch peepopt behavior to accept
Signed-off-by: Clifford Wolf <clifford@clifford.at>
Diffstat (limited to 'passes/pmgen/pmgen.py')
-rw-r--r-- | passes/pmgen/pmgen.py | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/passes/pmgen/pmgen.py b/passes/pmgen/pmgen.py index 22a7a5225..c6e9a9cbf 100644 --- a/passes/pmgen/pmgen.py +++ b/passes/pmgen/pmgen.py @@ -494,8 +494,6 @@ with open(outfile, "w") as f: current_pattern, current_subpattern = block["pattern"] if block["type"] == "final": - print(" on_accept();", file=f) - print(" check_blacklist_{}();".format(current_pattern), file=f) print(" }", file=f) if index+1 != len(blocks): print("", file=f) @@ -556,7 +554,7 @@ with open(outfile, "w") as f: print("#define reject do {{ check_blacklist_{}(); goto rollback_label; }} while(0)".format(current_pattern), file=f) print("#define accept do {{ on_accept(); check_blacklist_{}(); if (rollback) goto rollback_label; }} while(0)".format(current_pattern), file=f) print("#define branch do {{ block_{}(); if (rollback) goto rollback_label; }} while(0)".format(index+1), file=f) - print("#define subpattern(pattern_name) block_subpattern_{}_ ## pattern_name ()".format(current_pattern), file=f) + print("#define subpattern(pattern_name) do {{ block_subpattern_{}_ ## pattern_name (); if (rollback) goto rollback_label; }} while(0)".format(current_pattern), file=f) for line in block["code"]: print(" " + line, file=f) |