bbox_derive: add assert and debug print

This commit is contained in:
Emil J. Tywoniak 2024-05-03 20:43:01 +02:00
parent e8c58a5528
commit 44b0fdc2bf
1 changed files with 2 additions and 0 deletions

View File

@ -71,6 +71,8 @@ struct BboxDerivePass : Pass {
IdString derived_type = base->derive(d, cell->parameters); IdString derived_type = base->derive(d, cell->parameters);
Module *derived = d->module(derived_type); Module *derived = d->module(derived_type);
log_assert(derived && "Failed to derive module\n");
log_debug("derived %s\n", derived_type.c_str());
if (!naming_attr.empty() && derived->has_attribute(naming_attr)) { if (!naming_attr.empty() && derived->has_attribute(naming_attr)) {
IdString new_name = RTLIL::escape_id(derived->get_string_attribute(naming_attr)); IdString new_name = RTLIL::escape_id(derived->get_string_attribute(naming_attr));