Casting from unpacked array to packed array

In reply to tsb_matumoto:

It works in Questa, you should try it. :)

Another thing to try that should work in all simulators is cast to an intermediate packed type.

typedef logic [319:0] logic320_t;
...
vec_pack = logic320_t'(vec_unpack);