mirror of
https://github.com/YosysHQ/yosys
synced 2026-07-15 03:35:40 +00:00
twine: fix another off-by-one
This commit is contained in:
parent
d96461e40c
commit
9cb838febe
3 changed files with 2 additions and 3 deletions
|
|
@ -1983,7 +1983,7 @@ namespace {
|
|||
void error(int linenr)
|
||||
{
|
||||
std::stringstream buf;
|
||||
RTLIL_BACKEND::dump_cell(buf, " ", cell);
|
||||
RTLIL_BACKEND::dump_cell(buf, " ", cell, cell->module->design);
|
||||
|
||||
std::string mod_name = module ? module->design->twines.str(module->meta_->name) : std::string();
|
||||
std::string cell_name = cell->module->design->twines.str(cell->meta_->name);
|
||||
|
|
|
|||
|
|
@ -15,7 +15,6 @@ TwineRef twine_populate(std::string name) {
|
|||
}
|
||||
void twine_prepopulate() {
|
||||
TwinePool::globals_.reserve(STATIC_TWINE_END);
|
||||
TwinePool::globals_.push_back(Twine{std::string()});
|
||||
#define X(_id) twine_populate("\\" #_id);
|
||||
#include "kernel/constids.inc"
|
||||
#undef X
|
||||
|
|
|
|||
|
|
@ -265,7 +265,7 @@ struct TwinePool {
|
|||
}
|
||||
|
||||
void rebuild_index() {
|
||||
for (TwineRef ref = 0; ref < globals_.size(); ref++)
|
||||
for (TwineRef ref = 0; ref < STATIC_TWINE_END; ref++)
|
||||
index.insert(ref);
|
||||
for (auto it = backing.begin(); it != backing.end(); ++it)
|
||||
index.insert(STATIC_TWINE_END + backing.get_index(it));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue