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:
parent
4fb14523c8
commit
d7b34b53b5
|
|
@ -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 {
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue