diff options
author | Eddie Hung <eddie@fpgeh.com> | 2019-10-02 12:43:35 -0700 |
---|---|---|
committer | Eddie Hung <eddie@fpgeh.com> | 2019-10-02 12:43:35 -0700 |
commit | 265a655ef906fa0fc9ae30c1315db312e13ebd18 (patch) | |
tree | 1b2cd7829ba003a4e19b1c7cfaef8cec7bba4e51 /passes | |
parent | a4f2f7d23cb27f7677236d7a1823f36215c874e9 (diff) | |
download | yosys-265a655ef906fa0fc9ae30c1315db312e13ebd18.tar.gz yosys-265a655ef906fa0fc9ae30c1315db312e13ebd18.tar.bz2 yosys-265a655ef906fa0fc9ae30c1315db312e13ebd18.zip |
Also rename cells with _TECHMAP_REPLACE_. prefix, as per @cliffordwolf
Diffstat (limited to 'passes')
-rw-r--r-- | passes/techmap/techmap.cc | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/passes/techmap/techmap.cc b/passes/techmap/techmap.cc index 8f8cff9fa..0c57733d4 100644 --- a/passes/techmap/techmap.cc +++ b/passes/techmap/techmap.cc @@ -384,6 +384,8 @@ struct TechmapWorker if (techmap_replace_cell) c_name = orig_cell_name; + else if (it.second->name.begins_with("\\_TECHMAP_REPLACE_.")) + c_name = stringf("%s%s", orig_cell_name.c_str(), c_name.c_str() + strlen("\\_TECHMAP_REPLACE_")); else apply_prefix(cell->name, c_name); @@ -1204,10 +1206,12 @@ struct TechmapPass : public Pass { log("\n"); log("A cell with the name _TECHMAP_REPLACE_ in the map file will inherit the name\n"); log("and attributes of the cell that is being replaced.\n"); - log("A wire with a name of the form `_TECHMAP_REPLACE_.<suffix>` in the map file will\n"); - log("cause a new wire alias to be created with its name set to the original but with\n"); - log("its `_TECHMAP_REPLACE_' prefix to be substituted with the name of the cell being\n"); - log("replaced.\n"); + log("A cell with a name of the form `_TECHMAP_REPLACE_.<suffix>` in the map file will\n"); + log("be named thus but with the `_TECHMAP_REPLACE_' prefix substituted with the name\n"); + log("of the cell being replaced.\n"); + log("Similarly, a wire named in the form `_TECHMAP_REPLACE_.<suffix>` will cause a\n"); + log("new wire alias to be created and named as above but with the `_TECHMAP_REPLACE_'\n"); + log("prefix also substituted.\n"); log("\n"); log("See 'help extract' for a pass that does the opposite thing.\n"); log("\n"); |