vlog95: Add SV queue specific error message and code generation.
This commit is contained in:
parent
e5f49baaac
commit
4fb91ec7c7
|
|
@ -855,9 +855,11 @@ static void emit_expr_select(ivl_scope_t scope, ivl_expr_t expr, unsigned wid)
|
||||||
ivl_expr_t sig_expr = ivl_expr_oper1(expr);
|
ivl_expr_t sig_expr = ivl_expr_oper1(expr);
|
||||||
ivl_select_type_t sel_type = ivl_expr_sel_type(expr);
|
ivl_select_type_t sel_type = ivl_expr_sel_type(expr);
|
||||||
(void)wid; /* Parameter is not used. */
|
(void)wid; /* Parameter is not used. */
|
||||||
/* If this is a dynamic array select, translate it differently. */
|
/* If this is a dynamic array or queue select, translate the
|
||||||
|
* select differently. */
|
||||||
if ((ivl_expr_type(sig_expr) == IVL_EX_SIGNAL) &&
|
if ((ivl_expr_type(sig_expr) == IVL_EX_SIGNAL) &&
|
||||||
(ivl_signal_data_type(ivl_expr_signal(sig_expr)) == IVL_VT_DARRAY)) {
|
((ivl_signal_data_type(ivl_expr_signal(sig_expr)) == IVL_VT_DARRAY) ||
|
||||||
|
(ivl_signal_data_type(ivl_expr_signal(sig_expr)) == IVL_VT_QUEUE))) {
|
||||||
assert(sel_expr);
|
assert(sel_expr);
|
||||||
emit_select_name(scope, sig_expr);
|
emit_select_name(scope, sig_expr);
|
||||||
fprintf(vlog_out, "[");
|
fprintf(vlog_out, "[");
|
||||||
|
|
|
||||||
|
|
@ -2127,6 +2127,7 @@ void dump_nexus_information(ivl_scope_t scope, ivl_nexus_t nex)
|
||||||
case IVL_VT_STRING: fprintf(stderr, " string"); break;
|
case IVL_VT_STRING: fprintf(stderr, " string"); break;
|
||||||
case IVL_VT_DARRAY: fprintf(stderr, " dynamic array");
|
case IVL_VT_DARRAY: fprintf(stderr, " dynamic array");
|
||||||
case IVL_VT_CLASS: fprintf(stderr, " class");
|
case IVL_VT_CLASS: fprintf(stderr, " class");
|
||||||
|
case IVL_VT_QUEUE: fprintf(stderr, " queue");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (ivl_signal_signed(sig)) fprintf(stderr, " <signed>");
|
if (ivl_signal_signed(sig)) fprintf(stderr, " <signed>");
|
||||||
|
|
|
||||||
|
|
@ -125,6 +125,14 @@ static void emit_var_def(ivl_signal_t sig)
|
||||||
ivl_signal_file(sig),
|
ivl_signal_file(sig),
|
||||||
ivl_signal_lineno(sig), ivl_signal_basename(sig));
|
ivl_signal_lineno(sig), ivl_signal_basename(sig));
|
||||||
vlog_errors += 1;
|
vlog_errors += 1;
|
||||||
|
} else if (ivl_signal_data_type(sig) == IVL_VT_QUEUE) {
|
||||||
|
fprintf(vlog_out, "<queue> ");
|
||||||
|
emit_sig_id(sig);
|
||||||
|
fprintf(stderr, "%s:%u: vlog95 error: SystemVerilog queues "
|
||||||
|
"(%s) are not supported.\n",
|
||||||
|
ivl_signal_file(sig),
|
||||||
|
ivl_signal_lineno(sig), ivl_signal_basename(sig));
|
||||||
|
vlog_errors += 1;
|
||||||
} else {
|
} else {
|
||||||
int msb, lsb;
|
int msb, lsb;
|
||||||
get_sig_msb_lsb(sig, &msb, &lsb);
|
get_sig_msb_lsb(sig, &msb, &lsb);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue