mirror of
				https://github.com/YosysHQ/yosys
				synced 2025-10-31 03:32:29 +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.
		
			
				
	
	
		
			8 lines
		
	
	
	
		
			96 B
		
	
	
	
		
			Verilog
		
	
	
	
	
	
			
		
		
	
	
			8 lines
		
	
	
	
		
			96 B
		
	
	
	
		
			Verilog
		
	
	
	
	
	
| module top(...);
 | |
| 
 | |
| input [7:0] A;
 | |
| output [7:0] B;
 | |
| wire [7:0] C = 3;
 | |
| assign B = A + C;
 | |
| 
 | |
| endmodule
 |