In reply to dave_59:
Thank you for the advice.
vec_pack = 320’( vec_unpack) ; // note ()'s instead of {}'s
I tried the code but this fails for both VCS(Synopsys) and IES(Cadence) saying that:
(For Cadence, this expression has not yet implemented)
[VCS(2011.03)]
Error-[ICO] Illegal cast operation
tb_cast.sv, 21
Typecast fails because the use of width casting used with unpacked objects:
320’(vec_unpack).
[IES(10.2)]
vec_pack = 320’( vec_unpack);
|
ncvlog: *E,SCNOIN (tb_cast.sv,21|33): As a temporary implementation restriction, the source data type in a static cast must be an integral, real or class data type.
module worklib.tb:sv
errors: 1, warnings: 0
For the bitstream operation, I can run with VCS( but IES does not support this operation!!):
vec_pack = { >> {vec_unpack}};
|
ncvlog: *E,ILLPRI (tb_cast.sv,20|24): illegal expression primary [4.2(IEEE)].
module worklib.tb:sv
errors: 1, warnings: 0
For incorrect indexing in code, thank you for the correction.
I agree with you.
Regards.