vlog95: UDP definitions now use the original port names.
This patch modifies the UDP definition emitting code to use the original port names instead of made up ones.
This commit is contained in:
parent
53abd7a5b2
commit
026fe92a46
|
|
@ -184,23 +184,23 @@ static void emit_udp(ivl_udp_t udp)
|
|||
"file %s at line %u. */\n",
|
||||
ivl_udp_file(udp), ivl_udp_lineno(udp));
|
||||
fprintf(vlog_out, "primitive %s (", ivl_udp_name(udp));
|
||||
// HERE: we need to keep and export the real pin names.
|
||||
fprintf(vlog_out, "out");
|
||||
fprintf(vlog_out, "%s", ivl_udp_port(udp, 0));
|
||||
count = ivl_udp_nin(udp);
|
||||
for (idx = 1; idx <= count; idx += 1) {
|
||||
fprintf(vlog_out, ", in%u", idx);
|
||||
fprintf(vlog_out, ", %s", ivl_udp_port(udp, idx));
|
||||
}
|
||||
fprintf(vlog_out, ");\n");
|
||||
// HERE: we need to keep and export the real pin names.
|
||||
fprintf(vlog_out, "%*coutput out;\n", indent_incr, ' ');
|
||||
fprintf(vlog_out, "%*coutput %s;\n", indent_incr, ' ',
|
||||
ivl_udp_port(udp, 0));
|
||||
for (idx = 1; idx <= count; idx += 1) {
|
||||
fprintf(vlog_out, "%*cinput in%u;\n", indent_incr, ' ', idx);
|
||||
fprintf(vlog_out, "%*cinput %s;\n", indent_incr, ' ',
|
||||
ivl_udp_port(udp, idx));
|
||||
}
|
||||
if (ivl_udp_sequ(udp)) {
|
||||
char init = ivl_udp_init(udp);
|
||||
fprintf(vlog_out, "\n");
|
||||
// HERE: we need to keep and export the real pin names.
|
||||
fprintf(vlog_out, "%*creg out;\n", indent_incr, ' ');
|
||||
fprintf(vlog_out, "%*creg %s;\n", indent_incr, ' ',
|
||||
ivl_udp_port(udp, 0));
|
||||
switch (init) {
|
||||
case '0':
|
||||
case '1':
|
||||
|
|
@ -209,9 +209,8 @@ static void emit_udp(ivl_udp_t udp)
|
|||
init = 'x';
|
||||
break;
|
||||
}
|
||||
// HERE: we need to keep and export the real pin names.
|
||||
fprintf(vlog_out, "%*cinitial out = 1'b%c;\n",
|
||||
indent_incr, ' ', init);
|
||||
fprintf(vlog_out, "%*cinitial %s = 1'b%c;\n",
|
||||
indent_incr, ' ', ivl_udp_port(udp, 0), init);
|
||||
}
|
||||
fprintf(vlog_out, "\n");
|
||||
fprintf(vlog_out, "%*ctable\n", indent_incr, ' ');
|
||||
|
|
|
|||
Loading…
Reference in New Issue