Create nice errors when calling RTLIL::Module::derive() of base class

This commit is contained in:
Clifford Wolf 2013-03-26 19:27:49 +01:00
parent 6a231816fa
commit 041c06bd9d
1 changed files with 3 additions and 3 deletions

View File

@ -18,6 +18,7 @@
*/ */
#include "kernel/rtlil.h" #include "kernel/rtlil.h"
#include "kernel/log.h"
#include <assert.h> #include <assert.h>
#include <algorithm> #include <algorithm>
@ -257,13 +258,12 @@ RTLIL::Module::~Module()
RTLIL::IdString RTLIL::Module::derive(RTLIL::Design*, std::map<RTLIL::IdString, RTLIL::Const>) RTLIL::IdString RTLIL::Module::derive(RTLIL::Design*, std::map<RTLIL::IdString, RTLIL::Const>)
{ {
assert(!"Called derive() from module base class."); log_error("Module `%s' is used with parameters but is not parametric!\n", id2cstr(name));
abort();
} }
void RTLIL::Module::update_auto_wires(std::map<RTLIL::IdString, int>) void RTLIL::Module::update_auto_wires(std::map<RTLIL::IdString, int>)
{ {
assert(!"Called update_auto_wires() from module base class."); log_error("Module `%s' has automatic wires bu no HDL backend to handle it!\n", id2cstr(name));
} }
size_t RTLIL::Module::count_id(RTLIL::IdString id) size_t RTLIL::Module::count_id(RTLIL::IdString id)