3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-08-05 10:50:25 +00:00

gowin: Use memory_libmap pass.

This commit is contained in:
Marcelina Kościelnicka 2022-02-09 09:25:45 +01:00
parent 0a8eaca322
commit e4d811561c
9 changed files with 565 additions and 255 deletions

View file

@ -208,17 +208,17 @@ struct SynthGowinPass : public ScriptPass
run("synth -run coarse");
}
if (!nobram && check_label("map_bram", "(skip if -nobram)"))
if (check_label("map_ram"))
{
run("memory_bram -rules +/gowin/brams.txt");
run("techmap -map +/gowin/brams_map.v");
}
if (!nolutram && check_label("map_lutram", "(skip if -nolutram)"))
{
run("memory_bram -rules +/gowin/lutrams.txt");
run("techmap -map +/gowin/lutrams_map.v");
run("setundef -params -zero t:RAM16S4");
std::string args = "";
if (nobram)
args += " -no-auto-block";
if (nolutram)
args += " -no-auto-distributed";
if (help_mode)
args += " [-no-auto-block] [-no-auto-distributed]";
run("memory_libmap -lib +/gowin/lutrams.txt -lib +/gowin/brams.txt" + args, "(-no-auto-block if -nobram, -no-auto-distributed if -nolutram)");
run("techmap -map +/gowin/lutrams_map.v -map +/gowin/brams_map.v");
}
if (check_label("map_ffram"))