aboutsummaryrefslogtreecommitdiffstats
path: root/backends
diff options
context:
space:
mode:
authorClifford Wolf <clifford@clifford.at>2019-07-09 22:51:25 +0200
committerGitHub <noreply@github.com>2019-07-09 22:51:25 +0200
commit6dd33be7cec561675be362301ba837cb41f7c283 (patch)
tree9037a390ef691e0196d48e6b94694631504a0fb1 /backends
parentf604aa174e60c98c778d6003be2c591822bf80d1 (diff)
parent37bb6b5e96fcedc1126c31aac84b8c029e192f5f (diff)
downloadyosys-6dd33be7cec561675be362301ba837cb41f7c283.tar.gz
yosys-6dd33be7cec561675be362301ba837cb41f7c283.tar.bz2
yosys-6dd33be7cec561675be362301ba837cb41f7c283.zip
Merge pull request #1175 from whitequark/write_verilog-fix-case-attr-position
write_verilog: fix placement of case attributes
Diffstat (limited to 'backends')
-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);
}