From 0e20619189db03ce61379010eb54306033f89fea Mon Sep 17 00:00:00 2001 From: Aki Van Ness Date: Fri, 14 Jan 2022 09:41:52 -0500 Subject: [PATCH] metadata -> jny: migrated to the proper name for the pass --- backends/jny/Makefile.inc | 2 ++ backends/{metadata/metadata.cc => jny/jny.cc} | 36 +++++++++---------- backends/metadata/Makefile.inc | 2 -- 3 files changed, 19 insertions(+), 21 deletions(-) create mode 100644 backends/jny/Makefile.inc rename backends/{metadata/metadata.cc => jny/jny.cc} (90%) delete mode 100644 backends/metadata/Makefile.inc diff --git a/backends/jny/Makefile.inc b/backends/jny/Makefile.inc new file mode 100644 index 000000000..5e417128e --- /dev/null +++ b/backends/jny/Makefile.inc @@ -0,0 +1,2 @@ + +OBJS += backends/jny/jny.o diff --git a/backends/metadata/metadata.cc b/backends/jny/jny.cc similarity index 90% rename from backends/metadata/metadata.cc rename to backends/jny/jny.cc index 103db533f..1c1b8d694 100644 --- a/backends/metadata/metadata.cc +++ b/backends/jny/jny.cc @@ -17,8 +17,6 @@ * */ -// MYAU - Metadata for Yosys-Assisted Utilities - #include "kernel/rtlil.h" #include "kernel/register.h" #include "kernel/sigtools.h" @@ -33,7 +31,7 @@ USING_YOSYS_NAMESPACE PRIVATE_NAMESPACE_BEGIN -struct MetadataWriter +struct JnyWriter { private: std::ostream &f; @@ -69,7 +67,7 @@ struct MetadataWriter } public: - MetadataWriter(std::ostream &f, bool use_selection) noexcept: f(f), _use_selection(use_selection) { } + JnyWriter(std::ostream &f, bool use_selection) noexcept: f(f), _use_selection(use_selection) { } void write_metadata(Design *design) { @@ -237,13 +235,13 @@ struct MetadataWriter } }; -struct MetadataBackend : public Backend { - MetadataBackend() : Backend("metadata", "generate design metadata") { } +struct JnyBackend : public Backend { + JnyBackend() : Backend("jny", "generate design metadata") { } void help() override { // |---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---| log("\n"); - log(" metadata [options] [selection]\n"); + log(" jny [options] [selection]\n"); log("\n"); log("Write a JSON metadata for the current design\n"); log("\n"); @@ -255,30 +253,30 @@ struct MetadataBackend : public Backend { size_t argidx{1}; extra_args(f, filename, args, argidx); - log_header(design, "Executing metadata backend.\n"); + log_header(design, "Executing jny backend.\n"); - MetadataWriter metadata_writier(*f, false); - metadata_writier.write_metadata(design); + JnyWriter jny_writer(*f, false); + jny_writer.write_metadata(design); } -} MetadataBackend; +} JnyBackend; -struct MetadataPass : public Pass { - MetadataPass() : Pass("metadata", "write design metadata") { } +struct JnyPass : public Pass { + JnyPass() : Pass("jny", "write design and metadata") { } void help() override { // |---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---| log("\n"); - log(" metadata [options] [selection]\n"); + log(" jny [options] [selection]\n"); log("\n"); - log("Write a JSON metadata for the current design\n"); + log("Write a JSON netlist metadata for the current design\n"); log("\n"); log(" -o \n"); log(" write to the specified file.\n"); log("\n"); - log("See 'help write_metadata' for a description of the JSON format used.\n"); + log("See 'help write_jny' for a description of the JSON format used.\n"); log("\n"); } void execute(std::vector args, RTLIL::Design *design) override @@ -313,8 +311,8 @@ struct MetadataPass : public Pass { } - MetadataWriter metadata_writier(*f, false); - metadata_writier.write_metadata(design); + JnyWriter jny_writer(*f, false); + jny_writer.write_metadata(design); if (!filename.empty()) { delete f; @@ -323,6 +321,6 @@ struct MetadataPass : public Pass { } } -} MetadataPass; +} JnyPass; PRIVATE_NAMESPACE_END diff --git a/backends/metadata/Makefile.inc b/backends/metadata/Makefile.inc deleted file mode 100644 index 21f631cc9..000000000 --- a/backends/metadata/Makefile.inc +++ /dev/null @@ -1,2 +0,0 @@ - -OBJS += backends/metadata/metadata.o -- 2.30.2