# Explanation of %p in verilog $display function

**URL:** <https://verificationacademy.com/forums/t/explanation-of-p-in-verilog-display-function/42589>\
**Category:** SystemVerilog\
**Tags:** SystemVerilog, display, Verilog\
**Created:** [October 19, 2023, 9:34am UTC](https://verificationacademy.com/forums/t/explanation-of-p-in-verilog-display-function/42589 "2023-10-19T09:34:51Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Harsha\_vardhan](https://verificationacademy.com/forums/letter_avatar_proxy/v4/letter/h/dbc845/32.png) [@Harsha\_vardhan](https://verificationacademy.com/forums/u/Harsha_vardhan)\
**Post date:** [October 19, 2023, 9:34am UTC](https://verificationacademy.com/forums/t/explanation-of-p-in-verilog-display-function/42589/1 "2023-10-19T09:34:51Z")

</div>

Hi,

Can I know the explanation of %p used in $display in verilog.  
Anyone explain me about this.

Thanks in Advance  
Harsha Vardhan

---

<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:** [October 19, 2023, 10:27am UTC](https://verificationacademy.com/forums/t/explanation-of-p-in-verilog-display-function/42589/2 "2023-10-19T10:27:31Z")

</div>

_In reply to [Harsha vardhan](https://verificationacademy.com/forums/t/explanation-of-p-in-verilog-display-function/42589):_

From the LRM:  
**21.2.1.7 Assignment pattern format**  
The %p format specifier may be used to print aggregate expressions such as unpacked structures, arrays, and unions. For unpacked structure data types, it shall print the value as an assignment pattern with named elements. For unions, only the first declared elements shall be printed. In the case of a tagged union, it shall print “tag:value” along with the currently valid element. For unpacked array data types, it shall print the value as an assignment pattern, which may include the use of index labels. The use of white space is implementation dependent; however the output shall be a legal interpretation of the assignment pattern syntax (see 10.8).
