diff options
author | David Shah <dave@ds0.me> | 2019-12-01 14:03:23 +0000 |
---|---|---|
committer | David Shah <dave@ds0.me> | 2019-12-27 10:44:30 +0000 |
commit | fe40094216d0007797c51ff8894127b37a4ff045 (patch) | |
tree | 3ade1df159a81ea4a363d56f6c7f662266853c60 /common/nextpnr.h | |
parent | b1000870244dbb1a73198e23a859825865938b4c (diff) | |
download | nextpnr-fe40094216d0007797c51ff8894127b37a4ff045.tar.gz nextpnr-fe40094216d0007797c51ff8894127b37a4ff045.tar.bz2 nextpnr-fe40094216d0007797c51ff8894127b37a4ff045.zip |
Preserve hierarchy through packing
Signed-off-by: David Shah <dave@ds0.me>
Diffstat (limited to 'common/nextpnr.h')
-rw-r--r-- | common/nextpnr.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/common/nextpnr.h b/common/nextpnr.h index 7dfebd62..61e04415 100644 --- a/common/nextpnr.h +++ b/common/nextpnr.h @@ -544,6 +544,9 @@ struct HierarchicalCell IdString name, type, parent, fullpath; // Name inside cell instance -> global name std::unordered_map<IdString, IdString> leaf_cells, nets; + // Global name -> name inside cell instance + std::unordered_map<IdString, IdString> leaf_cells_by_gname, nets_by_gname; + // Cell port to net std::unordered_map<IdString, HierarchicalPort> ports; // Name inside cell instance -> global name std::unordered_map<IdString, IdString> hier_cells; @@ -836,6 +839,10 @@ struct Context : Arch, DeterministicRNG std::unordered_map<WireId, PipId> *route = nullptr, bool useEstimate = true); // -------------------------------------------------------------- + // call after changing hierpath or adding/removing nets and cells + void fixupHierarchy(); + + // -------------------------------------------------------------- // provided by sdf.cc void writeSDF(std::ostream &out, bool cvc_mode = false) const; |