summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClifford Wolf <clifford@clifford.at>2014-08-08 14:49:06 +0200
committerClifford Wolf <clifford@clifford.at>2014-08-08 14:56:03 +0200
commit7067c43ec09cca176ad72378aa9ad868171c2471 (patch)
tree87f8f6f78cc59a697e71ef4e075c2b770076d3bb
parentcb6ca08a53bfaa1b76798e6220bb1b267d49b235 (diff)
Fixed "fsm -export"
-rw-r--r--passes/fsm/fsm.cc6
-rw-r--r--passes/fsm/fsm_export.cc5
2 files changed, 5 insertions, 6 deletions
diff --git a/passes/fsm/fsm.cc b/passes/fsm/fsm.cc
index 13e90910..2fae7609 100644
--- a/passes/fsm/fsm.cc
+++ b/passes/fsm/fsm.cc
@@ -127,12 +127,12 @@ struct FsmPass : public Pass {
Pass::call(design, "fsm_recode" + fm_set_fsm_file_opt + encoding_opt);
Pass::call(design, "fsm_info");
- if (!flag_nomap)
- Pass::call(design, "fsm_map");
-
if (flag_export)
Pass::call(design, "fsm_export");
+ if (!flag_nomap)
+ Pass::call(design, "fsm_map");
+
log_pop();
}
} FsmPass;
diff --git a/passes/fsm/fsm_export.cc b/passes/fsm/fsm_export.cc
index cb762dc1..b4a6b3f7 100644
--- a/passes/fsm/fsm_export.cc
+++ b/passes/fsm/fsm_export.cc
@@ -56,13 +56,12 @@ void write_kiss2(struct RTLIL::Module *module, struct RTLIL::Cell *cell, std::st
attr_it = cell->attributes.find("\\fsm_export");
if (!filename.empty()) {
- kiss_name.assign(filename);
+ kiss_name.assign(filename);
} else if (attr_it != cell->attributes.end() && attr_it->second.decode_string() != "") {
kiss_name.assign(attr_it->second.decode_string());
}
else {
- kiss_name.assign(module->name.str());
- kiss_name.append('-' + cell->name.str() + ".kiss2");
+ kiss_name.assign(log_id(module) + std::string("-") + log_id(cell) + ".kiss2");
}
log("\n");