diff options
Diffstat (limited to 'backends/verilog')
| -rw-r--r-- | backends/verilog/verilog_backend.cc | 11 | 
1 files changed, 9 insertions, 2 deletions
| diff --git a/backends/verilog/verilog_backend.cc b/backends/verilog/verilog_backend.cc index 47ef1c479..aa1d4558c 100644 --- a/backends/verilog/verilog_backend.cc +++ b/backends/verilog/verilog_backend.cc @@ -358,7 +358,8 @@ void dump_sigchunk(std::ostream &f, const RTLIL::SigChunk &chunk, bool no_decima  void dump_sigspec(std::ostream &f, const RTLIL::SigSpec &sig)  {  	if (GetSize(sig) == 0) { -		f << "\"\""; +		// See IEEE 1364-2005 Clause 5.1.14. +		f << "{0{1'b0}}";  		return;  	}  	if (sig.is_chunk()) { @@ -431,7 +432,7 @@ void dump_wire(std::ostream &f, std::string indent, RTLIL::Wire *wire)  			dump_const(f, wire->attributes.at(ID::init));  		}  		f << stringf(";\n"); -	} else if (!wire->port_input && !wire->port_output) +	} else  		f << stringf("%s" "wire%s %s;\n", indent.c_str(), range.c_str(), id(wire->name).c_str());  #endif  } @@ -2299,6 +2300,12 @@ struct VerilogBackend : public Backend {  			extmem_prefix = filename.substr(0, filename.rfind('.'));  		} +		log_push(); +		Pass::call(design, "bmuxmap"); +		Pass::call(design, "demuxmap"); +		Pass::call(design, "clean_zerowidth"); +		log_pop(); +  		design->sort();  		*f << stringf("/* Generated by %s */\n", yosys_version_str); | 
