ice40: split out cells_map.v into ff_map.v
[yosys.git] / kernel / rtlil.cc
index 2aefe30b1543f3f663c40a202344458232c2ad5b..196e301b6c04e20fd449f197cf0cafd96467f230 100644 (file)
@@ -2619,16 +2619,15 @@ void RTLIL::Cell::setParam(RTLIL::IdString paramname, RTLIL::Const value)
 
 const RTLIL::Const &RTLIL::Cell::getParam(RTLIL::IdString paramname) const
 {
-       static const RTLIL::Const empty;
        const auto &it = parameters.find(paramname);
        if (it != parameters.end())
                return it->second;
        if (module && module->design) {
                RTLIL::Module *m = module->design->module(type);
                if (m)
-                       return m->parameter_default_values.at(paramname, empty);
+                       return m->parameter_default_values.at(paramname);
        }
-       return empty;
+       throw std::out_of_range("Cell::getParam()");
 }
 
 void RTLIL::Cell::sort()