mirror of
				https://github.com/YosysHQ/yosys
				synced 2025-10-31 03:32:29 +00:00 
			
		
		
		
	Added Pass:call_newsel API
This commit is contained in:
		
							parent
							
								
									905eac04f1
								
							
						
					
					
						commit
						a66ca0472a
					
				
					 2 changed files with 27 additions and 0 deletions
				
			
		|  | @ -182,6 +182,30 @@ void Pass::call(RTLIL::Design *design, std::vector<std::string> args) | |||
| 	design->check(); | ||||
| } | ||||
| 
 | ||||
| void Pass::call_newsel(RTLIL::Design *design, std::string command) | ||||
| { | ||||
| 	std::string backup_selected_active_module = design->selected_active_module; | ||||
| 	design->selected_active_module.clear(); | ||||
| 	design->selection_stack.push_back(RTLIL::Selection()); | ||||
| 
 | ||||
| 	Pass::call(design, command); | ||||
| 
 | ||||
| 	design->selection_stack.pop_back(); | ||||
| 	design->selected_active_module = backup_selected_active_module; | ||||
| } | ||||
| 
 | ||||
| void Pass::call_newsel(RTLIL::Design *design, std::vector<std::string> args) | ||||
| { | ||||
| 	std::string backup_selected_active_module = design->selected_active_module; | ||||
| 	design->selected_active_module.clear(); | ||||
| 	design->selection_stack.push_back(RTLIL::Selection()); | ||||
| 
 | ||||
| 	Pass::call(design, args); | ||||
| 
 | ||||
| 	design->selection_stack.pop_back(); | ||||
| 	design->selected_active_module = backup_selected_active_module; | ||||
| } | ||||
| 
 | ||||
| Frontend::Frontend(std::string name, std::string short_help) : Pass("read_"+name, short_help), frontend_name(name) | ||||
| { | ||||
| } | ||||
|  |  | |||
|  | @ -55,6 +55,9 @@ struct Pass | |||
| 	static void call(RTLIL::Design *design, std::string command); | ||||
| 	static void call(RTLIL::Design *design, std::vector<std::string> args); | ||||
| 
 | ||||
| 	static void call_newsel(RTLIL::Design *design, std::string command); | ||||
| 	static void call_newsel(RTLIL::Design *design, std::vector<std::string> args); | ||||
| 
 | ||||
| 	static void init_register(); | ||||
| 	static void done_register(); | ||||
| }; | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue