mirror of
				https://github.com/YosysHQ/yosys
				synced 2025-10-30 19:22:31 +00:00 
			
		
		
		
	opt_ffinv: Harden against simple ff/inv loop.
This commit is contained in:
		
							parent
							
								
									9e8a2ac051
								
							
						
					
					
						commit
						d07828b409
					
				
					 1 changed files with 4 additions and 0 deletions
				
			
		|  | @ -72,6 +72,8 @@ struct OptFfInvWorker | |||
| 		for (auto &port: q_ports) { | ||||
| 			if (port.cell == ff.cell && port.port == ID::Q) | ||||
| 				continue; | ||||
| 			if (port.cell == d_inv) | ||||
| 				return false; | ||||
| 			if (port.port != ID::A) | ||||
| 				return false; | ||||
| 			if (!port.cell->type.in(ID($not), ID($_NOT_), ID($lut))) | ||||
|  | @ -148,6 +150,8 @@ struct OptFfInvWorker | |||
| 		for (auto &port: q_ports) { | ||||
| 			if (port.cell == ff.cell && port.port == ID::Q) | ||||
| 				continue; | ||||
| 			if (port.cell == d_lut) | ||||
| 				return false; | ||||
| 			if (port.port != ID::A) | ||||
| 				return false; | ||||
| 			if (port.cell->type.in(ID($not), ID($_NOT_))) { | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue