mirror of
				https://github.com/YosysHQ/yosys
				synced 2025-11-03 21:09:12 +00:00 
			
		
		
		
	Add synth -keepdc option
This commit is contained in:
		
							parent
							
								
									b5072256f2
								
							
						
					
					
						commit
						dd9771cbcd
					
				
					 1 changed files with 13 additions and 2 deletions
				
			
		| 
						 | 
				
			
			@ -78,6 +78,9 @@ struct SynthPass : public ScriptPass
 | 
			
		|||
		log("    -abc9\n");
 | 
			
		||||
		log("        use new ABC9 flow (EXPERIMENTAL)\n");
 | 
			
		||||
		log("\n");
 | 
			
		||||
		log("    -keepdc\n");
 | 
			
		||||
		log("        do not optimize explicit don't-care values on $mux cells.\n");
 | 
			
		||||
		log("\n");
 | 
			
		||||
		log("\n");
 | 
			
		||||
		log("The following commands are executed by this synthesis command:\n");
 | 
			
		||||
		help_script();
 | 
			
		||||
| 
						 | 
				
			
			@ -85,7 +88,7 @@ struct SynthPass : public ScriptPass
 | 
			
		|||
	}
 | 
			
		||||
 | 
			
		||||
	string top_module, fsm_opts, memory_opts, abc;
 | 
			
		||||
	bool autotop, flatten, noalumacc, nofsm, noabc, noshare;
 | 
			
		||||
	bool autotop, flatten, noalumacc, nofsm, noabc, noshare, keepdc;
 | 
			
		||||
	int lut;
 | 
			
		||||
 | 
			
		||||
	void clear_flags() YS_OVERRIDE
 | 
			
		||||
| 
						 | 
				
			
			@ -102,6 +105,7 @@ struct SynthPass : public ScriptPass
 | 
			
		|||
		noabc = false;
 | 
			
		||||
		noshare = false;
 | 
			
		||||
		abc = "abc";
 | 
			
		||||
		keepdc = false;
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	void execute(std::vector<std::string> args, RTLIL::Design *design) YS_OVERRIDE
 | 
			
		||||
| 
						 | 
				
			
			@ -167,6 +171,10 @@ struct SynthPass : public ScriptPass
 | 
			
		|||
				abc = "abc9";
 | 
			
		||||
				continue;
 | 
			
		||||
			}
 | 
			
		||||
			if (args[argidx] == "-keepdc") {
 | 
			
		||||
				keepdc = true;
 | 
			
		||||
				continue;
 | 
			
		||||
			}
 | 
			
		||||
			break;
 | 
			
		||||
		}
 | 
			
		||||
		extra_args(args, argidx, design);
 | 
			
		||||
| 
						 | 
				
			
			@ -211,7 +219,10 @@ struct SynthPass : public ScriptPass
 | 
			
		|||
			run("opt_clean");
 | 
			
		||||
			run("check");
 | 
			
		||||
			run("opt");
 | 
			
		||||
			run("wreduce");
 | 
			
		||||
			if (help_mode)
 | 
			
		||||
				run("wreduce [-keepdc]");
 | 
			
		||||
			else
 | 
			
		||||
				run("wreduce" + std::string(keepdc ? " -keepdc" : ""));
 | 
			
		||||
			run("peepopt");
 | 
			
		||||
			run("opt_clean");
 | 
			
		||||
			if (help_mode)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue