mirror of
https://github.com/YosysHQ/yosys
synced 2025-06-06 06:03:23 +00:00
Added "yosys -X"
This commit is contained in:
parent
3ff0d04555
commit
ecd64182c5
7 changed files with 153 additions and 1 deletions
|
@ -120,6 +120,12 @@ namespace RTLIL
|
|||
global_id_storage_.at(idx) = strdup(p);
|
||||
global_id_index_[global_id_storage_.at(idx)] = idx;
|
||||
global_refcount_storage_.at(idx)++;
|
||||
|
||||
if (yosys_xtrace) {
|
||||
log("#X# New IdString '%s' with index %d.\n", p, idx);
|
||||
log_backtrace("-X- ", yosys_xtrace-1);
|
||||
}
|
||||
|
||||
return idx;
|
||||
}
|
||||
|
||||
|
@ -135,6 +141,11 @@ namespace RTLIL
|
|||
if (--global_refcount_storage_.at(idx) != 0)
|
||||
return;
|
||||
|
||||
if (yosys_xtrace) {
|
||||
log("#X# Removed IdString '%s' with index %d.\n", global_id_storage_.at(idx), idx);
|
||||
log_backtrace("-X- ", yosys_xtrace-1);
|
||||
}
|
||||
|
||||
global_id_index_.erase(global_id_storage_.at(idx));
|
||||
free(global_id_storage_.at(idx));
|
||||
global_id_storage_.at(idx) = nullptr;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue