ivl: Array querying functions ($left, $low, etc.) for localparams.

This commit is contained in:
Maciej Suminski 2015-06-22 17:50:41 +02:00
parent 5858e1bbac
commit f0fd73e146
1 changed files with 6 additions and 0 deletions

View File

@ -2009,6 +2009,12 @@ static bool check_dimension(const NetExpr*dim_expr, long &dim)
static bool get_array_info(const NetExpr*arg, long dim,
long &left, long &right, bool&defer)
{
if (const NetEConstParam*param = dynamic_cast<const NetEConstParam*>(arg)) {
assert(dim == 1);
left = param->expr_width() - 1;
right = 0;
return false;
}
/* The argument must be a signal that has enough dimensions. */
const NetESignal*esig = dynamic_cast<const NetESignal*>(arg);
if (esig == 0) return true;