mirror of https://github.com/YosysHQ/yosys.git
Added "memory -nordff"
This commit is contained in:
parent
255dcb27a0
commit
f6eca509bb
|
@ -31,7 +31,7 @@ struct MemoryPass : public Pass {
|
||||||
{
|
{
|
||||||
// |---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|
|
// |---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|
|
||||||
log("\n");
|
log("\n");
|
||||||
log(" memory [-nomap] [-bram <bram_rules>] [selection]\n");
|
log(" memory [-nomap] [-nordff] [-bram <bram_rules>] [selection]\n");
|
||||||
log("\n");
|
log("\n");
|
||||||
log("This pass calls all the other memory_* passes in a useful order:\n");
|
log("This pass calls all the other memory_* passes in a useful order:\n");
|
||||||
log("\n");
|
log("\n");
|
||||||
|
@ -43,6 +43,8 @@ struct MemoryPass : public Pass {
|
||||||
log(" memory_bram -rules <bram_rules> (when called with -bram)\n");
|
log(" memory_bram -rules <bram_rules> (when called with -bram)\n");
|
||||||
log(" memory_map (skipped if called with -nomap)\n");
|
log(" memory_map (skipped if called with -nomap)\n");
|
||||||
log("\n");
|
log("\n");
|
||||||
|
log("when called with -nordff, memory_dff will be called with -wr_only.\n");
|
||||||
|
log("\n");
|
||||||
log("This converts memories to word-wide DFFs and address decoders\n");
|
log("This converts memories to word-wide DFFs and address decoders\n");
|
||||||
log("or multiport memory blocks if called with the -nomap option.\n");
|
log("or multiport memory blocks if called with the -nomap option.\n");
|
||||||
log("\n");
|
log("\n");
|
||||||
|
@ -50,6 +52,7 @@ struct MemoryPass : public Pass {
|
||||||
virtual void execute(std::vector<std::string> args, RTLIL::Design *design)
|
virtual void execute(std::vector<std::string> args, RTLIL::Design *design)
|
||||||
{
|
{
|
||||||
bool flag_nomap = false;
|
bool flag_nomap = false;
|
||||||
|
bool flag_nordff = false;
|
||||||
string memory_bram_opts;
|
string memory_bram_opts;
|
||||||
|
|
||||||
log_header("Executing MEMORY pass.\n");
|
log_header("Executing MEMORY pass.\n");
|
||||||
|
@ -61,6 +64,10 @@ struct MemoryPass : public Pass {
|
||||||
flag_nomap = true;
|
flag_nomap = true;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
if (args[argidx] == "-nordff") {
|
||||||
|
flag_nordff = true;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
if (argidx+1 < args.size() && args[argidx] == "-bram") {
|
if (argidx+1 < args.size() && args[argidx] == "-bram") {
|
||||||
memory_bram_opts += " -rules " + args[++argidx];
|
memory_bram_opts += " -rules " + args[++argidx];
|
||||||
continue;
|
continue;
|
||||||
|
@ -69,7 +76,7 @@ struct MemoryPass : public Pass {
|
||||||
}
|
}
|
||||||
extra_args(args, argidx, design);
|
extra_args(args, argidx, design);
|
||||||
|
|
||||||
Pass::call(design, "memory_dff");
|
Pass::call(design, flag_nordff ? "memory_dff -wr_only" : "memory_dff");
|
||||||
Pass::call(design, "opt_clean");
|
Pass::call(design, "opt_clean");
|
||||||
Pass::call(design, "memory_share");
|
Pass::call(design, "memory_share");
|
||||||
Pass::call(design, "opt_clean");
|
Pass::call(design, "opt_clean");
|
||||||
|
|
Loading…
Reference in New Issue