USING_YOSYS_NAMESPACE
PRIVATE_NAMESPACE_BEGIN
-enum class gate_type_t {
- G_NONE,
- G_FF,
- G_BUF,
- G_NOT,
- G_AND,
- G_NAND,
- G_OR,
- G_NOR,
- G_XOR,
- G_XNOR,
- G_ANDNOT,
- G_ORNOT,
- G_MUX,
- G_AOI3,
- G_OAI3,
- G_AOI4,
- G_OAI4
-};
-
-#define G(_name) gate_type_t::G_ ## _name
-
-struct gate_t
-{
- int id;
- gate_type_t type;
- int in1, in2, in3, in4;
- bool is_port;
- RTLIL::SigBit bit;
- RTLIL::State init;
-};
-
bool map_mux4;
bool map_mux8;
bool map_mux16;
int map_autoidx;
SigMap assign_map;
RTLIL::Module *module;
-std::vector<gate_t> signal_list;
std::map<RTLIL::SigBit, int> signal_map;
std::map<RTLIL::SigBit, RTLIL::State> signal_init;
pool<std::string> enabled_gates;
map_autoidx = autoidx++;
signal_map.clear();
- signal_list.clear();
pi_map.clear();
po_map.clear();
recover_init = false;
log_push();
assign_map.clear();
- signal_list.clear();
signal_map.clear();
signal_init.clear();
pi_map.clear();
}
assign_map.clear();
- signal_list.clear();
signal_map.clear();
signal_init.clear();
pi_map.clear();