mirror of
				https://github.com/YosysHQ/yosys
				synced 2025-10-31 11:42:30 +00:00 
			
		
		
		
	Added "prep -nomem"
This commit is contained in:
		
							parent
							
								
									aa25a4cec6
								
							
						
					
					
						commit
						2ee9bf10d0
					
				
					 1 changed files with 16 additions and 6 deletions
				
			
		|  | @ -57,6 +57,9 @@ struct PrepPass : public ScriptPass | ||||||
| 		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. This option implies -nordff.\n"); | ||||||
| 		log("\n"); | 		log("\n"); | ||||||
|  | 		log("    -nomem\n"); | ||||||
|  | 		log("        do not run any of the memory_* passes\n"); | ||||||
|  | 		log("\n"); | ||||||
| 		log("    -nordff\n"); | 		log("    -nordff\n"); | ||||||
| 		log("        passed to 'memory_dff'. prohibits merging of FFs into memory read ports\n"); | 		log("        passed to 'memory_dff'. prohibits merging of FFs into memory read ports\n"); | ||||||
| 		log("\n"); | 		log("\n"); | ||||||
|  | @ -72,7 +75,7 @@ struct PrepPass : public ScriptPass | ||||||
| 	} | 	} | ||||||
| 
 | 
 | ||||||
| 	string top_module, fsm_opts, memory_opts; | 	string top_module, fsm_opts, memory_opts; | ||||||
| 	bool autotop, flatten, ifxmode, memxmode; | 	bool autotop, flatten, ifxmode, memxmode, nomemmode; | ||||||
| 
 | 
 | ||||||
| 	virtual void clear_flags() YS_OVERRIDE | 	virtual void clear_flags() YS_OVERRIDE | ||||||
| 	{ | 	{ | ||||||
|  | @ -83,6 +86,7 @@ struct PrepPass : public ScriptPass | ||||||
| 		flatten = false; | 		flatten = false; | ||||||
| 		ifxmode = false; | 		ifxmode = false; | ||||||
| 		memxmode = false; | 		memxmode = false; | ||||||
|  | 		nomemmode = false; | ||||||
| 	} | 	} | ||||||
| 
 | 
 | ||||||
| 	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 | ||||||
|  | @ -124,6 +128,10 @@ struct PrepPass : public ScriptPass | ||||||
| 				memory_opts += " -nordff"; | 				memory_opts += " -nordff"; | ||||||
| 				continue; | 				continue; | ||||||
| 			} | 			} | ||||||
|  | 			if (args[argidx] == "-nomem") { | ||||||
|  | 				nomemmode = true; | ||||||
|  | 				continue; | ||||||
|  | 			} | ||||||
| 			if (args[argidx] == "-nordff") { | 			if (args[argidx] == "-nordff") { | ||||||
| 				memory_opts += " -nordff"; | 				memory_opts += " -nordff"; | ||||||
| 				continue; | 				continue; | ||||||
|  | @ -179,11 +187,13 @@ struct PrepPass : public ScriptPass | ||||||
| 				else | 				else | ||||||
| 					run(memxmode ? "wreduce -memx" : "wreduce"); | 					run(memxmode ? "wreduce -memx" : "wreduce"); | ||||||
| 			} | 			} | ||||||
|  | 			if (!nomemmode) { | ||||||
| 				run("memory_dff" + (help_mode ? " [-nordff]" : memory_opts)); | 				run("memory_dff" + (help_mode ? " [-nordff]" : memory_opts)); | ||||||
| 				if (help_mode || memxmode) | 				if (help_mode || memxmode) | ||||||
| 					run("memory_memx", "(if -memx)"); | 					run("memory_memx", "(if -memx)"); | ||||||
| 				run("opt_clean"); | 				run("opt_clean"); | ||||||
| 				run("memory_collect"); | 				run("memory_collect"); | ||||||
|  | 			} | ||||||
| 			run("opt -keepdc -fast"); | 			run("opt -keepdc -fast"); | ||||||
| 		} | 		} | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue