1212
1313namespace ram {
1414
15- using odb::dbBlock;
16- using odb::dbBPin;
1715using odb::dbBTerm;
1816using odb::dbInst;
1917using odb::dbIoType;
@@ -33,8 +31,6 @@ RamGen::RamGen(sta::dbNetwork* network, odb::dbDatabase* db, Logger* logger)
3331{
3432}
3533
36- RamGen::~RamGen () = default ;
37-
3834dbInst* RamGen::makeCellInst (
3935 Cell* cell,
4036 const std::string& prefix,
@@ -125,6 +121,7 @@ void RamGen::makeCellByte(Grid& ram_grid,
125121 for (int bit = first_byte; bit < first_byte + 8 ; ++bit) {
126122 auto name = fmt::format (" {}.bit{}" , prefix, bit);
127123 vector<dbNet*> outs;
124+ outs.reserve (read_ports);
128125 for (int read_port = 0 ; read_port < read_ports; ++read_port) {
129126 outs.push_back (data_output[read_port][bit]->getNet ());
130127 }
@@ -352,9 +349,7 @@ void RamGen::findMasters()
352349 // for input buffers
353350 if (!buffer_cell_) {
354351 buffer_cell_ = findMaster (
355- [](sta::LibertyPort* port) {
356- return port->libertyCell ()->isBuffer ();
357- },
352+ [](sta::LibertyPort* port) { return port->libertyCell ()->isBuffer (); },
358353 " buffer" );
359354 }
360355}
@@ -383,7 +378,7 @@ void RamGen::generate(const int bytes_per_word,
383378 auto chip = db_->getChip ();
384379 if (!chip) {
385380 chip = odb::dbChip::create (
386- db_, db_->getTech (), ram_name. c_str () , odb::dbChip::ChipType::DIE);
381+ db_, db_->getTech (), ram_name, odb::dbChip::ChipType::DIE);
387382 }
388383
389384 block_ = chip->getBlock ();
@@ -545,14 +540,14 @@ void RamGen::generate(const int bytes_per_word,
545540
546541 int num_sites = ram_grid.getRowWidth () / db_sites->getWidth ();
547542 for (int i = 0 ; i <= word_count; ++i) { // extra for the layer of buffers
548- auto row_name = fmt::format (" RAM_ROW{}" , i). c_str () ;
543+ auto row_name = fmt::format (" RAM_ROW{}" , i);
549544 auto y_coord = i * ram_grid.getHeight ();
550545 auto row_orient = odb::dbOrientType::R0;
551546 if (i % 2 == 1 ) {
552547 row_orient = odb::dbOrientType::MX;
553548 }
554549 dbRow::create (block_,
555- row_name,
550+ row_name. c_str () ,
556551 db_sites,
557552 ram_origin.getX (),
558553 y_coord,
0 commit comments