diff --git a/src/dbSta/src/dbNetwork.cc b/src/dbSta/src/dbNetwork.cc index ae3b03107d1..1f5a7a89978 100644 --- a/src/dbSta/src/dbNetwork.cc +++ b/src/dbSta/src/dbNetwork.cc @@ -134,10 +134,10 @@ class DbInstanceChildIterator : public InstanceChildIterator dbModule* module_; std::vector child_modules_; bool top_; - dbSet::iterator dbinst_iter_; - dbSet::iterator dbinst_end_; - dbSet::iterator modinst_iter_; - dbSet::iterator modinst_end_; + std::vector>::iterator dbinst_iter_; + std::vector>::iterator dbinst_end_; + std::vector>::iterator modinst_iter_; + std::vector>::iterator modinst_end_; std::vector candidate_modules_; }; @@ -147,18 +147,18 @@ DbInstanceChildIterator::DbInstanceChildIterator(const Instance* instance, { dbBlock* block = network->block(); module_ = block->getTopModule(); - modinst_iter_ = ((dbModule*) module_)->getModInsts().begin(); + modinst_iter_ = module_->getModInstVec().end(); modinst_end_ = modinst_iter_; - dbinst_iter_ = ((dbModule*) module_)->getInsts().begin(); + dbinst_iter_ = module_->getDbInstVec().end(); dbinst_end_ = dbinst_iter_; - if (instance == network->topInstance() && block) { + if (instance == network->topInstance()) { module_ = block->getTopModule(); top_ = true; - modinst_iter_ = module_->getModInsts().begin(); - modinst_end_ = module_->getModInsts().end(); - dbinst_iter_ = module_->getInsts().begin(); - dbinst_end_ = module_->getInsts().end(); + modinst_iter_ = module_->getModInstVec().begin(); + modinst_end_ = module_->getModInstVec().end(); + dbinst_iter_ = module_->getDbInstVec().begin(); + dbinst_end_ = module_->getDbInstVec().end(); #ifdef DEBUG_DBNW printf("(top) Child iterator for instance %s\n", network_->name(instance)); printf("Number of db instances %u\n", module_->getDbInstCount()); @@ -172,10 +172,10 @@ DbInstanceChildIterator::DbInstanceChildIterator(const Instance* instance, network->staToDb(instance, db_inst, mod_inst); if (mod_inst) { module_ = mod_inst->getMaster(); - modinst_iter_ = module_->getModInsts().begin(); - modinst_end_ = module_->getModInsts().end(); - dbinst_iter_ = module_->getInsts().begin(); - dbinst_end_ = module_->getInsts().end(); + modinst_iter_ = module_->getModInstVec().begin(); + modinst_end_ = module_->getModInstVec().end(); + dbinst_iter_ = module_->getDbInstVec().begin(); + dbinst_end_ = module_->getDbInstVec().end(); #ifdef DEBUG_DBNW printf("(non-top/leaf)Child iterator for instance %s\n", network_->name(instance)); @@ -199,11 +199,11 @@ Instance* DbInstanceChildIterator::next() { Instance* ret = nullptr; if (dbinst_iter_ != dbinst_end_) { - dbInst* child = *dbinst_iter_; + dbInst* child = module_->getdbInst(*dbinst_iter_); dbinst_iter_++; ret = network_->dbToSta(child); } else if (modinst_iter_ != modinst_end_) { - dbModInst* child = *modinst_iter_; + dbModInst* child = module_->getModInst(*modinst_iter_); modinst_iter_++; ret = network_->dbToSta(child); } @@ -271,8 +271,8 @@ class DbInstancePinIterator : public InstancePinIterator dbSet::iterator bitr_; dbSet::iterator bitr_end_; // pins on a module instance - dbSet::iterator mi_itr_; - dbSet::iterator mi_itr_end_; + std::vector>::iterator mi_itr_; + std::vector>::iterator mi_itr_end_; Pin* next_; dbInst* db_inst_; @@ -297,8 +297,8 @@ DbInstancePinIterator::DbInstancePinIterator(const Instance* inst, iitr_ = db_inst_->getITerms().begin(); iitr_end_ = db_inst_->getITerms().end(); } else if (mod_inst_) { - mi_itr_ = mod_inst_->getModITerms().begin(); - mi_itr_end_ = mod_inst_->getModITerms().end(); + mi_itr_ = mod_inst_->getPinVec().begin(); + mi_itr_end_ = mod_inst_->getPinVec().end(); } } } @@ -326,7 +326,7 @@ bool DbInstancePinIterator::hasNext() } if (mi_itr_ != mi_itr_end_) { - dbModITerm* mod_iterm = *mi_itr_; + dbModITerm* mod_iterm = mod_inst_->getdbModITerm(*mi_itr_); next_ = network_->dbToSta(mod_iterm); mi_itr_++; return true; @@ -403,22 +403,10 @@ class DbNetTermIterator : public NetTermIterator DbNetTermIterator::DbNetTermIterator(const Net* net, const dbNetwork* network) : network_(network) { - dbModNet* modnet = nullptr; - dbNet* dnet = nullptr; - network_->staToDb(net, dnet, modnet); - if (dnet && !modnet) { - dbSet terms = dnet->getBTerms(); - iter_ = terms.begin(); - end_ = terms.end(); - } else if (modnet) { - dbSet terms = modnet->getBTerms(); - iter_ = terms.begin(); - end_ = terms.end(); - } else { - dbSet terms; - iter_ = terms.begin(); - end_ = terms.end(); - } + dbNet* dnet = network_->staToDb(net); + dbSet terms = dnet->getBTerms(); + iter_ = terms.begin(); + end_ = terms.end(); } bool DbNetTermIterator::hasNext() @@ -524,7 +512,7 @@ class dbModulePortIterator : public CellPortIterator virtual Port* next(); private: - dbSet::iterator iter_; + std::vector>::iterator iter_; const dbModule* module_; const dbBlock* block_; }; @@ -538,21 +526,22 @@ dbModulePortIterator::dbModulePortIterator(const dbModule* cell, { module_ = cell; block_ = block; - iter_ = (const_cast(cell))->getModBTerms().begin(); + iter_ = (const_cast(cell))->getPortVec().begin(); } bool dbModulePortIterator::hasNext() { - if (iter_ == (const_cast(module_))->getModBTerms().end()) + if (iter_ == (const_cast(module_))->getPortVec().end()) return false; return true; } Port* dbModulePortIterator::next() { - if (iter_ == (const_cast(module_))->getModBTerms().end()) + if (iter_ == (const_cast(module_))->getPortVec().end()) return nullptr; - dbModBTerm* modbterm = *iter_; + dbModBTerm* modbterm + = (const_cast(module_))->getdbModBTerm(*iter_); Port* ret = reinterpret_cast(modbterm); // advance to next iter_++; @@ -610,8 +599,12 @@ void dbNetwork::makeVerilogCell(Library* library, dbModInst* mod_inst) #ifdef DEBUG_BUS printf("Making verilog cell for %s\n", master->getName()); printf("Terms (modbterms) on master\n"); - for (auto i = master->getModBTerms()) { - printf("ModBTerm: %s\n", (*i)->getName()); + std::vector>::iterator modbterm_begin + = master->getPortVec().begin(); + std::vector>::iterator modbterm_end + = master->getPortVec().end(); + for (auto i = modbterm_begin; i != modbterm_end; i++) { + printf("ModBTerm: %s\n", master->getdbModBTerm(block_, *i)->getName()); } #endif @@ -623,11 +616,12 @@ void dbNetwork::makeVerilogCell(Library* library, dbModInst* mod_inst) // Handle bus ports std::map name2modbterm; - for (dbSet::iterator modbterm_iter - = master->getModBTerms().begin(); - modbterm_iter != master->getModBTerms().end(); + std::vector> local_array = master->getPortVec(); + for (std::vector>::iterator modbterm_iter + = local_array.begin(); + modbterm_iter != local_array.end(); modbterm_iter++) { - dbModBTerm* modbterm = *modbterm_iter; + dbModBTerm* modbterm = master->getdbModBTerm(block_, (*modbterm_iter)); const char* port_name = modbterm->getName(); Port* port = ConcreteNetwork::makePort(local_cell, port_name); PortDirection* dir = dbToSta(modbterm->getSigType(), modbterm->getIoType()); @@ -986,9 +980,7 @@ Net* dbNetwork::net(const Pin* pin) const dbBTerm* bterm; dbModITerm* moditerm; dbModBTerm* modbterm; -#ifdef DEBUG_DBNW - printf("Getting net for pin %s\n", name(pin)); -#endif + staToDb(pin, iterm, bterm, moditerm, modbterm); if (iterm) { dbNet* dnet = iterm->getNet(); @@ -1092,8 +1084,8 @@ Port* dbNetwork::port(const Pin* pin) const const char* port_name = port_name_str.c_str(); dbModInst* mod_inst = moditerm->getParent(); dbModule* module = mod_inst->getMaster(); - dbModBTerm* mod_port = module->findModBTerm(port_name); - if (mod_port) { + dbModBTerm* mod_port = nullptr; + if (module->findModBTerm(port_name, mod_port)) { ret = dbToSta(mod_port); return ret; } @@ -1362,41 +1354,14 @@ void dbNetwork::visitConnectedPins(const Net* net, PinVisitor& visitor, NetSet& visited_nets) const { - static int debug; - debug++; - - dbNet* db_net = nullptr; - dbModNet* mod_net = nullptr; - staToDb(net, db_net, mod_net); - - if (db_net && !mod_net) { - for (dbITerm* iterm : db_net->getITerms()) { - Pin* pin = dbToSta(iterm); - visitor(pin); - debug++; - } - for (dbBTerm* bterm : db_net->getBTerms()) { - Pin* pin = dbToSta(bterm); - visitor(pin); - debug++; - } - } else if (mod_net) { - for (dbITerm* iterm : mod_net->getITerms()) { - Pin* pin = dbToSta(iterm); - visitor(pin); - debug++; - } - for (dbBTerm* bterm : mod_net->getBTerms()) { - Pin* pin = dbToSta(bterm); - visitor(pin); - debug++; - } - - for (dbModITerm* moditerm : mod_net->getModITerms()) { - Pin* pin = dbToSta(moditerm); - visitor(pin); - debug++; - } + dbNet* db_net = staToDb(net); + for (dbITerm* iterm : db_net->getITerms()) { + Pin* pin = dbToSta(iterm); + visitor(pin); + } + for (dbBTerm* bterm : db_net->getBTerms()) { + Pin* pin = dbToSta(bterm); + visitor(pin); } } @@ -2138,7 +2103,7 @@ void dbNetwork::staToDb(const Port* port, mterm = staToDb(port); return; } else { - if (module->findModBTerm(name(port))) { + if (module->findModBTerm(name(port), modbterm)) { return; } } diff --git a/src/dbSta/src/dbReadVerilog.cc b/src/dbSta/src/dbReadVerilog.cc index 43c8c42ca6a..87ba10dfd0a 100644 --- a/src/dbSta/src/dbReadVerilog.cc +++ b/src/dbSta/src/dbReadVerilog.cc @@ -165,9 +165,7 @@ class Verilog2db void recordBusPortsOrder(); void recordBusPortsOrder(Cell*); void makeDbNets(const Instance* inst); - void makeVModNets(const Instance* inst, - dbModule* module, - std::map& mod_net_set); + void makeVModNets(const Instance* inst, dbModule* module); void makeVModNets( std::vector>& inst_module_vec); void WireUpModNetsForTopInst(const Instance* inst); @@ -626,7 +624,7 @@ bool Verilog2db::staToDb(dbModule* module, */ } else { // a port on the module itself (a mod bterm) - mod_bterm = module->findModBTerm(pin_name.c_str()); + module->findModBTerm(pin_name.c_str(), mod_bterm); } } } @@ -658,18 +656,10 @@ dbIoType Verilog2db::staToDb(PortDirection* dir) void Verilog2db::makeVModNets( std::vector>& inst_module_vec) { - std::map> module_instance_set; for (auto im : inst_module_vec) { const Instance* cur_inst = im.first; dbModule* dm = im.second; - module_instance_set[dm].insert(cur_inst); - } - for (auto& [dm, inst_set] : module_instance_set) { - // scope mod nets within each module using mod_net_map - std::map mod_net_map; - for (auto cur_inst : inst_set) { // all instances in this module. - makeVModNets(cur_inst, dm, mod_net_map); - } + makeVModNets(cur_inst, dm); } } @@ -720,9 +710,7 @@ void Verilog2db::WireUpModNetsForTopInst(const Instance* inst) delete net_iter; } -void Verilog2db::makeVModNets(const Instance* inst, - dbModule* module, - std::map& mod_net_set) +void Verilog2db::makeVModNets(const Instance* inst, dbModule* module) { Instance* top_instance = network_->topInstance(); @@ -744,7 +732,6 @@ void Verilog2db::makeVModNets(const Instance* inst, continue; const char* net_name = network_->name(inst_pin_net); - // Sort connected pins for regression stability. PinSeq net_pins; NetConnectedPinIterator* pin_iter @@ -778,35 +765,21 @@ void Verilog2db::makeVModNets(const Instance* inst, if (!add_mod_connection) continue; - // Make the module net (if it is not already present) - dbModNet* db_mod_net = nullptr; - std::string net_name_str(net_name); - auto set_iter = mod_net_set.find(net_name_str); - if (set_iter != mod_net_set.end()) { - db_mod_net = (*set_iter).second; -#ifdef DEBUG_VMODNETS - printf("D %d recycling a mod net %s in module %s\n", - debug, - net_name, - module->getName()); -#endif - } else { - db_mod_net = dbModNet::create(module, net_name); - mod_net_set[net_name_str] = db_mod_net; #ifdef DEBUG_VMODNETS - debug++; - printf( - "D %d Making vmod net for net %s (%s) on instance %s pin %s in " - "module " - "%s\n", - debug, - net_name, - network_->name(inst_pin_net), - network_->name(inst), - network_->name(inst_pin), - module->getName()); + debug++; + printf( + "D %d Making vmod net for net %s (%s) on instance %s pin %s in module " + "%s\n", + debug, + net_name, + network_->name(inst_pin_net), + network_->name(inst), + network_->name(inst_pin), + module_name); #endif - } + + // Make the module net (if it is not already present) + dbModNet* db_mod_net = dbModNet::create(module, net_name); for (const Pin* pin : net_pins) { dbITerm* iterm = nullptr; @@ -817,7 +790,6 @@ void Verilog2db::makeVModNets(const Instance* inst, Instance* cur_inst = network_->instance(pin); if (!((cur_inst == inst) || (cur_inst == network_->parent(inst)) - || (network_->parent(inst) == network_->parent(cur_inst)) || (cur_inst == top_instance && network_->parent(inst) == top_instance))) { #ifdef DEBUG_VMODNETS @@ -825,15 +797,14 @@ void Verilog2db::makeVModNets(const Instance* inst, "**D %d Skipping net pin %s on instance %s (entry instance %s)\n", debug, network_->name(pin), - cur_inst == top_instance ? " top instance" + cur_inst == top_instance ? " top instnace" : network_->pathName(cur_inst), - inst == top_instance ? " top instance" : network_->pathName(inst)); + inst == top_instance ? " top instnace" : network_->pathName(inst)); #endif continue; } #ifdef DEBUG_VMODNETS - /* printf( "**D %d Vmod net looking at net pin %s on instance %s (a %s) " "Starting from instance %s in module %s\n", @@ -844,7 +815,6 @@ void Verilog2db::makeVModNets(const Instance* inst, : "lower instance", network_->name(inst), module->getName()); - */ #endif // diff --git a/src/dbSta/test/write_verilog1.tcl b/src/dbSta/test/write_verilog1.tcl index f436d38956f..f4124ca1b67 100644 --- a/src/dbSta/test/write_verilog1.tcl +++ b/src/dbSta/test/write_verilog1.tcl @@ -4,5 +4,5 @@ read_lef liberty1.lef read_def reg1.def set verilog_file [make_result_file write_verilog1.v] -write_verilog -sort $verilog_file +write_verilog $verilog_file report_file $verilog_file diff --git a/src/dbSta/test/write_verilog2.tcl b/src/dbSta/test/write_verilog2.tcl index c4176a678f2..9fb669ea10a 100644 --- a/src/dbSta/test/write_verilog2.tcl +++ b/src/dbSta/test/write_verilog2.tcl @@ -4,5 +4,5 @@ read_lef liberty1.lef read_def reg4.def set verilog_file [make_result_file write_verilog2.v] -write_verilog -sort $verilog_file +write_verilog $verilog_file report_file $verilog_file diff --git a/src/dbSta/test/write_verilog4.tcl b/src/dbSta/test/write_verilog4.tcl index 9702731abc0..3261c810263 100644 --- a/src/dbSta/test/write_verilog4.tcl +++ b/src/dbSta/test/write_verilog4.tcl @@ -4,5 +4,5 @@ read_lef liberty1.lef read_def write_verilog4.def set verilog_file [make_result_file write_verilog4.v] -write_verilog -sort $verilog_file +write_verilog $verilog_file report_file $verilog_file diff --git a/src/odb/include/odb/db.h b/src/odb/include/odb/db.h index 2f21d24df88..2647434d0ae 100644 --- a/src/odb/include/odb/db.h +++ b/src/odb/include/odb/db.h @@ -7540,18 +7540,6 @@ class dbModBTerm : public dbObject dbModNet* getNet() const; - void setNextNetModbterm(dbModBTerm* next_net_modbterm); - - dbModBTerm* getNextNetModbterm() const; - - void setPrevNetModbterm(dbModBTerm* prev_net_modbterm); - - dbModBTerm* getPrevNetModbterm() const; - - void setNextEntry(dbModBTerm* next_entry); - - dbModBTerm* getNextEntry() const; - // User Code Begin dbModBTerm void setSigType(dbSigType type); @@ -7561,8 +7549,7 @@ class dbModBTerm : public dbObject static dbModBTerm* create(dbModule* parentModule, const char* name); - void connect(dbModNet*); - void disconnect(); + bool connect(dbModNet*); char* getName(); @@ -7599,9 +7586,9 @@ class dbModInst : public dbObject std::string getHierarchicalName() const; bool getPinAtIx(unsigned ix, dbModITerm*& ret) const; - bool findModITerm(const char* name, dbModITerm*& ret); + bool findModITerm(const char* name, dbModITerm*& ret) const; - dbSet getModITerms(); + std::vector>& getPinVec() const; // User Code End dbModInst }; @@ -7619,18 +7606,6 @@ class dbModITerm : public dbObject dbModNet* getNet() const; - void setNextNetModiterm(dbModITerm* next_net_moditerm); - - dbModITerm* getNextNetModiterm() const; - - void setPrevNetModiterm(dbModITerm* prev_net_moditerm); - - dbModITerm* getPrevNetModiterm() const; - - void setNextEntry(dbModITerm* next_entry); - - dbModITerm* getNextEntry() const; - // User Code Begin dbModITerm void setSigType(dbSigType type); dbSigType getSigType(); @@ -7649,14 +7624,9 @@ class dbModNet : public dbObject dbModule* getParent() const; // User Code Begin dbModNet - dbSet getModITerms(); - dbSet getModBTerms(); - dbSet getITerms(); - dbSet getBTerms(); - static dbModNet* create(dbModule* parentModule, const char* name); const char* getName() const; - dbModBTerm* connectedToModBTerm(); + dbModBTerm* connectedToModBTerm() const; // User Code End dbModNet }; @@ -7665,8 +7635,6 @@ class dbModule : public dbObject public: const char* getName() const; - void setModInst(dbModInst* mod_inst); - dbModInst* getModInst() const; // User Code Begin dbModule @@ -7680,19 +7648,17 @@ class dbModule : public dbObject // Adding an inst to a new module will remove it from its previous // module. void addInst(dbInst* inst); + void addInstInHierarchy(dbInst* inst); dbBlock* getOwner(); - dbSet getChildren(); - dbSet getModInsts(); - dbSet getModNets(); - dbSet getModBTerms(); dbSet getInsts(); + dbSet getChildren(); + dbModInst* findModInst(const char* name); void removeModInst(const char* name); dbInst* findDbInst(const char* name); - dbModBTerm* findModBTerm(const char* name); std::vector getLeafInsts(); @@ -7702,16 +7668,22 @@ class dbModule : public dbObject static dbModule* getModule(dbBlock* block_, uint dbid_); + bool findPortIx(const char* port_name, unsigned& ix) const; + + std::vector>& getPortVec() const; + std::vector>& getModInstVec() const; + std::vector>& getDbInstVec() const; + dbModInst* getModInst(dbId); dbInst* getdbInst(dbId); - unsigned getModInstCount(); - unsigned getDbInstCount(); + size_t getModInstCount(); + size_t getDbInstCount(); dbModBTerm* getdbModBTerm(dbId); dbModBTerm* getdbModBTerm(dbBlock*, dbId); dbModNet* getModNet(const char* net_name); - bool findPortIx(const char* port_name, unsigned& ix); + bool findModBTerm(const char* port_name, dbModBTerm*& ret); void staSetCell(void* cell); void* getStaCell(); diff --git a/src/odb/src/codeGenerator/schema.json b/src/odb/src/codeGenerator/schema.json index 495207d7604..40c45fdd001 100644 --- a/src/odb/src/codeGenerator/schema.json +++ b/src/odb/src/codeGenerator/schema.json @@ -17,70 +17,7 @@ "reversible": "true", "orderReversed": "true", "sequential": 0, - "includes": ["dbModInst.h", "dbModule.h"] - }, - { - "name": "dbModuleModBTermItr", - "parentObject": "dbModBTerm", - "tableName": "modbterm_tbl", - "reversible": "true", - "orderReversed": "true", - "sequential": 0, - "includes": ["dbModBTerm.h", "dbModule.h"] - }, - { - "name": "dbModuleModInstModITermItr", - "parentObject": "dbModITerm", - "tableName": "moditerm_tbl", - "reversible": "true", - "orderReversed": "true", - "sequential": 0, - "includes": ["dbModITerm.h", "dbModule.h", "dbModInst.h"] - }, - { - "name": "dbModuleModNetItr", - "parentObject": "dbModNet", - "tableName": "modnet_tbl", - "reversible": "true", - "orderReversed": "true", - "sequential": 0, - "includes": ["dbModNet.h","dbModule.h"] - }, - { - "name": "dbModuleModNetModITermItr", - "parentObject": "dbModITerm", - "tableName": "moditerm_tbl", - "reversible": "true", - "orderReversed": "true", - "sequential": 0, - "includes": ["dbModNet.h","dbModule.h"] - }, - { - "name": "dbModuleModNetModBTermItr", - "parentObject": "dbModBTerm", - "tableName": "modbterm_tbl", - "reversible": "true", - "orderReversed": "true", - "sequential": 0, - "includes": ["dbModNet.h","dbModule.h"] - }, - { - "name": "dbModuleModNetBTermItr", - "parentObject": "dbBTerm", - "tableName": "bterm_tbl", - "reversible": "true", - "orderReversed": "true", - "sequential": 0, - "includes": ["dbModNet.h", "dbModule.h"] - }, - { - "name": "dbModuleModNetITermItr", - "parentObject": "dbITerm", - "tableName": "iterm_tbl", - "reversible": "true", - "orderReversed": "true", - "sequential": 0, - "includes": ["dbModNet.h", "dbModule.h"] + "includes": ["dbModule.h"] }, { "name": "dbGroupModInstItr", diff --git a/src/odb/src/codeGenerator/schema/chip/dbModBterm.json b/src/odb/src/codeGenerator/schema/chip/dbModBterm.json index 417026f4abf..370b2fc1211 100644 --- a/src/odb/src/codeGenerator/schema/chip/dbModBterm.json +++ b/src/odb/src/codeGenerator/schema/chip/dbModBterm.json @@ -21,22 +21,7 @@ "name":"_net", "type":"dbId<_dbModNet>", "parent":"dbBlock" - }, - { - "name":"_next_net_modbterm", - "type":"dbId<_dbModBTerm>", - "parent":"dbBlock" - }, - { - "name":"_prev_net_modbterm", - "type":"dbId<_dbModBTerm>", - "parent":"dbBlock" - }, - { - "name":"_next_entry", - "type":"dbId<_dbModBTerm>", - "parent":"dbBlock" - } + } ], "constructors":[], "cpp_includes":["dbBlock.h","dbModule.h","dbModNet.h","dbHashTable.hpp"] diff --git a/src/odb/src/codeGenerator/schema/chip/dbModInst.json b/src/odb/src/codeGenerator/schema/chip/dbModInst.json index db8fafb8aa5..c792498063a 100644 --- a/src/odb/src/codeGenerator/schema/chip/dbModInst.json +++ b/src/odb/src/codeGenerator/schema/chip/dbModInst.json @@ -42,15 +42,14 @@ "parent":"dbBlock" }, { - "name":"_moditerms", - "type":"dbId<_dbModITerm >", - "flags":["no-get","no-set"], - "parent":"dbBlock" + "name":"_pin_vec", + "type":"std::vector >", + "flags": [ + "no-set", + "no-get", + "no-template" + ] } ], - "cpp_includes":["dbBlock.h","dbModule.h","dbHashTable.hpp", "dbModITerm.h"], - "h_includes": [ - "dbVector.h", - "dbSet.h" - ] + "cpp_includes":["dbBlock.h","dbModule.h","dbHashTable.hpp", "dbModITerm.h"] } diff --git a/src/odb/src/codeGenerator/schema/chip/dbModIterm.json b/src/odb/src/codeGenerator/schema/chip/dbModIterm.json index b100fc9a290..fcde65004e6 100644 --- a/src/odb/src/codeGenerator/schema/chip/dbModIterm.json +++ b/src/odb/src/codeGenerator/schema/chip/dbModIterm.json @@ -21,23 +21,7 @@ "name":"_net", "type":"dbId<_dbModNet>", "parent":"dbBlock" - }, - { - "name":"_next_net_moditerm", - "type":"dbId<_dbModITerm>", - "parent":"dbBlock" - }, - { - "name":"_prev_net_moditerm", - "type":"dbId<_dbModITerm>", - "parent":"dbBlock" - }, - { - "name":"_next_entry", - "type":"dbId<_dbModITerm>", - "parent":"dbBlock" - } - + } ], "constructors":[], "cpp_includes":["dbBlock.h","dbModInst.h","dbModNet.h","dbHashTable.hpp"] diff --git a/src/odb/src/codeGenerator/schema/chip/dbModNet.json b/src/odb/src/codeGenerator/schema/chip/dbModNet.json index 5b13841789a..28760602f99 100644 --- a/src/odb/src/codeGenerator/schema/chip/dbModNet.json +++ b/src/odb/src/codeGenerator/schema/chip/dbModNet.json @@ -20,22 +20,22 @@ }, { "name": "_moditerms", - "type": "dbId<_dbModITerm>", + "type": "dbVector>", "flags":["no-set","no-get"] }, { "name": "_modbterms", - "type": "dbId<_dbModBTerm>", + "type": "dbVector>", "flags":["no-set","no-get"] }, { "name": "_iterms", - "type": "dbId<_dbITerm>", + "type": "dbVector>", "flags":["no-set","no-get"] }, { "name": "_bterms", - "type": "dbId<_dbBTerm>", + "type": "dbVector>", "flags":["no-set","no-get"] } diff --git a/src/odb/src/codeGenerator/schema/chip/dbModule.json b/src/odb/src/codeGenerator/schema/chip/dbModule.json index 10e48e66023..f94898f47bb 100644 --- a/src/odb/src/codeGenerator/schema/chip/dbModule.json +++ b/src/odb/src/codeGenerator/schema/chip/dbModule.json @@ -21,6 +21,7 @@ { "name":"_mod_inst", "type":"dbId<_dbModInst>", + "flags":["no-set"], "parent":"dbBlock" }, { @@ -36,9 +37,29 @@ "parent":"dbBlock" }, { - "name":"_modbterms", - "type":"dbId<_dbModBTerm>", + "name":"_port_vec", + "type":"std::vector< dbId >", "flags":["no-set","no-get"] + }, + { + "name":"_modinst_vec", + "type":"std::vector< dbId >", + "flags":["no-set","no-get"] + }, + { + "name":"_dbinst_vec", + "type":"std::vector< dbId >", + "flags":["no-set","no-get"] + }, + { + "name":"_port_map", + "type":"std::map ", + "flags": ["no-set","no-get","no-template" ] + }, + { + "name":"_modnet_map", + "type":"std::map >", + "flags":["no-set","no-get"] } ], "cpp_includes":["dbBlock.h","dbHashTable.hpp", "dbModBTerm.h", "dbModInst.h", "dbInst.h"], diff --git a/src/odb/src/db/CMakeLists.txt b/src/odb/src/db/CMakeLists.txt index c38d64e567c..0e65d85550b 100644 --- a/src/odb/src/db/CMakeLists.txt +++ b/src/odb/src/db/CMakeLists.txt @@ -132,14 +132,7 @@ add_library(db dbGroupModInstItr.cpp dbGuideItr.cpp dbModuleInstItr.cpp - dbModuleModBTermItr.cpp dbModuleModInstItr.cpp - dbModuleModInstModITermItr.cpp - dbModuleModNetBTermItr.cpp - dbModuleModNetITermItr.cpp - dbModuleModNetItr.cpp - dbModuleModNetModBTermItr.cpp - dbModuleModNetModITermItr.cpp dbNetTrackItr.cpp dbRegionGroupItr.cpp # Generator Code End cpp diff --git a/src/odb/src/db/dbBTerm.cpp b/src/odb/src/db/dbBTerm.cpp index 9f01ea4ba95..c15796692d0 100644 --- a/src/odb/src/db/dbBTerm.cpp +++ b/src/odb/src/db/dbBTerm.cpp @@ -210,8 +210,6 @@ void _dbBTerm::differences(dbDiff& diff, DIFF_FIELD_NO_DEEP(_next_bterm); DIFF_FIELD_NO_DEEP(_prev_bterm); - DIFF_FIELD_NO_DEEP(_next_modnet_bterm); - DIFF_FIELD_NO_DEEP(_prev_modnet_bterm); DIFF_FIELD_NO_DEEP(_parent_block); DIFF_FIELD_NO_DEEP(_parent_iterm); DIFF_FIELD_NO_DEEP(_bpins); @@ -242,8 +240,6 @@ void _dbBTerm::out(dbDiff& diff, char side, const char* field) const DIFF_OUT_FIELD_NO_DEEP(_next_bterm); DIFF_OUT_FIELD_NO_DEEP(_prev_bterm); - DIFF_OUT_FIELD_NO_DEEP(_next_modnet_bterm); - DIFF_OUT_FIELD_NO_DEEP(_prev_modnet_bterm); DIFF_OUT_FIELD_NO_DEEP(_parent_block); DIFF_OUT_FIELD_NO_DEEP(_parent_iterm); DIFF_OUT_FIELD_NO_DEEP(_bpins); @@ -263,8 +259,6 @@ dbOStream& operator<<(dbOStream& stream, const _dbBTerm& bterm) stream << bterm._mnet; stream << bterm._next_bterm; stream << bterm._prev_bterm; - stream << bterm._next_modnet_bterm; - stream << bterm._prev_modnet_bterm; stream << bterm._parent_block; stream << bterm._parent_iterm; stream << bterm._bpins; @@ -284,8 +278,6 @@ dbIStream& operator>>(dbIStream& stream, _dbBTerm& bterm) stream >> bterm._mnet; stream >> bterm._next_bterm; stream >> bterm._prev_bterm; - stream >> bterm._next_modnet_bterm; - stream >> bterm._prev_modnet_bterm; stream >> bterm._parent_block; stream >> bterm._parent_iterm; stream >> bterm._bpins; @@ -450,21 +442,17 @@ dbModNet* dbBTerm::getModNet() return nullptr; } -void dbBTerm::connect(dbModNet* mod_net) +void dbBTerm::connect(dbModNet* net_) { - dbModule* parent_module = mod_net->getParent(); - _dbBlock* block = (_dbBlock*) (parent_module->getOwner()); - _dbModNet* _mod_net = (_dbModNet*) mod_net; + dbId<_dbModNet> net_el(net_->getId()); _dbBTerm* bterm = (_dbBTerm*) this; - if (bterm->_mnet == _mod_net->getId()) + if (bterm->_mnet == net_el) return; - if (bterm->_mnet) { - bterm->disconnectModNet(bterm, block); - } - bterm->connectModNet(_mod_net, block); - // printf("Mod net now connected to %d bterms\n", - // mod_net -> getBTerms().size()); + _dbModNet* mod_net = (_dbModNet*) net_; + dbId<_dbBTerm> bterm_el(getId()); + mod_net->_bterms.push_back(bterm_el); + bterm->_mnet = net_el; } void dbBTerm::connect(dbNet* net_) @@ -752,24 +740,6 @@ dbBTerm* dbBTerm::create(dbNet* net_, const char* name) return (dbBTerm*) bterm; } -void _dbBTerm::connectModNet(_dbModNet* mod_net, _dbBlock* block) -{ - // printf("Connecting mod net %s to bterm %s\n", ((dbModNet*)mod_net) -> - // getName(), - // _name - // ); - _mnet = mod_net->getOID(); - if (mod_net->_bterms != 0) { - _dbBTerm* head = block->_bterm_tbl->getPtr(mod_net->_bterms); - _next_modnet_bterm = mod_net->_bterms; - head->_prev_modnet_bterm = getOID(); - } else { - _next_modnet_bterm = 0; - } - _prev_modnet_bterm = 0; - mod_net->_bterms = getOID(); -} - void _dbBTerm::connectNet(_dbNet* net, _dbBlock* block) { for (auto callback : block->_callbacks) { @@ -869,29 +839,6 @@ void _dbBTerm::disconnectNet(_dbBTerm* bterm, _dbBlock* block) } } -void _dbBTerm::disconnectModNet(_dbBTerm* bterm, _dbBlock* block) -{ - _dbModNet* mod_net = block->_modnet_tbl->getPtr(bterm->_mnet); - uint id = bterm->getOID(); - if (mod_net->_bterms == id) { - mod_net->_bterms = bterm->_next_modnet_bterm; - if (mod_net->_bterms != 0) { - _dbBTerm* t = block->_bterm_tbl->getPtr(mod_net->_bterms); - t->_prev_modnet_bterm = 0; - } - } else { - if (bterm->_next_modnet_bterm != 0) { - _dbBTerm* next = block->_bterm_tbl->getPtr(bterm->_next_modnet_bterm); - next->_prev_modnet_bterm = bterm->_prev_modnet_bterm; - } - if (bterm->_prev_modnet_bterm != 0) { - _dbBTerm* prev = block->_bterm_tbl->getPtr(bterm->_prev_modnet_bterm); - prev->_next_modnet_bterm = bterm->_next_modnet_bterm; - } - } - _mnet = 0; -} - dbSet::iterator dbBTerm::destroy(dbSet::iterator& itr) { dbBTerm* bt = *itr; diff --git a/src/odb/src/db/dbBTerm.h b/src/odb/src/db/dbBTerm.h index eac5a111c6d..0e562b72b47 100644 --- a/src/odb/src/db/dbBTerm.h +++ b/src/odb/src/db/dbBTerm.h @@ -84,8 +84,6 @@ class _dbBTerm : public _dbObject dbId<_dbModNet> _mnet; dbId<_dbBTerm> _next_bterm; dbId<_dbBTerm> _prev_bterm; - dbId<_dbBTerm> _next_modnet_bterm; - dbId<_dbBTerm> _prev_modnet_bterm; dbId<_dbBlock> _parent_block; // Up hierarchy: TWG dbId<_dbITerm> _parent_iterm; // Up hierarchy: TWG dbId<_dbBPin> _bpins; // Up hierarchy: TWG @@ -98,10 +96,7 @@ class _dbBTerm : public _dbObject ~_dbBTerm(); void connectNet(_dbNet* net, _dbBlock* block); - void connectModNet(_dbModNet* net, _dbBlock* block); void disconnectNet(_dbBTerm* bterm, _dbBlock* block); - void disconnectModNet(_dbBTerm* bterm, _dbBlock* block); - bool operator==(const _dbBTerm& rhs) const; bool operator!=(const _dbBTerm& rhs) const { return !operator==(rhs); } bool operator<(const _dbBTerm& rhs) const; diff --git a/src/odb/src/db/dbBlock.cpp b/src/odb/src/db/dbBlock.cpp index 36e3e8eaf54..9dcd34ac69f 100644 --- a/src/odb/src/db/dbBlock.cpp +++ b/src/odb/src/db/dbBlock.cpp @@ -90,14 +90,7 @@ #include "dbModNet.h" #include "dbModule.h" #include "dbModuleInstItr.h" -#include "dbModuleModBTermItr.h" #include "dbModuleModInstItr.h" -#include "dbModuleModInstModITermItr.h" -#include "dbModuleModNetBTermItr.h" -#include "dbModuleModNetITermItr.h" -#include "dbModuleModNetItr.h" -#include "dbModuleModNetModBTermItr.h" -#include "dbModuleModNetModITermItr.h" #include "dbNameCache.h" #include "dbNet.h" #include "dbNetTrack.h" @@ -373,17 +366,6 @@ _dbBlock::_dbBlock(_dbDatabase* db) _module_modinst_itr = new dbModuleModInstItr(_modinst_tbl); - _module_modinstmoditerm_itr = new dbModuleModInstModITermItr(_moditerm_tbl); - - _module_modbterm_itr = new dbModuleModBTermItr(_modbterm_tbl); - - _module_modnet_itr = new dbModuleModNetItr(_modnet_tbl); - - _module_modnet_modbterm_itr = new dbModuleModNetModBTermItr(_modbterm_tbl); - _module_modnet_moditerm_itr = new dbModuleModNetModITermItr(_moditerm_tbl); - _module_modnet_iterm_itr = new dbModuleModNetITermItr(_iterm_tbl); - _module_modnet_bterm_itr = new dbModuleModNetBTermItr(_bterm_tbl); - _region_group_itr = new dbRegionGroupItr(_group_tbl); _group_itr = new dbGroupItr(_group_tbl); @@ -4071,23 +4053,6 @@ void dbBlock::dumpDebug() printf("Debug: Data base tables for block at %p:\n", block); - printf("Db nets (The Flat world)\n"); - for (auto dbnet : getNets()) { - printf("dbnet %s (id %u)\n", dbnet->getName().c_str(), dbnet->getId()); - dbNetITermItr dbnetiter(block->_iterm_tbl); - dbObject* parent = (dbObject*) dbnet; - uint id; - for (id = dbnetiter.begin(parent); id != dbnetiter.end(parent); - id = dbnetiter.next(id)) { - printf("\t-> Db Iterm %u\n", id); - } - dbNetBTermItr dbnetbter(block->_bterm_tbl); - for (id = dbnetbter.begin(parent); id != dbnetbter.end(parent); - id = dbnetbter.next(id)) { - printf("\t-> Db Bterm %u\n", id); - } - } - printf("Block ports\n"); // got through the ports and their owner printf("\t\tBTerm Ports +++\n"); @@ -4106,29 +4071,33 @@ void dbBlock::dumpDebug() if (block->_module_tbl) { printf("module table %d\n", block->_module_tbl->size()); - dbSet block_modules = getModules(); - printf("Content size %u modules\n", block_modules.size()); - for (auto mi : block_modules) { - dbModule* cur_obj = mi; + std::vector contents; + block->_module_tbl->getObjects(contents); + printf("Content size %lu modules\n", contents.size()); + + for (auto mi : contents) { + odb::_dbModule* cur_obj = mi; printf("\tModule %s\n", ((dbModule*) cur_obj)->getName()); + // got through the ports and their owner printf("\t\tModBTerm Ports +++\n"); - dbSet module_ports = cur_obj->getModBTerms(); - for (dbSet::iterator mod_bterm_iter = module_ports.begin(); - mod_bterm_iter != module_ports.end(); - mod_bterm_iter++) { - dbModBTerm* module_port = *mod_bterm_iter; + std::vector> module_ports = cur_obj->_port_vec; + for (std::vector>::iterator it = module_ports.begin(); + it != module_ports.end(); + it++) { + dbModBTerm* module_port = ((dbModule*) cur_obj)->getdbModBTerm(*it); printf("\t\tPort %s\n", module_port->getName()); printf("\t\tPort parent %s\n\n", module_port->getParent()->getName()); } printf("\t\tModBTermPorts ---\n"); printf("\t\tModule instances +++\n"); - dbSet module_instances = mi->getModInsts(); - for (dbSet::iterator mod_inst_iter = module_instances.begin(); - mod_inst_iter != module_instances.end(); - mod_inst_iter++) { - dbModInst* module_inst = *mod_inst_iter; + std::vector> module_instances = cur_obj->_modinst_vec; + for (std::vector>::iterator it = module_instances.begin(); + it != module_instances.end(); + it++) { + dbModInst* module_inst + = (dbModInst*) (((dbModule*) cur_obj)->getModInst(*it)); printf("\t\tMod inst %s ", module_inst->getName()); dbModule* master = module_inst->getMaster(); printf("\t\tMaster %s\n\n", module_inst->getMaster()->getName()); @@ -4138,19 +4107,27 @@ void dbBlock::dumpDebug() printf("\t\t\tMaster owner in wrong block\n"); printf("\t\tConnections\n"); - for (dbModITerm* miterm_pin : module_inst->getModITerms()) { - printf("\t\t\tModIterm : %s (%u) Mod Net %s (%u) \n", + unsigned count = ((_dbModInst*) module_inst)->_pin_vec.size(); + for (unsigned i = 0; i < count; i++) { + dbModITerm* miterm_pin = nullptr; + module_inst->getPinAtIx(i, miterm_pin); + printf("\t\t\tModIterm : %s (%u) Net %s (%u) \n", miterm_pin->getName(), miterm_pin->getId(), miterm_pin->getNet() ? ((_dbModNet*) miterm_pin->getNet())->_name : "No-net", - miterm_pin->getNet() ? miterm_pin->getNet()->getId() : 0); + miterm_pin->getNet()->getId()); } } + printf("\t\tModule instances ---\n"); printf("\t\tDb instances +++\n"); - for (dbInst* db_inst : cur_obj->getInsts()) { + std::vector> db_instances = cur_obj->_dbinst_vec; + for (std::vector>::iterator it = db_instances.begin(); + it != db_instances.end(); + it++) { + dbInst* db_inst = (dbInst*) (((dbModule*) cur_obj)->getdbInst(*it)); printf("\t\tdb inst %s\n", db_inst->getName().c_str()); printf("\t\tdb iterms:\n"); dbSet iterms = db_inst->getITerms(); @@ -4159,9 +4136,8 @@ void dbBlock::dumpDebug() ++iterm_itr) { dbITerm* iterm = *iterm_itr; dbMTerm* mterm = iterm->getMTerm(); - printf("\t\t\t\t iterm: %s (%u) Net: %s Mod net : %s\n", + printf("\t\t\t\t iterm: %s Net: %s Mod net : %s\n", mterm->getName().c_str(), - iterm->getId(), iterm->getNet() ? iterm->getNet()->getName().c_str() : "unk-dbnet", iterm->getModNet() ? iterm->getModNet()->getName() @@ -4171,34 +4147,46 @@ void dbBlock::dumpDebug() printf("\t\tDb instances ---\n"); printf("\tModule nets (modnets) +++ \n"); - printf("\t# mod nets %u in %s (%p)\n", - cur_obj->getModNets().size(), - cur_obj->getName(), - cur_obj); - dbSet mod_nets = cur_obj->getModNets(); - for (dbSet::iterator mod_net_iter = mod_nets.begin(); - mod_net_iter != mod_nets.end(); - mod_net_iter++) { - dbModNet* mod_net = *mod_net_iter; - printf("\t\tNet: %s (%u)\n", mod_net->getName(), mod_net->getId()); + printf("\t# nets %lu\n", cur_obj->_modnet_map.size()); + for (auto mn : cur_obj->_modnet_map) { + dbId mn_el = mn.second; + printf("\t\tNet: %s (%u)\n", mn.first.c_str(), mn_el.id()); + _dbModNet* mod_net = block->_modnet_tbl->getPtr(mn_el.id()); + (void) mod_net; printf("\t\tConnections -> modIterms/modbterms/bterms/iterms:\n"); - printf("\t\t -> %u moditerms\n", mod_net->getModITerms().size()); - for (dbModITerm* modi_term : mod_net->getModITerms()) { - printf("\t\t\t%s\n", modi_term->getName()); + dbVector> moditerms + = ((_dbModNet*) mod_net)->_moditerms; + dbVector> modbterms + = ((_dbModNet*) mod_net)->_modbterms; + dbVector> iterms = ((_dbModNet*) mod_net)->_iterms; + dbVector> bterms = ((_dbModNet*) mod_net)->_bterms; + printf("\t\t -> %lu moditerms\n", moditerms.size()); + printf("\t\t -> %lu modbterms\n", modbterms.size()); + printf("\t\t -> %lu iterms\n", iterms.size()); + printf("\t\t -> %lu bterms\n", bterms.size()); + + /* + dbVector >::iterator it_iter; + dbVector >::iterator bt_iter; + printf("\t\t: moditerms\n"); + for (auto it_iter= iterms.begin(); it_iter != iterms.end(); it_iter++){ + printf("\t\t\t%s\n",(*it_iter) -> getMTerm() -> _name); } - printf("\t\t -> %u modbterms\n", mod_net->getModBTerms().size()); - for (dbModBTerm* modb_term : mod_net->getModBTerms()) { - printf("\t\t\t%s\n", modb_term->getName()); - } - printf("\t\t -> %u iterms\n", mod_net->getITerms().size()); - for (dbITerm* db_iterm : mod_net->getITerms()) { - printf("\t\t\t%s\n", db_iterm->getName().c_str()); - } - printf("\t\t -> %u bterms\n", mod_net->getBTerms().size()); - for (dbBTerm* db_bterm : mod_net->getBTerms()) { - printf("\t\t\t%s\n", db_bterm->getName().c_str()); + printf("\t\t: modbterms\n"); + for (auto it: bterms){ + printf("\t\t\t%s\n",it -> getName().c_str()); } + */ + } + /* + printf("\tModule nets --- \n"); + printf("InstanceNets+++\n"); + InstanceNetIterator* inetIter = netIterator(((dbModule*)cur_obj) -> + getInstance()); while (inetIter.hasNext()){ printf("Net %s\n", + inetIter.next() -> getName().c_str()); } + printf("InstanceNets---\n"); + */ } } else printf("Empty module table\n"); diff --git a/src/odb/src/db/dbBlock.h b/src/odb/src/db/dbBlock.h index 294d2601929..5d9ee36575c 100644 --- a/src/odb/src/db/dbBlock.h +++ b/src/odb/src/db/dbBlock.h @@ -107,13 +107,6 @@ class dbInstITermItr; class dbRegionInstItr; class dbModuleInstItr; class dbModuleModInstItr; -class dbModuleModBTermItr; -class dbModuleModInstModITermItr; -class dbModuleModNetItr; -class dbModuleModNetModBTermItr; -class dbModuleModNetModITermItr; -class dbModuleModNetITermItr; -class dbModuleModNetBTermItr; class dbRegionGroupItr; class dbGlobalConnect; class dbGroupItr; @@ -259,15 +252,6 @@ class _dbBlock : public _dbObject dbRegionInstItr* _region_inst_itr; dbModuleInstItr* _module_inst_itr; dbModuleModInstItr* _module_modinst_itr; - dbModuleModBTermItr* _module_modbterm_itr; - dbModuleModInstModITermItr* _module_modinstmoditerm_itr; - - dbModuleModNetItr* _module_modnet_itr; - dbModuleModNetModITermItr* _module_modnet_moditerm_itr; - dbModuleModNetModBTermItr* _module_modnet_modbterm_itr; - dbModuleModNetITermItr* _module_modnet_iterm_itr; - dbModuleModNetBTermItr* _module_modnet_bterm_itr; - dbRegionGroupItr* _region_group_itr; dbGroupItr* _group_itr; dbGuideItr* _guide_itr; diff --git a/src/odb/src/db/dbITerm.cpp b/src/odb/src/db/dbITerm.cpp index 10fedac4b3a..3eb284383ee 100644 --- a/src/odb/src/db/dbITerm.cpp +++ b/src/odb/src/db/dbITerm.cpp @@ -131,8 +131,6 @@ void _dbITerm::differences(dbDiff& diff, DIFF_FIELD(_ext_id); DIFF_FIELD(_next_net_iterm); DIFF_FIELD(_prev_net_iterm); - DIFF_FIELD(_next_modnet_iterm); - DIFF_FIELD(_prev_modnet_iterm); DIFF_END } else { _dbBlock* lhs_blk = (_dbBlock*) getOwner(); @@ -179,8 +177,6 @@ void _dbITerm::out(dbDiff& diff, char side, const char* field) const DIFF_OUT_FIELD(_ext_id); DIFF_OUT_FIELD(_next_net_iterm); DIFF_OUT_FIELD(_prev_net_iterm); - DIFF_OUT_FIELD(_next_modnet_iterm); - DIFF_OUT_FIELD(_prev_modnet_iterm); DIFF_END } else { _dbMTerm* mterm = getMTerm(); @@ -450,43 +446,15 @@ dbModNet* dbITerm::getModNet() void dbITerm::connect(dbModNet* mod_net) { + unsigned id = mod_net->getId(); + dbId<_dbModNet> net_el(id); _dbITerm* iterm = (_dbITerm*) this; - _dbModNet* _mod_net = (_dbModNet*) mod_net; - _dbBlock* block = (_dbBlock*) iterm->getOwner(); - - if (iterm->_mnet == _mod_net->getId()) { + if (iterm->_mnet == net_el) return; - } - - if (iterm->_mnet != 0) { - // printf("Weird disconnecting an iterm\n"); - disconnect(); - } - - iterm->_mnet = _mod_net->getId(); - - _dbInst* inst = iterm->getInst(); - if (inst->_flags._dont_touch) { - inst->getLogger()->error( - utl::ODB, - 397, - "Attempt to connect iterm of dont_touch instance {}", - inst->_name); - } - - if (_mod_net->_iterms != 0) { - _dbITerm* head = block->_iterm_tbl->getPtr(_mod_net->_iterms); - iterm->_next_modnet_iterm = _mod_net->_iterms; - // prev is this one - head->_prev_modnet_iterm = iterm->getOID(); - } else { - iterm->_next_modnet_iterm = 0; - } - iterm->_prev_modnet_iterm = 0; - _mod_net->_iterms = iterm->getOID(); - - // printf("Mod net now connected to %d iterms\n", - // mod_net -> getITerms().size()); + dbId<_dbITerm> iterm_el(getId()); + _dbModNet* local_mod_net = (_dbModNet*) mod_net; + local_mod_net->_iterms.push_back(iterm_el); + iterm->_mnet = net_el; } void dbITerm::disconnect() @@ -504,6 +472,7 @@ void dbITerm::disconnect() "Attempt to disconnect iterm of dont_touch instance {}", inst->_name); } + _dbBlock* block = (_dbBlock*) iterm->getOwner(); _dbNet* net = block->_net_tbl->getPtr(iterm->_net); @@ -533,6 +502,7 @@ void dbITerm::disconnect() if (net->_iterms == id) { net->_iterms = iterm->_next_net_iterm; + if (net->_iterms != 0) { _dbITerm* t = block->_iterm_tbl->getPtr(net->_iterms); t->_prev_net_iterm = 0; @@ -542,36 +512,16 @@ void dbITerm::disconnect() _dbITerm* next = block->_iterm_tbl->getPtr(iterm->_next_net_iterm); next->_prev_net_iterm = iterm->_prev_net_iterm; } + if (iterm->_prev_net_iterm != 0) { _dbITerm* prev = block->_iterm_tbl->getPtr(iterm->_prev_net_iterm); prev->_next_net_iterm = iterm->_next_net_iterm; } } + iterm->_net = 0; for (auto callback : block->_callbacks) callback->inDbITermPostDisconnect(this, (dbNet*) net); - - // the modnet part - if (iterm->_mnet == 0) - return; - _dbModNet* mod_net = block->_modnet_tbl->getPtr(iterm->_mnet); - if (mod_net->_iterms == id) { - mod_net->_iterms = iterm->_next_modnet_iterm; - if (mod_net->_iterms != 0) { - _dbITerm* t = block->_iterm_tbl->getPtr(mod_net->_iterms); - t->_prev_modnet_iterm = 0; - } - } else { - if (iterm->_next_modnet_iterm != 0) { - _dbITerm* next = block->_iterm_tbl->getPtr(iterm->_next_modnet_iterm); - next->_prev_modnet_iterm = iterm->_prev_modnet_iterm; - } - if (iterm->_prev_modnet_iterm != 0) { - _dbITerm* prev = block->_iterm_tbl->getPtr(iterm->_prev_modnet_iterm); - prev->_next_modnet_iterm = iterm->_next_modnet_iterm; - } - } - iterm->_mnet = 0; } dbSigType dbITerm::getSigType() diff --git a/src/odb/src/db/dbITerm.h b/src/odb/src/db/dbITerm.h index 541c5727654..0f9e9e93ce7 100644 --- a/src/odb/src/db/dbITerm.h +++ b/src/odb/src/db/dbITerm.h @@ -81,8 +81,6 @@ class _dbITerm : public _dbObject dbId<_dbInst> _inst; dbId<_dbITerm> _next_net_iterm; dbId<_dbITerm> _prev_net_iterm; - dbId<_dbITerm> _next_modnet_iterm; - dbId<_dbITerm> _prev_modnet_iterm; uint32_t _sta_vertex_id; // not saved std::map, dbId<_dbAccessPoint>> aps_; @@ -119,8 +117,6 @@ inline _dbITerm::_dbITerm(_dbDatabase*, const _dbITerm& i) _inst(i._inst), _next_net_iterm(i._next_net_iterm), _prev_net_iterm(i._prev_net_iterm), - _next_modnet_iterm(i._next_modnet_iterm), - _prev_modnet_iterm(i._prev_modnet_iterm), _sta_vertex_id(0) { } @@ -135,8 +131,6 @@ inline dbOStream& operator<<(dbOStream& stream, const _dbITerm& iterm) stream << iterm._inst; stream << iterm._next_net_iterm; stream << iterm._prev_net_iterm; - stream << iterm._next_modnet_iterm; - stream << iterm._prev_modnet_iterm; stream << iterm.aps_; return stream; } @@ -151,8 +145,6 @@ inline dbIStream& operator>>(dbIStream& stream, _dbITerm& iterm) stream >> iterm._inst; stream >> iterm._next_net_iterm; stream >> iterm._prev_net_iterm; - stream >> iterm._next_modnet_iterm; - stream >> iterm._prev_modnet_iterm; stream >> iterm.aps_; return stream; } diff --git a/src/odb/src/db/dbInst.cpp b/src/odb/src/db/dbInst.cpp index ec406670a3a..55d91bc5bad 100644 --- a/src/odb/src/db/dbInst.cpp +++ b/src/odb/src/db/dbInst.cpp @@ -1383,20 +1383,13 @@ dbInst* dbInst::create(dbBlock* block_, inst->_flags._physical_only = physical_only; if (!physical_only) { - // block_->getTopModule()->addInst((dbInst*) inst); - if (parent_module) - parent_module->addInst((dbInst*) inst); - else - block_->getTopModule()->addInst((dbInst*) inst); + block_->getTopModule()->addInst((dbInst*) inst); } - // Check this out.. // add to the verilog hierarchy - /* if (parent_module) parent_module->addInstInHierarchy((dbInst*) inst); else block_->getTopModule()->addInstInHierarchy((dbInst*) inst); - */ if (region) { region->addInst((dbInst*) inst); diff --git a/src/odb/src/db/dbModBTerm.cpp b/src/odb/src/db/dbModBTerm.cpp index f0de71e7cf7..6c47eeb265a 100644 --- a/src/odb/src/db/dbModBTerm.cpp +++ b/src/odb/src/db/dbModBTerm.cpp @@ -59,15 +59,6 @@ bool _dbModBTerm::operator==(const _dbModBTerm& rhs) const if (_net != rhs._net) { return false; } - if (_next_net_modbterm != rhs._next_net_modbterm) { - return false; - } - if (_prev_net_modbterm != rhs._prev_net_modbterm) { - return false; - } - if (_next_entry != rhs._next_entry) { - return false; - } return true; } @@ -86,9 +77,6 @@ void _dbModBTerm::differences(dbDiff& diff, DIFF_FIELD(_flags); DIFF_FIELD(_parent); DIFF_FIELD(_net); - DIFF_FIELD(_next_net_modbterm); - DIFF_FIELD(_prev_net_modbterm); - DIFF_FIELD(_next_entry); DIFF_END } @@ -99,9 +87,6 @@ void _dbModBTerm::out(dbDiff& diff, char side, const char* field) const DIFF_OUT_FIELD(_flags); DIFF_OUT_FIELD(_parent); DIFF_OUT_FIELD(_net); - DIFF_OUT_FIELD(_next_net_modbterm); - DIFF_OUT_FIELD(_prev_net_modbterm); - DIFF_OUT_FIELD(_next_entry); DIFF_END } @@ -116,9 +101,6 @@ _dbModBTerm::_dbModBTerm(_dbDatabase* db, const _dbModBTerm& r) _flags = r._flags; _parent = r._parent; _net = r._net; - _next_net_modbterm = r._next_net_modbterm; - _prev_net_modbterm = r._prev_net_modbterm; - _next_entry = r._next_entry; } dbIStream& operator>>(dbIStream& stream, _dbModBTerm& obj) @@ -127,9 +109,6 @@ dbIStream& operator>>(dbIStream& stream, _dbModBTerm& obj) stream >> obj._flags; stream >> obj._parent; stream >> obj._net; - stream >> obj._next_net_modbterm; - stream >> obj._prev_net_modbterm; - stream >> obj._next_entry; return stream; } @@ -139,9 +118,6 @@ dbOStream& operator<<(dbOStream& stream, const _dbModBTerm& obj) stream << obj._flags; stream << obj._parent; stream << obj._net; - stream << obj._next_net_modbterm; - stream << obj._prev_net_modbterm; - stream << obj._next_entry; return stream; } @@ -204,57 +180,6 @@ dbModNet* dbModBTerm::getNet() const return (dbModNet*) par->_modnet_tbl->getPtr(obj->_net); } -void dbModBTerm::setNextNetModbterm(dbModBTerm* next_net_modbterm) -{ - _dbModBTerm* obj = (_dbModBTerm*) this; - - obj->_next_net_modbterm = next_net_modbterm->getImpl()->getOID(); -} - -dbModBTerm* dbModBTerm::getNextNetModbterm() const -{ - _dbModBTerm* obj = (_dbModBTerm*) this; - if (obj->_next_net_modbterm == 0) { - return nullptr; - } - _dbBlock* par = (_dbBlock*) obj->getOwner(); - return (dbModBTerm*) par->_modbterm_tbl->getPtr(obj->_next_net_modbterm); -} - -void dbModBTerm::setPrevNetModbterm(dbModBTerm* prev_net_modbterm) -{ - _dbModBTerm* obj = (_dbModBTerm*) this; - - obj->_prev_net_modbterm = prev_net_modbterm->getImpl()->getOID(); -} - -dbModBTerm* dbModBTerm::getPrevNetModbterm() const -{ - _dbModBTerm* obj = (_dbModBTerm*) this; - if (obj->_prev_net_modbterm == 0) { - return nullptr; - } - _dbBlock* par = (_dbBlock*) obj->getOwner(); - return (dbModBTerm*) par->_modbterm_tbl->getPtr(obj->_prev_net_modbterm); -} - -void dbModBTerm::setNextEntry(dbModBTerm* next_entry) -{ - _dbModBTerm* obj = (_dbModBTerm*) this; - - obj->_next_entry = next_entry->getImpl()->getOID(); -} - -dbModBTerm* dbModBTerm::getNextEntry() const -{ - _dbModBTerm* obj = (_dbModBTerm*) this; - if (obj->_next_entry == 0) { - return nullptr; - } - _dbBlock* par = (_dbBlock*) obj->getOwner(); - return (dbModBTerm*) par->_modbterm_tbl->getPtr(obj->_next_entry); -} - // User Code Begin dbModBTermPublicMethods struct dbModBTermFlags_str @@ -302,30 +227,23 @@ dbIoType dbModBTerm::getIoType() dbModBTerm* dbModBTerm::create(dbModule* parentModule, const char* name) { - dbModBTerm* ret = parentModule->findModBTerm(name); - if (ret) { - return ret; - } - _dbModule* module = (_dbModule*) parentModule; _dbBlock* block = (_dbBlock*) module->getOwner(); std::string str_name(name); + if (module->_port_map.find(str_name) != module->_port_map.end()) { + dbId el = module->_port_map[str_name]; + return ((dbModule*) module)->getdbModBTerm((dbBlock*) block, el); + } _dbModBTerm* modbterm = block->_modbterm_tbl->create(); - // defaults ((dbModBTerm*) modbterm)->setFlags(0U); ((dbModBTerm*) modbterm)->setIoType(dbIoType::INPUT); ((dbModBTerm*) modbterm)->setSigType(dbSigType::SIGNAL); - modbterm->_net = 0; - modbterm->_next_net_modbterm = 0; - modbterm->_prev_net_modbterm = 0; - modbterm->_name = strdup(name); ZALLOCATED(modbterm->_name); modbterm->_parent = module->getOID(); - modbterm->_next_entry = module->_modbterms; - module->_modbterms = modbterm->getOID(); - + module->_port_map[std::string(name)] = module->_port_vec.size(); + module->_port_vec.push_back(modbterm->getOID()); return (dbModBTerm*) modbterm; } @@ -335,69 +253,17 @@ char* dbModBTerm::getName() return _bterm->_name; } -void dbModBTerm::connect(dbModNet* net) -{ - // printf("Connecting mod net %s to modbterm %s\n", - // net -> getName(), - // getName() - // ); - _dbModule* _module = (_dbModule*) (net->getParent()); - _dbBlock* _block = (_dbBlock*) _module->getOwner(); - _dbModNet* _modnet = (_dbModNet*) net; - _dbModBTerm* _modbterm = (_dbModBTerm*) this; - // already connected - if (_modbterm->_net == net->getId()) - return; - _modbterm->_net = net->getId(); - // append to net mod bterms. Do this by pushing onto head of list. - if (_modnet->_modbterms != 0) { - _dbModBTerm* head = _block->_modbterm_tbl->getPtr(_modnet->_modbterms); - // next is old head - _modbterm->_next_net_modbterm = _modnet->_modbterms; - // previous for old head is this one - head->_prev_net_modbterm = getId(); - } else { - _modbterm->_next_net_modbterm = 0; // only element - } - _modbterm->_prev_net_modbterm = 0; // previous of head always zero - _modnet->_modbterms = getId(); // set new head - // printf("Mod net now connected to %d modbterms\n", - // net -> getModBTerms().size()); - - return; -} - -void dbModBTerm::disconnect() +bool dbModBTerm::connect(dbModNet* net) { - _dbModule* module = (_dbModule*) getParent(); - _dbBlock* block = (_dbBlock*) module->getOwner(); - _dbModBTerm* _modbterm = (_dbModBTerm*) this; - if (_modbterm->_net == 0) - return; - _dbModNet* mod_net = block->_modnet_tbl->getPtr(_modbterm->_net); - - if (_modbterm->_prev_net_modbterm == 0) { - // degenerate case, head element, need to update net starting point - // and if next is null then make generate empty list - mod_net->_modbterms = _modbterm->_next_net_modbterm; - } else { - _dbModBTerm* prev_modbterm - = block->_modbterm_tbl->getPtr(_modbterm->_prev_net_modbterm); - prev_modbterm->_next_net_modbterm - = _modbterm->_next_net_modbterm; // short out this element - } - if (_modbterm->_next_net_modbterm != 0) { - _dbModBTerm* next_modbterm - = block->_modbterm_tbl->getPtr(_modbterm->_next_net_modbterm); - next_modbterm->_prev_net_modbterm = _modbterm->_prev_net_modbterm; - } - - // - // zero out this element for garbage collection - // Not we can never rely on sequential order of modbterms for offsets. - // - _modbterm->_next_net_modbterm = 0; - _modbterm->_prev_net_modbterm = 0; + _dbModNet* local_modnet = (_dbModNet*) net; + _dbModBTerm* _bterm = (_dbModBTerm*) this; + dbId<_dbModNet> net_id(local_modnet->getOID()); + if (_bterm->_net == net_id) + return true; + _bterm->_net = net_id; + dbId<_dbModBTerm> dest = _bterm->getOID(); + local_modnet->_modbterms.push_back(dest); + return true; } void dbModBTerm::staSetPort(void* p) diff --git a/src/odb/src/db/dbModBTerm.h b/src/odb/src/db/dbModBTerm.h index 50588f49e62..832c802868d 100644 --- a/src/odb/src/db/dbModBTerm.h +++ b/src/odb/src/db/dbModBTerm.h @@ -64,9 +64,6 @@ class _dbModBTerm : public _dbObject uint _flags; dbId<_dbModule> _parent; dbId<_dbModNet> _net; - dbId<_dbModBTerm> _next_net_modbterm; - dbId<_dbModBTerm> _prev_net_modbterm; - dbId<_dbModBTerm> _next_entry; // User Code Begin Fields void* _sta_port; diff --git a/src/odb/src/db/dbModITerm.cpp b/src/odb/src/db/dbModITerm.cpp index 2e6dc512741..b505620ac3d 100644 --- a/src/odb/src/db/dbModITerm.cpp +++ b/src/odb/src/db/dbModITerm.cpp @@ -59,15 +59,6 @@ bool _dbModITerm::operator==(const _dbModITerm& rhs) const if (_net != rhs._net) { return false; } - if (_next_net_moditerm != rhs._next_net_moditerm) { - return false; - } - if (_prev_net_moditerm != rhs._prev_net_moditerm) { - return false; - } - if (_next_entry != rhs._next_entry) { - return false; - } return true; } @@ -86,9 +77,6 @@ void _dbModITerm::differences(dbDiff& diff, DIFF_FIELD(_flags); DIFF_FIELD(_parent); DIFF_FIELD(_net); - DIFF_FIELD(_next_net_moditerm); - DIFF_FIELD(_prev_net_moditerm); - DIFF_FIELD(_next_entry); DIFF_END } @@ -99,9 +87,6 @@ void _dbModITerm::out(dbDiff& diff, char side, const char* field) const DIFF_OUT_FIELD(_flags); DIFF_OUT_FIELD(_parent); DIFF_OUT_FIELD(_net); - DIFF_OUT_FIELD(_next_net_moditerm); - DIFF_OUT_FIELD(_prev_net_moditerm); - DIFF_OUT_FIELD(_next_entry); DIFF_END } @@ -116,9 +101,6 @@ _dbModITerm::_dbModITerm(_dbDatabase* db, const _dbModITerm& r) _flags = r._flags; _parent = r._parent; _net = r._net; - _next_net_moditerm = r._next_net_moditerm; - _prev_net_moditerm = r._prev_net_moditerm; - _next_entry = r._next_entry; } dbIStream& operator>>(dbIStream& stream, _dbModITerm& obj) @@ -127,9 +109,6 @@ dbIStream& operator>>(dbIStream& stream, _dbModITerm& obj) stream >> obj._flags; stream >> obj._parent; stream >> obj._net; - stream >> obj._next_net_moditerm; - stream >> obj._prev_net_moditerm; - stream >> obj._next_entry; return stream; } @@ -139,9 +118,6 @@ dbOStream& operator<<(dbOStream& stream, const _dbModITerm& obj) stream << obj._flags; stream << obj._parent; stream << obj._net; - stream << obj._next_net_moditerm; - stream << obj._prev_net_moditerm; - stream << obj._next_entry; return stream; } @@ -198,57 +174,6 @@ dbModNet* dbModITerm::getNet() const return (dbModNet*) par->_modnet_tbl->getPtr(obj->_net); } -void dbModITerm::setNextNetModiterm(dbModITerm* next_net_moditerm) -{ - _dbModITerm* obj = (_dbModITerm*) this; - - obj->_next_net_moditerm = next_net_moditerm->getImpl()->getOID(); -} - -dbModITerm* dbModITerm::getNextNetModiterm() const -{ - _dbModITerm* obj = (_dbModITerm*) this; - if (obj->_next_net_moditerm == 0) { - return nullptr; - } - _dbBlock* par = (_dbBlock*) obj->getOwner(); - return (dbModITerm*) par->_moditerm_tbl->getPtr(obj->_next_net_moditerm); -} - -void dbModITerm::setPrevNetModiterm(dbModITerm* prev_net_moditerm) -{ - _dbModITerm* obj = (_dbModITerm*) this; - - obj->_prev_net_moditerm = prev_net_moditerm->getImpl()->getOID(); -} - -dbModITerm* dbModITerm::getPrevNetModiterm() const -{ - _dbModITerm* obj = (_dbModITerm*) this; - if (obj->_prev_net_moditerm == 0) { - return nullptr; - } - _dbBlock* par = (_dbBlock*) obj->getOwner(); - return (dbModITerm*) par->_moditerm_tbl->getPtr(obj->_prev_net_moditerm); -} - -void dbModITerm::setNextEntry(dbModITerm* next_entry) -{ - _dbModITerm* obj = (_dbModITerm*) this; - - obj->_next_entry = next_entry->getImpl()->getOID(); -} - -dbModITerm* dbModITerm::getNextEntry() const -{ - _dbModITerm* obj = (_dbModITerm*) this; - if (obj->_next_entry == 0) { - return nullptr; - } - _dbBlock* par = (_dbBlock*) obj->getOwner(); - return (dbModITerm*) par->_moditerm_tbl->getPtr(obj->_next_entry); -} - // User Code Begin dbModITermPublicMethods struct dbModITermFlags_str @@ -296,48 +221,31 @@ dbIoType dbModITerm::getIoType() dbModITerm* dbModITerm::create(dbModInst* parentInstance, const char* name) { + // Axiom: iterms ordered in port order on dbModule + // that is in moditerm list (so we can always quickly get a modbterm from a + // moditerm) _dbModInst* parent = (_dbModInst*) parentInstance; _dbBlock* block = (_dbBlock*) parent->getOwner(); _dbModITerm* moditerm = block->_moditerm_tbl->create(); // defaults - moditerm->_net = 0; - moditerm->_next_net_moditerm = 0; - moditerm->_prev_net_moditerm = 0; - ((dbModITerm*) moditerm)->setFlags(0U); ((dbModITerm*) moditerm)->setIoType(dbIoType::INPUT); ((dbModITerm*) moditerm)->setSigType(dbSigType::SIGNAL); moditerm->_name = strdup(name); ZALLOCATED(moditerm->_name); - - moditerm->_parent = parent->getOID(); - moditerm->_next_entry = parent->_moditerms; - parent->_moditerms = moditerm->getOID(); - + moditerm->_parent = parent->getOID(); // dbModInst -- parent + parent->_pin_vec.push_back(moditerm->getOID()); return (dbModITerm*) moditerm; } bool dbModITerm::connect(dbModNet* net) { - _dbModITerm* _moditerm = (_dbModITerm*) this; - _dbModNet* _modnet = (_dbModNet*) net; - _dbBlock* _block = (_dbBlock*) _moditerm->getOwner(); - // already connected. - if (_moditerm->_net == _modnet->getId()) + _dbModITerm* _iterm = (_dbModITerm*) this; + dbId<_dbModITerm> dest = _iterm->getOID(); + if (_iterm->_net == ((_dbModNet*) net)->getOID()) return true; - _moditerm->_net = _modnet->getId(); - // append to net moditerms - if (_modnet->_moditerms != 0) { - _dbModITerm* head = _block->_moditerm_tbl->getPtr(_modnet->_moditerms); - // next is old head - _moditerm->_next_net_moditerm = _modnet->_moditerms; - head->_prev_net_moditerm = getId(); - } else { - _moditerm->_next_net_moditerm = 0; - } - // set up new head - _moditerm->_prev_net_moditerm = 0; - _modnet->_moditerms = getId(); + _iterm->_net = ((_dbModNet*) net)->getOID(); + ((_dbModNet*) net)->_moditerms.push_back(dest); return true; } diff --git a/src/odb/src/db/dbModITerm.h b/src/odb/src/db/dbModITerm.h index b446cc1f4ee..19775cd33eb 100644 --- a/src/odb/src/db/dbModITerm.h +++ b/src/odb/src/db/dbModITerm.h @@ -64,9 +64,6 @@ class _dbModITerm : public _dbObject uint _flags; dbId<_dbModInst> _parent; dbId<_dbModNet> _net; - dbId<_dbModITerm> _next_net_moditerm; - dbId<_dbModITerm> _prev_net_moditerm; - dbId<_dbModITerm> _next_entry; }; dbIStream& operator>>(dbIStream& stream, _dbModITerm& obj); dbOStream& operator<<(dbOStream& stream, const _dbModITerm& obj); diff --git a/src/odb/src/db/dbModInst.cpp b/src/odb/src/db/dbModInst.cpp index 5eddc40c9f8..bd8519dca50 100644 --- a/src/odb/src/db/dbModInst.cpp +++ b/src/odb/src/db/dbModInst.cpp @@ -45,7 +45,6 @@ // User Code Begin Includes #include "dbGroup.h" #include "dbModInst.h" -#include "dbModuleModInstModITermItr.h" // User Code End Includes namespace odb { template class dbTable<_dbModInst>; @@ -73,9 +72,6 @@ bool _dbModInst::operator==(const _dbModInst& rhs) const if (_group != rhs._group) { return false; } - if (_moditerms != rhs._moditerms) { - return false; - } return true; } @@ -101,7 +97,6 @@ void _dbModInst::differences(dbDiff& diff, DIFF_FIELD(_master); DIFF_FIELD(_group_next); DIFF_FIELD(_group); - DIFF_FIELD(_moditerms); DIFF_END } @@ -115,7 +110,6 @@ void _dbModInst::out(dbDiff& diff, char side, const char* field) const DIFF_OUT_FIELD(_master); DIFF_OUT_FIELD(_group_next); DIFF_OUT_FIELD(_group); - DIFF_OUT_FIELD(_moditerms); DIFF_END } @@ -141,7 +135,6 @@ _dbModInst::_dbModInst(_dbDatabase* db, const _dbModInst& r) _master = r._master; _group_next = r._group_next; _group = r._group; - _moditerms = r._moditerms; } dbIStream& operator>>(dbIStream& stream, _dbModInst& obj) @@ -153,7 +146,7 @@ dbIStream& operator>>(dbIStream& stream, _dbModInst& obj) stream >> obj._master; stream >> obj._group_next; stream >> obj._group; - stream >> obj._moditerms; + stream >> obj._pin_vec; return stream; } @@ -166,7 +159,7 @@ dbOStream& operator<<(dbOStream& stream, const _dbModInst& obj) stream << obj._master; stream << obj._group_next; stream << obj._group; - stream << obj._moditerms; + stream << obj._pin_vec; return stream; } @@ -226,8 +219,8 @@ dbModInst* dbModInst::create(dbModule* parentModule, { _dbModule* module = (_dbModule*) parentModule; _dbBlock* block = (_dbBlock*) module->getOwner(); - _dbModule* master = (_dbModule*) masterModule; + _dbModule* master = (_dbModule*) masterModule; if (master->_mod_inst != 0) return nullptr; @@ -246,8 +239,8 @@ dbModInst* dbModInst::create(dbModule* parentModule, modinst->_module_next = module->_modinsts; module->_modinsts = modinst->getOID(); master->_mod_inst = modinst->getOID(); + module->_modinst_vec.push_back(modinst->getOID()); block->_modinst_hash.insert(modinst); - dbSet mod_inst_set = ((dbModule*) module)->getModInsts(); return (dbModInst*) modinst; } @@ -295,13 +288,6 @@ dbSet::iterator dbModInst::destroy(dbSet::iterator& itr) return next; } -dbSet dbModInst::getModITerms() -{ - _dbModInst* _mod_inst = (_dbModInst*) this; - _dbBlock* _block = (_dbBlock*) _mod_inst->getOwner(); - return dbSet(_mod_inst, _block->_module_modinstmoditerm_itr); -} - dbModInst* dbModInst::getModInst(dbBlock* block_, uint dbid_) { _dbBlock* block = (_dbBlock*) block_; @@ -334,33 +320,41 @@ dbModITerm* dbModInst::getdbModITerm(dbId el) return ((dbModITerm*) (block->_moditerm_tbl->getPtr(conv_el))); } -bool dbModInst::findModITerm(const char* name, dbModITerm*& ret) +bool dbModInst::findModITerm(const char* name, dbModITerm*& ret) const { - dbSet moditerms = getModITerms(); - for (dbModITerm* mod_iterm : moditerms) { - if (!strcmp(mod_iterm->getName(), name)) { - ret = mod_iterm; + static int debug; + debug++; + _dbModInst* _obj = (_dbModInst*) this; + _dbBlock* block = (_dbBlock*) _obj->getOwner(); + for (auto el : _obj->_pin_vec) { + debug++; + dbId<_dbModITerm> conv_el(el.id()); + dbModITerm* candidate + = (dbModITerm*) (block->_moditerm_tbl->getPtr(conv_el)); + if (!strcmp(candidate->getName(), name)) { + ret = candidate; return true; } } return false; } +std::vector>& dbModInst::getPinVec() const +{ + _dbModInst* _obj = (_dbModInst*) this; + return _obj->_pin_vec; +} + bool dbModInst::getPinAtIx(unsigned ix, dbModITerm*& ret) const { _dbModInst* _obj = (_dbModInst*) this; _dbBlock* block = (_dbBlock*) _obj->getOwner(); - (void) block; - (void) _obj; - printf("TDODO"); - /* if (ix < _obj->_pin_vec.size()) { dbId el = _obj->_pin_vec.at(ix); dbId<_dbModITerm> conv_el(el.id()); ret = (dbModITerm*) (block->_moditerm_tbl->getPtr(conv_el)); return true; } - */ return false; } diff --git a/src/odb/src/db/dbModInst.h b/src/odb/src/db/dbModInst.h index e79a5b168ae..5b41da6bcfa 100644 --- a/src/odb/src/db/dbModInst.h +++ b/src/odb/src/db/dbModInst.h @@ -34,8 +34,6 @@ #pragma once #include "dbCore.h" -#include "dbSet.h" -#include "dbVector.h" #include "odb.h" namespace odb { @@ -45,7 +43,6 @@ class dbDiff; class _dbDatabase; class _dbModule; class _dbGroup; -class _dbModITerm; // User Code Begin Classes class dbModITerm; // User Code End Classes @@ -73,7 +70,7 @@ class _dbModInst : public _dbObject dbId<_dbModule> _master; dbId<_dbModInst> _group_next; dbId<_dbGroup> _group; - dbId<_dbModITerm> _moditerms; + std::vector> _pin_vec; }; dbIStream& operator>>(dbIStream& stream, _dbModInst& obj); dbOStream& operator<<(dbOStream& stream, const _dbModInst& obj); diff --git a/src/odb/src/db/dbModInstITermItr.cpp b/src/odb/src/db/dbModInstITermItr.cpp deleted file mode 100644 index b3d29347cca..00000000000 --- a/src/odb/src/db/dbModInstITermItr.cpp +++ /dev/null @@ -1,105 +0,0 @@ -/////////////////////////////////////////////////////////////////////////////// -// BSD 3-Clause License -// -// Copyright (c) 2019, Nefelus Inc -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are met: -// -// * Redistributions of source code must retain the above copyright notice, this -// list of conditions and the following disclaimer. -// -// * Redistributions in binary form must reproduce the above copyright notice, -// this list of conditions and the following disclaimer in the documentation -// and/or other materials provided with the distribution. -// -// * Neither the name of the copyright holder nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE -// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -// POSSIBILITY OF SUCH DAMAGE. - -// Generator Code Begin Cpp -#include "dbModInstITermItr.h" - -#include "dbModITerm.h" -#include "dbTable.h" - -namespace odb { - -//////////////////////////////////////////////////////////////////// -// -// dbModInstITermItr - Methods -// -//////////////////////////////////////////////////////////////////// - -bool dbModInstITermItr::reversible() -{ - return true; -} - -bool dbModInstITermItr::orderReversed() -{ - return true; -} - -void dbModInstITermItr::reverse(dbObject* parent) -{ -} - -uint dbModInstITermItr::sequential() -{ - return 0; -} - -uint dbModInstITermItr::size(dbObject* parent) -{ - uint id; - uint cnt = 0; - - for (id = dbModInstITermItr::begin(parent); - id != dbModInstITermItr::end(parent); - id = dbModInstITermItr::next(id)) - ++cnt; - - return cnt; -} - -uint dbModInstITermItr::begin(dbObject* parent) -{ - // User Code Begin begin - _dbModInst* modinst = (_dbModInst*) parent; - return modinst->_moditerms; - // User Code End begin -} - -uint dbModInstITermItr::end(dbObject* /* unused: parent */) -{ - return 0; -} - -uint dbModInstITermItr::next(uint id, ...) -{ - // User Code Begin next - _dbModInstITerm* iterm = _moditerm_tbl->getPtr(id); - return iterm->_next_entry; - // User Code End next -} - -dbObject* dbModInstITermItr::getObject(uint id, ...) -{ - return _moditerm_tbl->getPtr(id); -} -} // namespace odb - // Generator Code End Cpp diff --git a/src/odb/src/db/dbModInstITermItr.h b/src/odb/src/db/dbModInstITermItr.h deleted file mode 100644 index 60459a1b63b..00000000000 --- a/src/odb/src/db/dbModInstITermItr.h +++ /dev/null @@ -1,68 +0,0 @@ -/////////////////////////////////////////////////////////////////////////////// -// BSD 3-Clause License -// -// Copyright (c) 2020, The Regents of the University of California -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are met: -// -// * Redistributions of source code must retain the above copyright notice, this -// list of conditions and the following disclaimer. -// -// * Redistributions in binary form must reproduce the above copyright notice, -// this list of conditions and the following disclaimer in the documentation -// and/or other materials provided with the distribution. -// -// * Neither the name of the copyright holder nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE -// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -// POSSIBILITY OF SUCH DAMAGE. - -// Generator Code Begin Header -#pragma once - -#include "dbIterator.h" -#include "odb.h" - -namespace odb { -class _dbModITerm; - -template -class dbTable; - -class dbModInstITermItr : public dbIterator -{ - public: - dbModInstITermItr(dbTable<_dbModITerm>* moditerm_tbl) - { - _moditerm_tbl = moditerm_tbl; - } - - bool reversible() override; - bool orderReversed() override; - void reverse(dbObject* parent) override; - uint sequential() override; - uint size(dbObject* parent) override; - uint begin(dbObject* parent) override; - uint end(dbObject* parent) override; - uint next(uint id, ...) override; - dbObject* getObject(uint id, ...) override; - - private: - dbTable<_dbModITerm>* _moditerm_tbl; -}; - -} // namespace odb - // Generator Code End Header \ No newline at end of file diff --git a/src/odb/src/db/dbModInstModITermItr.cpp b/src/odb/src/db/dbModInstModITermItr.cpp deleted file mode 100644 index 7d81bb05866..00000000000 --- a/src/odb/src/db/dbModInstModITermItr.cpp +++ /dev/null @@ -1,97 +0,0 @@ -/////////////////////////////////////////////////////////////////////////////// -// BSD 3-Clause License -// -// Copyright (c) 2019, Nefelus Inc -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are met: -// -// * Redistributions of source code must retain the above copyright notice, this -// list of conditions and the following disclaimer. -// -// * Redistributions in binary form must reproduce the above copyright notice, -// this list of conditions and the following disclaimer in the documentation -// and/or other materials provided with the distribution. -// -// * Neither the name of the copyright holder nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE -// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -// POSSIBILITY OF SUCH DAMAGE. - -// Generator Code Begin Cpp -#include "dbModInstModITermItr.h" - -#include "dbModITerm.h" -#include "dbTable.h" - -namespace odb { - -//////////////////////////////////////////////////////////////////// -// -// dbModInstModITermItr - Methods -// -//////////////////////////////////////////////////////////////////// - -bool dbModInstModITermItr::reversible() -{ - return true; -} - -bool dbModInstModITermItr::orderReversed() -{ - return true; -} - -void dbModInstModITermItr::reverse(dbObject* parent) -{ -} - -uint dbModInstModITermItr::sequential() -{ - return 0; -} - -uint dbModInstModITermItr::size(dbObject* parent) -{ - uint id; - uint cnt = 0; - - for (id = dbModInstModITermItr::begin(parent); - id != dbModInstModITermItr::end(parent); - id = dbModInstModITermItr::next(id)) - ++cnt; - - return cnt; -} - -uint dbModInstModITermItr::begin(dbObject* parent) -{ -} - -uint dbModInstModITermItr::end(dbObject* /* unused: parent */) -{ - return 0; -} - -uint dbModInstModITermItr::next(uint id, ...) -{ -} - -dbObject* dbModInstModITermItr::getObject(uint id, ...) -{ - return _moditerm_tbl->getPtr(id); -} -} // namespace odb - // Generator Code End Cpp \ No newline at end of file diff --git a/src/odb/src/db/dbModInstModITermItr.h b/src/odb/src/db/dbModInstModITermItr.h deleted file mode 100644 index e21308f33d0..00000000000 --- a/src/odb/src/db/dbModInstModITermItr.h +++ /dev/null @@ -1,68 +0,0 @@ -/////////////////////////////////////////////////////////////////////////////// -// BSD 3-Clause License -// -// Copyright (c) 2020, The Regents of the University of California -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are met: -// -// * Redistributions of source code must retain the above copyright notice, this -// list of conditions and the following disclaimer. -// -// * Redistributions in binary form must reproduce the above copyright notice, -// this list of conditions and the following disclaimer in the documentation -// and/or other materials provided with the distribution. -// -// * Neither the name of the copyright holder nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE -// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -// POSSIBILITY OF SUCH DAMAGE. - -// Generator Code Begin Header -#pragma once - -#include "dbIterator.h" -#include "odb.h" - -namespace odb { -class _dbModITerm; - -template -class dbTable; - -class dbModInstModITermItr : public dbIterator -{ - public: - dbModInstModITermItr(dbTable<_dbModITerm>* moditerm_tbl) - { - _moditerm_tbl = moditerm_tbl; - } - - bool reversible() override; - bool orderReversed() override; - void reverse(dbObject* parent) override; - uint sequential() override; - uint size(dbObject* parent) override; - uint begin(dbObject* parent) override; - uint end(dbObject* parent) override; - uint next(uint id, ...) override; - dbObject* getObject(uint id, ...) override; - - private: - dbTable<_dbModITerm>* _moditerm_tbl; -}; - -} // namespace odb - // Generator Code End Header \ No newline at end of file diff --git a/src/odb/src/db/dbModNet.cpp b/src/odb/src/db/dbModNet.cpp index dc4d9a8b647..3bb4546dd55 100644 --- a/src/odb/src/db/dbModNet.cpp +++ b/src/odb/src/db/dbModNet.cpp @@ -46,12 +46,6 @@ #include "dbTable.h" #include "dbTable.hpp" #include "dbVector.h" -// User Code Begin Includes -#include "dbModuleModNetBTermItr.h" -#include "dbModuleModNetITermItr.h" -#include "dbModuleModNetModBTermItr.h" -#include "dbModuleModNetModITermItr.h" -// User Code End Includes namespace odb { template class dbTable<_dbModNet>; @@ -66,18 +60,6 @@ bool _dbModNet::operator==(const _dbModNet& rhs) const if (_next_entry != rhs._next_entry) { return false; } - if (_moditerms != rhs._moditerms) { - return false; - } - if (_modbterms != rhs._modbterms) { - return false; - } - if (_iterms != rhs._iterms) { - return false; - } - if (_bterms != rhs._bterms) { - return false; - } return true; } @@ -95,10 +77,6 @@ void _dbModNet::differences(dbDiff& diff, DIFF_FIELD(_name); DIFF_FIELD(_parent); DIFF_FIELD(_next_entry); - DIFF_FIELD(_moditerms); - DIFF_FIELD(_modbterms); - DIFF_FIELD(_iterms); - DIFF_FIELD(_bterms); DIFF_END } @@ -108,10 +86,6 @@ void _dbModNet::out(dbDiff& diff, char side, const char* field) const DIFF_OUT_FIELD(_name); DIFF_OUT_FIELD(_parent); DIFF_OUT_FIELD(_next_entry); - DIFF_OUT_FIELD(_moditerms); - DIFF_OUT_FIELD(_modbterms); - DIFF_OUT_FIELD(_iterms); - DIFF_OUT_FIELD(_bterms); DIFF_END } @@ -125,10 +99,6 @@ _dbModNet::_dbModNet(_dbDatabase* db, const _dbModNet& r) _name = r._name; _parent = r._parent; _next_entry = r._next_entry; - _moditerms = r._moditerms; - _modbterms = r._modbterms; - _iterms = r._iterms; - _bterms = r._bterms; } dbIStream& operator>>(dbIStream& stream, _dbModNet& obj) @@ -191,56 +161,30 @@ dbModNet* dbModNet::create(dbModule* parentModule, const char* name) // give illusion of scoping. _dbModule* parent = (_dbModule*) parentModule; _dbBlock* block = (_dbBlock*) parent->getOwner(); + + std::string name_str(name); + if (parent->_modnet_map.find(name_str) != parent->_modnet_map.end()) { + dbId modnet_id = parent->_modnet_map[name_str]; + _dbModNet* modnet = block->_modnet_tbl->getPtr(modnet_id.id()); + return ((dbModNet*) modnet); + } _dbModNet* modnet = block->_modnet_tbl->create(); - // defaults + parent->_modnet_map[name_str] = modnet->getOID(); modnet->_name = strdup(name); modnet->_parent = parent->getOID(); // dbmodule modnet->_next_entry = parent->_modnets; parent->_modnets = modnet->getOID(); - // printf("Creating modnet %s (%u) in %s (%p)\n", - // modnet -> _name, - // modnet -> getOID(), - // ((dbModule*)parent) -> getName(), - // ((dbModule*)parent) - // ); - // dbSet modnets = ((dbModule*)parent) -> getModNets(); - // printf("# modnets %u\n",modnets.size()); return (dbModNet*) modnet; } -dbSet dbModNet::getModITerms() -{ - _dbModNet* _mod_net = (_dbModNet*) this; - _dbBlock* _block = (_dbBlock*) _mod_net->getOwner(); - return dbSet(_mod_net, _block->_module_modnet_moditerm_itr); -} - -dbSet dbModNet::getModBTerms() -{ - _dbModNet* _mod_net = (_dbModNet*) this; - _dbBlock* _block = (_dbBlock*) _mod_net->getOwner(); - return dbSet(_mod_net, _block->_module_modnet_modbterm_itr); -} - -dbSet dbModNet::getBTerms() -{ - _dbModNet* _mod_net = (_dbModNet*) this; - _dbBlock* _block = (_dbBlock*) _mod_net->getOwner(); - return dbSet(_mod_net, _block->_module_modnet_bterm_itr); -} - -dbSet dbModNet::getITerms() -{ - _dbModNet* _mod_net = (_dbModNet*) this; - _dbBlock* _block = (_dbBlock*) _mod_net->getOwner(); - return dbSet(_mod_net, _block->_module_modnet_iterm_itr); -} - -dbModBTerm* dbModNet::connectedToModBTerm() +dbModBTerm* dbModNet::connectedToModBTerm() const { const char* net_name = getName(); - dbSet modbterms = getModBTerms(); - for (dbModBTerm* mbterm : modbterms) { + _dbModNet* obj = (_dbModNet*) this; + dbModule* module = getParent(); + for (auto mib : obj->_modbterms) { + odb::dbId conv_el(mib.id()); + dbModBTerm* mbterm = module->getdbModBTerm(conv_el); const char* mbterm_name = mbterm->getName(); if (!strcmp(mbterm_name, net_name)) return mbterm; diff --git a/src/odb/src/db/dbModNet.h b/src/odb/src/db/dbModNet.h index 0d7a952cb8a..cc3db2aa164 100644 --- a/src/odb/src/db/dbModNet.h +++ b/src/odb/src/db/dbModNet.h @@ -65,12 +65,12 @@ class _dbModNet : public _dbObject char* _name; dbId<_dbModule> _parent; dbId<_dbModNet> _next_entry; - dbId<_dbModITerm> _moditerms; - dbId<_dbModBTerm> _modbterms; - dbId<_dbITerm> _iterms; - dbId<_dbBTerm> _bterms; + dbVector> _moditerms; + dbVector> _modbterms; + dbVector> _iterms; + dbVector> _bterms; }; dbIStream& operator>>(dbIStream& stream, _dbModNet& obj); dbOStream& operator<<(dbOStream& stream, const _dbModNet& obj); } // namespace odb - // Generator Code End Header + // Generator Code End Header \ No newline at end of file diff --git a/src/odb/src/db/dbModule.cpp b/src/odb/src/db/dbModule.cpp index 0eacc9937dd..aa41ec5d8fb 100644 --- a/src/odb/src/db/dbModule.cpp +++ b/src/odb/src/db/dbModule.cpp @@ -50,9 +50,7 @@ #include "dbModInst.h" #include "dbModNet.h" #include "dbModuleInstItr.h" -#include "dbModuleModBTermItr.h" #include "dbModuleModInstItr.h" -#include "dbModuleModNetItr.h" #include "utl/Logger.h" // User Code End Includes namespace odb { @@ -78,9 +76,6 @@ bool _dbModule::operator==(const _dbModule& rhs) const if (_modnets != rhs._modnets) { return false; } - if (_modbterms != rhs._modbterms) { - return false; - } return true; } @@ -105,7 +100,6 @@ void _dbModule::differences(dbDiff& diff, DIFF_FIELD(_mod_inst); DIFF_FIELD(_modinsts); DIFF_FIELD(_modnets); - DIFF_FIELD(_modbterms); DIFF_END } @@ -118,7 +112,6 @@ void _dbModule::out(dbDiff& diff, char side, const char* field) const DIFF_OUT_FIELD(_mod_inst); DIFF_OUT_FIELD(_modinsts); DIFF_OUT_FIELD(_modnets); - DIFF_OUT_FIELD(_modbterms); DIFF_END } @@ -141,7 +134,6 @@ _dbModule::_dbModule(_dbDatabase* db, const _dbModule& r) _mod_inst = r._mod_inst; _modinsts = r._modinsts; _modnets = r._modnets; - _modbterms = r._modbterms; } dbIStream& operator>>(dbIStream& stream, _dbModule& obj) @@ -152,7 +144,11 @@ dbIStream& operator>>(dbIStream& stream, _dbModule& obj) stream >> obj._mod_inst; stream >> obj._modinsts; stream >> obj._modnets; - stream >> obj._modbterms; + stream >> obj._port_vec; + stream >> obj._modinst_vec; + stream >> obj._dbinst_vec; + stream >> obj._port_map; + stream >> obj._modnet_map; return stream; } @@ -164,7 +160,11 @@ dbOStream& operator<<(dbOStream& stream, const _dbModule& obj) stream << obj._mod_inst; stream << obj._modinsts; stream << obj._modnets; - stream << obj._modbterms; + stream << obj._port_vec; + stream << obj._modinst_vec; + stream << obj._dbinst_vec; + stream << obj._port_map; + stream << obj._modnet_map; return stream; } @@ -187,13 +187,6 @@ const char* dbModule::getName() const return obj->_name; } -void dbModule::setModInst(dbModInst* mod_inst) -{ - _dbModule* obj = (_dbModule*) this; - - obj->_mod_inst = mod_inst->getImpl()->getOID(); -} - dbModInst* dbModule::getModInst() const { _dbModule* obj = (_dbModule*) this; @@ -206,6 +199,18 @@ dbModInst* dbModule::getModInst() const // User Code Begin dbModulePublicMethods +std::vector>& dbModule::getPortVec() const +{ + _dbModule* obj = (_dbModule*) this; + return obj->_port_vec; +} + +std::vector>& dbModule::getModInstVec() const +{ + _dbModule* obj = (_dbModule*) this; + return obj->_modinst_vec; +} + std::string dbModule::getHierarchicalName(std::string& separator) { std::string ret = hierarchicalNameR(separator); @@ -288,6 +293,12 @@ void dbModule::highestModWithNetNamed(const char* modbterm_name, } } +std::vector>& dbModule::getDbInstVec() const +{ + _dbModule* obj = (_dbModule*) this; + return obj->_dbinst_vec; +} + dbModInst* dbModule::getModInst(dbId el) { _dbModule* module = (_dbModule*) this; @@ -304,18 +315,26 @@ dbInst* dbModule::getdbInst(dbId el) return ((dbInst*) (block->_inst_tbl->getPtr(converted_el))); } -unsigned dbModule::getModInstCount() +void dbModule::addInstInHierarchy(dbInst* inst) +{ + _dbInst* _inst = (_dbInst*) inst; + _dbModule* _module = (_dbModule*) this; + + unsigned id = _inst->getOID(); + dbId db_id(id); + _module->_dbinst_vec.push_back(db_id); +} + +size_t dbModule::getModInstCount() { _dbModule* module = (_dbModule*) this; - _dbBlock* block = (_dbBlock*) module->getOwner(); - return (dbSet(module, block->_module_modinst_itr)).size(); + return module->_modinst_vec.size(); } -unsigned dbModule::getDbInstCount() +size_t dbModule::getDbInstCount() { _dbModule* module = (_dbModule*) this; - _dbBlock* block = (_dbBlock*) module->getOwner(); - return dbSet(module, block->_module_inst_itr).size(); + return module->_dbinst_vec.size(); } void dbModule::addInst(dbInst* inst) @@ -403,6 +422,7 @@ void _dbModule::removeInst(dbInst* inst) prev->_module_next = _inst->_module_next; } } + _inst->_module = 0; _inst->_module_next = 0; _inst->_module_prev = 0; @@ -415,27 +435,6 @@ dbSet dbModule::getChildren() return dbSet(module, block->_module_modinst_itr); } -dbSet dbModule::getModNets() -{ - _dbModule* module = (_dbModule*) this; - _dbBlock* block = (_dbBlock*) module->getOwner(); - return dbSet(module, block->_module_modnet_itr); -} - -dbSet dbModule::getModInsts() -{ - _dbModule* module = (_dbModule*) this; - _dbBlock* block = (_dbBlock*) module->getOwner(); - return dbSet(module, block->_module_modinst_itr); -} - -dbSet dbModule::getModBTerms() -{ - _dbModule* module = (_dbModule*) this; - _dbBlock* block = (_dbBlock*) module->getOwner(); - return dbSet(module, block->_module_modbterm_itr); -} - dbSet dbModule::getInsts() { _dbModule* module = (_dbModule*) this; @@ -498,10 +497,6 @@ void dbModule::removeModInst(const char* name) { _dbModule* cur_module = (_dbModule*) this; _dbBlock* block = (_dbBlock*) cur_module->getOwner(); - (void) block; - (void) cur_module; - printf("Unsupported call: removeModInst\n"); - /* for (std::vector>::iterator it = cur_module->_modinst_vec.begin(); it != cur_module->_modinst_vec.end(); @@ -513,14 +508,19 @@ void dbModule::removeModInst(const char* name) cur_module->_modinst_vec.erase(it); return; } - }*/ + } } dbModInst* dbModule::findModInst(const char* name) { - for (dbModInst* mod_inst : getModInsts()) { - if (!strcmp(mod_inst->getName(), name)) - return mod_inst; + _dbModule* cur_module = (_dbModule*) this; + _dbBlock* block = (_dbBlock*) cur_module->getOwner(); + for (auto m : cur_module->_modinst_vec) { + unsigned id = m.id(); + dbId<_dbModInst> converted_el(id); + dbModInst* mi = (dbModInst*) (block->_modinst_tbl->getPtr(converted_el)); + if (mi && !strcmp(mi->getName(), name)) + return (dbModInst*) mi; } return nullptr; } @@ -529,9 +529,12 @@ dbInst* dbModule::findDbInst(const char* name) { _dbModule* cur_module = (_dbModule*) this; _dbBlock* block = (_dbBlock*) cur_module->getOwner(); - for (dbInst* inst : getInsts()) { - if (!strcmp(inst->getName().c_str(), name)) - return inst; + for (auto m : cur_module->_dbinst_vec) { + unsigned id = m.id(); + dbId<_dbInst> converted_el(id); + dbInst* mi = (dbInst*) (block->_inst_tbl->getPtr(converted_el)); + if (mi && !strcmp(mi->getName().c_str(), name)) + return (dbInst*) mi; } return nullptr; } @@ -554,25 +557,13 @@ std::vector dbModule::getLeafInsts() return insts; } -dbModBTerm* dbModule::findModBTerm(const char* name) -{ - _dbModule* cur_module = (_dbModule*) this; - _dbBlock* block = (_dbBlock*) cur_module->getOwner(); - for (dbModBTerm* mod_bterm : getModBTerms()) { - if (!strcmp(mod_bterm->getName(), name)) - return mod_bterm; - } - return nullptr; -} - -bool dbModule::findPortIx(const char* port_name, unsigned& ix) +bool dbModule::findPortIx(const char* port_name, unsigned& ix) const { + _dbModule* obj = (_dbModule*) this; std::string port_name_str(port_name); - ix = 0; - for (dbModBTerm* mod_bterm : getModBTerms()) { - if (!strcmp(mod_bterm->getName(), port_name)) - return true; - ix++; + if (obj->_port_map.find(port_name_str) != obj->_port_map.end()) { + ix = obj->_port_map[port_name_str]; + return true; } return false; } @@ -599,19 +590,35 @@ void dbModule::staSetCell(void* cell) module->_sta_cell = cell; } +bool dbModule::findModBTerm(const char* port_name, dbModBTerm*& ret) +{ + ret = nullptr; + _dbModule* _obj = (_dbModule*) this; + _dbBlock* block = (_dbBlock*) _obj->getOwner(); + for (auto el : _obj->_port_vec) { + // type conversion + unsigned id = el.id(); + dbId<_dbModBTerm> converted_el(id); + dbModBTerm* candidate + = (dbModBTerm*) (block->_modbterm_tbl->getPtr(converted_el)); + if (!strcmp(candidate->getName(), port_name)) { + ret = candidate; + return true; + } + } + return false; +} + dbModNet* dbModule::getModNet(const char* name) { _dbModule* obj = (_dbModule*) this; _dbBlock* _block = (_dbBlock*) obj->getOwner(); std::string name_str(name); - /* if (obj->_modnet_map.find(name_str) != obj->_modnet_map.end()) { dbId mnet_id = obj->_modnet_map[name_str]; dbId<_dbModNet> _mnet_id(mnet_id.id()); return (dbModNet*) (_block->_modnet_tbl->getPtr(_mnet_id)); } - */ - printf("unsupported: getModNet\n"); return nullptr; } @@ -625,6 +632,7 @@ dbModBTerm* dbModule::getdbModBTerm(dbBlock* block, dbId modbterm_id) { _dbBlock* _block = (_dbBlock*) block; + // do a weird type conversion unsigned id = modbterm_id.id(); dbId<_dbModBTerm> val(id); return (dbModBTerm*) (_block->_modbterm_tbl->getPtr(val)); @@ -634,6 +642,7 @@ dbModBTerm* dbModule::getdbModBTerm(dbId modbterm_id) { _dbModule* obj = (_dbModule*) this; _dbBlock* _block = (_dbBlock*) obj->getOwner(); + // do a weird type conversion unsigned id = modbterm_id.id(); dbId<_dbModBTerm> val(id); return (dbModBTerm*) (_block->_modbterm_tbl->getPtr(val)); diff --git a/src/odb/src/db/dbModule.h b/src/odb/src/db/dbModule.h index abad164edf3..9bb53224cee 100644 --- a/src/odb/src/db/dbModule.h +++ b/src/odb/src/db/dbModule.h @@ -49,7 +49,10 @@ class _dbDatabase; class _dbInst; class _dbModInst; class _dbModNet; -class _dbModBTerm; +class dbModBTerm; +class dbModInst; +class dbInst; +class dbModNet; class _dbModule : public _dbObject { @@ -77,7 +80,11 @@ class _dbModule : public _dbObject dbId<_dbModInst> _mod_inst; dbId<_dbModInst> _modinsts; dbId<_dbModNet> _modnets; - dbId<_dbModBTerm> _modbterms; + std::vector> _port_vec; + std::vector> _modinst_vec; + std::vector> _dbinst_vec; + std::map _port_map; + std::map> _modnet_map; // User Code Begin Fields void* _sta_cell; diff --git a/src/odb/src/db/dbModuleBTermItr.cpp b/src/odb/src/db/dbModuleBTermItr.cpp deleted file mode 100644 index 95d66617645..00000000000 --- a/src/odb/src/db/dbModuleBTermItr.cpp +++ /dev/null @@ -1,105 +0,0 @@ -/////////////////////////////////////////////////////////////////////////////// -// BSD 3-Clause License -// -// Copyright (c) 2019, Nefelus Inc -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are met: -// -// * Redistributions of source code must retain the above copyright notice, this -// list of conditions and the following disclaimer. -// -// * Redistributions in binary form must reproduce the above copyright notice, -// this list of conditions and the following disclaimer in the documentation -// and/or other materials provided with the distribution. -// -// * Neither the name of the copyright holder nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE -// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -// POSSIBILITY OF SUCH DAMAGE. - -// Generator Code Begin Cpp -#include "dbModuleBTermItr.h" - -#include "dbModBTerm.h" -#include "dbTable.h" - -namespace odb { - -//////////////////////////////////////////////////////////////////// -// -// dbModuleBTermItr - Methods -// -//////////////////////////////////////////////////////////////////// - -bool dbModuleBTermItr::reversible() -{ - return true; -} - -bool dbModuleBTermItr::orderReversed() -{ - return true; -} - -void dbModuleBTermItr::reverse(dbObject* parent) -{ -} - -uint dbModuleBTermItr::sequential() -{ - return 0; -} - -uint dbModuleBTermItr::size(dbObject* parent) -{ - uint id; - uint cnt = 0; - - for (id = dbModuleBTermItr::begin(parent); - id != dbModuleBTermItr::end(parent); - id = dbModuleBTermItr::next(id)) - ++cnt; - - return cnt; -} - -uint dbModuleBTermItr::begin(dbObject* parent) -{ - // User Code Begin begin - _dbModule* _module = (_dbModule*) parent; - _dbModBTerm* _modbterm = _module->_modbterms; - // User Code End begin -} - -uint dbModuleBTermItr::end(dbObject* /* unused: parent */) -{ - return 0; -} - -uint dbModuleBTermItr::next(uint id, ...) -{ - // User Code Begin next - _dbModITerm* modbterm = _modbterm_tbl->getPtr(id); - return modbterm->_next_entry; - // User Code End next -} - -dbObject* dbModuleBTermItr::getObject(uint id, ...) -{ - return _modbterm_tbl->getPtr(id); -} -} // namespace odb - // Generator Code End Cpp diff --git a/src/odb/src/db/dbModuleBTermItr.h b/src/odb/src/db/dbModuleBTermItr.h deleted file mode 100644 index 2b14398be99..00000000000 --- a/src/odb/src/db/dbModuleBTermItr.h +++ /dev/null @@ -1,68 +0,0 @@ -/////////////////////////////////////////////////////////////////////////////// -// BSD 3-Clause License -// -// Copyright (c) 2020, The Regents of the University of California -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are met: -// -// * Redistributions of source code must retain the above copyright notice, this -// list of conditions and the following disclaimer. -// -// * Redistributions in binary form must reproduce the above copyright notice, -// this list of conditions and the following disclaimer in the documentation -// and/or other materials provided with the distribution. -// -// * Neither the name of the copyright holder nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE -// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -// POSSIBILITY OF SUCH DAMAGE. - -// Generator Code Begin Header -#pragma once - -#include "dbIterator.h" -#include "odb.h" - -namespace odb { -class _dbModBTerm; - -template -class dbTable; - -class dbModuleBTermItr : public dbIterator -{ - public: - dbModuleBTermItr(dbTable<_dbModBTerm>* modbterm_tbl) - { - _modbterm_tbl = modbterm_tbl; - } - - bool reversible() override; - bool orderReversed() override; - void reverse(dbObject* parent) override; - uint sequential() override; - uint size(dbObject* parent) override; - uint begin(dbObject* parent) override; - uint end(dbObject* parent) override; - uint next(uint id, ...) override; - dbObject* getObject(uint id, ...) override; - - private: - dbTable<_dbModBTerm>* _modbterm_tbl; -}; - -} // namespace odb - // Generator Code End Header \ No newline at end of file diff --git a/src/odb/src/db/dbModuleModBTermItr.cpp b/src/odb/src/db/dbModuleModBTermItr.cpp deleted file mode 100644 index e8cd6a80b52..00000000000 --- a/src/odb/src/db/dbModuleModBTermItr.cpp +++ /dev/null @@ -1,106 +0,0 @@ -/////////////////////////////////////////////////////////////////////////////// -// BSD 3-Clause License -// -// Copyright (c) 2019, Nefelus Inc -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are met: -// -// * Redistributions of source code must retain the above copyright notice, this -// list of conditions and the following disclaimer. -// -// * Redistributions in binary form must reproduce the above copyright notice, -// this list of conditions and the following disclaimer in the documentation -// and/or other materials provided with the distribution. -// -// * Neither the name of the copyright holder nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE -// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -// POSSIBILITY OF SUCH DAMAGE. - -// Generator Code Begin Cpp -#include "dbModuleModBTermItr.h" - -#include "dbModBTerm.h" -#include "dbModule.h" -#include "dbTable.h" - -namespace odb { - -//////////////////////////////////////////////////////////////////// -// -// dbModuleModBTermItr - Methods -// -//////////////////////////////////////////////////////////////////// - -bool dbModuleModBTermItr::reversible() -{ - return true; -} - -bool dbModuleModBTermItr::orderReversed() -{ - return true; -} - -void dbModuleModBTermItr::reverse(dbObject* parent) -{ -} - -uint dbModuleModBTermItr::sequential() -{ - return 0; -} - -uint dbModuleModBTermItr::size(dbObject* parent) -{ - uint id; - uint cnt = 0; - - for (id = dbModuleModBTermItr::begin(parent); - id != dbModuleModBTermItr::end(parent); - id = dbModuleModBTermItr::next(id)) - ++cnt; - - return cnt; -} - -uint dbModuleModBTermItr::begin(dbObject* parent) -{ - // User Code Begin begin - _dbModule* _module = (_dbModule*) parent; - return _module->_modbterms; - // User Code End begin -} - -uint dbModuleModBTermItr::end(dbObject* /* unused: parent */) -{ - return 0; -} - -uint dbModuleModBTermItr::next(uint id, ...) -{ - // User Code Begin next - _dbModBTerm* modbterm = _modbterm_tbl->getPtr(id); - return modbterm->_next_entry; - // User Code End next -} - -dbObject* dbModuleModBTermItr::getObject(uint id, ...) -{ - return _modbterm_tbl->getPtr(id); -} -} // namespace odb - // Generator Code End Cpp diff --git a/src/odb/src/db/dbModuleModBTermItr.h b/src/odb/src/db/dbModuleModBTermItr.h deleted file mode 100644 index 675407eeba2..00000000000 --- a/src/odb/src/db/dbModuleModBTermItr.h +++ /dev/null @@ -1,68 +0,0 @@ -/////////////////////////////////////////////////////////////////////////////// -// BSD 3-Clause License -// -// Copyright (c) 2020, The Regents of the University of California -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are met: -// -// * Redistributions of source code must retain the above copyright notice, this -// list of conditions and the following disclaimer. -// -// * Redistributions in binary form must reproduce the above copyright notice, -// this list of conditions and the following disclaimer in the documentation -// and/or other materials provided with the distribution. -// -// * Neither the name of the copyright holder nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE -// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -// POSSIBILITY OF SUCH DAMAGE. - -// Generator Code Begin Header -#pragma once - -#include "dbIterator.h" -#include "odb.h" - -namespace odb { -class _dbModBTerm; - -template -class dbTable; - -class dbModuleModBTermItr : public dbIterator -{ - public: - dbModuleModBTermItr(dbTable<_dbModBTerm>* modbterm_tbl) - { - _modbterm_tbl = modbterm_tbl; - } - - bool reversible() override; - bool orderReversed() override; - void reverse(dbObject* parent) override; - uint sequential() override; - uint size(dbObject* parent) override; - uint begin(dbObject* parent) override; - uint end(dbObject* parent) override; - uint next(uint id, ...) override; - dbObject* getObject(uint id, ...) override; - - private: - dbTable<_dbModBTerm>* _modbterm_tbl; -}; - -} // namespace odb - // Generator Code End Header \ No newline at end of file diff --git a/src/odb/src/db/dbModuleModInstITermItr.cpp b/src/odb/src/db/dbModuleModInstITermItr.cpp deleted file mode 100644 index 92a143681d2..00000000000 --- a/src/odb/src/db/dbModuleModInstITermItr.cpp +++ /dev/null @@ -1,106 +0,0 @@ -/////////////////////////////////////////////////////////////////////////////// -// BSD 3-Clause License -// -// Copyright (c) 2019, Nefelus Inc -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are met: -// -// * Redistributions of source code must retain the above copyright notice, this -// list of conditions and the following disclaimer. -// -// * Redistributions in binary form must reproduce the above copyright notice, -// this list of conditions and the following disclaimer in the documentation -// and/or other materials provided with the distribution. -// -// * Neither the name of the copyright holder nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE -// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -// POSSIBILITY OF SUCH DAMAGE. - -// Generator Code Begin Cpp -#include "dbModuleModInstITermItr.h" - -#include "dbModITerm.h" -#include "dbModInst.h" -#include "dbTable.h" - -namespace odb { - -//////////////////////////////////////////////////////////////////// -// -// dbModuleModInstITermItr - Methods -// -//////////////////////////////////////////////////////////////////// - -bool dbModuleModInstITermItr::reversible() -{ - return true; -} - -bool dbModuleModInstITermItr::orderReversed() -{ - return true; -} - -void dbModuleModInstITermItr::reverse(dbObject* parent) -{ -} - -uint dbModuleModInstITermItr::sequential() -{ - return 0; -} - -uint dbModuleModInstITermItr::size(dbObject* parent) -{ - uint id; - uint cnt = 0; - - for (id = dbModuleModInstITermItr::begin(parent); - id != dbModuleModInstITermItr::end(parent); - id = dbModuleModInstITermItr::next(id)) - ++cnt; - - return cnt; -} - -uint dbModuleModInstITermItr::begin(dbObject* parent) -{ - // User Code Begin begin - _dbModInst* _mod_inst = (_dbModInst*) parent; - return _mod_inst->_moditerms; - // User Code End begin -} - -uint dbModuleModInstITermItr::end(dbObject* /* unused: parent */) -{ - return 0; -} - -uint dbModuleModInstITermItr::next(uint id, ...) -{ - // User Code Begin next - _dbModITerm* moditerm = _moditerm_tbl->getPtr(id); - return moditerm->_next_entry; - // User Code End next -} - -dbObject* dbModuleModInstITermItr::getObject(uint id, ...) -{ - return _moditerm_tbl->getPtr(id); -} -} // namespace odb - // Generator Code End Cpp diff --git a/src/odb/src/db/dbModuleModInstITermItr.h b/src/odb/src/db/dbModuleModInstITermItr.h deleted file mode 100644 index 955b1b29529..00000000000 --- a/src/odb/src/db/dbModuleModInstITermItr.h +++ /dev/null @@ -1,68 +0,0 @@ -/////////////////////////////////////////////////////////////////////////////// -// BSD 3-Clause License -// -// Copyright (c) 2020, The Regents of the University of California -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are met: -// -// * Redistributions of source code must retain the above copyright notice, this -// list of conditions and the following disclaimer. -// -// * Redistributions in binary form must reproduce the above copyright notice, -// this list of conditions and the following disclaimer in the documentation -// and/or other materials provided with the distribution. -// -// * Neither the name of the copyright holder nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE -// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -// POSSIBILITY OF SUCH DAMAGE. - -// Generator Code Begin Header -#pragma once - -#include "dbIterator.h" -#include "odb.h" - -namespace odb { -class _dbModInst; - -template -class dbTable; - -class dbModuleModInstITermItr : public dbIterator -{ - public: - dbModuleModInstITermItr(dbTable<_dbModInst>* moditerm_tbl) - { - _moditerm_tbl = moditerm_tbl; - } - - bool reversible() override; - bool orderReversed() override; - void reverse(dbObject* parent) override; - uint sequential() override; - uint size(dbObject* parent) override; - uint begin(dbObject* parent) override; - uint end(dbObject* parent) override; - uint next(uint id, ...) override; - dbObject* getObject(uint id, ...) override; - - private: - dbTable<_dbModInst>* _moditerm_tbl; -}; - -} // namespace odb - // Generator Code End Header \ No newline at end of file diff --git a/src/odb/src/db/dbModuleModInstItr.cpp b/src/odb/src/db/dbModuleModInstItr.cpp index ef8839cf6d3..624a504820e 100644 --- a/src/odb/src/db/dbModuleModInstItr.cpp +++ b/src/odb/src/db/dbModuleModInstItr.cpp @@ -117,4 +117,4 @@ dbObject* dbModuleModInstItr::getObject(uint id, ...) return _modinst_tbl->getPtr(id); } } // namespace odb - // Generator Code End Cpp + // Generator Code End Cpp \ No newline at end of file diff --git a/src/odb/src/db/dbModuleModInstModITermItr.cpp b/src/odb/src/db/dbModuleModInstModITermItr.cpp deleted file mode 100644 index 57b25065653..00000000000 --- a/src/odb/src/db/dbModuleModInstModITermItr.cpp +++ /dev/null @@ -1,107 +0,0 @@ -/////////////////////////////////////////////////////////////////////////////// -// BSD 3-Clause License -// -// Copyright (c) 2019, Nefelus Inc -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are met: -// -// * Redistributions of source code must retain the above copyright notice, this -// list of conditions and the following disclaimer. -// -// * Redistributions in binary form must reproduce the above copyright notice, -// this list of conditions and the following disclaimer in the documentation -// and/or other materials provided with the distribution. -// -// * Neither the name of the copyright holder nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE -// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -// POSSIBILITY OF SUCH DAMAGE. - -// Generator Code Begin Cpp -#include "dbModuleModInstModITermItr.h" - -#include "dbModITerm.h" -#include "dbModInst.h" -#include "dbModule.h" -#include "dbTable.h" - -namespace odb { - -//////////////////////////////////////////////////////////////////// -// -// dbModuleModInstModITermItr - Methods -// -//////////////////////////////////////////////////////////////////// - -bool dbModuleModInstModITermItr::reversible() -{ - return true; -} - -bool dbModuleModInstModITermItr::orderReversed() -{ - return true; -} - -void dbModuleModInstModITermItr::reverse(dbObject* parent) -{ -} - -uint dbModuleModInstModITermItr::sequential() -{ - return 0; -} - -uint dbModuleModInstModITermItr::size(dbObject* parent) -{ - uint id; - uint cnt = 0; - - for (id = dbModuleModInstModITermItr::begin(parent); - id != dbModuleModInstModITermItr::end(parent); - id = dbModuleModInstModITermItr::next(id)) - ++cnt; - - return cnt; -} - -uint dbModuleModInstModITermItr::begin(dbObject* parent) -{ - // User Code Begin begin - _dbModInst* mod_inst = (_dbModInst*) parent; - return mod_inst->_moditerms; - // User Code End begin -} - -uint dbModuleModInstModITermItr::end(dbObject* /* unused: parent */) -{ - return 0; -} - -uint dbModuleModInstModITermItr::next(uint id, ...) -{ - // User Code Begin next - _dbModITerm* moditerm = _moditerm_tbl->getPtr(id); - return moditerm->_next_entry; - // User Code End next -} - -dbObject* dbModuleModInstModITermItr::getObject(uint id, ...) -{ - return _moditerm_tbl->getPtr(id); -} -} // namespace odb - // Generator Code End Cpp diff --git a/src/odb/src/db/dbModuleModInstModITermItr.h b/src/odb/src/db/dbModuleModInstModITermItr.h deleted file mode 100644 index 34f8cbe2ca5..00000000000 --- a/src/odb/src/db/dbModuleModInstModITermItr.h +++ /dev/null @@ -1,68 +0,0 @@ -/////////////////////////////////////////////////////////////////////////////// -// BSD 3-Clause License -// -// Copyright (c) 2020, The Regents of the University of California -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are met: -// -// * Redistributions of source code must retain the above copyright notice, this -// list of conditions and the following disclaimer. -// -// * Redistributions in binary form must reproduce the above copyright notice, -// this list of conditions and the following disclaimer in the documentation -// and/or other materials provided with the distribution. -// -// * Neither the name of the copyright holder nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE -// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -// POSSIBILITY OF SUCH DAMAGE. - -// Generator Code Begin Header -#pragma once - -#include "dbIterator.h" -#include "odb.h" - -namespace odb { -class _dbModITerm; - -template -class dbTable; - -class dbModuleModInstModITermItr : public dbIterator -{ - public: - dbModuleModInstModITermItr(dbTable<_dbModITerm>* moditerm_tbl) - { - _moditerm_tbl = moditerm_tbl; - } - - bool reversible() override; - bool orderReversed() override; - void reverse(dbObject* parent) override; - uint sequential() override; - uint size(dbObject* parent) override; - uint begin(dbObject* parent) override; - uint end(dbObject* parent) override; - uint next(uint id, ...) override; - dbObject* getObject(uint id, ...) override; - - private: - dbTable<_dbModITerm>* _moditerm_tbl; -}; - -} // namespace odb - // Generator Code End Header \ No newline at end of file diff --git a/src/odb/src/db/dbModuleModNetBTermItr.cpp b/src/odb/src/db/dbModuleModNetBTermItr.cpp deleted file mode 100644 index 1c0acaf8555..00000000000 --- a/src/odb/src/db/dbModuleModNetBTermItr.cpp +++ /dev/null @@ -1,107 +0,0 @@ -/////////////////////////////////////////////////////////////////////////////// -// BSD 3-Clause License -// -// Copyright (c) 2019, Nefelus Inc -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are met: -// -// * Redistributions of source code must retain the above copyright notice, this -// list of conditions and the following disclaimer. -// -// * Redistributions in binary form must reproduce the above copyright notice, -// this list of conditions and the following disclaimer in the documentation -// and/or other materials provided with the distribution. -// -// * Neither the name of the copyright holder nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE -// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -// POSSIBILITY OF SUCH DAMAGE. - -// Generator Code Begin Cpp -#include "dbModuleModNetBTermItr.h" - -#include "dbBTerm.h" -#include "dbModNet.h" -#include "dbModule.h" -#include "dbTable.h" - -namespace odb { - -//////////////////////////////////////////////////////////////////// -// -// dbModuleModNetBTermItr - Methods -// -//////////////////////////////////////////////////////////////////// - -bool dbModuleModNetBTermItr::reversible() -{ - return true; -} - -bool dbModuleModNetBTermItr::orderReversed() -{ - return true; -} - -void dbModuleModNetBTermItr::reverse(dbObject* parent) -{ -} - -uint dbModuleModNetBTermItr::sequential() -{ - return 0; -} - -uint dbModuleModNetBTermItr::size(dbObject* parent) -{ - uint id; - uint cnt = 0; - - for (id = dbModuleModNetBTermItr::begin(parent); - id != dbModuleModNetBTermItr::end(parent); - id = dbModuleModNetBTermItr::next(id)) - ++cnt; - - return cnt; -} - -uint dbModuleModNetBTermItr::begin(dbObject* parent) -{ - // User Code Begin begin - _dbModNet* mod_net = (_dbModNet*) parent; - return mod_net->_bterms; - // User Code End begin -} - -uint dbModuleModNetBTermItr::end(dbObject* /* unused: parent */) -{ - return 0; -} - -uint dbModuleModNetBTermItr::next(uint id, ...) -{ - // User Code Begin next - _dbBTerm* _bterm = _bterm_tbl->getPtr(id); - return _bterm->_next_modnet_bterm; - // User Code End next -} - -dbObject* dbModuleModNetBTermItr::getObject(uint id, ...) -{ - return _bterm_tbl->getPtr(id); -} -} // namespace odb - // Generator Code End Cpp diff --git a/src/odb/src/db/dbModuleModNetBTermItr.h b/src/odb/src/db/dbModuleModNetBTermItr.h deleted file mode 100644 index 5d7c61b4e8f..00000000000 --- a/src/odb/src/db/dbModuleModNetBTermItr.h +++ /dev/null @@ -1,68 +0,0 @@ -/////////////////////////////////////////////////////////////////////////////// -// BSD 3-Clause License -// -// Copyright (c) 2020, The Regents of the University of California -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are met: -// -// * Redistributions of source code must retain the above copyright notice, this -// list of conditions and the following disclaimer. -// -// * Redistributions in binary form must reproduce the above copyright notice, -// this list of conditions and the following disclaimer in the documentation -// and/or other materials provided with the distribution. -// -// * Neither the name of the copyright holder nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE -// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -// POSSIBILITY OF SUCH DAMAGE. - -// Generator Code Begin Header -#pragma once - -#include "dbIterator.h" -#include "odb.h" - -namespace odb { -class _dbBTerm; - -template -class dbTable; - -class dbModuleModNetBTermItr : public dbIterator -{ - public: - dbModuleModNetBTermItr(dbTable<_dbBTerm>* bterm_tbl) - { - _bterm_tbl = bterm_tbl; - } - - bool reversible() override; - bool orderReversed() override; - void reverse(dbObject* parent) override; - uint sequential() override; - uint size(dbObject* parent) override; - uint begin(dbObject* parent) override; - uint end(dbObject* parent) override; - uint next(uint id, ...) override; - dbObject* getObject(uint id, ...) override; - - private: - dbTable<_dbBTerm>* _bterm_tbl; -}; - -} // namespace odb - // Generator Code End Header \ No newline at end of file diff --git a/src/odb/src/db/dbModuleModNetBtermItr.cpp b/src/odb/src/db/dbModuleModNetBtermItr.cpp deleted file mode 100644 index 955b21d225b..00000000000 --- a/src/odb/src/db/dbModuleModNetBtermItr.cpp +++ /dev/null @@ -1,107 +0,0 @@ -/////////////////////////////////////////////////////////////////////////////// -// BSD 3-Clause License -// -// Copyright (c) 2019, Nefelus Inc -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are met: -// -// * Redistributions of source code must retain the above copyright notice, this -// list of conditions and the following disclaimer. -// -// * Redistributions in binary form must reproduce the above copyright notice, -// this list of conditions and the following disclaimer in the documentation -// and/or other materials provided with the distribution. -// -// * Neither the name of the copyright holder nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE -// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -// POSSIBILITY OF SUCH DAMAGE. - -// Generator Code Begin Cpp -#include "dbModuleModNetBtermItr.h" - -#include "dbModNet.h" -#include "dbTable.h" -// User Code Begin Includes -// User Code End Includes - -namespace odb { - -//////////////////////////////////////////////////////////////////// -// -// dbModuleModNetBtermItr - Methods -// -//////////////////////////////////////////////////////////////////// - -bool dbModuleModNetBtermItr::reversible() -{ - return true; -} - -bool dbModuleModNetBtermItr::orderReversed() -{ - return true; -} - -void dbModuleModNetBtermItr::reverse(dbObject* parent) -{ - // User Code Begin reverse - // User Code End reverse -} - -uint dbModuleModNetBtermItr::sequential() -{ - return 0; -} - -uint dbModuleModNetBtermItr::size(dbObject* parent) -{ - uint id; - uint cnt = 0; - - for (id = dbModuleModNetBtermItr::begin(parent); - id != dbModuleModNetBtermItr::end(parent); - id = dbModuleModNetBtermItr::next(id)) - ++cnt; - - return cnt; -} - -uint dbModuleModNetBtermItr::begin(dbObject* parent) -{ - // User Code Begin begin - // User Code End begin -} - -uint dbModuleModNetBtermItr::end(dbObject* /* unused: parent */) -{ - return 0; -} - -uint dbModuleModNetBtermItr::next(uint id, ...) -{ - // User Code Begin next - // User Code End next -} - -dbObject* dbModuleModNetBtermItr::getObject(uint id, ...) -{ - return _bterm_tbl->getPtr(id); -} -// User Code Begin Methods -// User Code End Methods -} // namespace odb - // Generator Code End Cpp \ No newline at end of file diff --git a/src/odb/src/db/dbModuleModNetBtermItr.h b/src/odb/src/db/dbModuleModNetBtermItr.h deleted file mode 100644 index 26fbcf14b29..00000000000 --- a/src/odb/src/db/dbModuleModNetBtermItr.h +++ /dev/null @@ -1,76 +0,0 @@ -/////////////////////////////////////////////////////////////////////////////// -// BSD 3-Clause License -// -// Copyright (c) 2020, The Regents of the University of California -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are met: -// -// * Redistributions of source code must retain the above copyright notice, this -// list of conditions and the following disclaimer. -// -// * Redistributions in binary form must reproduce the above copyright notice, -// this list of conditions and the following disclaimer in the documentation -// and/or other materials provided with the distribution. -// -// * Neither the name of the copyright holder nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE -// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -// POSSIBILITY OF SUCH DAMAGE. - -// Generator Code Begin Header -#pragma once - -#include "dbIterator.h" -#include "odb.h" -// User Code Begin Includes -// User Code End Includes - -namespace odb { -class _dbModNet; - -template -class dbTable; - -// User Code Begin classes -// User Code End classes - -class dbModuleModNetBtermItr : public dbIterator -{ - public: - dbModuleModNetBtermItr(dbTable<_dbModNet>* bterm_tbl) - { - _bterm_tbl = bterm_tbl; - } - - bool reversible() override; - bool orderReversed() override; - void reverse(dbObject* parent) override; - uint sequential() override; - uint size(dbObject* parent) override; - uint begin(dbObject* parent) override; - uint end(dbObject* parent) override; - uint next(uint id, ...) override; - dbObject* getObject(uint id, ...) override; - // User Code Begin Methods - // User Code End Methods - private: - dbTable<_dbModNet>* _bterm_tbl; - // User Code Begin Fields - // User Code End Fields -}; - -} // namespace odb - // Generator Code End Header \ No newline at end of file diff --git a/src/odb/src/db/dbModuleModNetITermItr.cpp b/src/odb/src/db/dbModuleModNetITermItr.cpp deleted file mode 100644 index 16f9a3ab527..00000000000 --- a/src/odb/src/db/dbModuleModNetITermItr.cpp +++ /dev/null @@ -1,107 +0,0 @@ -/////////////////////////////////////////////////////////////////////////////// -// BSD 3-Clause License -// -// Copyright (c) 2019, Nefelus Inc -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are met: -// -// * Redistributions of source code must retain the above copyright notice, this -// list of conditions and the following disclaimer. -// -// * Redistributions in binary form must reproduce the above copyright notice, -// this list of conditions and the following disclaimer in the documentation -// and/or other materials provided with the distribution. -// -// * Neither the name of the copyright holder nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE -// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -// POSSIBILITY OF SUCH DAMAGE. - -// Generator Code Begin Cpp -#include "dbModuleModNetITermItr.h" - -#include "dbITerm.h" -#include "dbModNet.h" -#include "dbModule.h" -#include "dbTable.h" - -namespace odb { - -//////////////////////////////////////////////////////////////////// -// -// dbModuleModNetITermItr - Methods -// -//////////////////////////////////////////////////////////////////// - -bool dbModuleModNetITermItr::reversible() -{ - return true; -} - -bool dbModuleModNetITermItr::orderReversed() -{ - return true; -} - -void dbModuleModNetITermItr::reverse(dbObject* parent) -{ -} - -uint dbModuleModNetITermItr::sequential() -{ - return 0; -} - -uint dbModuleModNetITermItr::size(dbObject* parent) -{ - uint id; - uint cnt = 0; - - for (id = dbModuleModNetITermItr::begin(parent); - id != dbModuleModNetITermItr::end(parent); - id = dbModuleModNetITermItr::next(id)) - ++cnt; - - return cnt; -} - -uint dbModuleModNetITermItr::begin(dbObject* parent) -{ - // User Code Begin begin - _dbModNet* mod_net = (_dbModNet*) parent; - return mod_net->_iterms; - // User Code End begin -} - -uint dbModuleModNetITermItr::end(dbObject* /* unused: parent */) -{ - return 0; -} - -uint dbModuleModNetITermItr::next(uint id, ...) -{ - // User Code Begin next - _dbITerm* _iterm = _iterm_tbl->getPtr(id); - return _iterm->_next_modnet_iterm; - // User Code End next -} - -dbObject* dbModuleModNetITermItr::getObject(uint id, ...) -{ - return _iterm_tbl->getPtr(id); -} -} // namespace odb - // Generator Code End Cpp diff --git a/src/odb/src/db/dbModuleModNetITermItr.h b/src/odb/src/db/dbModuleModNetITermItr.h deleted file mode 100644 index 81ae1ca2d86..00000000000 --- a/src/odb/src/db/dbModuleModNetITermItr.h +++ /dev/null @@ -1,68 +0,0 @@ -/////////////////////////////////////////////////////////////////////////////// -// BSD 3-Clause License -// -// Copyright (c) 2020, The Regents of the University of California -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are met: -// -// * Redistributions of source code must retain the above copyright notice, this -// list of conditions and the following disclaimer. -// -// * Redistributions in binary form must reproduce the above copyright notice, -// this list of conditions and the following disclaimer in the documentation -// and/or other materials provided with the distribution. -// -// * Neither the name of the copyright holder nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE -// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -// POSSIBILITY OF SUCH DAMAGE. - -// Generator Code Begin Header -#pragma once - -#include "dbIterator.h" -#include "odb.h" - -namespace odb { -class _dbITerm; - -template -class dbTable; - -class dbModuleModNetITermItr : public dbIterator -{ - public: - dbModuleModNetITermItr(dbTable<_dbITerm>* iterm_tbl) - { - _iterm_tbl = iterm_tbl; - } - - bool reversible() override; - bool orderReversed() override; - void reverse(dbObject* parent) override; - uint sequential() override; - uint size(dbObject* parent) override; - uint begin(dbObject* parent) override; - uint end(dbObject* parent) override; - uint next(uint id, ...) override; - dbObject* getObject(uint id, ...) override; - - private: - dbTable<_dbITerm>* _iterm_tbl; -}; - -} // namespace odb - // Generator Code End Header \ No newline at end of file diff --git a/src/odb/src/db/dbModuleModNetItermItr.cpp b/src/odb/src/db/dbModuleModNetItermItr.cpp deleted file mode 100644 index b0638c022b3..00000000000 --- a/src/odb/src/db/dbModuleModNetItermItr.cpp +++ /dev/null @@ -1,107 +0,0 @@ -/////////////////////////////////////////////////////////////////////////////// -// BSD 3-Clause License -// -// Copyright (c) 2019, Nefelus Inc -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are met: -// -// * Redistributions of source code must retain the above copyright notice, this -// list of conditions and the following disclaimer. -// -// * Redistributions in binary form must reproduce the above copyright notice, -// this list of conditions and the following disclaimer in the documentation -// and/or other materials provided with the distribution. -// -// * Neither the name of the copyright holder nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE -// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -// POSSIBILITY OF SUCH DAMAGE. - -// Generator Code Begin Cpp -#include "dbModuleModNetItermItr.h" - -#include "dbModNet.h" -#include "dbTable.h" -// User Code Begin Includes -// User Code End Includes - -namespace odb { - -//////////////////////////////////////////////////////////////////// -// -// dbModuleModNetItermItr - Methods -// -//////////////////////////////////////////////////////////////////// - -bool dbModuleModNetItermItr::reversible() -{ - return true; -} - -bool dbModuleModNetItermItr::orderReversed() -{ - return true; -} - -void dbModuleModNetItermItr::reverse(dbObject* parent) -{ - // User Code Begin reverse - // User Code End reverse -} - -uint dbModuleModNetItermItr::sequential() -{ - return 0; -} - -uint dbModuleModNetItermItr::size(dbObject* parent) -{ - uint id; - uint cnt = 0; - - for (id = dbModuleModNetItermItr::begin(parent); - id != dbModuleModNetItermItr::end(parent); - id = dbModuleModNetItermItr::next(id)) - ++cnt; - - return cnt; -} - -uint dbModuleModNetItermItr::begin(dbObject* parent) -{ - // User Code Begin begin - // User Code End begin -} - -uint dbModuleModNetItermItr::end(dbObject* /* unused: parent */) -{ - return 0; -} - -uint dbModuleModNetItermItr::next(uint id, ...) -{ - // User Code Begin next - // User Code End next -} - -dbObject* dbModuleModNetItermItr::getObject(uint id, ...) -{ - return _iterm_tbl->getPtr(id); -} -// User Code Begin Methods -// User Code End Methods -} // namespace odb - // Generator Code End Cpp \ No newline at end of file diff --git a/src/odb/src/db/dbModuleModNetItermItr.h b/src/odb/src/db/dbModuleModNetItermItr.h deleted file mode 100644 index 73b41db4500..00000000000 --- a/src/odb/src/db/dbModuleModNetItermItr.h +++ /dev/null @@ -1,76 +0,0 @@ -/////////////////////////////////////////////////////////////////////////////// -// BSD 3-Clause License -// -// Copyright (c) 2020, The Regents of the University of California -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are met: -// -// * Redistributions of source code must retain the above copyright notice, this -// list of conditions and the following disclaimer. -// -// * Redistributions in binary form must reproduce the above copyright notice, -// this list of conditions and the following disclaimer in the documentation -// and/or other materials provided with the distribution. -// -// * Neither the name of the copyright holder nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE -// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -// POSSIBILITY OF SUCH DAMAGE. - -// Generator Code Begin Header -#pragma once - -#include "dbIterator.h" -#include "odb.h" -// User Code Begin Includes -// User Code End Includes - -namespace odb { -class _dbModNet; - -template -class dbTable; - -// User Code Begin classes -// User Code End classes - -class dbModuleModNetItermItr : public dbIterator -{ - public: - dbModuleModNetItermItr(dbTable<_dbModNet>* iterm_tbl) - { - _iterm_tbl = iterm_tbl; - } - - bool reversible() override; - bool orderReversed() override; - void reverse(dbObject* parent) override; - uint sequential() override; - uint size(dbObject* parent) override; - uint begin(dbObject* parent) override; - uint end(dbObject* parent) override; - uint next(uint id, ...) override; - dbObject* getObject(uint id, ...) override; - // User Code Begin Methods - // User Code End Methods - private: - dbTable<_dbModNet>* _iterm_tbl; - // User Code Begin Fields - // User Code End Fields -}; - -} // namespace odb - // Generator Code End Header \ No newline at end of file diff --git a/src/odb/src/db/dbModuleModNetItr.cpp b/src/odb/src/db/dbModuleModNetItr.cpp deleted file mode 100644 index 16de8605bf1..00000000000 --- a/src/odb/src/db/dbModuleModNetItr.cpp +++ /dev/null @@ -1,106 +0,0 @@ -/////////////////////////////////////////////////////////////////////////////// -// BSD 3-Clause License -// -// Copyright (c) 2019, Nefelus Inc -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are met: -// -// * Redistributions of source code must retain the above copyright notice, this -// list of conditions and the following disclaimer. -// -// * Redistributions in binary form must reproduce the above copyright notice, -// this list of conditions and the following disclaimer in the documentation -// and/or other materials provided with the distribution. -// -// * Neither the name of the copyright holder nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE -// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -// POSSIBILITY OF SUCH DAMAGE. - -// Generator Code Begin Cpp -#include "dbModuleModNetItr.h" - -#include "dbModNet.h" -#include "dbModule.h" -#include "dbTable.h" - -namespace odb { - -//////////////////////////////////////////////////////////////////// -// -// dbModuleModNetItr - Methods -// -//////////////////////////////////////////////////////////////////// - -bool dbModuleModNetItr::reversible() -{ - return true; -} - -bool dbModuleModNetItr::orderReversed() -{ - return true; -} - -void dbModuleModNetItr::reverse(dbObject* parent) -{ -} - -uint dbModuleModNetItr::sequential() -{ - return 0; -} - -uint dbModuleModNetItr::size(dbObject* parent) -{ - uint id; - uint cnt = 0; - - for (id = dbModuleModNetItr::begin(parent); - id != dbModuleModNetItr::end(parent); - id = dbModuleModNetItr::next(id)) - ++cnt; - - return cnt; -} - -uint dbModuleModNetItr::begin(dbObject* parent) -{ - // User Code Begin begin - _dbModule* module = (_dbModule*) parent; - return module->_modnets; - // User Code End begin -} - -uint dbModuleModNetItr::end(dbObject* /* unused: parent */) -{ - return 0; -} - -uint dbModuleModNetItr::next(uint id, ...) -{ - // User Code Begin next - _dbModNet* modnet = _modnet_tbl->getPtr(id); - return modnet->_next_entry; - // User Code End next -} - -dbObject* dbModuleModNetItr::getObject(uint id, ...) -{ - return _modnet_tbl->getPtr(id); -} -} // namespace odb - // Generator Code End Cpp diff --git a/src/odb/src/db/dbModuleModNetItr.h b/src/odb/src/db/dbModuleModNetItr.h deleted file mode 100644 index 3861c02bdfd..00000000000 --- a/src/odb/src/db/dbModuleModNetItr.h +++ /dev/null @@ -1,68 +0,0 @@ -/////////////////////////////////////////////////////////////////////////////// -// BSD 3-Clause License -// -// Copyright (c) 2020, The Regents of the University of California -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are met: -// -// * Redistributions of source code must retain the above copyright notice, this -// list of conditions and the following disclaimer. -// -// * Redistributions in binary form must reproduce the above copyright notice, -// this list of conditions and the following disclaimer in the documentation -// and/or other materials provided with the distribution. -// -// * Neither the name of the copyright holder nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE -// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -// POSSIBILITY OF SUCH DAMAGE. - -// Generator Code Begin Header -#pragma once - -#include "dbIterator.h" -#include "odb.h" - -namespace odb { -class _dbModNet; - -template -class dbTable; - -class dbModuleModNetItr : public dbIterator -{ - public: - dbModuleModNetItr(dbTable<_dbModNet>* modnet_tbl) - { - _modnet_tbl = modnet_tbl; - } - - bool reversible() override; - bool orderReversed() override; - void reverse(dbObject* parent) override; - uint sequential() override; - uint size(dbObject* parent) override; - uint begin(dbObject* parent) override; - uint end(dbObject* parent) override; - uint next(uint id, ...) override; - dbObject* getObject(uint id, ...) override; - - private: - dbTable<_dbModNet>* _modnet_tbl; -}; - -} // namespace odb - // Generator Code End Header \ No newline at end of file diff --git a/src/odb/src/db/dbModuleModNetModBTermItr.cpp b/src/odb/src/db/dbModuleModNetModBTermItr.cpp deleted file mode 100644 index 58acd17d7ea..00000000000 --- a/src/odb/src/db/dbModuleModNetModBTermItr.cpp +++ /dev/null @@ -1,107 +0,0 @@ -/////////////////////////////////////////////////////////////////////////////// -// BSD 3-Clause License -// -// Copyright (c) 2019, Nefelus Inc -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are met: -// -// * Redistributions of source code must retain the above copyright notice, this -// list of conditions and the following disclaimer. -// -// * Redistributions in binary form must reproduce the above copyright notice, -// this list of conditions and the following disclaimer in the documentation -// and/or other materials provided with the distribution. -// -// * Neither the name of the copyright holder nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE -// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -// POSSIBILITY OF SUCH DAMAGE. - -// Generator Code Begin Cpp -#include "dbModuleModNetModBTermItr.h" - -#include "dbModBTerm.h" -#include "dbModNet.h" -#include "dbModule.h" -#include "dbTable.h" - -namespace odb { - -//////////////////////////////////////////////////////////////////// -// -// dbModuleModNetModBTermItr - Methods -// -//////////////////////////////////////////////////////////////////// - -bool dbModuleModNetModBTermItr::reversible() -{ - return true; -} - -bool dbModuleModNetModBTermItr::orderReversed() -{ - return true; -} - -void dbModuleModNetModBTermItr::reverse(dbObject* parent) -{ -} - -uint dbModuleModNetModBTermItr::sequential() -{ - return 0; -} - -uint dbModuleModNetModBTermItr::size(dbObject* parent) -{ - uint id; - uint cnt = 0; - - for (id = dbModuleModNetModBTermItr::begin(parent); - id != dbModuleModNetModBTermItr::end(parent); - id = dbModuleModNetModBTermItr::next(id)) - ++cnt; - - return cnt; -} - -uint dbModuleModNetModBTermItr::begin(dbObject* parent) -{ - // User Code Begin begin - _dbModNet* mod_net = (_dbModNet*) parent; - return mod_net->_modbterms; - // User Code End begin -} - -uint dbModuleModNetModBTermItr::end(dbObject* /* unused: parent */) -{ - return 0; -} - -uint dbModuleModNetModBTermItr::next(uint id, ...) -{ - // User Code Begin next - _dbModBTerm* _modbterm = _modbterm_tbl->getPtr(id); - return _modbterm->_next_net_modbterm; - // User Code End next -} - -dbObject* dbModuleModNetModBTermItr::getObject(uint id, ...) -{ - return _modbterm_tbl->getPtr(id); -} -} // namespace odb - // Generator Code End Cpp diff --git a/src/odb/src/db/dbModuleModNetModBTermItr.h b/src/odb/src/db/dbModuleModNetModBTermItr.h deleted file mode 100644 index 2a436814403..00000000000 --- a/src/odb/src/db/dbModuleModNetModBTermItr.h +++ /dev/null @@ -1,68 +0,0 @@ -/////////////////////////////////////////////////////////////////////////////// -// BSD 3-Clause License -// -// Copyright (c) 2020, The Regents of the University of California -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are met: -// -// * Redistributions of source code must retain the above copyright notice, this -// list of conditions and the following disclaimer. -// -// * Redistributions in binary form must reproduce the above copyright notice, -// this list of conditions and the following disclaimer in the documentation -// and/or other materials provided with the distribution. -// -// * Neither the name of the copyright holder nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE -// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -// POSSIBILITY OF SUCH DAMAGE. - -// Generator Code Begin Header -#pragma once - -#include "dbIterator.h" -#include "odb.h" - -namespace odb { -class _dbModBTerm; - -template -class dbTable; - -class dbModuleModNetModBTermItr : public dbIterator -{ - public: - dbModuleModNetModBTermItr(dbTable<_dbModBTerm>* modbterm_tbl) - { - _modbterm_tbl = modbterm_tbl; - } - - bool reversible() override; - bool orderReversed() override; - void reverse(dbObject* parent) override; - uint sequential() override; - uint size(dbObject* parent) override; - uint begin(dbObject* parent) override; - uint end(dbObject* parent) override; - uint next(uint id, ...) override; - dbObject* getObject(uint id, ...) override; - - private: - dbTable<_dbModBTerm>* _modbterm_tbl; -}; - -} // namespace odb - // Generator Code End Header \ No newline at end of file diff --git a/src/odb/src/db/dbModuleModNetModBtermItr.cpp b/src/odb/src/db/dbModuleModNetModBtermItr.cpp deleted file mode 100644 index 5b323c0cdea..00000000000 --- a/src/odb/src/db/dbModuleModNetModBtermItr.cpp +++ /dev/null @@ -1,107 +0,0 @@ -/////////////////////////////////////////////////////////////////////////////// -// BSD 3-Clause License -// -// Copyright (c) 2019, Nefelus Inc -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are met: -// -// * Redistributions of source code must retain the above copyright notice, this -// list of conditions and the following disclaimer. -// -// * Redistributions in binary form must reproduce the above copyright notice, -// this list of conditions and the following disclaimer in the documentation -// and/or other materials provided with the distribution. -// -// * Neither the name of the copyright holder nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE -// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -// POSSIBILITY OF SUCH DAMAGE. - -// Generator Code Begin Cpp -#include "dbModuleModNetModBtermItr.h" - -#include "dbModNet.h" -#include "dbTable.h" -// User Code Begin Includes -// User Code End Includes - -namespace odb { - -//////////////////////////////////////////////////////////////////// -// -// dbModuleModNetModBtermItr - Methods -// -//////////////////////////////////////////////////////////////////// - -bool dbModuleModNetModBtermItr::reversible() -{ - return true; -} - -bool dbModuleModNetModBtermItr::orderReversed() -{ - return true; -} - -void dbModuleModNetModBtermItr::reverse(dbObject* parent) -{ - // User Code Begin reverse - // User Code End reverse -} - -uint dbModuleModNetModBtermItr::sequential() -{ - return 0; -} - -uint dbModuleModNetModBtermItr::size(dbObject* parent) -{ - uint id; - uint cnt = 0; - - for (id = dbModuleModNetModBtermItr::begin(parent); - id != dbModuleModNetModBtermItr::end(parent); - id = dbModuleModNetModBtermItr::next(id)) - ++cnt; - - return cnt; -} - -uint dbModuleModNetModBtermItr::begin(dbObject* parent) -{ - // User Code Begin begin - // User Code End begin -} - -uint dbModuleModNetModBtermItr::end(dbObject* /* unused: parent */) -{ - return 0; -} - -uint dbModuleModNetModBtermItr::next(uint id, ...) -{ - // User Code Begin next - // User Code End next -} - -dbObject* dbModuleModNetModBtermItr::getObject(uint id, ...) -{ - return _modbterm_tbl->getPtr(id); -} -// User Code Begin Methods -// User Code End Methods -} // namespace odb - // Generator Code End Cpp \ No newline at end of file diff --git a/src/odb/src/db/dbModuleModNetModBtermItr.h b/src/odb/src/db/dbModuleModNetModBtermItr.h deleted file mode 100644 index 56dbb114793..00000000000 --- a/src/odb/src/db/dbModuleModNetModBtermItr.h +++ /dev/null @@ -1,76 +0,0 @@ -/////////////////////////////////////////////////////////////////////////////// -// BSD 3-Clause License -// -// Copyright (c) 2020, The Regents of the University of California -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are met: -// -// * Redistributions of source code must retain the above copyright notice, this -// list of conditions and the following disclaimer. -// -// * Redistributions in binary form must reproduce the above copyright notice, -// this list of conditions and the following disclaimer in the documentation -// and/or other materials provided with the distribution. -// -// * Neither the name of the copyright holder nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE -// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -// POSSIBILITY OF SUCH DAMAGE. - -// Generator Code Begin Header -#pragma once - -#include "dbIterator.h" -#include "odb.h" -// User Code Begin Includes -// User Code End Includes - -namespace odb { -class _dbModNet; - -template -class dbTable; - -// User Code Begin classes -// User Code End classes - -class dbModuleModNetModBtermItr : public dbIterator -{ - public: - dbModuleModNetModBtermItr(dbTable<_dbModNet>* modbterm_tbl) - { - _modbterm_tbl = modbterm_tbl; - } - - bool reversible() override; - bool orderReversed() override; - void reverse(dbObject* parent) override; - uint sequential() override; - uint size(dbObject* parent) override; - uint begin(dbObject* parent) override; - uint end(dbObject* parent) override; - uint next(uint id, ...) override; - dbObject* getObject(uint id, ...) override; - // User Code Begin Methods - // User Code End Methods - private: - dbTable<_dbModNet>* _modbterm_tbl; - // User Code Begin Fields - // User Code End Fields -}; - -} // namespace odb - // Generator Code End Header \ No newline at end of file diff --git a/src/odb/src/db/dbModuleModNetModITermItr.cpp b/src/odb/src/db/dbModuleModNetModITermItr.cpp deleted file mode 100644 index 00647765a85..00000000000 --- a/src/odb/src/db/dbModuleModNetModITermItr.cpp +++ /dev/null @@ -1,107 +0,0 @@ -/////////////////////////////////////////////////////////////////////////////// -// BSD 3-Clause License -// -// Copyright (c) 2019, Nefelus Inc -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are met: -// -// * Redistributions of source code must retain the above copyright notice, this -// list of conditions and the following disclaimer. -// -// * Redistributions in binary form must reproduce the above copyright notice, -// this list of conditions and the following disclaimer in the documentation -// and/or other materials provided with the distribution. -// -// * Neither the name of the copyright holder nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE -// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -// POSSIBILITY OF SUCH DAMAGE. - -// Generator Code Begin Cpp -#include "dbModuleModNetModITermItr.h" - -#include "dbModITerm.h" -#include "dbModNet.h" -#include "dbModule.h" -#include "dbTable.h" - -namespace odb { - -//////////////////////////////////////////////////////////////////// -// -// dbModuleModNetModITermItr - Methods -// -//////////////////////////////////////////////////////////////////// - -bool dbModuleModNetModITermItr::reversible() -{ - return true; -} - -bool dbModuleModNetModITermItr::orderReversed() -{ - return true; -} - -void dbModuleModNetModITermItr::reverse(dbObject* parent) -{ -} - -uint dbModuleModNetModITermItr::sequential() -{ - return 0; -} - -uint dbModuleModNetModITermItr::size(dbObject* parent) -{ - uint id; - uint cnt = 0; - - for (id = dbModuleModNetModITermItr::begin(parent); - id != dbModuleModNetModITermItr::end(parent); - id = dbModuleModNetModITermItr::next(id)) - ++cnt; - - return cnt; -} - -uint dbModuleModNetModITermItr::begin(dbObject* parent) -{ - // User Code Begin begin - _dbModNet* mod_net = (_dbModNet*) parent; - return mod_net->_moditerms; - // User Code End begin -} - -uint dbModuleModNetModITermItr::end(dbObject* /* unused: parent */) -{ - return 0; -} - -uint dbModuleModNetModITermItr::next(uint id, ...) -{ - // User Code Begin next - _dbModITerm* _moditerm = _moditerm_tbl->getPtr(id); - return _moditerm->_next_net_moditerm; - // User Code End next -} - -dbObject* dbModuleModNetModITermItr::getObject(uint id, ...) -{ - return _moditerm_tbl->getPtr(id); -} -} // namespace odb - // Generator Code End Cpp diff --git a/src/odb/src/db/dbModuleModNetModITermItr.h b/src/odb/src/db/dbModuleModNetModITermItr.h deleted file mode 100644 index e5def76c8f8..00000000000 --- a/src/odb/src/db/dbModuleModNetModITermItr.h +++ /dev/null @@ -1,68 +0,0 @@ -/////////////////////////////////////////////////////////////////////////////// -// BSD 3-Clause License -// -// Copyright (c) 2020, The Regents of the University of California -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are met: -// -// * Redistributions of source code must retain the above copyright notice, this -// list of conditions and the following disclaimer. -// -// * Redistributions in binary form must reproduce the above copyright notice, -// this list of conditions and the following disclaimer in the documentation -// and/or other materials provided with the distribution. -// -// * Neither the name of the copyright holder nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE -// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -// POSSIBILITY OF SUCH DAMAGE. - -// Generator Code Begin Header -#pragma once - -#include "dbIterator.h" -#include "odb.h" - -namespace odb { -class _dbModITerm; - -template -class dbTable; - -class dbModuleModNetModITermItr : public dbIterator -{ - public: - dbModuleModNetModITermItr(dbTable<_dbModITerm>* moditerm_tbl) - { - _moditerm_tbl = moditerm_tbl; - } - - bool reversible() override; - bool orderReversed() override; - void reverse(dbObject* parent) override; - uint sequential() override; - uint size(dbObject* parent) override; - uint begin(dbObject* parent) override; - uint end(dbObject* parent) override; - uint next(uint id, ...) override; - dbObject* getObject(uint id, ...) override; - - private: - dbTable<_dbModITerm>* _moditerm_tbl; -}; - -} // namespace odb - // Generator Code End Header \ No newline at end of file diff --git a/src/odb/src/db/dbModuleModNetModItermItr.cpp b/src/odb/src/db/dbModuleModNetModItermItr.cpp deleted file mode 100644 index 812767e65f4..00000000000 --- a/src/odb/src/db/dbModuleModNetModItermItr.cpp +++ /dev/null @@ -1,107 +0,0 @@ -/////////////////////////////////////////////////////////////////////////////// -// BSD 3-Clause License -// -// Copyright (c) 2019, Nefelus Inc -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are met: -// -// * Redistributions of source code must retain the above copyright notice, this -// list of conditions and the following disclaimer. -// -// * Redistributions in binary form must reproduce the above copyright notice, -// this list of conditions and the following disclaimer in the documentation -// and/or other materials provided with the distribution. -// -// * Neither the name of the copyright holder nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE -// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -// POSSIBILITY OF SUCH DAMAGE. - -// Generator Code Begin Cpp -#include "dbModuleModNetModItermItr.h" - -#include "dbModNet.h" -#include "dbTable.h" -// User Code Begin Includes -// User Code End Includes - -namespace odb { - -//////////////////////////////////////////////////////////////////// -// -// dbModuleModNetModItermItr - Methods -// -//////////////////////////////////////////////////////////////////// - -bool dbModuleModNetModItermItr::reversible() -{ - return true; -} - -bool dbModuleModNetModItermItr::orderReversed() -{ - return true; -} - -void dbModuleModNetModItermItr::reverse(dbObject* parent) -{ - // User Code Begin reverse - // User Code End reverse -} - -uint dbModuleModNetModItermItr::sequential() -{ - return 0; -} - -uint dbModuleModNetModItermItr::size(dbObject* parent) -{ - uint id; - uint cnt = 0; - - for (id = dbModuleModNetModItermItr::begin(parent); - id != dbModuleModNetModItermItr::end(parent); - id = dbModuleModNetModItermItr::next(id)) - ++cnt; - - return cnt; -} - -uint dbModuleModNetModItermItr::begin(dbObject* parent) -{ - // User Code Begin begin - // User Code End begin -} - -uint dbModuleModNetModItermItr::end(dbObject* /* unused: parent */) -{ - return 0; -} - -uint dbModuleModNetModItermItr::next(uint id, ...) -{ - // User Code Begin next - // User Code End next -} - -dbObject* dbModuleModNetModItermItr::getObject(uint id, ...) -{ - return _moditerm_tbl->getPtr(id); -} -// User Code Begin Methods -// User Code End Methods -} // namespace odb - // Generator Code End Cpp \ No newline at end of file diff --git a/src/odb/src/db/dbModuleModNetModItermItr.h b/src/odb/src/db/dbModuleModNetModItermItr.h deleted file mode 100644 index fbd75084c90..00000000000 --- a/src/odb/src/db/dbModuleModNetModItermItr.h +++ /dev/null @@ -1,76 +0,0 @@ -/////////////////////////////////////////////////////////////////////////////// -// BSD 3-Clause License -// -// Copyright (c) 2020, The Regents of the University of California -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are met: -// -// * Redistributions of source code must retain the above copyright notice, this -// list of conditions and the following disclaimer. -// -// * Redistributions in binary form must reproduce the above copyright notice, -// this list of conditions and the following disclaimer in the documentation -// and/or other materials provided with the distribution. -// -// * Neither the name of the copyright holder nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE -// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -// POSSIBILITY OF SUCH DAMAGE. - -// Generator Code Begin Header -#pragma once - -#include "dbIterator.h" -#include "odb.h" -// User Code Begin Includes -// User Code End Includes - -namespace odb { -class _dbModNet; - -template -class dbTable; - -// User Code Begin classes -// User Code End classes - -class dbModuleModNetModItermItr : public dbIterator -{ - public: - dbModuleModNetModItermItr(dbTable<_dbModNet>* moditerm_tbl) - { - _moditerm_tbl = moditerm_tbl; - } - - bool reversible() override; - bool orderReversed() override; - void reverse(dbObject* parent) override; - uint sequential() override; - uint size(dbObject* parent) override; - uint begin(dbObject* parent) override; - uint end(dbObject* parent) override; - uint next(uint id, ...) override; - dbObject* getObject(uint id, ...) override; - // User Code Begin Methods - // User Code End Methods - private: - dbTable<_dbModNet>* _moditerm_tbl; - // User Code Begin Fields - // User Code End Fields -}; - -} // namespace odb - // Generator Code End Header \ No newline at end of file diff --git a/src/odb/test/data/design.odb b/src/odb/test/data/design.odb index 182e1511104..ddbb2c6f8a0 100644 Binary files a/src/odb/test/data/design.odb and b/src/odb/test/data/design.odb differ