mirror of
				https://github.com/YosysHQ/yosys
				synced 2025-11-03 21:09:12 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			15 lines
		
	
	
	
		
			252 B
		
	
	
	
		
			Text
		
	
	
	
	
	
			
		
		
	
	
			15 lines
		
	
	
	
		
			252 B
		
	
	
	
		
			Text
		
	
	
	
	
	
read_verilog -sv <<EOF
 | 
						|
module top(input wire x, y, output reg z);
 | 
						|
function automatic f;
 | 
						|
    input inp;
 | 
						|
    for (int i = 0; i < 1; i++)
 | 
						|
        f = inp + 0;
 | 
						|
endfunction
 | 
						|
always_comb
 | 
						|
    if (y)
 | 
						|
        z = f(x);
 | 
						|
    else
 | 
						|
        z = 0;
 | 
						|
endmodule
 | 
						|
EOF
 | 
						|
proc
 |