ice40: split out cells_map.v into ff_map.v
[yosys.git] / kernel / register.h
index 8024c56a0362d5a47f44659c2e152512a420815d..3d89386b7a0f7c0f72a71bff63e812ef7f8cad3c 100644 (file)
@@ -1,4 +1,4 @@
-/*
+/* -*- c++ -*-
  *  yosys -- Yosys Open SYnthesis Suite
  *
  *  Copyright (C) 2012  Clifford Wolf <clifford@clifford.at>
@@ -36,6 +36,11 @@ struct Pass
 
        int call_counter;
        int64_t runtime_ns;
+       bool experimental_flag = false;
+
+       void experimental() {
+               experimental_flag = true;
+       }
 
        struct pre_post_exec_state_t {
                Pass *parent_pass;
@@ -62,6 +67,9 @@ struct Pass
        virtual void run_register();
        static void init_register();
        static void done_register();
+
+       virtual void on_register();
+       virtual void on_shutdown();
 };
 
 struct ScriptPass : Pass
@@ -76,6 +84,7 @@ struct ScriptPass : Pass
 
        bool check_label(std::string label, std::string info = std::string());
        void run(std::string command, std::string info = std::string());
+       void run_nocheck(std::string command, std::string info = std::string());
        void run_script(RTLIL::Design *design, std::string run_from = std::string(), std::string run_to = std::string());
        void help_script();
 };
@@ -88,13 +97,13 @@ struct Frontend : Pass
 
        std::string frontend_name;
        Frontend(std::string name, std::string short_help = "** document me **");
-       virtual void run_register() YS_OVERRIDE;
-       virtual ~Frontend();
-       virtual void execute(std::vector<std::string> args, RTLIL::Design *design) YS_OVERRIDE YS_FINAL;
+       void run_register() YS_OVERRIDE;
+       ~Frontend() YS_OVERRIDE;
+       void execute(std::vector<std::string> args, RTLIL::Design *design) YS_OVERRIDE YS_FINAL;
        virtual void execute(std::istream *&f, std::string filename, std::vector<std::string> args, RTLIL::Design *design) = 0;
 
        static std::vector<std::string> next_args;
-       void extra_args(std::istream *&f, std::string &filename, std::vector<std::string> args, size_t argidx);
+       void extra_args(std::istream *&f, std::string &filename, std::vector<std::string> args, size_t argidx, bool bin_input = false);
 
        static void frontend_call(RTLIL::Design *design, std::istream *f, std::string filename, std::string command);
        static void frontend_call(RTLIL::Design *design, std::istream *f, std::string filename, std::vector<std::string> args);
@@ -104,12 +113,12 @@ struct Backend : Pass
 {
        std::string backend_name;
        Backend(std::string name, std::string short_help = "** document me **");
-       virtual void run_register() YS_OVERRIDE;
-       virtual ~Backend();
-       virtual void execute(std::vector<std::string> args, RTLIL::Design *design) YS_OVERRIDE YS_FINAL;
+       void run_register() YS_OVERRIDE;
+       ~Backend() YS_OVERRIDE;
+       void execute(std::vector<std::string> args, RTLIL::Design *design) YS_OVERRIDE YS_FINAL;
        virtual void execute(std::ostream *&f, std::string filename,  std::vector<std::string> args, RTLIL::Design *design) = 0;
 
-       void extra_args(std::ostream *&f, std::string &filename, std::vector<std::string> args, size_t argidx);
+       void extra_args(std::ostream *&f, std::string &filename, std::vector<std::string> args, size_t argidx, bool bin_output = false);
 
        static void backend_call(RTLIL::Design *design, std::ostream *f, std::string filename, std::string command);
        static void backend_call(RTLIL::Design *design, std::ostream *f, std::string filename, std::vector<std::string> args);