Skip to content

Commit ad47b96

Browse files
authored
Merge pull request #697 from os-fpga/pinc_read_Q_array_in_config_json_EDA2852
pin_c: read Q-array in config.json EDA-2852
2 parents 9497be2 + 1a6b023 commit ad47b96

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

stars/src/main.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
static const char* _pln_VERSION_STR = "pln0207";
1+
static const char* _pln_VERSION_STR = "pln0208";
22

33
#include "RS/rsEnv.h"
44
#include "util/pln_log.h"

stars/src/pin_loc/read_ports.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -527,7 +527,11 @@ static bool s_read_json_items(const nlohmann::ordered_json& from,
527527
bool cont_2 = propObj.contains("Q");
528528
if (!has_new and !has_old and cont_1 and cont_2) {
529529
last.newPin_ = propObj["D"];
530-
last.oldPin_ = propObj["Q"];
530+
auto Q_obj = propObj["Q"];
531+
if (Q_obj.is_array())
532+
last.oldPin_ = Q_obj[0];
533+
else
534+
last.oldPin_ = Q_obj;
531535
has_new = true;
532536
has_old = true;
533537
}

0 commit comments

Comments
 (0)