Minor cleanup.

Minor cleanup of some commented out code, and some minor simplification
of the subarray code.
This commit is contained in:
Stephen Williams 2007-12-08 21:10:58 -08:00
parent 088b4e2fb8
commit 0fbdcbeb02
2 changed files with 4 additions and 13 deletions

View File

@ -1862,14 +1862,7 @@ static struct vector_info draw_select_signal(ivl_expr_t sube,
use_word = get_number_immediate(ix);
}
#if 0
shiv = draw_eval_expr(bit_idx, STUFF_OK_XZ|STUFF_OK_RO);
fprintf(vvp_out, " %%ix/get 0, %u, %u;\n", shiv.base, shiv.wid);
if (shiv.base >= 8)
clr_vector(shiv);
#else
draw_eval_expr_into_integer(bit_idx, 0);
#endif
/* Try the special case that the base is 0 and the width
exactly matches the signal. Just load the signal in one

View File

@ -357,10 +357,9 @@ unsigned long* vvp_vector4_t::subarray(unsigned adr, unsigned wid) const
tmp >>= 2UL * off;
// Test for X bits but not beyond the desired wid.
unsigned long xmask = WORD_X_BITS;
if (wid < (BITS_PER_WORD-off))
xmask &= ~(-1UL << 2*wid);
if (tmp & xmask)
tmp &= ~(-1UL << 2*wid);
if (tmp & WORD_X_BITS)
goto x_out;
// Where in the target array to write the next bit.
@ -376,10 +375,9 @@ unsigned long* vvp_vector4_t::subarray(unsigned adr, unsigned wid) const
tmp = bits_ptr_[adr/BITS_PER_WORD];
// If this is the last word, then only test
// for X in the valid bits.
xmask = WORD_X_BITS;
if ((wid-idx) < BITS_PER_WORD)
xmask &= ~(WORD_Z_BITS<<2*(wid-idx));
if (tmp & xmask)
tmp &= ~(WORD_Z_BITS<<2*(wid-idx));
if (tmp & WORD_X_BITS)
goto x_out;
adr_bit = 0;
}