Produce a better message for ! and real values.
In the transition to the new expression code we forgot how to handle the logical not (!) of a real value. This patch adds a more appropriate error message until we get this reimplemented.
This commit is contained in:
parent
3bce8bb995
commit
6b62cce14a
|
|
@ -871,6 +871,12 @@ NetNet* NetEUReduce::synthesize(Design*des, NetScope*scope)
|
|||
if (isig == 0) return 0;
|
||||
|
||||
if (isig->data_type() == IVL_VT_REAL) {
|
||||
if (op() == '!') {
|
||||
cerr << get_fileline() << ": sorry: ! is currently "
|
||||
"unsupported for real values." << endl;
|
||||
des->errors += 1;
|
||||
return 0;
|
||||
}
|
||||
cerr << get_fileline() << ": error: reduction operator ("
|
||||
<< human_readable_op(op_)
|
||||
<< ") may not have a REAL operand." << endl;
|
||||
|
|
|
|||
|
|
@ -387,6 +387,7 @@ const char *human_readable_op(const char op)
|
|||
case '|': type = "|"; break; // Bitwise OR
|
||||
case 'O': type = "~|"; break; // NOR
|
||||
|
||||
case '!': type = "!"; break; // Logical NOT
|
||||
case 'a': type = "&&"; break; // Logical AND
|
||||
case 'o': type = "||"; break; // Logical OR
|
||||
|
||||
|
|
@ -397,7 +398,8 @@ const char *human_readable_op(const char op)
|
|||
case 'r': type = ">>"; break; // Logical right shift
|
||||
case 'R': type = ">>>"; break; // Arithmetic right shift
|
||||
|
||||
default: assert(0);
|
||||
default:
|
||||
assert(0);
|
||||
}
|
||||
return type;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue