Der Verilog Code:
1 | reg [ 8-1:0] cntr1 ; |
2 | always @(posedge clk_1) begin |
3 | cntr1 <= cntr1 + 1 ; |
4 | end
|
ergibt unter Quartus die Warnung:
1 | Warning (10230): Verilog HDL assignment warning ....: |
2 | truncated value with size 32 to match size of target (8) |
In XILINX-VIVADO und IcarusVerilog bekomme ich diese Warnung nicht. Schreibe ich
1 | cntr1 <= cntr1 + 1'b1 ; |
Verschwindet die Warnung. Anscheinend geht Quartus davon aus, dass "1" ein 32-Bit Wert ist. Warum ?