diff options
| author | Aman Goel <amangoel@umich.edu> | 2018-07-04 15:14:28 -0400 |
|---|---|---|
| committer | Aman Goel <amangoel@umich.edu> | 2018-07-04 15:14:28 -0400 |
| commit | 4d343fc1cdafe469484846051680ca0b1f948549 (patch) | |
| tree | 2847b1045fbf06420cfdce3ccf8bae1346d8c5b3 /techlibs/ice40/synth_ice40.cc | |
| parent | 6e63df6dd08fe424f46039d26f9f238ac1cb4494 (diff) | |
| parent | 8b92ddb9d2635c30636b17ff3d24bc09a44b8551 (diff) | |
| download | yosys-4d343fc1cdafe469484846051680ca0b1f948549.tar.gz yosys-4d343fc1cdafe469484846051680ca0b1f948549.tar.bz2 yosys-4d343fc1cdafe469484846051680ca0b1f948549.zip | |
Merging with official repo
Diffstat (limited to 'techlibs/ice40/synth_ice40.cc')
| -rw-r--r-- | techlibs/ice40/synth_ice40.cc | 31 |
1 files changed, 22 insertions, 9 deletions
diff --git a/techlibs/ice40/synth_ice40.cc b/techlibs/ice40/synth_ice40.cc index 177581d53..abd890a56 100644 --- a/techlibs/ice40/synth_ice40.cc +++ b/techlibs/ice40/synth_ice40.cc @@ -45,7 +45,11 @@ struct SynthIce40Pass : public ScriptPass log(" is omitted if this parameter is not specified.\n"); log("\n"); log(" -edif <file>\n"); - log(" write the design to the specified edif file. writing of an output file\n"); + log(" write the design to the specified EDIF file. writing of an output file\n"); + log(" is omitted if this parameter is not specified.\n"); + log("\n"); + log(" -json <file>\n"); + log(" write the design to the specified JSON file. writing of an output file\n"); log(" is omitted if this parameter is not specified.\n"); log("\n"); log(" -run <from_label>:<to_label>\n"); @@ -81,7 +85,7 @@ struct SynthIce40Pass : public ScriptPass log("\n"); } - string top_opt, blif_file, edif_file; + string top_opt, blif_file, edif_file, json_file; bool nocarry, nodffe, nobram, flatten, retime, abc2, vpr; virtual void clear_flags() YS_OVERRIDE @@ -89,6 +93,7 @@ struct SynthIce40Pass : public ScriptPass top_opt = "-auto-top"; blif_file = ""; edif_file = ""; + json_file = ""; nocarry = false; nodffe = false; nobram = false; @@ -118,6 +123,10 @@ struct SynthIce40Pass : public ScriptPass edif_file = args[++argidx]; continue; } + if (args[argidx] == "-json" && argidx+1 < args.size()) { + json_file = args[++argidx]; + continue; + } if (args[argidx] == "-run" && argidx+1 < args.size()) { size_t pos = args[argidx+1].find(':'); if (pos == std::string::npos) @@ -260,17 +269,15 @@ struct SynthIce40Pass : public ScriptPass if (!blif_file.empty() || help_mode) { if (vpr || help_mode) { run(stringf("opt_clean -purge"), - " " - " (vpr mode)"); + " (vpr mode)"); run(stringf("write_blif -attr -cname -conn -param %s", - help_mode ? "<file-name>" : blif_file.c_str()), - " (vpr mode)"); + help_mode ? "<file-name>" : blif_file.c_str()), + " (vpr mode)"); } if (!vpr) run(stringf("write_blif -gates -attr -param %s", - help_mode ? "<file-name>" : blif_file.c_str()), - " " - " (non-vpr mode)"); + help_mode ? "<file-name>" : blif_file.c_str()), + " (non-vpr mode)"); } } @@ -279,6 +286,12 @@ struct SynthIce40Pass : public ScriptPass if (!edif_file.empty() || help_mode) run(stringf("write_edif %s", help_mode ? "<file-name>" : edif_file.c_str())); } + + if (check_label("json")) + { + if (!json_file.empty() || help_mode) + run(stringf("write_json %s", help_mode ? "<file-name>" : json_file.c_str())); + } } } SynthIce40Pass; |
