# \#function

**URL:** https://verificationacademy.com/forums/tag/function/4319.md

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

---

## [Start\_item and finish\_item](https://verificationacademy.com/forums/t/start-item-and-finish-item/40671)

<div class="topic-metadata">

**Author:** [@basilleaf](https://verificationacademy.com/forums/u/basilleaf)\
**Replies:** 1\
**Last updated:** [July 22, 2022, 1:16pm UTC](https://verificationacademy.com/forums/t/start-item-and-finish-item/40671 "2022-07-22T13:16:36Z")

</div>

Hi, Can start\_item() and finish\_item() be used inside a function?

---

## [Illegal value (14) for ref formal (base). Value must be assignable](https://verificationacademy.com/forums/t/illegal-value-14-for-ref-formal-base-value-must-be-assignable/35508)

<div class="topic-metadata">

**Author:** [@verif\_learner1](https://verificationacademy.com/forums/u/verif_learner1)\
**Replies:** 1\
**Last updated:** [December 24, 2018, 5:39pm UTC](https://verificationacademy.com/forums/t/illegal-value-14-for-ref-formal-base-value-must-be-assignable/35508 "2018-12-24T17:39:46Z")

</div>

I am getting the above compile time error where call to function is made. The function and caller code looks like below: function init\_array (ref int arr\[\], int base, int count); arr = new \[count\]; for (int i…

---

## [Functions with return and output arguments](https://verificationacademy.com/forums/t/functions-with-return-and-output-arguments/35030)

<div class="topic-metadata">

**Author:** [@shatrish](https://verificationacademy.com/forums/u/shatrish)\
**Replies:** 1\
**Last updated:** [September 13, 2018, 3:45pm UTC](https://verificationacademy.com/forums/t/functions-with-return-and-output-arguments/35030 "2018-09-13T15:45:20Z")

</div>

What is the difference between function with return and function with output parameter? When to use which type? Thanks

---

## [Parameterized functions](https://verificationacademy.com/forums/t/parameterized-functions/34557)

<div class="topic-metadata">

**Author:** [@verif\_learner1](https://verificationacademy.com/forums/u/verif_learner1)\
**Replies:** 1\
**Last updated:** [June 11, 2018, 3:14am UTC](https://verificationacademy.com/forums/t/parameterized-functions/34557 "2018-06-11T03:14:27Z")

</div>

I would like to know if functions can be parametrized. For example, I would like to write a function to calculate parity of a vector. The vector input can be 32/64/128/256 bits. Hence I would like to have a parameter t…

---

## [Partial override of a class](https://verificationacademy.com/forums/t/partial-override-of-a-class/33625)

<div class="topic-metadata">

**Author:** [@Peak25500](https://verificationacademy.com/forums/u/Peak25500)\
**Replies:** 4\
**Last updated:** [October 23, 2017, 8:57am UTC](https://verificationacademy.com/forums/t/partial-override-of-a-class/33625 "2017-10-23T08:57:38Z")

</div>

Hi guys, Here is my problem: I have a class BaseClass that I extend to DerivedClass. In BaseClass, I have three function that are A, B and C. Function A calls B which itself calls C. In DerivedClass I have overriden …

---

## [General type input of function](https://verificationacademy.com/forums/t/general-type-input-of-function/32585)

<div class="topic-metadata">

**Author:** [@saritr](https://verificationacademy.com/forums/u/saritr)\
**Replies:** 2\
**Last updated:** [November 27, 2016, 2:43pm UTC](https://verificationacademy.com/forums/t/general-type-input-of-function/32585 "2016-11-27T14:43:19Z")

</div>

I have the following code in my test\_base: class test\_base extends uvm\_test; //factory registration \`uvm\_component\_utils(test\_base) //internal decleration girobo2\_env grb\_env\_i; //configuration obj…

---

## [Can I add Delay in System Verilog function?](https://verificationacademy.com/forums/t/can-i-add-delay-in-system-verilog-function/32173)

<div class="topic-metadata">

**Author:** [@milinraijada](https://verificationacademy.com/forums/u/milinraijada)\
**Replies:** 6\
**Last updated:** [August 21, 2016, 12:16pm UTC](https://verificationacademy.com/forums/t/can-i-add-delay-in-system-verilog-function/32173 "2016-08-21T12:16:12Z")

</div>

Hi All, I have seen somewhere like this function abc fork #100 $display(“System Verilog”); join\_none so is it allowed to have delay and why ? and another question from where can I get such information about System …

---

## [Exact difference between $cast as a task and function](https://verificationacademy.com/forums/t/exact-difference-between-cast-as-a-task-and-function/31392)

<div class="topic-metadata">

**Author:** [@BPlus](https://verificationacademy.com/forums/u/BPlus)\
**Replies:** 4\
**Last updated:** [January 11, 2016, 7:00am UTC](https://verificationacademy.com/forums/t/exact-difference-between-cast-as-a-task-and-function/31392 "2016-01-11T07:00:44Z")

</div>

While using $cast in our code, how do we call it as a task or a function precisely? I did not get it clearly from LRM. Can anyone give a clear working example of how should it be used as a task/function? Thanks in adv…

---

## [Mailbox get/put inside a function is illegal in system verilog?](https://verificationacademy.com/forums/t/mailbox-get-put-inside-a-function-is-illegal-in-system-verilog/28996)

<div class="topic-metadata">

**Author:** [@ruchi\_puri2001](https://verificationacademy.com/forums/u/ruchi_puri2001)\
**Replies:** 1\
**Last updated:** [December 10, 2013, 5:46am UTC](https://verificationacademy.com/forums/t/mailbox-get-put-inside-a-function-is-illegal-in-system-verilog/28996 "2013-12-10T05:46:05Z")

</div>

Hi Wanted to confirm – 1.Can we use mailbox.get or mailbox.put inside function. virtual function BitChk\_status\_e putDrvData (string name, int data); if (bcDrvPoints.exists(name)) begin bcDrvPoints\[name\].dp.mailbox.p…
