mirror of
				https://github.com/YosysHQ/yosys
				synced 2025-10-30 19:22:31 +00:00 
			
		
		
		
	In line with other tools, this adds an extra wrapping block around such for loops to appropriately scope the variable.
		
			
				
	
	
		
			9 lines
		
	
	
	
		
			241 B
		
	
	
	
		
			Text
		
	
	
	
	
	
			
		
		
	
	
			9 lines
		
	
	
	
		
			241 B
		
	
	
	
		
			Text
		
	
	
	
	
	
| logger -expect error "For loop inline variable declaration is only supported in SystemVerilog mode!" 1
 | |
| read_verilog <<EOT
 | |
| module top;
 | |
|     integer z;
 | |
|     initial
 | |
|         for (integer i = 1; i < 10; i = i + 1)
 | |
|             z = i;
 | |
| endmodule
 | |
| EOT
 |