Add support for virtual reg arrays to tgt-stub

This patch adds support for virtualized register arrays to the
tgt-stub back end.

Based Cary's patch, but with a slightly different style.
Both work fine.
This commit is contained in:
Larry Doolittle 2009-03-23 19:02:45 -07:00 committed by Stephen Williams
parent 4205752bb0
commit 2a53255445
2 changed files with 11 additions and 4 deletions

View File

@ -1897,7 +1897,8 @@ extern "C" ivl_nexus_t ivl_signal_nex(ivl_signal_t net, unsigned word)
if (net->pins) {
return net->pins[word];
} else {
cerr << "AACK! ivl_signal_nex() returning NULL" << endl;
// net->pins can be NULL for a virtualized reg array.
assert(net->type_ == IVL_SIT_REG);
return NULL;
}
} else {

View File

@ -1272,15 +1272,21 @@ static void show_signal(ivl_signal_t net)
ivl_nexus_t nex = ivl_signal_nex(net, idx);
fprintf(out, " %s %s %s%s[%d:%d] %s[word=%u, adr=%d] <width=%u%s> <discipline=%s> nexus=%p\n",
fprintf(out, " %s %s %s%s[%d:%d] %s[word=%u, adr=%d] "
"<width=%u%s> <discipline=%s> ",
type, sign, port, data_type,
ivl_signal_msb(net), ivl_signal_lsb(net),
ivl_signal_basename(net),
idx, ivl_signal_array_base(net)+idx,
ivl_signal_width(net),
ivl_signal_local(net)? ", local":"",
discipline_txt,
nex);
discipline_txt);
if (nex == NULL) {
fprintf(out, "nexus=<virtual>\n");
continue;
} else {
fprintf(out, "nexus=%p\n", nex);
}
show_nexus_details(net, nex);
}