aboutsummaryrefslogtreecommitdiffstats
path: root/passes/hierarchy
diff options
context:
space:
mode:
authorClifford Wolf <clifford@clifford.at>2019-03-26 14:51:35 +0100
committerClifford Wolf <clifford@clifford.at>2019-03-26 14:52:48 +0100
commitd0b9b1bece9866fd7b0e153c991fc7e9b57a1efc (patch)
treedf8908d5062a5152a829d5a9c0b12a27923d5b4e /passes/hierarchy
parentc863796e9ff91c76f0f8679b6871b8ffcb75edb6 (diff)
downloadyosys-d0b9b1bece9866fd7b0e153c991fc7e9b57a1efc.tar.gz
yosys-d0b9b1bece9866fd7b0e153c991fc7e9b57a1efc.tar.bz2
yosys-d0b9b1bece9866fd7b0e153c991fc7e9b57a1efc.zip
Add "hdlname" attribute
Signed-off-by: Clifford Wolf <clifford@clifford.at>
Diffstat (limited to 'passes/hierarchy')
-rw-r--r--passes/hierarchy/uniquify.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/passes/hierarchy/uniquify.cc b/passes/hierarchy/uniquify.cc
index c88ecd82e..e6154e94f 100644
--- a/passes/hierarchy/uniquify.cc
+++ b/passes/hierarchy/uniquify.cc
@@ -87,6 +87,8 @@ struct UniquifyPass : public Pass {
smod->name = newname;
cell->type = newname;
smod->set_bool_attribute("\\unique");
+ if (smod->attributes.count("\\hdlname") == 0)
+ smod->attributes["\\hdlname"] = string(log_id(tmod->name));
design->add(smod);
did_something = true;