mirror of
https://github.com/YosysHQ/yosys
synced 2025-04-23 09:05:32 +00:00
Added ENABLE_NDEBUG makefile options
This commit is contained in:
parent
8fe9ab50e5
commit
2a9ad48eb6
12 changed files with 33 additions and 12 deletions
|
@ -220,7 +220,7 @@ static inline void log_dump_val_worker(char *v) { log("%s", v); }
|
|||
static inline void log_dump_val_worker(const char *v) { log("%s", v); }
|
||||
static inline void log_dump_val_worker(std::string v) { log("%s", v.c_str()); }
|
||||
static inline void log_dump_val_worker(PerformanceTimer p) { log("%f seconds", p.sec()); }
|
||||
static inline void log_dump_args_worker(const char *p) { log_assert(*p == 0); }
|
||||
static inline void log_dump_args_worker(const char *p YS_ATTRIBUTE(unused)) { log_assert(*p == 0); }
|
||||
void log_dump_val_worker(RTLIL::SigSpec v);
|
||||
|
||||
template<typename T>
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -130,7 +130,7 @@ struct ModIndex : public RTLIL::Monitor
|
|||
port_add(cell, port, sig);
|
||||
}
|
||||
|
||||
virtual void notify_connect(RTLIL::Module *mod, const RTLIL::SigSig &sigsig) YS_OVERRIDE
|
||||
virtual void notify_connect(RTLIL::Module *mod YS_ATTRIBUTE(unused), const RTLIL::SigSig &sigsig) YS_OVERRIDE
|
||||
{
|
||||
log_assert(module == mod);
|
||||
|
||||
|
@ -174,13 +174,13 @@ struct ModIndex : public RTLIL::Monitor
|
|||
}
|
||||
}
|
||||
|
||||
virtual void notify_connect(RTLIL::Module *mod, const std::vector<RTLIL::SigSig>&) YS_OVERRIDE
|
||||
virtual void notify_connect(RTLIL::Module *mod YS_ATTRIBUTE(unused), const std::vector<RTLIL::SigSig>&) YS_OVERRIDE
|
||||
{
|
||||
log_assert(module == mod);
|
||||
auto_reload_module = true;
|
||||
}
|
||||
|
||||
virtual void notify_blackout(RTLIL::Module *mod) YS_OVERRIDE
|
||||
virtual void notify_blackout(RTLIL::Module *mod YS_ATTRIBUTE(unused)) YS_OVERRIDE
|
||||
{
|
||||
log_assert(module == mod);
|
||||
auto_reload_module = true;
|
||||
|
|
|
@ -319,11 +319,13 @@ std::string make_temp_dir(std::string template_str)
|
|||
mkdir(template_str.c_str());
|
||||
return template_str;
|
||||
#else
|
||||
# ifndef NDEBUG
|
||||
size_t pos = template_str.rfind("XXXXXX");
|
||||
log_assert(pos != std::string::npos);
|
||||
|
||||
int suffixlen = GetSize(template_str) - pos - 6;
|
||||
log_assert(suffixlen == 0);
|
||||
# endif
|
||||
|
||||
char *p = strdup(template_str.c_str());
|
||||
p = mkdtemp(p);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue