If selection logic inside module is hitting unknown or bad value

In reply to dave_59:

As per OP’s code, “misalign_ln0_data” is assigned in procedural block. So I assumed that misalign_ln0_data is not a parameter. I agree that misalign_ln0_data should ideally be declared as parameter but that was not something that was shown in the original code (If usage of ternary is to be done then simple variable misalign_ln0_data can also suffice).