summaryrefslogtreecommitdiff
path: root/kernel/macc.h
diff options
context:
space:
mode:
authorClifford Wolf <clifford@clifford.at>2015-01-24 12:16:46 +0100
committerClifford Wolf <clifford@clifford.at>2015-01-24 12:16:46 +0100
commit2a9ad48eb63a5f019c528fe46ceca0065364a44d (patch)
treea84eec02de3e555ca502d9fc4cdc2d9ca66b203c /kernel/macc.h
parent8fe9ab50e51204e5709eaad0fbf2ffb5397a0194 (diff)
Added ENABLE_NDEBUG makefile options
Diffstat (limited to 'kernel/macc.h')
-rw-r--r--kernel/macc.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/kernel/macc.h b/kernel/macc.h
index ab17f8c4..cac5b00d 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;