mirror of
https://github.com/holub/mame
synced 2025-04-24 17:30:55 +03:00
netlist: Fix scheduling bug.
This commit is contained in:
parent
9a4a812ba8
commit
89687cc1a4
@ -515,7 +515,7 @@ namespace solver
|
||||
if (delta < netlist_time_ext::quantum())
|
||||
{
|
||||
//printf("solve return %s at %f\n", source, now.as_double());
|
||||
return netlist_time::zero();
|
||||
return timestep_device_count() > 0 ? netlist_time::from_fp(m_params.m_min_timestep) : netlist_time::zero();
|
||||
}
|
||||
|
||||
backup(); // save voltages for backup and timestep calculation
|
||||
|
@ -232,9 +232,9 @@ namespace solver
|
||||
|
||||
update_inputs();
|
||||
|
||||
if (m_params.m_dynamic_ts && (timestep_device_count() != 0))
|
||||
if (timestep_device_count() > 0)
|
||||
{
|
||||
this->reschedule(netlist_time::from_fp(m_params.m_min_timestep));
|
||||
this->reschedule(netlist_time::from_fp(m_params.m_dynamic_ts ? m_params.m_min_timestep : m_params.m_max_timestep));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -54,7 +54,7 @@ namespace devices
|
||||
{
|
||||
const netlist_time_ext now(exec().time());
|
||||
const std::size_t nthreads = m_params.m_parallel() < 2 ? 1 : std::min(static_cast<std::size_t>(m_params.m_parallel()), plib::omp::get_max_threads());
|
||||
const netlist_time_ext sched(now + (nthreads <= 1 ? netlist_time_ext::zero() : netlist_time_ext::from_usec(100)));
|
||||
const netlist_time_ext sched(now + (nthreads <= 1 ? netlist_time_ext::zero() : netlist_time_ext::from_nsec(100)));
|
||||
plib::uninitialised_array<solver::matrix_solver_t *, config::MAX_SOLVER_QUEUE_SIZE::value> tmp;
|
||||
plib::uninitialised_array<netlist_time, config::MAX_SOLVER_QUEUE_SIZE::value> nt;
|
||||
std::size_t p=0;
|
||||
|
Loading…
Reference in New Issue
Block a user