Fix bug when calculating the decay time from two variable delays.

We need to also update the decay time if the new rise/fall value
is less than the minimum value and we are in ignore decay mode.
This commit is contained in:
Cary R 2010-07-13 15:03:22 -07:00 committed by Stephen Williams
parent 13fb07dc17
commit 5fe5171e49
1 changed files with 6 additions and 4 deletions

View File

@ -119,18 +119,20 @@ vvp_time64_t vvp_delay_t::get_min_delay() const
void vvp_delay_t::set_rise(vvp_time64_t val)
{
rise_ = val;
if (val < min_delay_)
if (val < min_delay_) {
min_delay_ = val;
else
if (ignore_decay_) decay_ = val;
} else
calculate_min_delay_();
}
void vvp_delay_t::set_fall(vvp_time64_t val)
{
fall_ = val;
if (val < min_delay_)
if (val < min_delay_) {
min_delay_ = val;
else
if (ignore_decay_) decay_ = val;
} else
calculate_min_delay_();
}