aboutsummaryrefslogtreecommitdiffstats
path: root/backends
diff options
context:
space:
mode:
authorClifford Wolf <clifford@clifford.at>2019-07-09 16:56:29 +0200
committerDavid Shah <dave@ds0.me>2019-07-09 18:48:38 +0100
commit76f20492a468ffef9902712e36c856f3a6e63dd5 (patch)
tree87ac4c63577e7f0ca026fcd0a0e89fec3e0d5803 /backends
parent17e0cc010c12fc69fdadc2c342da1ef8e16a2d91 (diff)
downloadyosys-76f20492a468ffef9902712e36c856f3a6e63dd5.tar.gz
yosys-76f20492a468ffef9902712e36c856f3a6e63dd5.tar.bz2
yosys-76f20492a468ffef9902712e36c856f3a6e63dd5.zip
Merge pull request #1162 from whitequark/rtlil-case-attrs
Allow attributes on individual switch cases in RTLIL
Diffstat (limited to 'backends')
-rw-r--r--backends/ilang/ilang_backend.cc5
1 files changed, 5 insertions, 0 deletions
diff --git a/backends/ilang/ilang_backend.cc b/backends/ilang/ilang_backend.cc
index b4ba2b03f..313af7d5c 100644
--- a/backends/ilang/ilang_backend.cc
+++ b/backends/ilang/ilang_backend.cc
@@ -204,6 +204,11 @@ void ILANG_BACKEND::dump_proc_switch(std::ostream &f, std::string indent, const
for (auto it = sw->cases.begin(); it != sw->cases.end(); ++it)
{
+ for (auto ait = (*it)->attributes.begin(); ait != (*it)->attributes.end(); ++ait) {
+ f << stringf("%s attribute %s ", indent.c_str(), ait->first.c_str());
+ dump_const(f, ait->second);
+ f << stringf("\n");
+ }
f << stringf("%s case ", indent.c_str());
for (size_t i = 0; i < (*it)->compare.size(); i++) {
if (i > 0)