From c5bde6560c0eb7267fec21955f078256c43d9ff4 Mon Sep 17 00:00:00 2001 From: steve Date: Mon, 1 Jul 2002 15:36:12 +0000 Subject: [PATCH] Limit word writing to vector limits. --- vvp/vpi_memory.cc | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/vvp/vpi_memory.cc b/vvp/vpi_memory.cc index 07891cbb7..5737bc45f 100644 --- a/vvp/vpi_memory.cc +++ b/vvp/vpi_memory.cc @@ -27,7 +27,7 @@ * Picture Elements, Inc., 777 Panoramic Way, Berkeley, CA 94704. */ #if !defined(WINNT) && !defined(macintosh) -#ident "$Id: vpi_memory.cc,v 1.10 2002/06/30 04:35:47 steve Exp $" +#ident "$Id: vpi_memory.cc,v 1.11 2002/07/01 15:36:12 steve Exp $" #endif # include "vpi_priv.h" @@ -465,7 +465,7 @@ static void memory_word_get_value(vpiHandle ref, s_vpi_value*vp) op->bval |= (1 << idx % 32); break; } - if (idx && !(idx % 32)) { + if (!((idx+1) % 32) && (idx+1 < width)) { op++; op->aval = op->bval = 0; } @@ -536,6 +536,9 @@ vpiHandle vpip_make_memory(vvp_memory_t mem) /* * $Log: vpi_memory.cc,v $ + * Revision 1.11 2002/07/01 15:36:12 steve + * Limit word writing to vector limits. + * * Revision 1.10 2002/06/30 04:35:47 steve * Get vpiVectorVal for memories. *