Fix memory word offset errors

Fix handling writing to a word part select,
Fix readmemb calculations for the word size.
This commit is contained in:
Stephen Williams
2008-05-19 18:05:27 -07:00
parent 96ec4b7eba
commit 3189efacbc
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -401,7 +401,7 @@ void array_set_word(vvp_array_t arr,
if (arr->vals) {
assert(arr->nets == 0);
if (part_off != 0) {
if (part_off != 0 || val.size() != arr->vals_width) {
if (arr->vals[address].size() == 0)
arr->vals[address] = vvp_vector4_t(arr->vals_width, BIT4_X);
if ((part_off + val.size()) > arr->vals[address].size()) {