diff options
author | Bogdan Vukobratovic <bogdan.vukobratovic@gmail.com> | 2019-06-27 12:11:47 +0200 |
---|---|---|
committer | Bogdan Vukobratovic <bogdan.vukobratovic@gmail.com> | 2019-06-27 12:11:47 +0200 |
commit | 0f32cb4e0af85e16a90ae274cf7c9fee6fbd2ad7 (patch) | |
tree | 9ed03b8345847046143161c3a63b8fa599393da2 /backends/json | |
parent | 2454ad99bf49afe752d6fd1c1567f59ee9e26736 (diff) | |
parent | 0d2b87e3ed9bacae7d44d27a4712e56ca03c8dd3 (diff) | |
download | yosys-0f32cb4e0af85e16a90ae274cf7c9fee6fbd2ad7.tar.gz yosys-0f32cb4e0af85e16a90ae274cf7c9fee6fbd2ad7.tar.bz2 yosys-0f32cb4e0af85e16a90ae274cf7c9fee6fbd2ad7.zip |
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'backends/json')
-rw-r--r-- | backends/json/json.cc | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/backends/json/json.cc b/backends/json/json.cc index 5022d5da1..dda4dfedd 100644 --- a/backends/json/json.cc +++ b/backends/json/json.cc @@ -126,6 +126,10 @@ struct JsonWriter f << stringf("%s\n", first ? "" : ","); f << stringf(" %s: {\n", get_name(n).c_str()); f << stringf(" \"direction\": \"%s\",\n", w->port_input ? w->port_output ? "inout" : "input" : "output"); + if (w->start_offset) + f << stringf(" \"offset\": %d,\n", w->start_offset); + if (w->upto) + f << stringf(" \"upto\": 1,\n"); f << stringf(" \"bits\": %s\n", get_bits(w).c_str()); f << stringf(" }"); first = false; @@ -189,6 +193,10 @@ struct JsonWriter f << stringf(" %s: {\n", get_name(w->name).c_str()); f << stringf(" \"hide_name\": %s,\n", w->name[0] == '$' ? "1" : "0"); 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(" \"attributes\": {"); write_parameters(w->attributes); f << stringf("\n }\n"); |