mirror of
				https://github.com/YosysHQ/yosys
				synced 2025-10-31 11:42:30 +00:00 
			
		
		
		
	Made the expansion order of hierarchy deterministic
This commit is contained in:
		
							parent
							
								
									8e9e793126
								
							
						
					
					
						commit
						e22e4d59b8
					
				
					 1 changed files with 3 additions and 3 deletions
				
			
		|  | @ -261,7 +261,7 @@ bool expand_module(RTLIL::Design *design, RTLIL::Module *module, bool flag_check | ||||||
| 	return did_something; | 	return did_something; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| void hierarchy_worker(RTLIL::Design *design, std::set<RTLIL::Module*> &used, RTLIL::Module *mod, int indent) | void hierarchy_worker(RTLIL::Design *design, std::set<RTLIL::Module*, IdString::compare_ptr_by_name<Module>> &used, RTLIL::Module *mod, int indent) | ||||||
| { | { | ||||||
| 	if (used.count(mod) > 0) | 	if (used.count(mod) > 0) | ||||||
| 		return; | 		return; | ||||||
|  | @ -287,7 +287,7 @@ void hierarchy_worker(RTLIL::Design *design, std::set<RTLIL::Module*> &used, RTL | ||||||
| 
 | 
 | ||||||
| void hierarchy_clean(RTLIL::Design *design, RTLIL::Module *top, bool purge_lib) | void hierarchy_clean(RTLIL::Design *design, RTLIL::Module *top, bool purge_lib) | ||||||
| { | { | ||||||
| 	std::set<RTLIL::Module*> used; | 	std::set<RTLIL::Module*, IdString::compare_ptr_by_name<Module>> used; | ||||||
| 	hierarchy_worker(design, used, top, 0); | 	hierarchy_worker(design, used, top, 0); | ||||||
| 
 | 
 | ||||||
| 	std::vector<RTLIL::Module*> del_modules; | 	std::vector<RTLIL::Module*> del_modules; | ||||||
|  | @ -523,7 +523,7 @@ struct HierarchyPass : public Pass { | ||||||
| 		{ | 		{ | ||||||
| 			did_something = false; | 			did_something = false; | ||||||
| 
 | 
 | ||||||
| 			std::set<RTLIL::Module*> used_modules; | 			std::set<RTLIL::Module*, IdString::compare_ptr_by_name<Module>> used_modules; | ||||||
| 			if (top_mod != NULL) { | 			if (top_mod != NULL) { | ||||||
| 				log_header(design, "Analyzing design hierarchy..\n"); | 				log_header(design, "Analyzing design hierarchy..\n"); | ||||||
| 				hierarchy_worker(design, used_modules, top_mod, 0); | 				hierarchy_worker(design, used_modules, top_mod, 0); | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue