3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-04-07 01:54:10 +00:00

metadata -> jny: migrated to the proper name for the pass

This commit is contained in:
Aki Van Ness 2022-01-14 09:41:52 -05:00 committed by N. Engelhardt
parent bdf14557ca
commit 0e20619189
3 changed files with 19 additions and 21 deletions

View file

@ -0,0 +1,2 @@
OBJS += backends/jny/jny.o

View file

@ -17,8 +17,6 @@
* *
*/ */
// MYAU - Metadata for Yosys-Assisted Utilities
#include "kernel/rtlil.h" #include "kernel/rtlil.h"
#include "kernel/register.h" #include "kernel/register.h"
#include "kernel/sigtools.h" #include "kernel/sigtools.h"
@ -33,7 +31,7 @@ USING_YOSYS_NAMESPACE
PRIVATE_NAMESPACE_BEGIN PRIVATE_NAMESPACE_BEGIN
struct MetadataWriter struct JnyWriter
{ {
private: private:
std::ostream &f; std::ostream &f;
@ -69,7 +67,7 @@ struct MetadataWriter
} }
public: 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) void write_metadata(Design *design)
{ {
@ -237,13 +235,13 @@ struct MetadataWriter
} }
}; };
struct MetadataBackend : public Backend { struct JnyBackend : public Backend {
MetadataBackend() : Backend("metadata", "generate design metadata") { } JnyBackend() : Backend("jny", "generate design metadata") { }
void help() override void help() override
{ {
// |---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---| // |---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|
log("\n"); log("\n");
log(" metadata [options] [selection]\n"); log(" jny [options] [selection]\n");
log("\n"); log("\n");
log("Write a JSON metadata for the current design\n"); log("Write a JSON metadata for the current design\n");
log("\n"); log("\n");
@ -255,30 +253,30 @@ struct MetadataBackend : public Backend {
size_t argidx{1}; size_t argidx{1};
extra_args(f, filename, args, argidx); 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); JnyWriter jny_writer(*f, false);
metadata_writier.write_metadata(design); jny_writer.write_metadata(design);
} }
} MetadataBackend; } JnyBackend;
struct MetadataPass : public Pass { struct JnyPass : public Pass {
MetadataPass() : Pass("metadata", "write design metadata") { } JnyPass() : Pass("jny", "write design and metadata") { }
void help() override void help() override
{ {
// |---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---| // |---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|
log("\n"); log("\n");
log(" metadata [options] [selection]\n"); log(" jny [options] [selection]\n");
log("\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("\n");
log(" -o <filename>\n"); log(" -o <filename>\n");
log(" write to the specified file.\n"); log(" write to the specified file.\n");
log("\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"); log("\n");
} }
void execute(std::vector<std::string> args, RTLIL::Design *design) override void execute(std::vector<std::string> args, RTLIL::Design *design) override
@ -313,8 +311,8 @@ struct MetadataPass : public Pass {
} }
MetadataWriter metadata_writier(*f, false); JnyWriter jny_writer(*f, false);
metadata_writier.write_metadata(design); jny_writer.write_metadata(design);
if (!filename.empty()) { if (!filename.empty()) {
delete f; delete f;
@ -323,6 +321,6 @@ struct MetadataPass : public Pass {
} }
} }
} MetadataPass; } JnyPass;
PRIVATE_NAMESPACE_END PRIVATE_NAMESPACE_END

View file

@ -1,2 +0,0 @@
OBJS += backends/metadata/metadata.o