mirror of
				https://github.com/YosysHQ/yosys
				synced 2025-10-31 03:32:29 +00:00 
			
		
		
		
	Improve read_verilog range out of bounds warning
Signed-off-by: Clifford Wolf <clifford@clifford.at>
This commit is contained in:
		
							parent
							
								
									f3de732fb4
								
							
						
					
					
						commit
						23b69ca32b
					
				
					 1 changed files with 6 additions and 6 deletions
				
			
		|  | @ -1083,8 +1083,8 @@ RTLIL::SigSpec AstNode::genRTLIL(int width_hint, bool sign_hint) | |||
| 							log_file_warning(filename, linenum, "Range select out of bounds on signal `%s': Setting result bit to undef.\n", | ||||
| 									 str.c_str()); | ||||
| 						else | ||||
| 							log_file_warning(filename, linenum, "Range select out of bounds on signal `%s': Setting all %d result bits to undef.\n", | ||||
| 									str.c_str(), chunk.width); | ||||
| 							log_file_warning(filename, linenum, "Range select [%d:%d] out of bounds on signal `%s': Setting all %d result bits to undef.\n", | ||||
| 									children[0]->range_left, children[0]->range_right, str.c_str(), chunk.width); | ||||
| 						chunk = RTLIL::SigChunk(RTLIL::State::Sx, chunk.width); | ||||
| 					} else { | ||||
| 						if (chunk.width + chunk.offset > source_width) { | ||||
|  | @ -1097,11 +1097,11 @@ RTLIL::SigSpec AstNode::genRTLIL(int width_hint, bool sign_hint) | |||
| 							chunk.offset += add_undef_bits_lsb; | ||||
| 						} | ||||
| 						if (add_undef_bits_lsb) | ||||
| 							log_file_warning(filename, linenum, "Range select out of bounds on signal `%s': Setting %d LSB bits to undef.\n", | ||||
| 									 str.c_str(), add_undef_bits_lsb); | ||||
| 							log_file_warning(filename, linenum, "Range [%d:%d] select out of bounds on signal `%s': Setting %d LSB bits to undef.\n", | ||||
| 									 children[0]->range_left, children[0]->range_right, str.c_str(), add_undef_bits_lsb); | ||||
| 						if (add_undef_bits_msb) | ||||
| 							log_file_warning(filename, linenum, "Range select out of bounds on signal `%s': Setting %d MSB bits to undef.\n", | ||||
| 									 str.c_str(), add_undef_bits_msb); | ||||
| 							log_file_warning(filename, linenum, "Range [%d:%d] select out of bounds on signal `%s': Setting %d MSB bits to undef.\n", | ||||
| 									 children[0]->range_left, children[0]->range_right, str.c_str(), add_undef_bits_msb); | ||||
| 					} | ||||
| 				} | ||||
| 			} | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue