3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-04-24 01:25:33 +00:00

Add upto and offset to JSON ports

This commit is contained in:
Miodrag Milanovic 2019-06-21 19:47:25 +02:00
parent e664814971
commit 50e7221077
2 changed files with 16 additions and 0 deletions

View file

@ -127,6 +127,10 @@ struct JsonWriter
f << stringf(" %s: {\n", get_name(n).c_str());
f << stringf(" \"direction\": \"%s\",\n", w->port_input ? w->port_output ? "inout" : "input" : "output");
f << stringf(" \"bits\": %s\n", get_bits(w).c_str());
if (w->start_offset)
f << stringf(" \"offset\": %d,\n", w->start_offset);
if (w->upto)
f << stringf(" \"upto\": 1,\n");
f << stringf(" }");
first = false;
}