mirror of
				https://github.com/YosysHQ/yosys
				synced 2025-10-31 11:42:30 +00:00 
			
		
		
		
	Make -nordff the default in "prep"
Signed-off-by: Clifford Wolf <clifford@clifford.at>
This commit is contained in:
		
							parent
							
								
									a77e27ab15
								
							
						
					
					
						commit
						7fecc3c199
					
				
					 1 changed files with 13 additions and 9 deletions
				
			
		|  | @ -55,13 +55,14 @@ struct PrepPass : public ScriptPass | ||||||
| 		log("\n"); | 		log("\n"); | ||||||
| 		log("    -memx\n"); | 		log("    -memx\n"); | ||||||
| 		log("        simulate verilog simulation behavior for out-of-bounds memory accesses\n"); | 		log("        simulate verilog simulation behavior for out-of-bounds memory accesses\n"); | ||||||
| 		log("        using the 'memory_memx' pass. This option implies -nordff.\n"); | 		log("        using the 'memory_memx' pass.\n"); | ||||||
| 		log("\n"); | 		log("\n"); | ||||||
| 		log("    -nomem\n"); | 		log("    -nomem\n"); | ||||||
| 		log("        do not run any of the memory_* passes\n"); | 		log("        do not run any of the memory_* passes\n"); | ||||||
| 		log("\n"); | 		log("\n"); | ||||||
| 		log("    -nordff\n"); | 		log("    -rdff\n"); | ||||||
| 		log("        passed to 'memory_dff'. prohibits merging of FFs into memory read ports\n"); | 		log("        do not pass -nordff to 'memory_dff'. This enables merging of FFs into\n"); | ||||||
|  | 		log("        memory read ports.\n"); | ||||||
| 		log("\n"); | 		log("\n"); | ||||||
| 		log("    -nokeepdc\n"); | 		log("    -nokeepdc\n"); | ||||||
| 		log("        do not call opt_* with -keepdc\n"); | 		log("        do not call opt_* with -keepdc\n"); | ||||||
|  | @ -77,13 +78,12 @@ struct PrepPass : public ScriptPass | ||||||
| 		log("\n"); | 		log("\n"); | ||||||
| 	} | 	} | ||||||
| 
 | 
 | ||||||
| 	string top_module, fsm_opts, memory_opts; | 	string top_module, fsm_opts; | ||||||
| 	bool autotop, flatten, ifxmode, memxmode, nomemmode, nokeepdc; | 	bool autotop, flatten, ifxmode, memxmode, nomemmode, nokeepdc, nordff; | ||||||
| 
 | 
 | ||||||
| 	virtual void clear_flags() YS_OVERRIDE | 	virtual void clear_flags() YS_OVERRIDE | ||||||
| 	{ | 	{ | ||||||
| 		top_module.clear(); | 		top_module.clear(); | ||||||
| 		memory_opts.clear(); |  | ||||||
| 
 | 
 | ||||||
| 		autotop = false; | 		autotop = false; | ||||||
| 		flatten = false; | 		flatten = false; | ||||||
|  | @ -91,6 +91,7 @@ struct PrepPass : public ScriptPass | ||||||
| 		memxmode = false; | 		memxmode = false; | ||||||
| 		nomemmode = false; | 		nomemmode = false; | ||||||
| 		nokeepdc = false; | 		nokeepdc = false; | ||||||
|  | 		nordff = true; | ||||||
| 	} | 	} | ||||||
| 
 | 
 | ||||||
| 	virtual void execute(std::vector<std::string> args, RTLIL::Design *design) YS_OVERRIDE | 	virtual void execute(std::vector<std::string> args, RTLIL::Design *design) YS_OVERRIDE | ||||||
|  | @ -129,7 +130,6 @@ struct PrepPass : public ScriptPass | ||||||
| 			} | 			} | ||||||
| 			if (args[argidx] == "-memx") { | 			if (args[argidx] == "-memx") { | ||||||
| 				memxmode = true; | 				memxmode = true; | ||||||
| 				memory_opts += " -nordff"; |  | ||||||
| 				continue; | 				continue; | ||||||
| 			} | 			} | ||||||
| 			if (args[argidx] == "-nomem") { | 			if (args[argidx] == "-nomem") { | ||||||
|  | @ -137,7 +137,11 @@ struct PrepPass : public ScriptPass | ||||||
| 				continue; | 				continue; | ||||||
| 			} | 			} | ||||||
| 			if (args[argidx] == "-nordff") { | 			if (args[argidx] == "-nordff") { | ||||||
| 				memory_opts += " -nordff"; | 				nordff = true; | ||||||
|  | 				continue; | ||||||
|  | 			} | ||||||
|  | 			if (args[argidx] == "-rdff") { | ||||||
|  | 				nordff = false; | ||||||
| 				continue; | 				continue; | ||||||
| 			} | 			} | ||||||
| 			if (args[argidx] == "-nokeepdc") { | 			if (args[argidx] == "-nokeepdc") { | ||||||
|  | @ -196,7 +200,7 @@ struct PrepPass : public ScriptPass | ||||||
| 					run(memxmode ? "wreduce -memx" : "wreduce"); | 					run(memxmode ? "wreduce -memx" : "wreduce"); | ||||||
| 			} | 			} | ||||||
| 			if (!nomemmode) { | 			if (!nomemmode) { | ||||||
| 				run("memory_dff" + (help_mode ? " [-nordff]" : memory_opts)); | 				run(string("memory_dff") + (help_mode ? " [-nordff]" : nordff ? " -nordff" : "")); | ||||||
| 				if (help_mode || memxmode) | 				if (help_mode || memxmode) | ||||||
| 					run("memory_memx", "(if -memx)"); | 					run("memory_memx", "(if -memx)"); | ||||||
| 				run("opt_clean"); | 				run("opt_clean"); | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue