# Printing the whole Queue with $monitor

**URL:** <https://verificationacademy.com/forums/t/printing-the-whole-queue-with-monitor/32272>\
**Category:** SystemVerilog\
**Tags:** monitor, SystemVerilog, queue\
**Created:** [September 16, 2016, 9:34am UTC](https://verificationacademy.com/forums/t/printing-the-whole-queue-with-monitor/32272 "2016-09-16T09:34:13Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![jayeshranjan](https://verificationacademy.com/forums/letter_avatar_proxy/v4/letter/j/85e7bf/32.png) [@jayeshranjan](https://verificationacademy.com/forums/u/jayeshranjan)\
**Post date:** [September 16, 2016, 9:34am UTC](https://verificationacademy.com/forums/t/printing-the-whole-queue-with-monitor/32272/1 "2016-09-16T09:34:13Z")

</div>

How to Print a whole queue using $monitor?

---

<div class="post-metadata">

**Author:** ![mayurkubavat](https://verificationacademy.com/forums/letter_avatar_proxy/v4/letter/m/a9a28c/32.png) [@mayurkubavat](https://verificationacademy.com/forums/u/mayurkubavat)\
**Post date:** [September 16, 2016, 11:22am UTC](https://verificationacademy.com/forums/t/printing-the-whole-queue-with-monitor/32272/2 "2016-09-16T11:22:36Z")

</div>

_In reply to [jayeshranjan](https://verificationacademy.com/forums/t/printing-the-whole-queue-with-monitor/32272):_

To print complex data structures(e.g. array, class etc.) you can use %p,

```verilog
$monitor("Value is %p", my_queue);

```

---

<div class="post-metadata">

**Author:** ![jayeshranjan](https://verificationacademy.com/forums/letter_avatar_proxy/v4/letter/j/85e7bf/32.png) [@jayeshranjan](https://verificationacademy.com/forums/u/jayeshranjan)\
**Post date:** [September 16, 2016, 1:04pm UTC](https://verificationacademy.com/forums/t/printing-the-whole-queue-with-monitor/32272/3 "2016-09-16T13:04:59Z")

</div>

_In reply to [mayurkubavat](https://verificationacademy.com/forums/t/printing-the-whole-queue-with-monitor/32272/2):_

Actually I have already tried this . But its showing an error as below:

Error-[DTINPCIL] Dynamic type in non-procedural context

testbench.sv, 7  
“$monitor(“Value is %p”, my\_queue);”  
Argument: my\_queue  
Queue may not be used in non-procedural context.

I am also mentioning the the link of edaplayground where i have tied to simulate:

> **[EDA Playground](https://www.edaplayground.com/x/34s6)**
>
> Edit, save, simulate, synthesize SystemVerilog, Verilog, VHDL and other HDLs from your web browser.

---

<div class="post-metadata">

**Author:** ![cgales](https://verificationacademy.com/forums/letter_avatar_proxy/v4/letter/c/ccd318/32.png) [@cgales](https://verificationacademy.com/forums/u/cgales)\
**Post date:** [September 16, 2016, 2:19pm UTC](https://verificationacademy.com/forums/t/printing-the-whole-queue-with-monitor/32272/4 "2016-09-16T14:19:11Z")

</div>

_In reply to [jayeshranjan](https://verificationacademy.com/forums/t/printing-the-whole-queue-with-monitor/32272/3):_

This works fine in Questasim, so it must be a tool related. Please contact your vendor’s support team regarding this issue.

---

<div class="post-metadata">

**Author:** ![jayeshranjan](https://verificationacademy.com/forums/letter_avatar_proxy/v4/letter/j/85e7bf/32.png) [@jayeshranjan](https://verificationacademy.com/forums/u/jayeshranjan)\
**Post date:** [September 19, 2016, 10:35am UTC](https://verificationacademy.com/forums/t/printing-the-whole-queue-with-monitor/32272/5 "2016-09-19T10:35:03Z")

</div>

ok , Thanks cgales
