3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-05-13 02:34:44 +00:00

Naming improvements

This commit is contained in:
Akash Levy 2024-11-21 03:29:35 -08:00
parent f855b39dbb
commit 52a1493548
3 changed files with 63 additions and 65 deletions

View file

@ -358,18 +358,16 @@ RTLIL::IdString new_id_suffix(std::string file, int line, std::string func, std:
YOSYS_NAMESPACE_PREFIX new_id(__FILE__, __LINE__, __FUNCTION__)
#define NEW_ID_SUFFIX(suffix) \
YOSYS_NAMESPACE_PREFIX new_id_suffix(__FILE__, __LINE__, __FUNCTION__, suffix)
#define NEW_ID2 \
module->uniquify(cell->name.str())
#define NEW_ID2_SUFFIX(suffix) \
module->uniquify(cell->name.str() + "_" + suffix)
#define NEW_ID3 \
module->uniquify(cell_name.str())
#define NEW_ID3_SUFFIX(suffix) \
module->uniquify(cell_name.str() + "_" + suffix)
#define NEW_MEM_ID_SUFFIX(suffix) \
mem.mem ? module->uniquify(mem.mem->name.str() + "_" + suffix) : module->uniquify(string("\\mem_") + suffix)
#define NEW_ABC_ID \
module->uniquify(IdString("\\boolopt"))
#define UNQ_SUFFIX "_ix" + std::to_string(autoidx++)
#define NEW_ID2 IdString(cell->name.str() + UNQ_SUFFIX)
#define NEW_ID2_SUFFIX(suffix) IdString(cell->name.str() + "_" + suffix + UNQ_SUFFIX)
#define NEW_ID3 IdString(cell_name.str() + UNQ_SUFFIX)
#define NEW_ID3_SUFFIX(suffix) IdString(cell_name.str() + "_" + suffix + UNQ_SUFFIX)
#define NEW_ID4 IdString(name.str() + UNQ_SUFFIX)
#define NEW_ID4_SUFFIX(suffix) IdString(name.str() + "_" + suffix + UNQ_SUFFIX)
#define NEW_MEM_ID_SUFFIX(suffix) mem.mem ? module->uniquify(mem.mem->name.str() + "_" + suffix) : module->uniquify(string("\\mem_") + suffix)
#define NEW_ABC_ID module->uniquify(IdString("\\boolopt"))
// Create a statically allocated IdString object, using for example ID::A or ID($add).
//