[lib] update tests and fixed some bugs

This commit is contained in:
tangxifan 2023-09-15 17:38:51 -07:00
parent b5cf08a3c5
commit 7913e6cc6a
3 changed files with 10 additions and 4 deletions

View File

@ -1,5 +1,5 @@
<module_mames>
<module_names>
<module_name default="tile_0__1_" given="tile_io_bottom"/>
<module_name default="tile_1__1_" given="tile_clb"/>
<module_name default="tile_1__0_" given="tile_io_left"/>
</ports>
</module_names>

View File

@ -0,0 +1,6 @@
<module_names>
<module_name default="tile_0__1_" given="tile_io_bottom"/>
<module_name default="tile_1__1_" given="tile_clb"/>
<module_name default="tile_1__0_" given="tile_io_left"/>
<module_name default="tile_3__0_" given="tile_io_left"/>
</module_names>

View File

@ -48,11 +48,11 @@ int ModuleNameMap::set_tag_to_name_pair(const std::string& tag, const std::strin
VTR_LOG_ERROR("The customized name '%s' has already been mapped to a built-in name '%s'! Fail to bind it to a new built-in name '%s'\n", name.c_str(), result->second.c_str(), tag.c_str());
return CMD_EXEC_FATAL_ERROR;
}
/* Clean up */
name2tags_.erase(name);
/* Create double link */
name2tags_[name] = tag;
tag2names_[tag] = name;
/* Clean up */
name2tags_.erase(name);
return CMD_EXEC_SUCCESS;
}