mirror of
				https://github.com/YosysHQ/yosys
				synced 2025-11-04 05:19:11 +00:00 
			
		
		
		
	Fix submod -hidden
This commit is contained in:
		
							parent
							
								
									435d33c373
								
							
						
					
					
						commit
						5e487b103c
					
				
					 1 changed files with 6 additions and 5 deletions
				
			
		| 
						 | 
					@ -151,15 +151,16 @@ struct SubmodWorker
 | 
				
			||||||
				new_wire_name = stringf("%s[%d]", wire->name.c_str(), bit.offset);
 | 
									new_wire_name = stringf("%s[%d]", wire->name.c_str(), bit.offset);
 | 
				
			||||||
			if (new_wire_port_input || new_wire_port_output) {
 | 
								if (new_wire_port_input || new_wire_port_output) {
 | 
				
			||||||
				if (new_wire_name[0] == '$')
 | 
									if (new_wire_name[0] == '$')
 | 
				
			||||||
					do {
 | 
										while (1) {
 | 
				
			||||||
						std::string next_wire_name = stringf("%s\\n%d", hidden_mode ? "$submod" : ":", auto_name_counter++);
 | 
											std::string next_wire_name = stringf("%s\\n%d", hidden_mode ? "$submod" : "", auto_name_counter++);
 | 
				
			||||||
						if (all_wire_names.count(next_wire_name) == 0) {
 | 
											if (all_wire_names.count(next_wire_name) == 0) {
 | 
				
			||||||
							all_wire_names.insert(next_wire_name);
 | 
												all_wire_names.insert(next_wire_name);
 | 
				
			||||||
							new_wire_name = next_wire_name;
 | 
												new_wire_name = next_wire_name;
 | 
				
			||||||
 | 
												break;
 | 
				
			||||||
						}
 | 
											}
 | 
				
			||||||
					} while (new_wire_name[0] == '$');
 | 
										}
 | 
				
			||||||
				else
 | 
									else if (hidden_mode)
 | 
				
			||||||
					new_wire_name = stringf("$submod%s\n", new_wire_name.c_str());
 | 
										new_wire_name = stringf("$submod%s", new_wire_name.c_str());
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
			RTLIL::Wire *new_wire = new_mod->addWire(new_wire_name);
 | 
								RTLIL::Wire *new_wire = new_mod->addWire(new_wire_name);
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue