Illegal range in part select

In reply to zz8318:

Variable slicing is not allowed in sv bit locations have to be constant. Of you explain what you are planning to achieve maybe we could give a fix.

If you are just planning to compare exp_data with data you do not need to slice it. Anyway woth regards of register access usually fields are compared eachother so it might depend on the result you are trying to get.

Do you wanna compare fields? Do you wanna compare just random bits? Regards