mirror of
				https://github.com/YosysHQ/yosys
				synced 2025-10-31 11:42:30 +00:00 
			
		
		
		
	Fixed generation of temp names in verilog backend
This commit is contained in:
		
							parent
							
								
									4f4d729e02
								
							
						
					
					
						commit
						461594bb83
					
				
					 1 changed files with 5 additions and 4 deletions
				
			
		|  | @ -51,16 +51,17 @@ void reset_auto_counter_id(RTLIL::IdString id, bool may_rename) | ||||||
| 	if (*str == '$' && may_rename && !norename) | 	if (*str == '$' && may_rename && !norename) | ||||||
| 		auto_name_map[id] = auto_name_counter++; | 		auto_name_map[id] = auto_name_counter++; | ||||||
| 
 | 
 | ||||||
| 	if (str[0] != '_' && str[1] != 0) | 	if (str[0] != '\\' || str[1] != '_' || str[2] == 0) | ||||||
| 		return; | 		return; | ||||||
| 	for (int i = 0; str[i] != 0; i++) { | 
 | ||||||
| 		if (str[i] == '_') | 	for (int i = 2; str[i] != 0; i++) { | ||||||
|  | 		if (str[i] == '_' && str[i+1] == 0) | ||||||
| 			continue; | 			continue; | ||||||
| 		if (str[i] < '0' || str[i] > '9') | 		if (str[i] < '0' || str[i] > '9') | ||||||
| 			return; | 			return; | ||||||
| 	} | 	} | ||||||
| 
 | 
 | ||||||
| 	int num = atoi(str+1); | 	int num = atoi(str+2); | ||||||
| 	if (num >= auto_name_offset) | 	if (num >= auto_name_offset) | ||||||
| 		auto_name_offset = num + 1; | 		auto_name_offset = num + 1; | ||||||
| } | } | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue