3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-07-24 13:18:56 +00:00

memory_share: Add -nosat and -nowiden options.

This unlocks wide port recognition by default.
This commit is contained in:
Marcelina Kościelnicka 2021-05-29 17:45:05 +02:00
parent 9fdedf4d1c
commit 1f74ec3535
11 changed files with 269 additions and 11 deletions

View file

@ -31,7 +31,7 @@ struct MemoryPass : public Pass {
{
// |---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|
log("\n");
log(" memory [-nomap] [-nordff] [-memx] [-bram <bram_rules>] [selection]\n");
log(" memory [-nomap] [-nordff] [-nowiden] [-nosat] [-memx] [-bram <bram_rules>] [selection]\n");
log("\n");
log("This pass calls all the other memory_* passes in a useful order:\n");
log("\n");
@ -40,7 +40,7 @@ struct MemoryPass : public Pass {
log(" opt_mem_feedback\n");
log(" memory_dff (skipped if called with -nordff or -memx)\n");
log(" opt_clean\n");
log(" memory_share\n");
log(" memory_share [-nowiden] [-nosat]\n");
log(" memory_memx (when called with -memx)\n");
log(" opt_clean\n");
log(" memory_collect\n");
@ -57,6 +57,7 @@ struct MemoryPass : public Pass {
bool flag_nordff = false;
bool flag_memx = false;
string memory_bram_opts;
string memory_share_opts;
log_header(design, "Executing MEMORY pass.\n");
log_push();
@ -76,6 +77,14 @@ struct MemoryPass : public Pass {
flag_memx = true;
continue;
}
if (args[argidx] == "-nowiden") {
memory_share_opts += " -nowiden";
continue;
}
if (args[argidx] == "-nosat") {
memory_share_opts += " -nosat";
continue;
}
if (argidx+1 < args.size() && args[argidx] == "-bram") {
memory_bram_opts += " -rules " + args[++argidx];
continue;
@ -90,7 +99,7 @@ struct MemoryPass : public Pass {
if (!flag_nordff)
Pass::call(design, "memory_dff");
Pass::call(design, "opt_clean");
Pass::call(design, "memory_share");
Pass::call(design, "memory_share" + memory_share_opts);
if (flag_memx)
Pass::call(design, "memory_memx");
Pass::call(design, "opt_clean");