# \#packed-array-and-queues

**URL:** https://verificationacademy.com/forums/tag/packed-array-and-queues/6607.md

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

---

## [How to declare queue fo queue, each queue is struct element](https://verificationacademy.com/forums/t/how-to-declare-queue-fo-queue-each-queue-is-struct-element/42409)

<div class="topic-metadata">

**Author:** [@aneesh2010](https://verificationacademy.com/forums/u/aneesh2010)\
**Replies:** 1\
**Last updated:** [September 16, 2023, 3:35am UTC](https://verificationacademy.com/forums/t/how-to-declare-queue-fo-queue-each-queue-is-struct-element/42409 "2023-09-16T03:35:31Z")

</div>

Hi sir, Looking for help with SV for Queue of Queue syntax, the below code is giving compile err. any help from anyone sir ? typedef struct { int num; string flag; bit pass; } gen\_pk; gen…

---

## [How do I declare a queue such that it's index begins from 1 and not zero?](https://verificationacademy.com/forums/t/how-do-i-declare-a-queue-such-that-its-index-begins-from-1-and-not-zero/40281)

<div class="topic-metadata">

**Author:** [@ShashankGurijala](https://verificationacademy.com/forums/u/ShashankGurijala)\
**Replies:** 1\
**Last updated:** [April 16, 2022, 5:25pm UTC](https://verificationacademy.com/forums/t/how-do-i-declare-a-queue-such-that-its-index-begins-from-1-and-not-zero/40281 "2022-04-16T17:25:27Z")

</div>

See the program I’ve tried below: module built\_in\_functions\_manual; int insert\_queue \[$\]; int i; int insert\_element; int insert\_location; initial begin insert\_queue='{4,8,98,12,34,56,76,50,90,11}; $display("\\…

---

## [Storing data based on address](https://verificationacademy.com/forums/t/storing-data-based-on-address/39794)

<div class="topic-metadata">

**Author:** [@m\_r\_m](https://verificationacademy.com/forums/u/m_r_m)\
**Replies:** 2\
**Last updated:** [November 7, 2021, 6:06pm UTC](https://verificationacademy.com/forums/t/storing-data-based-on-address/39794 "2021-11-07T18:06:06Z")

</div>

module st\_data; // wanted to store data based on the addresses typedef struct {bit \[5:0\] dst\_addr; bit \[57:0\] o\_data;} outdata; typedef struct {bit \[5:0\] src\_addr; bit \[57:0\] i\_data;} indata; outdata out\_data\_q…

---

## [Constraints to pick an element from queue](https://verificationacademy.com/forums/t/constraints-to-pick-an-element-from-queue/36586)

<div class="topic-metadata">

**Author:** [@sandman](https://verificationacademy.com/forums/u/sandman)\
**Replies:** 1\
**Last updated:** [September 24, 2019, 6:20pm UTC](https://verificationacademy.com/forums/t/constraints-to-pick-an-element-from-queue/36586 "2019-09-24T18:20:31Z")

</div>

I have a static Queue in a class, and the elements of the queue are set by some module using the class name. I am getting constraint failure when I try to pick an element from the queue. Code - class seq\_item; st…

---

## [How to sort only the first k elements of an array using sort method?](https://verificationacademy.com/forums/t/how-to-sort-only-the-first-k-elements-of-an-array-using-sort-method/35370)

<div class="topic-metadata">

**Author:** [@ManojJ](https://verificationacademy.com/forums/u/ManojJ)\
**Replies:** 4\
**Last updated:** [November 24, 2018, 9:18am UTC](https://verificationacademy.com/forums/t/how-to-sort-only-the-first-k-elements-of-an-array-using-sort-method/35370 "2018-11-24T09:18:28Z")

</div>

How to sort only the first k elemets of array using sort method?

---

## [Overriding queue with packed array, but why the queue is holding the elements in reverse order?](https://verificationacademy.com/forums/t/overriding-queue-with-packed-array-but-why-the-queue-is-holding-the-elements-in-reverse-order/34956)

<div class="topic-metadata">

**Author:** [@Somu](https://verificationacademy.com/forums/u/Somu)\
**Replies:** 1\
**Last updated:** [August 30, 2018, 2:18pm UTC](https://verificationacademy.com/forums/t/overriding-queue-with-packed-array-but-why-the-queue-is-holding-the-elements-in-reverse-order/34956 "2018-08-30T14:18:05Z")

</div>

Hi, I am trying to override queue with my packed array, but queue is holding the elements of packed array in reverse order. In the below function i am trying to override adec\_array, with packed array ‘row’, but adec\_ar…
