Fix for br937.
When writing a string value, vpi_put_value cannot assume the target vector is a multiple of 8 bits wide.
This commit is contained in:
parent
68db6c5a65
commit
34643d9628
|
|
@ -760,7 +760,7 @@ static vvp_vector4_t from_stringval(const char*str, unsigned wid)
|
|||
unsigned byte = *--cp;
|
||||
int bit;
|
||||
|
||||
for (bit = 0 ; bit < 8 ; bit += 1) {
|
||||
for (bit = 0 ; (bit < 8) && (idx < wid) ; bit += 1) {
|
||||
if (byte & 1)
|
||||
val.set_bit(idx, BIT4_1);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue