Add support for getting the size of a real array word.
This patch adds code to get the size of a real array word. We currently define the size if a real to be 1.
This commit is contained in:
parent
85e2bf3e55
commit
337c9e7577
|
|
@ -462,13 +462,20 @@ static int vpi_array_var_word_get(int code, vpiHandle ref)
|
||||||
|
|
||||||
assert(obj);
|
assert(obj);
|
||||||
decode_array_word_pointer(obj, parent);
|
decode_array_word_pointer(obj, parent);
|
||||||
|
assert(parent->nets == 0);
|
||||||
|
|
||||||
switch (code) {
|
switch (code) {
|
||||||
case vpiLineNo:
|
case vpiLineNo:
|
||||||
return 0; // Not implemented for now!
|
return 0; // Not implemented for now!
|
||||||
|
|
||||||
case vpiSize:
|
case vpiSize:
|
||||||
return (int) parent->vals4->width();
|
if (parent->vals4) {
|
||||||
|
assert(parent->valsr == 0);
|
||||||
|
return (int) parent->vals4->width();
|
||||||
|
} else {
|
||||||
|
assert(parent->vals4 == 0);
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
case vpiLeftRange:
|
case vpiLeftRange:
|
||||||
return parent->msb.value;
|
return parent->msb.value;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue