mirror of
				https://github.com/YosysHQ/yosys
				synced 2025-10-30 19:22:31 +00:00 
			
		
		
		
	This adds one simple piece of functionality to opt_expr: when a cell port is connected to a fully-constant signal (as determined by sigmap), the port is reconnected directly to the constant value. This is just enough optimization to fix the "non-constant $meminit input" problem without requiring a full opt_clean or a separate pass.
		
			
				
	
	
		
			7 lines
		
	
	
	
		
			224 B
		
	
	
	
		
			Text
		
	
	
	
	
	
			
		
		
	
	
			7 lines
		
	
	
	
		
			224 B
		
	
	
	
		
			Text
		
	
	
	
	
	
| read_verilog opt_expr_constconn.v
 | |
| select -assert-count 1 t:$add
 | |
| select -assert-count 1 t:$add %ci w:C %i
 | |
| equiv_opt -assert opt_expr
 | |
| design -load postopt
 | |
| select -assert-count 1 t:$add
 | |
| select -assert-count 0 t:$add %ci w:C %i
 |