summaryrefslogtreecommitdiffstatshomepage
path: root/src/lib/netlist/nl_setup.cpp
diff options
context:
space:
mode:
author couriersud <couriersud@gmx.org>2020-06-28 14:21:36 +0200
committer couriersud <couriersud@gmx.org>2020-06-28 14:21:36 +0200
commite6d7db27cf4ceab80978232fdb0792395b1cc728 (patch)
tree0c15d2f761b0f1eb4128d67e3e123c90738361ea /src/lib/netlist/nl_setup.cpp
parentd7cbe855aa6baa01a74198ce830cfdf6793b367f (diff)
netlist: Fix parameter value resolution on rom devices.
* also simplifiy a return. * document parameter value resolution.
Diffstat (limited to 'src/lib/netlist/nl_setup.cpp')
-rw-r--r--src/lib/netlist/nl_setup.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/lib/netlist/nl_setup.cpp b/src/lib/netlist/nl_setup.cpp
index d759ce13e92..784cb67ffcf 100644
--- a/src/lib/netlist/nl_setup.cpp
+++ b/src/lib/netlist/nl_setup.cpp
@@ -434,6 +434,13 @@ pstring setup_t::termtype_as_str(detail::core_terminal_t &in)
pstring setup_t::get_initial_param_val(const pstring &name, const pstring &def) const
{
+ // when get_intial_param_val is called the parameter <name> is already registered
+ // and the value (valstr()) is set to the default value, e.g. "74XX"
+ // If thus $(IC5E.A.MODEL) is given for name=="IC5E.A.MODEL" valstr() below
+ // will return the default.
+ // FIXME: It may be more explicit and stable to test if pattern==name and return
+ // def in this case.
+
auto i = m_abstract.m_param_values.find(name);
auto found_pat(false);
pstring v = (i == m_abstract.m_param_values.end()) ? def : i->second;
@@ -1440,7 +1447,7 @@ void setup_t::prepare_to_run()
m_parser.register_dynamic_log_devices(loglist);
}
- // create defparams!
+ // create defparams first!
for (auto & e : m_abstract.m_defparams)
{