aboutsummaryrefslogtreecommitdiffstats
path: root/backends/verilog
diff options
context:
space:
mode:
authorwhitequark <whitequark@whitequark.org>2019-07-09 19:14:03 +0000
committerwhitequark <whitequark@whitequark.org>2019-07-09 19:14:03 +0000
commit37bb6b5e96fcedc1126c31aac84b8c029e192f5f (patch)
tree2dab728342ba5f004e32a55b83b04e820a16d664 /backends/verilog
parente95ce1f7af269447943cf1798c03b02a0c5aa1a2 (diff)
downloadyosys-37bb6b5e96fcedc1126c31aac84b8c029e192f5f.tar.gz
yosys-37bb6b5e96fcedc1126c31aac84b8c029e192f5f.tar.bz2
yosys-37bb6b5e96fcedc1126c31aac84b8c029e192f5f.zip
write_verilog: fix placement of case attributes. NFC.
Diffstat (limited to 'backends/verilog')
-rw-r--r--backends/verilog/verilog_backend.cc5
1 files changed, 2 insertions, 3 deletions
diff --git a/backends/verilog/verilog_backend.cc b/backends/verilog/verilog_backend.cc
index 6288502a5..087c6fec6 100644
--- a/backends/verilog/verilog_backend.cc
+++ b/backends/verilog/verilog_backend.cc
@@ -1501,6 +1501,7 @@ void dump_proc_switch(std::ostream &f, std::string indent, RTLIL::SwitchRule *sw
bool got_default = false;
for (auto it = sw->cases.begin(); it != sw->cases.end(); ++it) {
+ dump_attributes(f, indent + " ", (*it)->attributes, '\n', /*modattr=*/false, /*as_comment=*/true);
if ((*it)->compare.size() == 0) {
if (got_default)
continue;
@@ -1514,9 +1515,7 @@ void dump_proc_switch(std::ostream &f, std::string indent, RTLIL::SwitchRule *sw
dump_sigspec(f, (*it)->compare[i]);
}
}
- f << stringf(":");
- dump_attributes(f, indent, (*it)->attributes, ' ', /*modattr=*/false, /*as_comment=*/true);
- f << stringf("\n");
+ f << stringf(":\n");
dump_case_body(f, indent + " ", *it);
}