@@ -526,10 +526,26 @@ static bool s_read_json_items(const nlohmann::ordered_json& from,
526
526
last.oldPin_ = propObj[" O" ];
527
527
has_old = true ;
528
528
}
529
+
529
530
bool cont_1 = propObj.contains (" D" );
530
531
bool cont_2 = propObj.contains (" Q" );
531
532
if (!has_new and !has_old and cont_1 and cont_2) {
532
- last.newPin_ = propObj[" D" ];
533
+
534
+ // read "D", can be array
535
+ auto D_obj = propObj[" D" ];
536
+ if (D_obj.is_array ()) {
537
+ size_t q_sz = D_obj.size ();
538
+ if (q_sz) {
539
+ last.newPin_ = D_obj[0 ];
540
+ last.D_bus_ .resize (q_sz);
541
+ for (size_t i = 0 ; i < q_sz; i++)
542
+ last.D_bus_ [i] = D_obj[i];
543
+ }
544
+ } else {
545
+ last.newPin_ = D_obj;
546
+ }
547
+
548
+ // read "Q", can be array
533
549
auto Q_obj = propObj[" Q" ];
534
550
if (Q_obj.is_array ()) {
535
551
size_t q_sz = Q_obj.size ();
@@ -545,6 +561,7 @@ static bool s_read_json_items(const nlohmann::ordered_json& from,
545
561
has_new = true ;
546
562
has_old = true ;
547
563
}
564
+
548
565
cont_1 = propObj.contains (" I_P" );
549
566
cont_2 = propObj.contains (" O" );
550
567
if ((!has_new or !has_old) and cont_1 and cont_2) {
@@ -618,8 +635,8 @@ void PinPlacer::dump_edits(const string& memo) noexcept {
618
635
lprintf (
619
636
" |%u| %s module: %s js_dir:%s dir:%i old: %s new: %s" ,
620
637
i+1 , ed.cname (), ed.c_mod (), ed.c_jsdir (), ed.dir_ , ed.c_old (), ed.c_new ());
621
- if (ed.isBus ())
622
- lprintf (" BUS -%u" , ed.busSize ());
638
+ if (ed.isQBus ())
639
+ lprintf (" QBUS -%u" , ed.qbusSize ());
623
640
lputs ();
624
641
if (!ed.dir_ )
625
642
undefs.push_back (i);
@@ -630,8 +647,8 @@ void PinPlacer::dump_edits(const string& memo) noexcept {
630
647
lprintf (" nm:%s module: %s js_dir:%s dir:%i old: %s new %s R:%i" ,
631
648
ed.cname (), ed.c_mod (), ed.c_jsdir (), ed.dir_ ,
632
649
ed.c_old (), ed.c_new (), ed.isRoot ());
633
- if (ed.isBus ())
634
- lprintf (" BUS -%u" , ed.busSize ());
650
+ if (ed.isQBus ())
651
+ lprintf (" QBUS -%u" , ed.qbusSize ());
635
652
lputs ();
636
653
}
637
654
lprintf (" ---- ibufs (%zu) ----\n " , ibufs_.size ());
@@ -640,8 +657,8 @@ void PinPlacer::dump_edits(const string& memo) noexcept {
640
657
lprintf (" nm:%s module: %s js_dir:%s dir:%i old %s new %s R:%i" ,
641
658
ed.cname (), ed.c_mod (), ed.c_jsdir (), ed.dir_ ,
642
659
ed.c_old (), ed.c_new (), ed.isRoot ());
643
- if (ed.isBus ())
644
- lprintf (" BUS -%u" , ed.busSize ());
660
+ if (ed.isQBus ())
661
+ lprintf (" QBUS -%u" , ed.qbusSize ());
645
662
lputs ();
646
663
}
647
664
lputs (" ====" );
0 commit comments