@@ -747,10 +747,39 @@ bool PinPlacer::write_dot_place(const PcCsvReader& csv) {
747
747
internalPin.clear ();
748
748
if (cmdObj.hasInternalPin ()) {
749
749
internalPin = cmdObj.internalPin_ ;
750
- // gbox_rows = csv.get_gbox_rows(device_pin_name);
751
- // if (not gbox_rows.empty()) {
752
- // // search internalPin among gbox_rows
753
- // }
750
+ gbox_rows = csv.get_gbox_rows (device_pin_name);
751
+ if (not gbox_rows.empty ()) {
752
+ row_num = -1 ;
753
+ // search internalPin among gbox_rows
754
+ for (uint gbr : gbox_rows) {
755
+ const PcCsvReader::BCD& gbRow = csv.getBCD (gbr);
756
+ if (gbRow.fullchipName_ == internalPin) {
757
+ row_num = gbr + 2 ;
758
+ break ;
759
+ }
760
+ }
761
+ if (row_num > 1 ) {
762
+ if (tr >= 4 ) {
763
+ lprintf (" infered row_num= %i from gbox: %s internal_pin: %s\n " ,
764
+ row_num, device_pin_name.c_str (), internalPin.c_str ());
765
+ }
766
+ } else {
767
+ flush_out (true );
768
+ flush_out (true );
769
+ string ers = str::concat (" did not find PT row matching internal_pin: " , internalPin);
770
+ CERROR << ers << " : <" << device_pin_name << " >" << endl;
771
+ OUT_ERROR << ers << " : <" << device_pin_name << " >" << endl;
772
+ flush_out (true );
773
+
774
+ out_file << " \n === Error happened, .place file is incomplete\n "
775
+ << " === ERROR:" << ers
776
+ << " : <" << udes_pin_name
777
+ << " > device_pin_name: " << device_pin_name
778
+ << " internal_pin: " << internalPin
779
+ << " \n\n " ;
780
+ return false ;
781
+ }
782
+ }
754
783
}
755
784
756
785
const char * direction = " INPUT" ;
@@ -772,7 +801,7 @@ bool PinPlacer::write_dot_place(const PcCsvReader& csv) {
772
801
XYZ xyz;
773
802
774
803
if (row_num > 1 ) {
775
- // pt_row was explicitely passed in .pcf
804
+ // pt_row was explicitely passed in .pcf or infered from internal_pin
776
805
uint row_idx = row_num - 2 ;
777
806
if (row_idx < csv.numRows ()) {
778
807
const PcCsvReader::BCD& bb = csv.getBCD (row_idx);
0 commit comments