mirror of
				https://github.com/YosysHQ/yosys
				synced 2025-10-31 11:42:30 +00:00 
			
		
		
		
	Added support for @<set-name> in expand select ops (%x, %ci, %co)
This commit is contained in:
		
							parent
							
								
									5919bf5525
								
							
						
					
					
						commit
						32ee794bfb
					
				
					 1 changed files with 12 additions and 2 deletions
				
			
		|  | @ -346,8 +346,18 @@ static void select_op_expand(RTLIL::Design *design, std::string arg, char mode) | ||||||
| 			size_t endpos = arg.find(':', pos); | 			size_t endpos = arg.find(':', pos); | ||||||
| 			if (endpos == std::string::npos) | 			if (endpos == std::string::npos) | ||||||
| 				endpos = arg.size(); | 				endpos = arg.size(); | ||||||
| 			if (int(endpos) > pos) | 			if (int(endpos) > pos) { | ||||||
| 				limits.insert(RTLIL::escape_id(arg.substr(pos, endpos-pos))); | 				std::string str = arg.substr(pos, endpos-pos); | ||||||
|  | 				if (str[0] == '@') { | ||||||
|  | 					str = RTLIL::escape_id(str.substr(1)); | ||||||
|  | 					if (design->selection_vars.count(str) > 0) { | ||||||
|  | 						for (auto i1 : design->selection_vars.at(str).selected_members) | ||||||
|  | 						for (auto i2 : i1.second) | ||||||
|  | 							limits.insert(i2); | ||||||
|  | 					} | ||||||
|  | 				} else | ||||||
|  | 					limits.insert(RTLIL::escape_id(str)); | ||||||
|  | 			} | ||||||
| 			pos = endpos; | 			pos = endpos; | ||||||
| 		} | 		} | ||||||
| 	} | 	} | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue