# \#ParameterizedClass

**URL:** https://verificationacademy.com/forums/tag/parameterizedclass/7355.md

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

---

## [Making Testbench Emulation friendly](https://verificationacademy.com/forums/t/making-testbench-emulation-friendly/47674)

<div class="topic-metadata">

**Author:** [@jay.sipani](https://verificationacademy.com/forums/u/jay.sipani)\
**Replies:** 1\
**Last updated:** [June 20, 2024, 6:24pm UTC](https://verificationacademy.com/forums/t/making-testbench-emulation-friendly/47674 "2024-06-20T18:24:50Z")

</div>

Hi, Can I use parameterized UVM classes if I want to have an emulation friendly Testbench? Is emulator (say Veloce) able to process the parameterized classes correctly? If not, can you suggest an alternative to paramete…

---

## [Extending parameterized classes](https://verificationacademy.com/forums/t/extending-parameterized-classes/44710)

<div class="topic-metadata">

**Author:** [@kpdeepak](https://verificationacademy.com/forums/u/kpdeepak)\
**Replies:** 4\
**Last updated:** [January 5, 2024, 5:17pm UTC](https://verificationacademy.com/forums/t/extending-parameterized-classes/44710 "2024-01-05T17:17:43Z")

</div>

Hi All, In the following example, class Trans #(int awidth=8, dwidth=8); string name; function new(string name = ""); this.name = name; endfunction virtual function void display(); $disp…

---

## [Parameterize UVC](https://verificationacademy.com/forums/t/parameterize-uvc/42480)

<div class="topic-metadata">

**Author:** [@Svlearner](https://verificationacademy.com/forums/u/Svlearner)\
**Replies:** 2\
**Last updated:** [October 1, 2023, 5:29pm UTC](https://verificationacademy.com/forums/t/parameterize-uvc/42480 "2023-10-01T17:29:17Z")

</div>

Hi Can anyone share the best approach to develop parameterize UVC ? Example of need can be multiple AHB masters in TB and all are supporting varying address and data width. I read the paper “Deploying Parameterized Int…

---

## [Cast to parameterized variable fails](https://verificationacademy.com/forums/t/cast-to-parameterized-variable-fails/42041)

<div class="topic-metadata">

**Author:** [@emin](https://verificationacademy.com/forums/u/emin)\
**Replies:** 6\
**Last updated:** [August 2, 2023, 7:27pm UTC](https://verificationacademy.com/forums/t/cast-to-parameterized-variable-fails/42041 "2023-08-02T19:27:16Z")

</div>

Below code throws error when simulation is loaded, if right-hand side of cast operation is not given as class type. I would like it to work with types of class or other data types such as struct. When given type is stru…

---

## [How to set parameterized sequcence as default sequence with +uvm\_set\_default\_sequence](https://verificationacademy.com/forums/t/how-to-set-parameterized-sequcence-as-default-sequence-with-uvm-set-default-sequence/42040)

<div class="topic-metadata">

**Author:** [@Jaor](https://verificationacademy.com/forums/u/Jaor)\
**Replies:** 2\
**Last updated:** [July 31, 2023, 3:14pm UTC](https://verificationacademy.com/forums/t/how-to-set-parameterized-sequcence-as-default-sequence-with-uvm-set-default-sequence/42040 "2023-07-31T15:14:39Z")

</div>

I am trying to use +uvm\_set\_default\_sequence to set default sequence to an parameterized sequence, but i didn’t make it. Can anyone please help and show me what went wrong? The sequence is parameterized like below. cl…

---

## [Uvm\_comparer : parametrized classes .compare issue](https://verificationacademy.com/forums/t/uvm-comparer-parametrized-classes-compare-issue/41259)

<div class="topic-metadata">

**Author:** [@lalithjithan](https://verificationacademy.com/forums/u/lalithjithan)\
**Replies:** 2\
**Last updated:** [February 14, 2023, 4:52am UTC](https://verificationacademy.com/forums/t/uvm-comparer-parametrized-classes-compare-issue/41259 "2023-02-14T04:52:13Z")

</div>

Hi , I am facing an issue with .compare method, where compare between two objects of the same parameterized class but different parameter values with different data inside return success always. EXAMPLE : class trans …

---

## [How to create a parameterized class with the parameter automatically got](https://verificationacademy.com/forums/t/how-to-create-a-parameterized-class-with-the-parameter-automatically-got/41061)

<div class="topic-metadata">

**Author:** [@jianfeng.he](https://verificationacademy.com/forums/u/jianfeng.he)\
**Replies:** 6\
**Last updated:** [December 6, 2022, 8:48am UTC](https://verificationacademy.com/forums/t/how-to-create-a-parameterized-class-with-the-parameter-automatically-got/41061 "2022-12-06T08:48:30Z")

</div>

hi： I want to create a parameterized class with the parameter automatically got by the class handle in order to make the code more flexible, so I write the code like here: Edit code - EDA Playground , however an error o…

---

## [Passing a parameterized virtual interface (or any class/object) through a config object](https://verificationacademy.com/forums/t/passing-a-parameterized-virtual-interface-or-any-class-object-through-a-config-object/40643)

<div class="topic-metadata">

**Author:** [@renvillph](https://verificationacademy.com/forums/u/renvillph)\
**Replies:** 1\
**Last updated:** [July 14, 2022, 9:21am UTC](https://verificationacademy.com/forums/t/passing-a-parameterized-virtual-interface-or-any-class-object-through-a-config-object/40643 "2022-07-14T09:21:37Z")

</div>

I would like to pass a virtual interface from the base test down to the env level through the use of a config object. The interface is parameterized and I would like to override it with a new value in the base test. Also…

---

## [Regarding parameterized class](https://verificationacademy.com/forums/t/regarding-parameterized-class/40599)

<div class="topic-metadata">

**Author:** [@poojanm2002](https://verificationacademy.com/forums/u/poojanm2002)\
**Replies:** 1\
**Last updated:** [July 3, 2022, 12:40am UTC](https://verificationacademy.com/forums/t/regarding-parameterized-class/40599 "2022-07-03T00:40:04Z")

</div>

Hi, I have below two pieces of code. In the first one, when I do upcasting, there is runtime error. I assume it is because of incompatible types of class param. In the second code, the upcasting works fine. Can someone…

---

## [uvm\_config\_db#(T) labels uniqness within same scope](https://verificationacademy.com/forums/t/uvm-config-db-t-labels-uniqness-within-same-scope/40304)

<div class="topic-metadata">

**Author:** [@jkpatel](https://verificationacademy.com/forums/u/jkpatel)\
**Replies:** 2\
**Last updated:** [April 23, 2022, 12:09pm UTC](https://verificationacademy.com/forums/t/uvm-config-db-t-labels-uniqness-within-same-scope/40304 "2022-04-23T12:09:46Z")

</div>

uvm\_config\_db#(TYPE)::set(this, “\*”, “label”, value) Let’s say , we are using config db within same scope of different type with same label. Case1 : uvm\_config\_db#(int)::set(uvm\_root::get(),““,“counter”,cnt); Case2 : …

---

## [Extended Parametrized class](https://verificationacademy.com/forums/t/extended-parametrized-class/40128)

<div class="topic-metadata">

**Author:** [@rag123](https://verificationacademy.com/forums/u/rag123)\
**Replies:** 3\
**Last updated:** [March 9, 2022, 10:49pm UTC](https://verificationacademy.com/forums/t/extended-parametrized-class/40128 "2022-03-09T22:49:03Z")

</div>

Looking at section 8.25 Parametrized class in LRM, there is another way to override the base class parameter from extended class. class D4 #(type P = C#(real)) extends P; // for default, T is real // I am assuming C#(r…

---

## [Is it possible to create parameterized class with arg as array?](https://verificationacademy.com/forums/t/is-it-possible-to-create-parameterized-class-with-arg-as-array/39230)

<div class="topic-metadata">

**Author:** [@abhishek.khule.seagate.com](https://verificationacademy.com/forums/u/abhishek.khule.seagate.com)\
**Replies:** 1\
**Last updated:** [June 24, 2021, 9:25pm UTC](https://verificationacademy.com/forums/t/is-it-possible-to-create-parameterized-class-with-arg-as-array/39230 "2021-06-24T21:25:52Z")

</div>

Hi, I am trying to create an parameterized class and one of the arg is array. Is it legal to pass an array? class abc #(int size, int arr\[\]); int arr\_size = size; int array\[\] = arr; endclass //creating object arr\[\]…

---

## [Need of parameterization in UVM](https://verificationacademy.com/forums/t/need-of-parameterization-in-uvm/38940)

<div class="topic-metadata">

**Author:** [@bachan21](https://verificationacademy.com/forums/u/bachan21)\
**Replies:** 1\
**Last updated:** [April 5, 2021, 3:44pm UTC](https://verificationacademy.com/forums/t/need-of-parameterization-in-uvm/38940 "2021-04-05T15:44:45Z")

</div>

I have observed that the extended UVM classes are often parameterized. For example, user defined driver class. What is the advantage of parameterizing user defined classes? How does it affect the UVM code?

---

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

<div class="topic-metadata">

**Author:** [@Elyasaf\_Asraf](https://verificationacademy.com/forums/u/Elyasaf_Asraf)\
**Replies:** 1\
**Last updated:** [March 22, 2021, 5:34pm UTC](https://verificationacademy.com/forums/t/parameterized-test/38868 "2021-03-22T17:34:01Z")

</div>

hi i know there is a specific solution how to implement a parametrized test, as stated in “Parameters, UVM, Coverage & Emulation – Take Two and Call Me in the Morning” from DVCon USA 2016. my question is why not just u…

---

## [Creating a parameterized class by extending from another parameterized class](https://verificationacademy.com/forums/t/creating-a-parameterized-class-by-extending-from-another-parameterized-class/38822)

<div class="topic-metadata">

**Author:** [@Yasaswini](https://verificationacademy.com/forums/u/Yasaswini)\
**Replies:** 1\
**Last updated:** [March 12, 2021, 6:56am UTC](https://verificationacademy.com/forums/t/creating-a-parameterized-class-by-extending-from-another-parameterized-class/38822 "2021-03-12T06:56:02Z")

</div>

Hi, is it possible to create a parameterized class from another parameterized class? If yes, how do we create objects of the newly parameterized class while changing the parameters? when i create an extended class object…

---

## [Passing TB/RTL parameters to sequences](https://verificationacademy.com/forums/t/passing-tb-rtl-parameters-to-sequences/38322)

<div class="topic-metadata">

**Author:** [@SumanPatra](https://verificationacademy.com/forums/u/SumanPatra)\
**Replies:** 3\
**Last updated:** [November 14, 2020, 5:39pm UTC](https://verificationacademy.com/forums/t/passing-tb-rtl-parameters-to-sequences/38322 "2020-11-14T17:39:39Z")

</div>

If the design has N ports and N can be changed as per the product requirement, then how do we get this port information N in the generic sequences that we code to validate such a design. The design uses parameters, which…

---

## [Incompatible class assignment error](https://verificationacademy.com/forums/t/incompatible-class-assignment-error/38124)

<div class="topic-metadata">

**Author:** [@jj\_bukhari](https://verificationacademy.com/forums/u/jj_bukhari)\
**Replies:** 3\
**Last updated:** [September 25, 2020, 3:59pm UTC](https://verificationacademy.com/forums/t/incompatible-class-assignment-error/38124 "2020-09-25T15:59:07Z")

</div>

hello, forum I am getting the below error Error-\[SV-ICA\] Illegal class assignment axi\_test\_top.sv, 79 "this.sq\_transaction\_w = uvm\_object\_registry#($unit::eit\_axi\_master\_write\_transaction#(32,32),"\<unknown\>")::create(…

---

## [How to pass parameterized class handle as argument](https://verificationacademy.com/forums/t/how-to-pass-parameterized-class-handle-as-argument/37630)

<div class="topic-metadata">

**Author:** [@jj\_bukhari](https://verificationacademy.com/forums/u/jj_bukhari)\
**Replies:** 4\
**Last updated:** [May 26, 2020, 11:41am UTC](https://verificationacademy.com/forums/t/how-to-pass-parameterized-class-handle-as-argument/37630 "2020-05-26T11:41:53Z")

</div>

//base class as given in the question class axi\_transaction; typedef enum {WRITE=0, READ=1} rw\_e; rand rw\_e rw; rand bit \[31:0\] addr, data; endclass:axi\_transaction //derived class as asked in question class axi\_w…
