[How to] Assign integer value to unpacked array slice

In reply to Fipser@VA:

Your problem is here

tcode_tx[7:2] == '{tc_counter};

On the LHS you have 6 entries and on the RHS you have only 1 entry.