vhdlpp: VTypeArray::evaluate_ranges uses range boundaries to determine the direction.
This commit is contained in:
parent
47c5ce0ab6
commit
356a09d295
|
|
@ -266,12 +266,11 @@ bool VTypeArray::is_variable_length(ScopeBase*scope) const {
|
|||
void VTypeArray::evaluate_ranges(ScopeBase*scope) {
|
||||
for(std::vector<range_t>::iterator it = ranges_.begin(); it != ranges_.end(); ++it ) {
|
||||
int64_t lsb_val = -1, msb_val = -1;
|
||||
bool dir = it->is_downto();
|
||||
|
||||
if(it->msb()->evaluate(scope, msb_val) && it->lsb()->evaluate(scope, lsb_val)) {
|
||||
assert(lsb_val >= 0);
|
||||
assert(msb_val >= 0);
|
||||
*it = range_t(new ExpInteger(msb_val), new ExpInteger(lsb_val), dir);
|
||||
*it = range_t(new ExpInteger(msb_val), new ExpInteger(lsb_val), msb_val > lsb_val);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue