mirror of
				https://github.com/YosysHQ/yosys
				synced 2025-10-31 03:32:29 +00:00 
			
		
		
		
	Fixed upto handling in verilog back-end
This commit is contained in:
		
							parent
							
								
									1058660ac8
								
							
						
					
					
						commit
						f0a8713fea
					
				
					 1 changed files with 3 additions and 0 deletions
				
			
		|  | @ -141,6 +141,9 @@ bool is_reg_wire(RTLIL::SigSpec sig, std::string ®_name) | ||||||
| 	if (sig.size() != chunk.wire->width) { | 	if (sig.size() != chunk.wire->width) { | ||||||
| 		if (sig.size() == 1) | 		if (sig.size() == 1) | ||||||
| 			reg_name += stringf("[%d]", chunk.wire->start_offset +  chunk.offset); | 			reg_name += stringf("[%d]", chunk.wire->start_offset +  chunk.offset); | ||||||
|  | 		else if (chunk.wire->upto) | ||||||
|  | 			reg_name += stringf("[%d:%d]", (chunk.wire->width - (chunk.offset + chunk.width - 1) - 1) + chunk.wire->start_offset, | ||||||
|  | 					(chunk.wire->width - chunk.offset - 1) + chunk.wire->start_offset); | ||||||
| 		else | 		else | ||||||
| 			reg_name += stringf("[%d:%d]", chunk.wire->start_offset +  chunk.offset + chunk.width - 1, | 			reg_name += stringf("[%d:%d]", chunk.wire->start_offset +  chunk.offset + chunk.width - 1, | ||||||
| 					chunk.wire->start_offset +  chunk.offset); | 					chunk.wire->start_offset +  chunk.offset); | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue