Merge pull request #3103 from whitequark/write_verilog-more-zero-width-values

write_verilog: dump zero width sigspecs correctly
This commit is contained in:
Catherine 2021-12-11 16:24:47 +00:00 committed by GitHub
commit 21fbdb6638
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -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()) {