[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

gEDA-user: Compilation problem with icarus 0.8.1?



I have the following code snippet that fails compilation under icarus 0.8.1 with this message:

[mark@camelot-007 DT_mark_cosim]$ iverilog junk.v
junk.v:20: error: operand of concatenation has indefinite width: ((('d288)-(+d[4:0]))-((9'b000001000)-(c[2:0])))+({(+m[31:0])-(1'b1), 3'b000})
1 error(s) during elaboration.

It looks like icarus doesn't like the "9'd256 + 9'd32", but I don't think there's anything illegal about it?

module junk;

   integer d, e, m;

   reg [63:0]         a;
   reg [(512*8)-1:0]  b;
   reg [2:0]          c;

   initial begin
      b = 0;
      c = 0;
      d = 0;
      m = 0;
      e = 9'd256 + 9'd32;

      // This one works
      a = b >> {(e - d[4:0] - (9'd8 - c) + {(m - 1'b1),3'o0}),3'o0};

      // This one doesn't
      a = b >> {(9'd256 + 9'd32 - d[4:0] - (9'd8 - c) + {(m - 1'b1),3'o0}),3'o0};

      $display("%m : 0x%h",a);
   end
endmodule