# \#packed-array

**URL:** https://verificationacademy.com/forums/tag/packed-array/5611.md

[Latest](https://verificationacademy.com/forums/latest.md) · [Categories](https://verificationacademy.com/forums/categories.md) · [Tags](https://verificationacademy.com/forums/tags.md)

---

## [Packed vs unpacked array](https://verificationacademy.com/forums/t/packed-vs-unpacked-array/35463)

<div class="topic-metadata">

**Author:** [@verif\_learner1](https://verificationacademy.com/forums/u/verif_learner1)\
**Replies:** 3\
**Last updated:** [December 14, 2018, 6:44pm UTC](https://verificationacademy.com/forums/t/packed-vs-unpacked-array/35463 "2018-12-14T18:44:39Z")

</div>

Pardon me if this is a repeated or question is very basic. I would like to know when to prefer packed over unpacked array or vice versa.

---

## [Cannot mix packed and unpacked types in this operation](https://verificationacademy.com/forums/t/cannot-mix-packed-and-unpacked-types-in-this-operation/32995)

<div class="topic-metadata">

**Author:** [@alessandro](https://verificationacademy.com/forums/u/alessandro)\
**Replies:** 3\
**Last updated:** [March 24, 2017, 4:32pm UTC](https://verificationacademy.com/forums/t/cannot-mix-packed-and-unpacked-types-in-this-operation/32995 "2017-03-24T16:32:01Z")

</div>

I have the below code and the assignment is giving me “Cannot mix packed and unpacked types in this operation” as an error. What options do I have to get this to work? interface my\_interface #( parameter int un…

---

## [Variable slicing of a fixed size packed array in systemverilog](https://verificationacademy.com/forums/t/variable-slicing-of-a-fixed-size-packed-array-in-systemverilog/31858)

<div class="topic-metadata">

**Author:** [@aditgupta100](https://verificationacademy.com/forums/u/aditgupta100)\
**Replies:** 8\
**Last updated:** [May 27, 2016, 1:23pm UTC](https://verificationacademy.com/forums/t/variable-slicing-of-a-fixed-size-packed-array-in-systemverilog/31858 "2016-05-27T13:23:03Z")

</div>

I’m doing something like this in SV but it gives me error. \`define s 8 int array\[31:0\]; int size =\`s; int queue\[$\]; task t(); for(int i=31;i\>=0;i-=size ) queue.push\_back(array\[i-:size\]); //This doesn't wor…

---

## [Function for packed arrays](https://verificationacademy.com/forums/t/function-for-packed-arrays/31687)

<div class="topic-metadata">

**Author:** [@sarab](https://verificationacademy.com/forums/u/sarab)\
**Replies:** 1\
**Last updated:** [April 7, 2016, 3:00pm UTC](https://verificationacademy.com/forums/t/function-for-packed-arrays/31687 "2016-04-07T15:00:44Z")

</div>

Do we have any function that tells us the size of the packed array or the msb / lsb value ? for example if I have logic \[10:20\] a \[7:0\] ; then I have the function size or high or low that will give me the result 8,7,0…
