mirror of
				https://github.com/YosysHQ/yosys
				synced 2025-11-04 05:19:11 +00:00 
			
		
		
		
	Move \init from source wire to submod if output port
This commit is contained in:
		
							parent
							
								
									dd317c9280
								
							
						
					
					
						commit
						0d7ba77426
					
				
					 1 changed files with 7 additions and 0 deletions
				
			
		| 
						 | 
				
			
			@ -162,6 +162,13 @@ struct SubmodWorker
 | 
			
		|||
			new_wire->port_input = new_wire_port_input;
 | 
			
		||||
			new_wire->port_output = new_wire_port_output;
 | 
			
		||||
			new_wire->attributes = wire->attributes;
 | 
			
		||||
			if (new_wire->port_output) {
 | 
			
		||||
				auto it = wire->attributes.find(ID(init));
 | 
			
		||||
				if (it != wire->attributes.end()) {
 | 
			
		||||
					new_wire->attributes[ID(init)] = it->second[bit.offset];
 | 
			
		||||
					it->second[bit.offset] = State::Sx;
 | 
			
		||||
				}
 | 
			
		||||
			}
 | 
			
		||||
 | 
			
		||||
			if (new_wire->port_input && new_wire->port_output)
 | 
			
		||||
				log("  signal %s: inout %s\n", wire->name.c_str(), new_wire->name.c_str());
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue