Forum Discussion
Altera_Forum
Honored Contributor
9 years agoPresumed you are using numeric_std library, the both errors can be fixed by writing:
shift_p <= shift_left(shift_p,1);
-- or
shift_p <= resize(2*shift_left,MEM_WIDTH);
wr <= resize(curr_depth_bufbuf, MEM_WIDTH); In the first case, you have the problem, that the bit width of unsigned multiply increases the bit width. Resize cuts the additional bits on the left, necessary to assign the result to signal with fixed bit width. Similarly curr_depth_bufbuf must be zero filled on the left, resize can also do it. There are many other ways to achieve the same.