348 std::string top_module_name;
349 std::string buf_type, buf_in, buf_out;
350 std::string true_type, true_out;
351 std::string false_type, false_out;
357 for (argidx = 1; argidx <
args.size(); argidx++)
359 if (
args[argidx] ==
"-top" && argidx+1 <
args.size()) {
360 top_module_name =
args[++argidx];
363 if (
args[argidx] ==
"-buf" && argidx+3 <
args.size()) {
369 if (
args[argidx] ==
"-unbuf" && argidx+3 <
args.size()) {
373 config.
unbuf_types[unbuf_type] = std::pair<RTLIL::IdString, RTLIL::IdString>(unbuf_in, unbuf_out);
376 if (
args[argidx] ==
"-true" && argidx+2 <
args.size()) {
381 if (
args[argidx] ==
"-false" && argidx+2 <
args.size()) {
386 if (
args[argidx] ==
"-undef" && argidx+2 <
args.size()) {
391 if (
args[argidx] ==
"-icells") {
395 if (
args[argidx] ==
"-gates") {
399 if (
args[argidx] ==
"-conn") {
403 if (
args[argidx] ==
"-param") {
407 if (
args[argidx] ==
"-blackbox") {
411 if (
args[argidx] ==
"-impltf") {
419 if (top_module_name.empty())
420 for (
auto & mod_it:design->
modules_)
421 if (mod_it.second->get_bool_attribute(
"\\top"))
422 top_module_name = mod_it.first.str();
426 std::vector<RTLIL::Module*> mod_list;
428 for (
auto module_it : design->
modules_)
431 if (module->get_bool_attribute(
"\\blackbox") && !config.
blackbox_mode)
435 log_error(
"Found unmapped processes in module %s: unmapped processes are not supported in BLIF backend!\n",
RTLIL::id2cstr(module->
name));
437 log_error(
"Found munmapped emories in module %s: unmapped memories are not supported in BLIF backend!\n",
RTLIL::id2cstr(module->
name));
441 top_module_name.clear();
445 mod_list.push_back(module);
448 if (!top_module_name.empty())
449 log_error(
"Can't find top module `%s'!\n", top_module_name.c_str());
451 for (
auto module : mod_list)
const char * yosys_version_str
std::map< RTLIL::IdString, std::pair< RTLIL::IdString, RTLIL::IdString > > unbuf_types
std::string stringf(const char *fmt,...)
void log_header(const char *format,...)
std::map< RTLIL::IdString, RTLIL::Memory * > memories
void log_error(const char *format,...)
static std::string escape_id(std::string str)
void extra_args(std::ostream *&f, std::string &filename, std::vector< std::string > args, size_t argidx)
static const char * id2cstr(const RTLIL::IdString &str)
std::map< RTLIL::IdString, RTLIL::Process * > processes
std::map< RTLIL::IdString, RTLIL::Module * > modules_