summaryrefslogtreecommitdiff
path: root/passes/fsm/fsm.cc
diff options
context:
space:
mode:
authorClifford Wolf <clifford@clifford.at>2013-05-24 14:39:19 +0200
committerClifford Wolf <clifford@clifford.at>2013-05-24 14:39:19 +0200
commit66bc46b30b13ce6f9005edff7a479e28f223a678 (patch)
tree0dbc48336290443b1db224a72a79a642c08ca395 /passes/fsm/fsm.cc
parented0e2f7a6fe721175b80f6397c9abd5c0080033f (diff)
Improved FSM one-hot encoding, added binary encoding
Diffstat (limited to 'passes/fsm/fsm.cc')
-rw-r--r--passes/fsm/fsm.cc8
1 files changed, 7 insertions, 1 deletions
diff --git a/passes/fsm/fsm.cc b/passes/fsm/fsm.cc
index c0c42de9..b4d7bc46 100644
--- a/passes/fsm/fsm.cc
+++ b/passes/fsm/fsm.cc
@@ -56,6 +56,7 @@ struct FsmPass : public Pass {
log(" -expand, -norecode, -export, -nomap\n");
log(" enable or disable passes as indicated above\n");
log("\n");
+ log(" -encoding tye\n");
log(" -fm_set_fsm_file file\n");
log(" passed through to fsm_recode pass\n");
log("\n");
@@ -67,6 +68,7 @@ struct FsmPass : public Pass {
bool flag_expand = false;
bool flag_export = false;
std::string fm_set_fsm_file_opt;
+ std::string encoding_opt;
log_header("Executing FSM pass (extract and optimize FSM).\n");
log_push();
@@ -78,6 +80,10 @@ struct FsmPass : public Pass {
fm_set_fsm_file_opt = " -fm_set_fsm_file " + args[++argidx];
continue;
}
+ if (arg == "-encoding" && argidx+1 < args.size() && fm_set_fsm_file_opt.empty()) {
+ encoding_opt = " -encoding " + args[++argidx];
+ continue;
+ }
if (arg == "-norecode") {
flag_norecode = true;
continue;
@@ -112,7 +118,7 @@ struct FsmPass : public Pass {
}
if (!flag_norecode)
- Pass::call(design, "fsm_recode" + fm_set_fsm_file_opt);
+ Pass::call(design, "fsm_recode" + fm_set_fsm_file_opt + encoding_opt);
Pass::call(design, "fsm_info");
if (!flag_nomap)