diff options
author | Sahand Kashani <sahand.kashani@gmail.com> | 2020-03-19 16:24:18 +0100 |
---|---|---|
committer | Sahand Kashani <sahand.kashani@gmail.com> | 2020-03-19 16:24:18 +0100 |
commit | ed9f8bfe6ecfbe395a3be9b9d711b8209e0f38cb (patch) | |
tree | 9f0808933de3f205ba4e59876577f897a5846a0e /backends/firrtl/firrtl.cc | |
parent | 59236314f80b68126ca7ec81cca3ce1bf36a384b (diff) | |
download | yosys-ed9f8bfe6ecfbe395a3be9b9d711b8209e0f38cb.tar.gz yosys-ed9f8bfe6ecfbe395a3be9b9d711b8209e0f38cb.tar.bz2 yosys-ed9f8bfe6ecfbe395a3be9b9d711b8209e0f38cb.zip |
Add fileinfo to firrtl backend for instances
Diffstat (limited to 'backends/firrtl/firrtl.cc')
-rw-r--r-- | backends/firrtl/firrtl.cc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/backends/firrtl/firrtl.cc b/backends/firrtl/firrtl.cc index 30b99fd91..8b361e9ac 100644 --- a/backends/firrtl/firrtl.cc +++ b/backends/firrtl/firrtl.cc @@ -394,7 +394,8 @@ struct FirrtlWorker log_warning("No instance for %s.%s\n", cell_type.c_str(), cell_name.c_str()); return; } - wire_exprs.push_back(stringf("%s" "inst %s%s of %s", indent.c_str(), cell_name.c_str(), cell_name_comment.c_str(), instanceOf.c_str())); + auto cellFileinfo = getFileinfo(cell->attributes); + wire_exprs.push_back(stringf("%s" "inst %s%s of %s @[%s]", indent.c_str(), cell_name.c_str(), cell_name_comment.c_str(), instanceOf.c_str(), cellFileinfo.c_str())); for (auto it = cell->connections().begin(); it != cell->connections().end(); ++it) { if (it->second.size() > 0) { @@ -435,7 +436,7 @@ struct FirrtlWorker // as part of the coalesced subfield assignments for this wire. register_reverse_wire_map(sourceExpr, *sinkSig); } else { - wire_exprs.push_back(stringf("\n%s%s <= %s", indent.c_str(), sinkExpr.c_str(), sourceExpr.c_str())); + wire_exprs.push_back(stringf("\n%s%s <= %s @[%s]", indent.c_str(), sinkExpr.c_str(), sourceExpr.c_str(), cellFileinfo.c_str())); } } } |