mirror of
				https://github.com/YosysHQ/yosys
				synced 2025-10-31 11:42:30 +00:00 
			
		
		
		
	Merge pull request #1203 from whitequark/write_verilog-zero-width-values
write_verilog: dump zero width constants correctly
This commit is contained in:
		
						commit
						927f0caa9d
					
				
					 1 changed files with 2 additions and 1 deletions
				
			
		|  | @ -189,7 +189,8 @@ void dump_const(std::ostream &f, const RTLIL::Const &data, int width = -1, int o | ||||||
| 	if (width < 0) | 	if (width < 0) | ||||||
| 		width = data.bits.size() - offset; | 		width = data.bits.size() - offset; | ||||||
| 	if (width == 0) { | 	if (width == 0) { | ||||||
| 		f << "\"\""; | 		// See IEEE 1364-2005 Clause 5.1.14.
 | ||||||
|  | 		f << "{0{1'b0}}"; | ||||||
| 		return; | 		return; | ||||||
| 	} | 	} | ||||||
| 	if (nostr) | 	if (nostr) | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue