In reply to chr_sue:
Taking it as a parameter is fine but the value of crc_bits is dependent on the sequence_item. So if in a single testcase I want to send different data length formats which uses their respective CRCs then I won’t be able to change the crc_bits again and again.
crc_bits calculation is done something like this as follows:
crc_bits = (req.mode==1) ? ((req.data_length <= 16) ? 17 : 21):15;
And CRC polynomial is based on the crc_bits. After this assignment I’m passing these two values as argument to the CRC generator function