vlog95: Add an error message that SV strings and darrays are not supported

We can not convert SystemVerilog strings or dynamic arrays to valid vlog95.
This patch adds an error message that they are not supported. There are still
issues with converting some of the dynamic array constructs (the compiler
crashes), but the message is printed before the crash.
This commit is contained in:
Cary R 2012-08-06 18:12:05 -07:00
parent 1749d10966
commit 62412700aa
2 changed files with 17 additions and 0 deletions

View File

@ -1851,6 +1851,8 @@ void dump_nexus_information(ivl_scope_t scope, ivl_nexus_t nex)
case IVL_VT_BOOL: fprintf(stderr, " bool"); break;
case IVL_VT_LOGIC: fprintf(stderr, " logic"); break;
case IVL_VT_STRING: fprintf(stderr, " string"); break;
case IVL_VT_DARRAY: fprintf(stderr, " dynamic array");
break;
}
} else {
fprintf(stderr, "Error: No/missing information!");

View File

@ -108,6 +108,21 @@ void emit_var_def(ivl_signal_t sig)
ivl_signal_basename(sig));
vlog_errors += 1;
}
} else if (ivl_signal_data_type(sig) == IVL_VT_STRING) {
fprintf(vlog_out, "string ");
emit_sig_id(sig);
fprintf(stderr, "%s:%u: vlog95 error: SystemVerilog strings (%s) "
"are not supported.\n", ivl_signal_file(sig),
ivl_signal_lineno(sig), ivl_signal_basename(sig));
vlog_errors += 1;
} else if (ivl_signal_data_type(sig) == IVL_VT_DARRAY) {
fprintf(vlog_out, "<dynamic array> ");
emit_sig_id(sig);
fprintf(stderr, "%s:%u: vlog95 error: SystemVerilog dynamic "
"arrays (%s) are not supported.\n",
ivl_signal_file(sig),
ivl_signal_lineno(sig), ivl_signal_basename(sig));
vlog_errors += 1;
} else {
int msb, lsb;
get_sig_msb_lsb(sig, &msb, &lsb);