[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[pci] Icarus showing more problemetic code



Hallo,

this is the answer of Stephen Williams  about a question for the code in
wb_bus_mon.v:332: 
address <= {1'b1, (ADDR_O + `WB_SEL_WIDTH)} ;
>  results in wb_bus_mon.v:332: error: operand of concatenation has indefinite
>  width: (ADDR_O[31:0])+('sd4)
>
> Yes, this is an error in your code. This should be a FAQ, but it is
> certainly described in the ieee1364-notes.txt file that comes with
> Icarus Verilog distributions.
> 
> You get away with it with most compilers, because most "XL bug
> compatible" compilers expand unsized expressions to 32 bits inside
> concatenations, but the expression is already 32bits wide. Icarus
> Verilog does not use or enforce a 32bit restriction on unsized
> values, so does report this error.
> 
> Just be glad you're getting an error message instead of a chip that
> loses high bits with no warning:-)

Probably a wraparound is supposed to happen. Should I submit a patch?

Bye
-- 
Uwe Bonnes                bon@elektron.ikp.physik.tu-darmstadt.de

Institut fuer Kernphysik  Schlossgartenstrasse 9  64289 Darmstadt
--------- Tel. 06151 162516 -------- Fax. 06151 164321 ----------
--
To unsubscribe from pci mailing list please visit http://www.opencores.org/mailinglists.shtml