mirror of
				https://github.com/YosysHQ/yosys
				synced 2025-10-26 09:24:37 +00:00 
			
		
		
		
	sim: Fix cosimulation with nested modules having unconnected inputs
When assigning values to input ports of nested modules in cosimulation, sim needs to find the actual driver of the signal to perform the assignment. The existing code didn't handle unconnected inputs in that scenario.
This commit is contained in:
		
							parent
							
								
									e6f3914800
								
							
						
					
					
						commit
						ad2b04d63a
					
				
					 1 changed files with 2 additions and 1 deletions
				
			
		|  | @ -223,7 +223,8 @@ struct SimInstance | |||
| 
 | ||||
| 			if (wire->port_input && instance != nullptr && parent != nullptr) { | ||||
| 				for (int i = 0; i < GetSize(sig); i++) { | ||||
| 					in_parent_drivers.emplace(sig[i], parent->sigmap(instance->getPort(wire->name)[i])); | ||||
| 					if (instance->hasPort(wire->name)) | ||||
| 						in_parent_drivers.emplace(sig[i], parent->sigmap(instance->getPort(wire->name)[i])); | ||||
| 				} | ||||
| 			} | ||||
| 		} | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue