Illegal range in part select

In reply to Rsignori92:

everytime when we call this task the shift and width are changed. anyway, I use the original method to make it pass. thanks everyone for your great help