@@ -174,7 +174,7 @@ void RamGen::makeCellByte(Grid& ram_grid,
174174}
175175
176176std::unique_ptr<Layout> RamGen::generateTapColumn (const int word_count,
177- const int tapcell_col)
177+ const int tapcell_col)
178178{
179179 auto tapcell_layout = std::make_unique<Layout>(odb::vertical);
180180 for (int i = 0 ; i < word_count; ++i) {
@@ -566,39 +566,40 @@ void RamGen::generate(const int bytes_per_word,
566566 ram_grid.gridInit ();
567567
568568 if (tapcell_) {
569- // max tap distance specified is greater than the length of ram
569+ // max tap distance specified is greater than the length of ram
570570 if (ram_grid.getRowWidth () <= max_tap_dist) {
571571 auto tapcell_layout = generateTapColumn (word_count, 0 );
572- ram_grid.insertLayout (std::move (tapcell_layout), 0 );
572+ ram_grid.insertLayout (std::move (tapcell_layout), 0 );
573573 } else {
574574 // needed this calculation so first cells have right distance
575- int nearest_tap = (max_tap_dist / ram_grid.getWidth ()) * ram_grid.getLayoutWidth (0 );
575+ int nearest_tap
576+ = (max_tap_dist / ram_grid.getWidth ()) * ram_grid.getLayoutWidth (0 );
576577 int tapcell_count = 0 ;
577- // x distance between transistor and tapcell means 2x distance between tapcells
578- max_tap_dist *= 2 ;
579- // iterates through each of the columns
578+ // x distance between transistor and tapcell means 2x distance between
579+ // tapcells
580+ max_tap_dist *= 2 ;
581+ // iterates through each of the columns
580582 for (int col = 0 ; col < ram_grid.numLayouts (); ++col) {
581- if (nearest_tap + ram_grid.getLayoutWidth (col) >= max_tap_dist) {
582- // if the nearest_tap is too far, generate tap column
583+ if (nearest_tap + ram_grid.getLayoutWidth (col) >= max_tap_dist) {
584+ // if the nearest_tap is too far, generate tap column
583585 auto tapcell_layout = generateTapColumn (word_count, tapcell_count);
584586 ram_grid.insertLayout (std::move (tapcell_layout), col);
585- ++col; // col adjustment after insertion
587+ ++col; // col adjustment after insertion
586588 nearest_tap = 0 ;
587589 ++tapcell_count;
588- }
590+ }
589591 nearest_tap += ram_grid.getLayoutWidth (col);
590592 }
591593 // check for last column in the grid
592594 if (nearest_tap >= max_tap_dist / 2 ) {
593595 auto tapcell_layout = generateTapColumn (word_count, tapcell_count);
594596 ram_grid.addLayout (std::move (tapcell_layout));
595597 }
596- }
597-
598- }
598+ }
599+ }
599600
600601 ram_grid.gridInit ();
601-
602+
602603 auto db_libs = db_->getLibs ().begin ();
603604 auto db_sites = *(db_libs->getSites ().begin ());
604605 auto sites_width = db_sites->getWidth ();
0 commit comments