mirror of
https://github.com/YosysHQ/yosys
synced 2025-10-10 17:58:07 +00:00
driver: add --no-private-id-locs and NEWER_ID
This commit is contained in:
parent
85bcdee232
commit
e4d4de1020
3 changed files with 29 additions and 1 deletions
|
@ -82,6 +82,7 @@ YOSYS_NAMESPACE_BEGIN
|
|||
int autoidx = 1;
|
||||
int yosys_xtrace = 0;
|
||||
bool yosys_write_versions = true;
|
||||
bool yosys_private_id_locs = true;
|
||||
const char* yosys_maybe_version() {
|
||||
if (yosys_write_versions)
|
||||
return yosys_version_str;
|
||||
|
@ -272,6 +273,16 @@ void yosys_shutdown()
|
|||
}
|
||||
|
||||
RTLIL::IdString new_id(std::string file, int line, std::string func)
|
||||
{
|
||||
return newer_id(file, line, func);
|
||||
}
|
||||
|
||||
RTLIL::IdString new_id_suffix(std::string file, int line, std::string func, std::string suffix)
|
||||
{
|
||||
return newer_id_suffix(file, line, func, suffix);
|
||||
}
|
||||
|
||||
RTLIL::IdString newer_id(std::string file, int line, std::string func)
|
||||
{
|
||||
#ifdef _WIN32
|
||||
size_t pos = file.find_last_of("/\\");
|
||||
|
@ -288,7 +299,7 @@ RTLIL::IdString new_id(std::string file, int line, std::string func)
|
|||
return stringf("$auto$%s:%d:%s$%d", file, line, func, autoidx++);
|
||||
}
|
||||
|
||||
RTLIL::IdString new_id_suffix(std::string file, int line, std::string func, std::string suffix)
|
||||
RTLIL::IdString newer_id_suffix(std::string file, int line, std::string func, std::string suffix)
|
||||
{
|
||||
#ifdef _WIN32
|
||||
size_t pos = file.find_last_of("/\\");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue