Hi,
I am not familiar with Matlab bitshift but had a quick look at it. It only accepts unsigned integer values. Therefore I suggest you got one more task; you need to convert negative values to equivalent unsigned then reverse that as follows(however, since your function bitshift did not crash on negative values, may be it sees values as unsigned already...I don't how)
for bitshift input: for n bits signed decimal
if value is < 0 %negative
value = value + 2^n;
end
for bitshift output:to recover negative values:
if value >2^(n-1)
value = value -2^n;
end
I can see how Matlab/DSP builder is making life so hard, you better do the shift by hand(in vhdl code)
kaz