[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: gEDA-user: tb_ethernet.v
cfk@pacbell.net said:
> phy_data = {8'h7D, (i[7:0] + 1)};
cfk@pacbell.net said:
> tb_ethernet.v:2080 error: operand of concatenation has indefinite
> width
See this section in the iverilog ieee1364-notes.txt with your distribution:
* UNSIZED EXPRESSIONS AS PARAMETERS TO CONCATENATION {}
In particular, the expression (i[7:0] + 1) does not do what you
expect, and in fact this is a *bug* in tb_ethernet.v. Change it
to (i[7:0] + 8'd1) and you will be much happier.
Other compilers do not complain about this, but they also don't
generally do what you expect. Some very expensive compilers believe
that the expression {8'h7D, (i[7:0] + 1)} is 40 bits (8 + 32) long,
then truncated to fit into the phys_data l-value.
--
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."