--- Quote Start ---
Yes, but here it is filling with the resize, so (supposing an fill from 3 bits to 5):
--- Quote End ---
If your number is unsigned to start with, resize should add zeros for the sign-extension bits.
So your example for the unsigned values are no longer correct, i.e.,
Bin(o) resize(U,5) resize(S,5)
100 00100 = 4 11100 = -4
101 00101 = 5 11101 = -3
110 00110 = 6 11110 = -2
111 00111 = 7 11111 = -1
The resize() function should preserve the number in whatever format you pass it.
Play with signed and/or signed numbers in Modelsim and I think you'll figure out what is the appropriate format for your application.
Cheers,
Dave