--- Quote Start ---
If your number is unsigned to start with, resize should add zeros for the sign-extension bits.
The resize() function should preserve the number in whatever format you pass it.
--- Quote End ---
from
http://standards.ieee.org/downloads/1076/1076.2-1996/numeric_std.vhdl function RESIZE (ARG: SIGNED; NEW_SIZE: NATURAL) return SIGNED;
-- Result subtype: SIGNED(NEW_SIZE-1 downto 0)
-- Result: Resizes the SIGNED vector ARG to the specified size.
-- To create a larger vector, the new [leftmost] bit positions
-- are filled with the sign bit (ARG'LEFT). When truncating,
-- the sign bit is retained along with the rightmost part.
By that, loks like: RESIZE(N(2 downto 0), 5) => N(2)&N(2)&N(2 downto 0)
So, if I opt for UNSIGNED (again) I have all the bits, while if I opt for SIGNED, it will have 1 bit less with the possibility to change all the logic (witch in normal state isnt the case)
also, i just compiled as said and it became weird in RTL:
https://dl.dropboxusercontent.com/u/38797606/Untitled%20%282%29.png and then again, the RTL invents an circuit