mirror of
				https://github.com/YosysHQ/yosys
				synced 2025-10-31 11:42:30 +00:00 
			
		
		
		
	genrtlil: add width detection for AST_PREFIX nodes
This commit is contained in:
		
							parent
							
								
									87ef1dd805
								
							
						
					
					
						commit
						4fec3a85cd
					
				
					 2 changed files with 26 additions and 0 deletions
				
			
		
							
								
								
									
										18
									
								
								tests/simple/loop_prefix_case.v
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										18
									
								
								tests/simple/loop_prefix_case.v
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,18 @@ | |||
| module top( | ||||
| 	input wire x, | ||||
| 	output reg y | ||||
| ); | ||||
| 	localparam I = 1; | ||||
| 	genvar i; | ||||
| 	generate | ||||
| 		for (i = 0; i < 1; i = i + 1) begin : blk | ||||
| 			wire [i:i] z = x; | ||||
| 		end | ||||
| 	endgenerate | ||||
| 	always @* begin | ||||
| 		case (blk[I - 1].z) | ||||
| 			1: y = 0; | ||||
| 			0: y = 1; | ||||
| 		endcase | ||||
| 	end | ||||
| endmodule | ||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue