Fix propagation of unforced bits when forcing a part select.
vvp_net_t::force_vec4 propagates all bits of the forced value passed to it, regardless of the mask value. I can't see any way to fix this directly, so instead make sure anything that calls force_vec4 sets the unforced bits of the passed value to the correct value.
This commit is contained in:
parent
44dfc41004
commit
dad223316e
|
|
@ -2859,6 +2859,14 @@ bool of_FORCE_VEC4_OFF(vthread_t thr, vvp_code_t cp)
|
|||
mask.set_bit(base+idx, 1);
|
||||
|
||||
vvp_vector4_t tmp (use_size, BIT4_Z);
|
||||
|
||||
// vvp_net_t::force_vec4 propagates all the bits of the
|
||||
// forced vector value, regardless of the mask. This
|
||||
// ensures the unforced bits retain their current value.
|
||||
vvp_signal_value*sig = dynamic_cast<vvp_signal_value*>(net->fil);
|
||||
assert(sig);
|
||||
sig->vec4_value(tmp);
|
||||
|
||||
tmp.set_vec(base, value);
|
||||
|
||||
net->force_vec4(tmp, mask);
|
||||
|
|
|
|||
Loading…
Reference in New Issue