netlist: added parameter STARTUP_STRATEGY to switch between ...

startup strategies. This determines the order of device triggering.
0: Full - trigger all delegates. Next all devices not touched.
1: Backwards - trigger all devices backwards (only update delegate)
2: Forward - trigger all devices forward (only update delegate)
This commit is contained in:
couriersud 2019-02-08 23:18:32 +01:00
parent 8f94739f65
commit 8daa6e0a0d
2 changed files with 7 additions and 3 deletions

View File

@ -28,6 +28,7 @@ namespace netlist
{
NETLIB_CONSTRUCTOR(netlistparams)
, m_use_deactivate(*this, "USE_DEACTIVATE", false)
, m_startup_strategy(*this, "STARTUP_STRATEGY", 1)
{
}
NETLIB_UPDATEI() { }
@ -35,6 +36,7 @@ namespace netlist
//NETLIB_UPDATE_PARAMI() { }
public:
param_logic_t m_use_deactivate;
param_int_t m_startup_strategy;
};
// -----------------------------------------------------------------------------

View File

@ -359,9 +359,9 @@ void netlist_state_t::reset()
* variations are explicitly stated in the breakout manual.
*/
const unsigned startup_strategy = 1; //! \note make this a parameter
auto *netlist_params = get_single_device<devices::NETLIB_NAME(netlistparams)>("parameter");
switch (startup_strategy)
switch (netlist_params->m_startup_strategy())
{
case 0:
{
@ -384,8 +384,10 @@ void netlist_state_t::reset()
log().verbose("Devices not yet updated:");
for (auto &dev : m_devices)
if (!plib::container::contains(d, dev.second.get()))
{
log().verbose("\t ...{1}", dev.second->name());
//x->update_dev();
dev.second->update();
}
}
break;
case 1: // brute force backward