mirror of
https://github.com/steveicarus/iverilog.git
synced 2026-08-22 13:57:18 +02:00
Fix for initial value propagation (part 2).
To ensure the initial propagation of 'x' values at time-0 does not trigger any events, the propagation of these values needs to be completed before any statements that wait on events are executed. vvp has a pre-simulation event queue to handle this, but some functors defeat this by postponing their output propagation using the stratified event queue. This patch fixes this by using the pre-simulation event queue to schedule functor output propagation until initial value propagation is complete.
This commit is contained in:
committed by
Stephen Williams
parent
c9f0d7e28f
commit
2bf704940b
+8
-8
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2001-2009 Stephen Williams ([email protected])
|
||||
* Copyright (c) 2001-2010 Stephen Williams ([email protected])
|
||||
*
|
||||
* This source code is free software; you can redistribute it
|
||||
* and/or modify it in source code form under the terms of the GNU
|
||||
@@ -52,7 +52,7 @@ void vvp_fun_boolean_::recv_vec4(vvp_net_ptr_t ptr, const vvp_vector4_t&bit,
|
||||
input_[port] = bit;
|
||||
if (net_ == 0) {
|
||||
net_ = ptr.ptr();
|
||||
schedule_generic(this, 0, false);
|
||||
schedule_functor(this);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -71,7 +71,7 @@ void vvp_fun_boolean_::recv_vec4_pv(vvp_net_ptr_t ptr, const vvp_vector4_t&bit,
|
||||
input_[port] .set_vec(base, bit);
|
||||
if (net_ == 0) {
|
||||
net_ = ptr.ptr();
|
||||
schedule_generic(this, 0, false);
|
||||
schedule_functor(this);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -138,7 +138,7 @@ void vvp_fun_buf::recv_vec4(vvp_net_ptr_t ptr, const vvp_vector4_t&bit,
|
||||
|
||||
if (net_ == 0) {
|
||||
net_ = ptr.ptr();
|
||||
schedule_generic(this, 0, false);
|
||||
schedule_functor(this);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -229,7 +229,7 @@ void vvp_fun_muxr::recv_vec4(vvp_net_ptr_t ptr, const vvp_vector4_t&bit,
|
||||
|
||||
if (net_ == 0) {
|
||||
net_ = ptr.ptr();
|
||||
schedule_generic(this, 0, false);
|
||||
schedule_functor(this);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -256,7 +256,7 @@ void vvp_fun_muxr::recv_real(vvp_net_ptr_t ptr, double bit,
|
||||
|
||||
if (net_ == 0) {
|
||||
net_ = ptr.ptr();
|
||||
schedule_generic(this, 0, false);
|
||||
schedule_functor(this);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -335,7 +335,7 @@ void vvp_fun_muxz::recv_vec4(vvp_net_ptr_t ptr, const vvp_vector4_t&bit,
|
||||
|
||||
if (net_ == 0) {
|
||||
net_ = ptr.ptr();
|
||||
schedule_generic(this, 0, false);
|
||||
schedule_functor(this);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -405,7 +405,7 @@ void vvp_fun_not::recv_vec4(vvp_net_ptr_t ptr, const vvp_vector4_t&bit,
|
||||
input_ = bit;
|
||||
if (net_ == 0) {
|
||||
net_ = ptr.ptr();
|
||||
schedule_generic(this, 0, false);
|
||||
schedule_functor(this);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user