aboutsummaryrefslogtreecommitdiffstats
path: root/frontends/json/jsonparse.cc
diff options
context:
space:
mode:
authorEddie Hung <eddie@fpgeh.com>2019-06-24 22:48:49 -0700
committerEddie Hung <eddie@fpgeh.com>2019-06-24 22:48:49 -0700
commit1564eb8b549a0927efa4d2b4cbc479038993024a (patch)
treeb31c219fd98a8d0c8bb4542c10f5961529bd9635 /frontends/json/jsonparse.cc
parentf1675b88f63b4c279e368d5ec9e6ca48f528024d (diff)
parenta19226c174e31da444b831706adf7fa17e9cb9e4 (diff)
downloadyosys-1564eb8b549a0927efa4d2b4cbc479038993024a.tar.gz
yosys-1564eb8b549a0927efa4d2b4cbc479038993024a.tar.bz2
yosys-1564eb8b549a0927efa4d2b4cbc479038993024a.zip
Merge remote-tracking branch 'origin/xaig' into xc7mux
Diffstat (limited to 'frontends/json/jsonparse.cc')
-rw-r--r--frontends/json/jsonparse.cc12
1 files changed, 12 insertions, 0 deletions
diff --git a/frontends/json/jsonparse.cc b/frontends/json/jsonparse.cc
index b74d41dd2..f5ae8eb72 100644
--- a/frontends/json/jsonparse.cc
+++ b/frontends/json/jsonparse.cc
@@ -292,6 +292,18 @@ void json_import(Design *design, string &modname, JsonNode *node)
if (port_wire == nullptr)
port_wire = module->addWire(port_name, GetSize(port_bits_node->data_array));
+ if (port_node->data_dict.count("upto") != 0) {
+ JsonNode *val = port_node->data_dict.at("upto");
+ if (val->type == 'N')
+ port_wire->upto = val->data_number != 0;
+ }
+
+ if (port_node->data_dict.count("offset") != 0) {
+ JsonNode *val = port_node->data_dict.at("offset");
+ if (val->type == 'N')
+ port_wire->start_offset = val->data_number;
+ }
+
if (port_direction_node->data_string == "input") {
port_wire->port_input = true;
} else