mirror of
				https://github.com/YosysHQ/yosys
				synced 2025-10-31 03:32:29 +00:00 
			
		
		
		
	Unify usage of noflatten among architectures
This commit is contained in:
		
							parent
							
								
									d98fe8ce1f
								
							
						
					
					
						commit
						3b17c9018a
					
				
					 4 changed files with 16 additions and 8 deletions
				
			
		|  | @ -52,6 +52,9 @@ struct SynthGowinPass : public ScriptPass | |||
| 		log("    -nobram\n"); | ||||
| 		log("        do not use BRAM 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("\n"); | ||||
|  | @ -62,14 +65,15 @@ struct SynthGowinPass : public ScriptPass | |||
| 	} | ||||
| 
 | ||||
| 	string top_opt, vout_file; | ||||
| 	bool retime, nobram; | ||||
| 	bool retime, flatten, nobram; | ||||
| 
 | ||||
| 	void clear_flags() YS_OVERRIDE | ||||
| 	{ | ||||
| 		top_opt = "-auto-top"; | ||||
| 		vout_file = ""; | ||||
| 		retime = false; | ||||
|                 nobram = true; | ||||
| 		flatten = true; | ||||
| 		nobram = true; | ||||
| 	} | ||||
| 
 | ||||
| 	void execute(std::vector<std::string> args, RTLIL::Design *design) YS_OVERRIDE | ||||
|  | @ -104,6 +108,10 @@ struct SynthGowinPass : public ScriptPass | |||
| 				nobram = true; | ||||
| 				continue; | ||||
| 			} | ||||
| 			if (args[argidx] == "-noflatten") { | ||||
| 				flatten = false; | ||||
| 				continue; | ||||
| 			}			 | ||||
| 			break; | ||||
| 		} | ||||
| 		extra_args(args, argidx, design); | ||||
|  | @ -127,7 +135,7 @@ struct SynthGowinPass : public ScriptPass | |||
| 			run(stringf("hierarchy -check %s", help_mode ? "-top <top>" : top_opt.c_str())); | ||||
| 		} | ||||
| 
 | ||||
| 		if (check_label("flatten") && check_label("flatten", "(unless -noflatten)")) | ||||
| 		if (flatten && check_label("flatten", "(unless -noflatten)")) | ||||
| 		{ | ||||
| 			run("proc"); | ||||
| 			run("flatten"); | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue