mirror of
				https://github.com/YosysHQ/yosys
				synced 2025-11-04 13:29:12 +00:00 
			
		
		
		
	Merge branch 'koriakin/xc7nocarrymux' into xaig
This commit is contained in:
		
						commit
						799b18263f
					
				
					 2 changed files with 26 additions and 9 deletions
				
			
		| 
						 | 
					@ -76,7 +76,7 @@ struct SynthEcp5Pass : public ScriptPass
 | 
				
			||||||
		log("    -nodram\n");
 | 
							log("    -nodram\n");
 | 
				
			||||||
		log("        do not use distributed RAM cells in output netlist\n");
 | 
							log("        do not use distributed RAM cells in output netlist\n");
 | 
				
			||||||
		log("\n");
 | 
							log("\n");
 | 
				
			||||||
		log("    -nomux\n");
 | 
							log("    -nowidelut\n");
 | 
				
			||||||
		log("        do not use PFU muxes to implement LUTs larger than LUT4s\n");
 | 
							log("        do not use PFU muxes to implement LUTs larger than LUT4s\n");
 | 
				
			||||||
		log("\n");
 | 
							log("\n");
 | 
				
			||||||
		log("    -abc2\n");
 | 
							log("    -abc2\n");
 | 
				
			||||||
| 
						 | 
					@ -96,7 +96,7 @@ struct SynthEcp5Pass : public ScriptPass
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	string top_opt, blif_file, edif_file, json_file;
 | 
						string top_opt, blif_file, edif_file, json_file;
 | 
				
			||||||
	bool noccu2, nodffe, nobram, nodram, nomux, flatten, retime, abc2, abc9, vpr;
 | 
						bool noccu2, nodffe, nobram, nodram, nowidelut, flatten, retime, abc2, abc9, vpr;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	void clear_flags() YS_OVERRIDE
 | 
						void clear_flags() YS_OVERRIDE
 | 
				
			||||||
	{
 | 
						{
 | 
				
			||||||
| 
						 | 
					@ -108,7 +108,7 @@ struct SynthEcp5Pass : public ScriptPass
 | 
				
			||||||
		nodffe = false;
 | 
							nodffe = false;
 | 
				
			||||||
		nobram = false;
 | 
							nobram = false;
 | 
				
			||||||
		nodram = false;
 | 
							nodram = false;
 | 
				
			||||||
		nomux = false;
 | 
							nowidelut = false;
 | 
				
			||||||
		flatten = true;
 | 
							flatten = true;
 | 
				
			||||||
		retime = false;
 | 
							retime = false;
 | 
				
			||||||
		abc2 = false;
 | 
							abc2 = false;
 | 
				
			||||||
| 
						 | 
					@ -176,8 +176,8 @@ struct SynthEcp5Pass : public ScriptPass
 | 
				
			||||||
				nodram = true;
 | 
									nodram = true;
 | 
				
			||||||
				continue;
 | 
									continue;
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
			if (args[argidx] == "-nomux") {
 | 
								if (args[argidx] == "-nowidelut" || args[argidx] == "-nomux") {
 | 
				
			||||||
				nomux = true;
 | 
									nowidelut = true;
 | 
				
			||||||
				continue;
 | 
									continue;
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
			if (args[argidx] == "-abc2") {
 | 
								if (args[argidx] == "-abc2") {
 | 
				
			||||||
| 
						 | 
					@ -275,12 +275,11 @@ struct SynthEcp5Pass : public ScriptPass
 | 
				
			||||||
			if (abc9) {
 | 
								if (abc9) {
 | 
				
			||||||
				run("abc9 -lut +/ecp5/abc_5g.lut -box +/ecp5/abc_5g.box -W 200");
 | 
									run("abc9 -lut +/ecp5/abc_5g.lut -box +/ecp5/abc_5g.box -W 200");
 | 
				
			||||||
			} else {
 | 
								} else {
 | 
				
			||||||
				if (nomux)
 | 
									if (nowidelut)
 | 
				
			||||||
					run("abc -lut 4 -dress");
 | 
										run("abc -lut 4 -dress");
 | 
				
			||||||
				else
 | 
									else
 | 
				
			||||||
					run("abc -lut 4:7 -dress");
 | 
										run("abc -lut 4:7 -dress");
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
 | 
					 | 
				
			||||||
			run("clean");
 | 
								run("clean");
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -73,6 +73,12 @@ struct SynthXilinxPass : public ScriptPass
 | 
				
			||||||
		log("    -nosrl\n");
 | 
							log("    -nosrl\n");
 | 
				
			||||||
		log("        disable inference of shift registers\n");
 | 
							log("        disable inference of shift registers\n");
 | 
				
			||||||
		log("\n");
 | 
							log("\n");
 | 
				
			||||||
 | 
							log("    -nocarry\n");
 | 
				
			||||||
 | 
							log("        do not use XORCY/MUXCY/CARRY4 cells in output netlist\n");
 | 
				
			||||||
 | 
							log("\n");
 | 
				
			||||||
 | 
							log("    -nowidelut\n");
 | 
				
			||||||
 | 
							log("        do not use MUXF[78] resources to implement LUTs larger than LUT6s\n");
 | 
				
			||||||
 | 
							log("\n");
 | 
				
			||||||
		log("    -run <from_label>:<to_label>\n");
 | 
							log("    -run <from_label>:<to_label>\n");
 | 
				
			||||||
		log("        only run the commands between the labels (see below). an empty\n");
 | 
							log("        only run the commands between the labels (see below). an empty\n");
 | 
				
			||||||
		log("        from label is synonymous to 'begin', and empty to label is\n");
 | 
							log("        from label is synonymous to 'begin', and empty to label is\n");
 | 
				
			||||||
| 
						 | 
					@ -94,7 +100,7 @@ struct SynthXilinxPass : public ScriptPass
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	std::string top_opt, edif_file, blif_file, abc, arch;
 | 
						std::string top_opt, edif_file, blif_file, abc, arch;
 | 
				
			||||||
	bool flatten, retime, vpr, nocarry, nobram, nodram, nosrl;
 | 
						bool flatten, retime, vpr, nobram, nodram, nosrl, nocarry, nowidelut;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	void clear_flags() YS_OVERRIDE
 | 
						void clear_flags() YS_OVERRIDE
 | 
				
			||||||
	{
 | 
						{
 | 
				
			||||||
| 
						 | 
					@ -109,6 +115,8 @@ struct SynthXilinxPass : public ScriptPass
 | 
				
			||||||
		nobram = false;
 | 
							nobram = false;
 | 
				
			||||||
		nodram = false;
 | 
							nodram = false;
 | 
				
			||||||
		nosrl = false;
 | 
							nosrl = false;
 | 
				
			||||||
 | 
							nocarry = false;
 | 
				
			||||||
 | 
							nowidelut = false;
 | 
				
			||||||
		arch = "xc7";
 | 
							arch = "xc7";
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -152,6 +160,14 @@ struct SynthXilinxPass : public ScriptPass
 | 
				
			||||||
				retime = true;
 | 
									retime = true;
 | 
				
			||||||
				continue;
 | 
									continue;
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
 | 
								if (args[argidx] == "-nocarry") {
 | 
				
			||||||
 | 
									nocarry = true;
 | 
				
			||||||
 | 
									continue;
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
 | 
								if (args[argidx] == "-nowidelut") {
 | 
				
			||||||
 | 
									nowidelut = true;
 | 
				
			||||||
 | 
									continue;
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
			if (args[argidx] == "-vpr") {
 | 
								if (args[argidx] == "-vpr") {
 | 
				
			||||||
				vpr = true;
 | 
									vpr = true;
 | 
				
			||||||
				continue;
 | 
									continue;
 | 
				
			||||||
| 
						 | 
					@ -285,7 +301,9 @@ struct SynthXilinxPass : public ScriptPass
 | 
				
			||||||
			if (abc == "abc9")
 | 
								if (abc == "abc9")
 | 
				
			||||||
				run(abc + " -lut +/xilinx/abc_xc7.lut -box +/xilinx/abc_xc7.box -W " + XC7_WIRE_DELAY + string(retime ? " -dff" : ""));
 | 
									run(abc + " -lut +/xilinx/abc_xc7.lut -box +/xilinx/abc_xc7.box -W " + XC7_WIRE_DELAY + string(retime ? " -dff" : ""));
 | 
				
			||||||
			else if (help_mode)
 | 
								else if (help_mode)
 | 
				
			||||||
				run(abc + " -luts 2:2,3,6:5,10,20 [-dff]");
 | 
									run("abc -luts 2:2,3,6:5[,10,20] [-dff]", "(skip if 'nowidelut', only for '-retime')");
 | 
				
			||||||
 | 
								else if (nowidelut)
 | 
				
			||||||
 | 
									run("abc -luts 2:2,3,6:5" + string(retime ? " -dff" : ""));
 | 
				
			||||||
			else
 | 
								else
 | 
				
			||||||
				run(abc + " -luts 2:2,3,6:5,10,20" + string(retime ? " -dff" : ""));
 | 
									run(abc + " -luts 2:2,3,6:5,10,20" + string(retime ? " -dff" : ""));
 | 
				
			||||||
			run("clean");
 | 
								run("clean");
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue