Explicitly initialize real values to 0.0.

This patch explicitly initializes real values to 0.0. Not doing
this was creating an intermittent time zero value problem.
This commit is contained in:
Cary R 2008-02-15 14:10:53 -08:00 committed by Stephen Williams
parent f9bf502324
commit e7ea90c812
3 changed files with 4 additions and 0 deletions

View File

@ -781,6 +781,8 @@ void vvp_shiftr::recv_vec4(vvp_net_ptr_t ptr, const vvp_vector4_t&bit)
vvp_arith_real_::vvp_arith_real_()
{
op_a_ = 0.0;
op_b_ = 0.0;
}
void vvp_arith_real_::dispatch_operand_(vvp_net_ptr_t ptr, double bit)

View File

@ -131,6 +131,7 @@ vvp_fun_delay::vvp_fun_delay(vvp_net_t*n, vvp_bit4_t init, const vvp_delay_t&d)
: net_(n), delay_(d), cur_vec4_(1)
{
cur_vec4_.set_bit(0, init);
cur_real_ = 0.0;
list_ = 0;
initial_ = true;
}

View File

@ -1964,6 +1964,7 @@ vvp_scalar_t vvp_fun_signal8::scalar_value(unsigned idx) const
vvp_fun_signal_real::vvp_fun_signal_real()
{
bits_ = 0.0;
}
double vvp_fun_signal_real::real_value() const