From 05ae20f2609226d850e71324c9abe4539774f230 Mon Sep 17 00:00:00 2001 From: Clifford Wolf Date: Sun, 24 Mar 2013 12:05:25 +0100 Subject: [PATCH] Added -notypes option to intersynth backend --- backends/intersynth/intersynth.cc | 25 ++++++++++++++++++------- 1 file changed, 18 insertions(+), 7 deletions(-) diff --git a/backends/intersynth/intersynth.cc b/backends/intersynth/intersynth.cc index 0a50fa306..e0092ef18 100644 --- a/backends/intersynth/intersynth.cc +++ b/backends/intersynth/intersynth.cc @@ -60,10 +60,14 @@ struct IntersynthBackend : public Backend { log("Write the current design to an 'intersynth' netlist file. InterSynth is\n"); log("a tool for Coarse-Grain Example-Driven Interconnect Synthesis.\n"); log("\n"); + log(" -notypes\n"); + log(" do not generate celltypes and conntypes commands. i.e. just output\n"); + log(" the netlists. this is used for postsilicon synthesis.\n"); + log("\n"); log(" -lib \n"); - log(" Use the specified library file for determining whether cell ports are\n"); - log(" inputs or outputs. This option can be used multiple times to specify\n"); - log(" more than one library.\n"); + log(" Use the specified library file for determining whether cell ports are\n"); + log(" inputs or outputs. This option can be used multiple times to specify\n"); + log(" more than one library.\n"); log("\n"); log("http://www.clifford.at/intersynth/\n"); log("\n"); @@ -75,10 +79,15 @@ struct IntersynthBackend : public Backend { std::vector libfiles; std::vector libs; + bool flag_notypes = false; size_t argidx; for (argidx = 1; argidx < args.size(); argidx++) { + if (args[argidx] == "-notypes") { + flag_notypes = true; + continue; + } if (args[argidx] == "-lib" && argidx+1 < args.size()) { libfiles.push_back(args[++argidx]); continue; @@ -170,10 +179,12 @@ struct IntersynthBackend : public Backend { netlists_code += code; } - for (auto code : conntypes_code) - fprintf(f, "%s", code.c_str()); - for (auto code : celltypes_code) - fprintf(f, "%s", code.c_str()); + if (!flag_notypes) { + for (auto code : conntypes_code) + fprintf(f, "%s", code.c_str()); + for (auto code : celltypes_code) + fprintf(f, "%s", code.c_str()); + } fprintf(f, "%s", netlists_code.c_str()); for (auto lib : libs) -- 2.30.2