mirror of
				https://github.com/YosysHQ/yosys
				synced 2025-10-30 19:22:31 +00:00 
			
		
		
		
	Added module->uniquify()
This commit is contained in:
		
							parent
							
								
									f82c978e08
								
							
						
					
					
						commit
						7f734ecc09
					
				
					 5 changed files with 29 additions and 15 deletions
				
			
		|  | @ -603,9 +603,7 @@ static void import_netlist(RTLIL::Design *design, Netlist *nl, std::set<Netlist* | |||
| 
 | ||||
| 		// log("  importing net %s.\n", net->Name());
 | ||||
| 
 | ||||
| 		std::string wire_name = RTLIL::escape_id(net->Name()); | ||||
| 		while (module->count_id(wire_name)) | ||||
| 			wire_name += "_"; | ||||
| 		RTLIL::IdString wire_name = module->uniquify(RTLIL::escape_id(net->Name())); | ||||
| 		RTLIL::Wire *wire = module->addWire(wire_name); | ||||
| 		import_attributes(wire->attributes, net); | ||||
| 
 | ||||
|  | @ -627,9 +625,7 @@ static void import_netlist(RTLIL::Design *design, Netlist *nl, std::set<Netlist* | |||
| 		{ | ||||
| 			// log("  importing netbus %s.\n", netbus->Name());
 | ||||
| 
 | ||||
| 			std::string wire_name = RTLIL::escape_id(netbus->Name()); | ||||
| 			while (module->count_id(wire_name)) | ||||
| 				wire_name += "_"; | ||||
| 			RTLIL::IdString wire_name = module->uniquify(RTLIL::escape_id(netbus->Name())); | ||||
| 			RTLIL::Wire *wire = module->addWire(wire_name, netbus->Size()); | ||||
| 			wire->start_offset = std::min(netbus->LeftIndex(), netbus->RightIndex()); | ||||
| 			import_attributes(wire->attributes, netbus); | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue