shaiko
Advanced Member level 5
Hello,
Consider the following VHDL signals:
From the compiler's point of view:
1. The width of x * y is expected to be x'length + y'length. This makes sense as the highest achievable number is : 1111 1110 0000 0001 (16 bits wide).
2. The width of x + y is expected however to be 8 bits long - and I don't understand why. Clearly, the highest achievable number is 1 1111 1110 (9 bits wide).
Why?
Consider the following VHDL signals:
Code:
signal x : unsigned ( 7 downto 0 ) ;
signal y : unsigned ( 7 downto 0 ) ;
From the compiler's point of view:
1. The width of x * y is expected to be x'length + y'length. This makes sense as the highest achievable number is : 1111 1110 0000 0001 (16 bits wide).
2. The width of x + y is expected however to be 8 bits long - and I don't understand why. Clearly, the highest achievable number is 1 1111 1110 (9 bits wide).
Why?