diff options
Diffstat (limited to 'kernel/macc.h')
-rw-r--r-- | kernel/macc.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/kernel/macc.h b/kernel/macc.h index ab17f8c41..cac5b00d7 100644 --- a/kernel/macc.h +++ b/kernel/macc.h @@ -105,10 +105,12 @@ struct Macc bit_ports = cell->getPort("\\B"); std::vector<RTLIL::State> config_bits = cell->getParam("\\CONFIG").bits; - int config_width = cell->getParam("\\CONFIG_WIDTH").as_int(); int config_cursor = 0; +#ifndef NDEBUG + int config_width = cell->getParam("\\CONFIG_WIDTH").as_int(); log_assert(GetSize(config_bits) >= config_width); +#endif int num_bits = 0; if (config_bits[config_cursor++] == RTLIL::S1) num_bits |= 1; |