diff options
Diffstat (limited to 'techlibs/gowin')
| -rw-r--r-- | techlibs/gowin/Makefile.inc | 6 | ||||
| -rw-r--r-- | techlibs/gowin/brams.txt (renamed from techlibs/gowin/bram.txt) | 0 | ||||
| -rw-r--r-- | techlibs/gowin/lutrams.txt (renamed from techlibs/gowin/dram.txt) | 0 | ||||
| -rw-r--r-- | techlibs/gowin/lutrams_map.v (renamed from techlibs/gowin/drams_map.v) | 0 | ||||
| -rw-r--r-- | techlibs/gowin/synth_gowin.cc | 53 | 
5 files changed, 31 insertions, 28 deletions
diff --git a/techlibs/gowin/Makefile.inc b/techlibs/gowin/Makefile.inc index d2853704b..fe5d9d6e6 100644 --- a/techlibs/gowin/Makefile.inc +++ b/techlibs/gowin/Makefile.inc @@ -7,9 +7,9 @@ $(eval $(call add_share_file,share/gowin,techlibs/gowin/cells_map.v))  $(eval $(call add_share_file,share/gowin,techlibs/gowin/cells_sim.v))  $(eval $(call add_share_file,share/gowin,techlibs/gowin/arith_map.v))  $(eval $(call add_share_file,share/gowin,techlibs/gowin/brams_map.v)) -$(eval $(call add_share_file,share/gowin,techlibs/gowin/bram.txt)) -$(eval $(call add_share_file,share/gowin,techlibs/gowin/drams_map.v)) -$(eval $(call add_share_file,share/gowin,techlibs/gowin/dram.txt)) +$(eval $(call add_share_file,share/gowin,techlibs/gowin/brams.txt)) +$(eval $(call add_share_file,share/gowin,techlibs/gowin/lutrams_map.v)) +$(eval $(call add_share_file,share/gowin,techlibs/gowin/lutrams.txt)) diff --git a/techlibs/gowin/bram.txt b/techlibs/gowin/brams.txt index e406f9c51..e406f9c51 100644 --- a/techlibs/gowin/bram.txt +++ b/techlibs/gowin/brams.txt diff --git a/techlibs/gowin/dram.txt b/techlibs/gowin/lutrams.txt index 9db530251..9db530251 100644 --- a/techlibs/gowin/dram.txt +++ b/techlibs/gowin/lutrams.txt diff --git a/techlibs/gowin/drams_map.v b/techlibs/gowin/lutrams_map.v index a50ab365a..a50ab365a 100644 --- a/techlibs/gowin/drams_map.v +++ b/techlibs/gowin/lutrams_map.v diff --git a/techlibs/gowin/synth_gowin.cc b/techlibs/gowin/synth_gowin.cc index 6cf058f29..c5b41b503 100644 --- a/techlibs/gowin/synth_gowin.cc +++ b/techlibs/gowin/synth_gowin.cc @@ -55,23 +55,23 @@ struct SynthGowinPass : public ScriptPass  		log("    -nobram\n");  		log("        do not use BRAM cells in output netlist\n");  		log("\n"); -		log("    -nodram\n"); +		log("    -nolutram\n");  		log("        do not use distributed RAM cells in output netlist\n");  		log("\n");  		log("    -noflatten\n");  		log("        do not flatten design before synthesis\n");  		log("\n");  		log("    -retime\n"); -		log("        run 'abc' with -dff option\n"); +		log("        run 'abc' with '-dff -D 1' options\n");  		log("\n");  		log("    -nowidelut\n");  		log("        do not use muxes to implement LUTs larger than LUT4s\n");  		log("\n");  		log("    -noiopads\n");  		log("        do not emit IOB at top level ports\n"); -		log("\n"); -		log("    -abc9\n"); -		log("        use new ABC9 flow (EXPERIMENTAL)\n"); +		//log("\n"); +		//log("    -abc9\n"); +		//log("        use new ABC9 flow (EXPERIMENTAL)\n");  		log("\n");  		log("\n");  		log("The following commands are executed by this synthesis command:\n"); @@ -80,7 +80,7 @@ struct SynthGowinPass : public ScriptPass  	}  	string top_opt, vout_file; -	bool retime, nobram, nodram, flatten, nodffe, nowidelut, abc9, noiopads; +	bool retime, nobram, nolutram, flatten, nodffe, nowidelut, abc9, noiopads;  	void clear_flags() YS_OVERRIDE  	{ @@ -90,7 +90,7 @@ struct SynthGowinPass : public ScriptPass  		flatten = true;  		nobram = false;  		nodffe = false; -		nodram = false; +		nolutram = false;  		nowidelut = false;  		abc9 = false;  		noiopads = false; @@ -128,8 +128,8 @@ struct SynthGowinPass : public ScriptPass  				nobram = true;  				continue;  			} -			if (args[argidx] == "-nodram") { -				nodram = true; +			if (args[argidx] == "-nolutram" || /*deprecated*/args[argidx] == "-nodram") { +				nolutram = true;  				continue;  			}  			if (args[argidx] == "-nodffe") { @@ -144,10 +144,10 @@ struct SynthGowinPass : public ScriptPass  				nowidelut = true;  				continue;  			} -			if (args[argidx] == "-abc9") { -				abc9 = true; -				continue; -			} +			//if (args[argidx] == "-abc9") { +			//	abc9 = true; +			//	continue; +			//}  			if (args[argidx] == "-noiopads") {  				noiopads = true;  				continue; @@ -188,28 +188,32 @@ struct SynthGowinPass : public ScriptPass  			run("synth -run coarse");  		} -		if (!nobram && check_label("bram", "(skip if -nobram)")) +		if (!nobram && check_label("map_bram", "(skip if -nobram)"))  		{ -			run("memory_bram -rules +/gowin/bram.txt"); +			run("memory_bram -rules +/gowin/brams.txt");  			run("techmap -map +/gowin/brams_map.v -map +/gowin/cells_sim.v");  		} -		if (!nodram && check_label("dram", "(skip if -nodram)")) +		if (!nolutram && check_label("map_lutram", "(skip if -nolutram)"))  		{ -			run("memory_bram -rules +/gowin/dram.txt"); -			run("techmap -map +/gowin/drams_map.v"); +			run("memory_bram -rules +/gowin/lutrams.txt"); +			run("techmap -map +/gowin/lutrams_map.v");  			run("determine_init");  		} -		if (check_label("fine")) +		if (check_label("map_ffram"))  		{  			run("opt -fast -mux_undef -undriven -fine");  			run("memory_map");  			run("opt -undriven -fine"); +		} + +		if (check_label("map_gates")) +		{  			run("techmap -map +/techmap.v -map +/gowin/arith_map.v");  			run("techmap -map +/techmap.v");  			if (retime || help_mode) -				run("abc -dff", "(only if -retime)"); +				run("abc -dff -D 1", "(only if -retime)");  			run("splitnets");  		} @@ -227,13 +231,13 @@ struct SynthGowinPass : public ScriptPass  		if (check_label("map_luts"))  		{ -			if (nowidelut && abc9) { +			/*if (nowidelut && abc9) {  				run("abc9 -lut 4"); -			} else if (nowidelut && !abc9) { +			} else*/ if (nowidelut && !abc9) {  				run("abc -lut 4"); -			} else if (!nowidelut && abc9) { +			} else /*if (!nowidelut && abc9) {  				run("abc9 -lut 4:8"); -			} else if (!nowidelut && !abc9) { +			} else*/ if (!nowidelut && !abc9) {  				run("abc -lut 4:8");  			}  			run("clean"); @@ -248,7 +252,6 @@ struct SynthGowinPass : public ScriptPass  				run("iopadmap -bits -inpad IBUF O:I -outpad OBUF I:O "  					"-toutpad TBUF OEN:I:O -tinoutpad IOBUF OEN:O:I:IO", "(unless -noiopads)");  			run("clean"); -  		}  		if (check_label("check"))  | 
