mirror of
				https://github.com/YosysHQ/yosys
				synced 2025-10-31 03:32:29 +00:00 
			
		
		
		
	Allow %0s $display format specifier
This commit is contained in:
		
							parent
							
								
									9a4f420b4b
								
							
						
					
					
						commit
						96ec9acf84
					
				
					 2 changed files with 8 additions and 1 deletions
				
			
		|  | @ -89,7 +89,7 @@ std::string AstNode::process_format_str(const std::string &sformat, int next_arg | ||||||
| 				case 'S': | 				case 'S': | ||||||
| 				case 'd': | 				case 'd': | ||||||
| 				case 'D': | 				case 'D': | ||||||
| 					if (got_len) | 					if (got_len && len_value != 0) | ||||||
| 						goto unsupported_format; | 						goto unsupported_format; | ||||||
| 					YS_FALLTHROUGH | 					YS_FALLTHROUGH | ||||||
| 				case 'x': | 				case 'x': | ||||||
|  |  | ||||||
							
								
								
									
										7
									
								
								tests/simple/string_format.v
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										7
									
								
								tests/simple/string_format.v
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,7 @@ | ||||||
|  | module top; | ||||||
|  | 	parameter STR = "something interesting"; | ||||||
|  | 	initial begin | ||||||
|  | 		$display("A: %s", STR); | ||||||
|  | 		$display("B: %0s", STR); | ||||||
|  | 	end | ||||||
|  | endmodule | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue