D
-DeeT
Guest
If you take a slice of a signed vector which doesn't include the sign
bit, is that slice considered to be signed or unsigned? Here's an
illustration:
signal v : signed(7 downto 0);
alias a is v(3 downto 0);
variable i : integer;
i := to_integer(a);
In the above scenario, what is the range of possible values for 'i'?
Is it 0 to 15, or -8 to +7?
I ask because a compiler upgrade broke some of my code, by changing
this behavior (which admittedly I shouldn't have counted on either
way!).
Thanks in advance for your thoughts...
-DT
bit, is that slice considered to be signed or unsigned? Here's an
illustration:
signal v : signed(7 downto 0);
alias a is v(3 downto 0);
variable i : integer;
i := to_integer(a);
In the above scenario, what is the range of possible values for 'i'?
Is it 0 to 15, or -8 to +7?
I ask because a compiler upgrade broke some of my code, by changing
this behavior (which admittedly I shouldn't have counted on either
way!).
Thanks in advance for your thoughts...
-DT