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

View File

@ -282,7 +282,7 @@ static PLI_INT32 sys_readmem_calltf(PLI_BYTE8*name)
}
}
item = vpi_handle_by_index(mitem,0);
item = vpi_handle_by_index(mitem,min_addr);
wwid = vpi_get(vpiSize, item);
/* variable that will be uses by the lexer to pass values

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()) {