-
Notifications
You must be signed in to change notification settings - Fork 536
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hier port map (to provide fast linking for large designs). #5836
base: master
Are you sure you want to change the base?
Hier port map (to provide fast linking for large designs). #5836
Conversation
…archical mode. Added read_db -hier Signed-off-by: andyfox-rushc <[email protected]>
Signed-off-by: andyfox-rushc <[email protected]>
Signed-off-by: andyfox-rushc <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
clang-tidy made some suggestions
Signed-off-by: andyfox-rushc <[email protected]>
clang-tidy review says "All clean, LGTM! 👍" |
Signed-off-by: andyfox-rushc <[email protected]>
clang-tidy review says "All clean, LGTM! 👍" |
…d netlisted results Signed-off-by: andyfox-rushc <[email protected]>
Signed-off-by: andyfox-rushc <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
clang-tidy made some suggestions
Signed-off-by: andyfox-rushc <[email protected]>
clang-tidy review says "All clean, LGTM! 👍" |
Signed-off-by: andyfox-rushc <[email protected]>
Signed-off-by: andyfox-rushc <[email protected]>
clang-tidy review says "All clean, LGTM! 👍" |
1 similar comment
clang-tidy review says "All clean, LGTM! 👍" |
Signed-off-by: andyfox-rushc <[email protected]>
clang-tidy review says "All clean, LGTM! 👍" |
Signed-off-by: andyfox-rushc <[email protected]>
clang-tidy review says "All clean, LGTM! 👍" |
Signed-off-by: andyfox-rushc <[email protected]>
clang-tidy review says "All clean, LGTM! 👍" |
Signed-off-by: andyfox-rushc <[email protected]>
clang-tidy review says "All clean, LGTM! 👍" |
Signed-off-by: andyfox-rushc <[email protected]>
clang-tidy review says "All clean, LGTM! 👍" |
Signed-off-by: andyfox-rushc <[email protected]>
…keAccessHash call Signed-off-by: andyfox-rushc <[email protected]>
Signed-off-by: andyfox-rushc <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
clang-tidy made some suggestions
src/odb/src/db/dbModBTerm.cpp
Outdated
dbDatabase* db = (dbDatabase*) (obj.getDatabase()); | ||
_dbBlock* block = (_dbBlock*) (db->getChip()->getBlock()); | ||
_dbModule* module = block->_module_tbl->getPtr(obj._parent); | ||
module->_modbterm_hash[obj._name] = obj.getId(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
warning: The parameter must not be null [clang-analyzer-cplusplus.StringChecker]
module->_modbterm_hash[obj._name] = obj.getId();
^
Additional context
src/odb/src/db/dbModBTerm.cpp:147: Taking true branch
if (obj.getDatabase()->isSchema(db_schema_update_hierarchy)) {
^
src/odb/src/db/dbModBTerm.cpp:148: Calling 'dbIStream::operator>>'
stream >> obj._name;
^
src/odb/include/odb/dbStream.h:382: Assuming 'l' is equal to 0
if (l == 0) {
^
src/odb/include/odb/dbStream.h:382: Taking true branch
if (l == 0) {
^
src/odb/include/odb/dbStream.h:383: Null pointer value stored to field '_name'
c = nullptr;
^
src/odb/src/db/dbModBTerm.cpp:148: Returning from 'dbIStream::operator>>'
stream >> obj._name;
^
src/odb/src/db/dbModBTerm.cpp:150: Taking false branch
if (obj.getDatabase()->isSchema(db_schema_update_hierarchy)) {
^
src/odb/src/db/dbModBTerm.cpp:153: Taking false branch
if (obj.getDatabase()->isSchema(db_schema_update_hierarchy)) {
^
src/odb/src/db/dbModBTerm.cpp:156: Taking false branch
if (obj.getDatabase()->isSchema(db_schema_update_hierarchy)) {
^
src/odb/src/db/dbModBTerm.cpp:159: Taking false branch
if (obj.getDatabase()->isSchema(db_schema_update_hierarchy)) {
^
src/odb/src/db/dbModBTerm.cpp:162: Taking false branch
if (obj.getDatabase()->isSchema(db_schema_update_hierarchy)) {
^
src/odb/src/db/dbModBTerm.cpp:165: Taking false branch
if (obj.getDatabase()->isSchema(db_schema_update_hierarchy)) {
^
src/odb/src/db/dbModBTerm.cpp:168: Taking false branch
if (obj.getDatabase()->isSchema(db_schema_odb_busport)) {
^
src/odb/src/db/dbModBTerm.cpp:171: Taking false branch
if (obj.getDatabase()->isSchema(db_schema_update_hierarchy)) {
^
src/odb/src/db/dbModBTerm.cpp:174: Taking false branch
if (obj.getDatabase()->isSchema(db_schema_hier_port_removal)) {
^
src/odb/src/db/dbModBTerm.cpp:178: Taking true branch
if (obj.getDatabase()->isSchema(db_schema_db_remove_hash)) {
^
src/odb/src/db/dbModBTerm.cpp:182: The parameter must not be null
module->_modbterm_hash[obj._name] = obj.getId();
^
src/odb/src/db/dbModITerm.cpp
Outdated
dbDatabase* db = (dbDatabase*) (obj.getDatabase()); | ||
_dbBlock* block = (_dbBlock*) (db->getChip()->getBlock()); | ||
_dbModInst* mod_inst = block->_modinst_tbl->getPtr(obj._parent); | ||
mod_inst->_moditerm_hash[obj._name] = obj.getId(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
warning: The parameter must not be null [clang-analyzer-cplusplus.StringChecker]
mod_inst->_moditerm_hash[obj._name] = obj.getId();
^
Additional context
src/odb/src/db/dbModITerm.cpp:133: Taking true branch
if (obj.getDatabase()->isSchema(db_schema_update_hierarchy)) {
^
src/odb/src/db/dbModITerm.cpp:134: Calling 'dbIStream::operator>>'
stream >> obj._name;
^
src/odb/include/odb/dbStream.h:382: Assuming 'l' is equal to 0
if (l == 0) {
^
src/odb/include/odb/dbStream.h:382: Taking true branch
if (l == 0) {
^
src/odb/include/odb/dbStream.h:383: Null pointer value stored to field '_name'
c = nullptr;
^
src/odb/src/db/dbModITerm.cpp:134: Returning from 'dbIStream::operator>>'
stream >> obj._name;
^
src/odb/src/db/dbModITerm.cpp:136: Taking false branch
if (obj.getDatabase()->isSchema(db_schema_update_hierarchy)) {
^
src/odb/src/db/dbModITerm.cpp:139: Taking false branch
if (obj.getDatabase()->isSchema(db_schema_update_hierarchy)) {
^
src/odb/src/db/dbModITerm.cpp:142: Taking false branch
if (obj.getDatabase()->isSchema(db_schema_update_hierarchy)) {
^
src/odb/src/db/dbModITerm.cpp:145: Taking false branch
if (obj.getDatabase()->isSchema(db_schema_update_hierarchy)) {
^
src/odb/src/db/dbModITerm.cpp:148: Taking false branch
if (obj.getDatabase()->isSchema(db_schema_update_hierarchy)) {
^
src/odb/src/db/dbModITerm.cpp:151: Taking false branch
if (obj.getDatabase()->isSchema(db_schema_update_hierarchy)) {
^
src/odb/src/db/dbModITerm.cpp:154: Taking false branch
if (obj.getDatabase()->isSchema(db_schema_hier_port_removal)) {
^
src/odb/src/db/dbModITerm.cpp:158: Taking true branch
if (obj.getDatabase()->isSchema(db_schema_db_remove_hash)) {
^
src/odb/src/db/dbModITerm.cpp:162: The parameter must not be null
mod_inst->_moditerm_hash[obj._name] = obj.getId();
^
Signed-off-by: andyfox-rushc <[email protected]>
clang-tidy review says "All clean, LGTM! 👍" |
Signed-off-by: andyfox-rushc <[email protected]>
clang-tidy review says "All clean, LGTM! 👍" |
This pull request includes the use of hash tables to provide fast access to dbInst, dbModInst, dbModBTerm, dbModITerms. The hashes are annotated as user fields on dbModule/dbModInst and populated during creation (and input streaming). To get the streamer to work the dbInst have to be written out after the dbModule, so the streamer was modified.
The read_db command has been augmented with a -hier flag to mark the database as being hierarchical.
Many of the redundant hashes in dbBlock have been removed. For example the modbterms hash is in the dbModule not the dbBlock. The original modinst hash on dbBlock is unused (but left in for backward compatibility). The database version was advanced to handle this change.
The name of instances in hierarchical mode is now the "scoped" local name so that the netlisted verilog in hierachical mode only has local names for instances. So in hierarchical mode name (const Instance*) return the "tail" of the name, though of course the fullpath name still works. A filter was put in to the various writers (eg lef/def) which require flat names.