[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
gEDA: Re: Bug with function in continous assignment.
al.provist@free.fr said:
> I have a problem with the new version of Icarus Verilog; when I use a
> function in a continous assignment, I have an error message of vvp:
> 'unresolved code label'.
Appears to be a case of messed up buffers. Function functor labels
didn't get the new label calculation treatment. Found a similar bug
in a few other places. The attached patch should apply to the 20030308
snapshot and do the trick for you. I've checked it in.
--
Steve Williams "The woods are lovely, dark and deep.
steve at icarus.com But I have promises to keep,
steve at picturel.com and lines to code before I sleep,
http://www.picturel.com And lines to code before I sleep."
Index: tgt-vvp/vvp_scope.c
===================================================================
RCS file: /home/u/icarus/steve/CVS/verilog/tgt-vvp/vvp_scope.c,v
retrieving revision 1.89
diff -c -r1.89 vvp_scope.c
*** tgt-vvp/vvp_scope.c 10 Mar 2003 23:40:54 -0000 1.89
--- tgt-vvp/vvp_scope.c 13 Mar 2003 05:59:08 -0000
***************
*** 359,367 ****
case IVL_LPM_UFUNC:
for (idx = 0 ; idx < ivl_lpm_width(lpm) ; idx += 1)
if (ivl_lpm_q(lpm, idx) == nex) {
! sprintf(result, "L_%s.%s[%u]",
! vvp_mangle_id(ivl_scope_name(ivl_lpm_scope(lpm))),
! vvp_mangle_id(ivl_lpm_basename(lpm)), idx);
return result;
}
--- 359,365 ----
case IVL_LPM_UFUNC:
for (idx = 0 ; idx < ivl_lpm_width(lpm) ; idx += 1)
if (ivl_lpm_q(lpm, idx) == nex) {
! sprintf(result, "L_%p[%u]", lpm, idx);
return result;
}
***************
*** 1037,1054 ****
ivl_nexus_t pin;
if (clk) {
! fprintf(vvp_out,
! "CLK_%s.%s .event posedge, ",
! vvp_mangle_id(ivl_scope_name(ivl_lpm_scope(net))),
! vvp_mangle_id(ivl_lpm_basename(net)));
draw_input_from_net(clk);
fprintf(vvp_out, ";\n");
}
! fprintf(vvp_out,
! "L_%s.%s .mem/port",
! vvp_mangle_id(ivl_scope_name(ivl_lpm_scope(net))),
! vvp_mangle_id(ivl_lpm_basename(net)));
fprintf(vvp_out,
" M_%s, %d,0, %d,\n ",
vvp_memory_label(mem),
--- 1035,1046 ----
ivl_nexus_t pin;
if (clk) {
! fprintf(vvp_out, "CLK_%p .event posedge, ", net);
draw_input_from_net(clk);
fprintf(vvp_out, ";\n");
}
! fprintf(vvp_out, "L_%p .mem/port", net);
fprintf(vvp_out,
" M_%s, %d,0, %d,\n ",
vvp_memory_label(mem),
***************
*** 1062,1070 ****
}
if (clk) {
! fprintf(vvp_out, ",\n CLK_%s.%s, ",
! vvp_mangle_id(ivl_scope_name(ivl_lpm_scope(net))),
! vvp_mangle_id(ivl_lpm_basename(net)));
pin = ivl_lpm_enable(net);
if (pin)
draw_input_from_net(pin);
--- 1054,1060 ----
}
if (clk) {
! fprintf(vvp_out, ",\n CLK_%p, ", net);
pin = ivl_lpm_enable(net);
if (pin)
draw_input_from_net(pin);
***************
*** 1132,1140 ****
assert(0);
}
! fprintf(vvp_out, "L_%s.%s .arith/%s %u",
! vvp_mangle_id(ivl_scope_name(ivl_lpm_scope(net))),
! vvp_mangle_id(ivl_lpm_basename(net)), type, width);
draw_lpm_arith_a_b_inputs(net);
--- 1122,1128 ----
assert(0);
}
! fprintf(vvp_out, "L_%p .arith/%s %u", net, type, width);
draw_lpm_arith_a_b_inputs(net);
***************
*** 1393,1405 ****
selwid = width;
if (ivl_lpm_type(net) == IVL_LPM_SHIFTR)
! fprintf(vvp_out, "L_%s.%s .shift/r %u",
! vvp_mangle_id(ivl_scope_name(ivl_lpm_scope(net))),
! vvp_mangle_id(ivl_lpm_basename(net)), width);
else
! fprintf(vvp_out, "L_%s.%s .shift/l %u",
! vvp_mangle_id(ivl_scope_name(ivl_lpm_scope(net))),
! vvp_mangle_id(ivl_lpm_basename(net)), width);
for (idx = 0 ; idx < width ; idx += 1) {
fprintf(vvp_out, ", ");
--- 1381,1389 ----
selwid = width;
if (ivl_lpm_type(net) == IVL_LPM_SHIFTR)
! fprintf(vvp_out, "L_%p .shift/r %u", net, width);
else
! fprintf(vvp_out, "L_%p .shift/l %u", net, width);
for (idx = 0 ; idx < width ; idx += 1) {
fprintf(vvp_out, ", ");
***************
*** 1424,1432 ****
char comma;
ivl_scope_t def = ivl_lpm_define(net);
! fprintf(vvp_out, "L_%s.%s .ufunc TD_%s, %u",
! vvp_mangle_id(ivl_scope_name(ivl_lpm_scope(net))),
! vvp_mangle_id(ivl_lpm_basename(net)),
ivl_scope_name(def),
ivl_lpm_width(net));
--- 1408,1414 ----
char comma;
ivl_scope_t def = ivl_lpm_define(net);
! fprintf(vvp_out, "L_%p .ufunc TD_%s, %u", net,
ivl_scope_name(def),
ivl_lpm_width(net));