# \#class

**URL:** https://verificationacademy.com/forums/tag/class/4385.md

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

---

## [Overriding Class properties](https://verificationacademy.com/forums/t/overriding-class-properties/51360)

<div class="topic-metadata">

**Author:** [@Praveen\_Kakodra](https://verificationacademy.com/forums/u/Praveen_Kakodra)\
**Replies:** 6\
**Last updated:** [September 18, 2025, 5:19pm UTC](https://verificationacademy.com/forums/t/overriding-class-properties/51360 "2025-09-18T17:19:11Z")

</div>

Hi All, Consider the following code :: class base; int a = 10; virtual function void A(); $display("a is %0d",a); endfunction endclass class ext extends base; int a = 20; \`ifdef OVER …

---

## [Overriding non-virtual task](https://verificationacademy.com/forums/t/overriding-non-virtual-task/49793)

<div class="topic-metadata">

**Author:** [@arshi582](https://verificationacademy.com/forums/u/arshi582)\
**Replies:** 3\
**Last updated:** [March 8, 2025, 1:40am UTC](https://verificationacademy.com/forums/t/overriding-non-virtual-task/49793 "2025-03-08T01:40:04Z")

</div>

Hello Forum, I am trying to override one of the non-virtual tasks defined in base class to implement some additional logic. Here is my attempt edaplayground I have a few questions (1) Without any +define I observe the…

---

## [System Verilog coverge sampling using class instead of Mod](https://verificationacademy.com/forums/t/system-verilog-coverge-sampling-using-class-instead-of-mod/42669)

<div class="topic-metadata">

**Author:** [@Harsha\_vardhan](https://verificationacademy.com/forums/u/Harsha_vardhan)\
**Replies:** 2\
**Last updated:** [November 9, 2023, 9:39am UTC](https://verificationacademy.com/forums/t/system-verilog-coverge-sampling-using-class-instead-of-mod/42669 "2023-11-09T09:39:12Z")

</div>

Hi, I am trying to sample the cover groups inside the class instead of module while I am creating new to the cover group I am getting an error. Can anyone Please help me which type of function or task I can use to samp…

---

## [Does type\_id::create() end up eventually call the class's new function?](https://verificationacademy.com/forums/t/does-type-id-create-end-up-eventually-call-the-classs-new-function/42579)

<div class="topic-metadata">

**Author:** [@vk7715](https://verificationacademy.com/forums/u/vk7715)\
**Replies:** 7\
**Last updated:** [October 26, 2023, 3:43am UTC](https://verificationacademy.com/forums/t/does-type-id-create-end-up-eventually-call-the-classs-new-function/42579 "2023-10-26T03:43:05Z")

</div>

Hi all, I kindly require help on the following. Assume I have a class as follows class abc extends uvm\_object; // a kind of config class \`uvm\_object\_utils(abc) config\_class config\_h; function new(string name …

---

## [How to override severity report from UVM\_ERROR to UVM\_WARNING of a module](https://verificationacademy.com/forums/t/how-to-override-severity-report-from-uvm-error-to-uvm-warning-of-a-module/42588)

<div class="topic-metadata">

**Author:** [@Asraful\_21](https://verificationacademy.com/forums/u/Asraful_21)\
**Replies:** 2\
**Last updated:** [October 20, 2023, 7:06am UTC](https://verificationacademy.com/forums/t/how-to-override-severity-report-from-uvm-error-to-uvm-warning-of-a-module/42588 "2023-10-20T07:06:51Z")

</div>

I’ve some \`uvm\_error messages inside a module (checker), which is instantiated at hdl\_top module. I want to change the severity of checker module from UVM\_ERROR to UVM\_WARNING for certain test-case \`include "uvm\_macro…

---

## [How to use packages in class](https://verificationacademy.com/forums/t/how-to-use-packages-in-class/42174)

<div class="topic-metadata">

**Author:** [@atashinchi](https://verificationacademy.com/forums/u/atashinchi)\
**Replies:** 3\
**Last updated:** [August 22, 2023, 1:21am UTC](https://verificationacademy.com/forums/t/how-to-use-packages-in-class/42174 "2023-08-22T01:21:58Z")

</div>

I saw in the thread below that packages cannot be directly imported into classes: https://verificationacademy.com/forums/systemverilog/why-it-illegal-import-package-contents-class-scope But I didn’t understand what is …

---

## [Understanding Automatic or Automatic Lifetime of Class objects - SV](https://verificationacademy.com/forums/t/understanding-automatic-or-automatic-lifetime-of-class-objects-sv/41994)

<div class="topic-metadata">

**Author:** [@xfinity](https://verificationacademy.com/forums/u/xfinity)\
**Replies:** 4\
**Last updated:** [July 25, 2023, 5:31pm UTC](https://verificationacademy.com/forums/t/understanding-automatic-or-automatic-lifetime-of-class-objects-sv/41994 "2023-07-25T17:31:48Z")

</div>

Hi All, cfg.get\_ci\_id("if\_s"); I see in this my TB code. cfg is a env configuration class and get\_ci\_id is a function which returns return(ci\_id) which is of type cip\_client\_f However i don’t see an object of cip\_cl…

---

## [SV Introspection](https://verificationacademy.com/forums/t/sv-introspection/41567)

<div class="topic-metadata">

**Author:** [@rgarcia07](https://verificationacademy.com/forums/u/rgarcia07)\
**Replies:** 1\
**Last updated:** [April 24, 2023, 4:06pm UTC](https://verificationacademy.com/forums/t/sv-introspection/41567 "2023-04-24T16:06:33Z")

</div>

Hello, I think this has been asked before but is there any example of introspection/reflection implementation in SV? basically what I want is that given an object such as the following, I can get the members name and ty…

---

## [Local vs protected in SV class](https://verificationacademy.com/forums/t/local-vs-protected-in-sv-class/33989)

<div class="topic-metadata">

**Author:** [@verif\_learner1](https://verificationacademy.com/forums/u/verif_learner1)\
**Replies:** 3\
**Last updated:** [March 20, 2023, 6:23pm UTC](https://verificationacademy.com/forums/t/local-vs-protected-in-sv-class/33989 "2023-03-20T18:23:32Z")

</div>

I would like to confirm my understanding of local and protected in a SV class. local variable - this is local to the class where it is specified. Neither it is available in the derived class or module that instantiates …

---

## [How to change the bit field of a property in a class from another class](https://verificationacademy.com/forums/t/how-to-change-the-bit-field-of-a-property-in-a-class-from-another-class/41159)

<div class="topic-metadata">

**Author:** [@Prashanthp436](https://verificationacademy.com/forums/u/Prashanthp436)\
**Replies:** 1\
**Last updated:** [January 9, 2023, 9:32pm UTC](https://verificationacademy.com/forums/t/how-to-change-the-bit-field-of-a-property-in-a-class-from-another-class/41159 "2023-01-09T21:32:41Z")

</div>

Let us say there are two classes a1, b1 extending from different parent classes. How to set the “change\_value” field in class a1 from class b1 class a1 extends random\_class; bit\[change\_value -1:0\] data; .. .. endclass …

---

## [The best way of using struct, class, and array](https://verificationacademy.com/forums/t/the-best-way-of-using-struct-class-and-array/40928)

<div class="topic-metadata">

**Author:** [@jh\_veryveri](https://verificationacademy.com/forums/u/jh_veryveri)\
**Replies:** 4\
**Last updated:** [October 24, 2022, 7:24am UTC](https://verificationacademy.com/forums/t/the-best-way-of-using-struct-class-and-array/40928 "2022-10-24T07:24:03Z")

</div>

Hello, all. I implement functions for verifying DUT, but its performance is not good. I use struct type variable and queue, and associative array for comparing. I want to enhance its performance. So, I wonder about th…

---

## [Having instances of Both Child class and Parent class within a module](https://verificationacademy.com/forums/t/having-instances-of-both-child-class-and-parent-class-within-a-module/40746)

<div class="topic-metadata">

**Author:** [@nithinbhargav](https://verificationacademy.com/forums/u/nithinbhargav)\
**Replies:** 3\
**Last updated:** [August 17, 2022, 1:10am UTC](https://verificationacademy.com/forums/t/having-instances-of-both-child-class-and-parent-class-within-a-module/40746 "2022-08-17T01:10:34Z")

</div>

Hi, Below is my code where I have set and get methods for both parent class and child class. Some methods are extern ( outside of the class) I am trying to create a handle to the child class within a module but its res…

---

## [Unable to verify these errors](https://verificationacademy.com/forums/t/unable-to-verify-these-errors/40748)

<div class="topic-metadata">

**Author:** [@ARK010](https://verificationacademy.com/forums/u/ARK010)\
**Replies:** 3\
**Last updated:** [August 15, 2022, 2:13pm UTC](https://verificationacademy.com/forums/t/unable-to-verify-these-errors/40748 "2022-08-15T14:13:01Z")

</div>

// Code your design here virtual class trains; protected int times = -1; protected int price = -1; protected string name ; protected int seat\_no = -1; function new (int t, int p, string n, int s); …

---

## [Assign to interface input inside Class](https://verificationacademy.com/forums/t/assign-to-interface-input-inside-class/40528)

<div class="topic-metadata">

**Author:** [@Junior](https://verificationacademy.com/forums/u/Junior)\
**Replies:** 3\
**Last updated:** [June 14, 2022, 1:33pm UTC](https://verificationacademy.com/forums/t/assign-to-interface-input-inside-class/40528 "2022-06-14T13:33:53Z")

</div>

Hi I have an interface : interface bus\_ifc (inout\[2:0\] bus); .... and I want to assign to the bus variable in class struct temp {a,b,c} class a temp t; t.a = 1; t.b=0; t.c=0; fork begin agent.bus\_if…

---

## [Class handle copy](https://verificationacademy.com/forums/t/class-handle-copy/40378)

<div class="topic-metadata">

**Author:** [@natasv](https://verificationacademy.com/forums/u/natasv)\
**Replies:** 1\
**Last updated:** [May 10, 2022, 5:46am UTC](https://verificationacademy.com/forums/t/class-handle-copy/40378 "2022-05-10T05:46:49Z")

</div>

class opconst; rand int ii; /\* rand int oper\[$\]; constraint cc { oper.size() inside {10,12} ; foreach (oper\[j\]) oper\[j\] dist {\[1:2\] :/ 1, \[3:4\] :/ 8};} // {"add", "sub", "mul", "nop"};} \*/ endclass class opconstcpy e…

---

## [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 : …

---

## [Uvm\_component is static](https://verificationacademy.com/forums/t/uvm-component-is-static/40255)

<div class="topic-metadata">

**Author:** [@natasv](https://verificationacademy.com/forums/u/natasv)\
**Replies:** 5\
**Last updated:** [April 10, 2022, 5:02pm UTC](https://verificationacademy.com/forums/t/uvm-component-is-static/40255 "2022-04-10T17:02:40Z")

</div>

If class is a dynamic (gets created during runtime) datatype, how can uvm\_component be static?

---

## [Why fatal error "Bad handle or reference" of this code](https://verificationacademy.com/forums/t/why-fatal-error-bad-handle-or-reference-of-this-code/39208)

<div class="topic-metadata">

**Author:** [@mohd\_iqbal](https://verificationacademy.com/forums/u/mohd_iqbal)\
**Replies:** 1\
**Last updated:** [June 21, 2021, 7:37am UTC](https://verificationacademy.com/forums/t/why-fatal-error-bad-handle-or-reference-of-this-code/39208 "2021-06-21T07:37:20Z")

</div>

module test; class account; int balance; function new(int balance = 20); this.balance = balance; endfunction function int summary; return balance; endfunction …

---

## [If the default argument is initialized in the base\_class function there is no error. But for the following explicit super.new the following error is obtained. Thanks in Advance](https://verificationacademy.com/forums/t/if-the-default-argument-is-initialized-in-the-base-class-function-there-is-no-error-but-for-the-following-explicit-super-new-the-following-error-is-obtained-thanks-in-advance/36970)

<div class="topic-metadata">

**Author:** [@Chandra\_Shekar\_N](https://verificationacademy.com/forums/u/Chandra_Shekar_N)\
**Replies:** 7\
**Last updated:** [December 31, 2019, 9:57am UTC](https://verificationacademy.com/forums/t/if-the-default-argument-is-initialized-in-the-base-class-function-there-is-no-error-but-for-the-following-explicit-super-new-the-following-error-is-obtained-thanks-in-advance/36970 "2019-12-31T09:57:27Z")

</div>

Error-\[SV-SNCIM\] Super new call is missing 5soln.sv, 13 $unit Base class constructor specification is missing in derived class ‘sub\_class’. Please add ::new arguments to ‘extends’ specification or add call to ‘…

---

## [Class static methods and static properies initialization and creation](https://verificationacademy.com/forums/t/class-static-methods-and-static-properies-initialization-and-creation/31147)

<div class="topic-metadata">

**Author:** [@8Blades](https://verificationacademy.com/forums/u/8Blades)\
**Replies:** 5\
**Last updated:** [November 7, 2018, 2:53pm UTC](https://verificationacademy.com/forums/t/class-static-methods-and-static-properies-initialization-and-creation/31147 "2018-11-07T14:53:19Z")

</div>

As far as i know, a class’es static method and properties are created and initialized during end of elaboration phase. However i am getting confused with this thing, if a class is created dynamically during run time(whic…

---

## [Class declaration within a class](https://verificationacademy.com/forums/t/class-declaration-within-a-class/35281)

<div class="topic-metadata">

**Author:** [@verif\_learner1](https://verificationacademy.com/forums/u/verif_learner1)\
**Replies:** 1\
**Last updated:** [November 5, 2018, 3:38pm UTC](https://verificationacademy.com/forums/t/class-declaration-within-a-class/35281 "2018-11-05T15:38:57Z")

</div>

I am going through open source implementation of a utility function and I see that the designer has declared classes within another class. Something like this: module abc; class x; class y; endclass endclass x…

---

## [Can cast class type from another class? (Want to reduce redundant part)](https://verificationacademy.com/forums/t/can-cast-class-type-from-another-class-want-to-reduce-redundant-part/34728)

<div class="topic-metadata">

**Author:** [@lycos007](https://verificationacademy.com/forums/u/lycos007)\
**Replies:** 3\
**Last updated:** [July 25, 2018, 1:01pm UTC](https://verificationacademy.com/forums/t/can-cast-class-type-from-another-class-want-to-reduce-redundant-part/34728 "2018-07-25T13:01:34Z")

</div>

I want to reduce redundant parts from my code. my code make a class handle(same handle name) from different class. and it is determined by its argument. for example, \`ifdef useClassA classA handle; common part; \`e…

---

## [Constraining an Object's Object's Variable](https://verificationacademy.com/forums/t/constraining-an-objects-objects-variable/34639)

<div class="topic-metadata">

**Author:** [@daniel.p.sherman](https://verificationacademy.com/forums/u/daniel.p.sherman)\
**Replies:** 7\
**Last updated:** [July 9, 2018, 1:16pm UTC](https://verificationacademy.com/forums/t/constraining-an-objects-objects-variable/34639 "2018-07-09T13:16:10Z")

</div>

Hello, I’m having an issue with my constraints in my testbench… I want part of a register to never be a certain value after a randomize function, so my code is similar to the following: class B; extern void function…

---

## [UVM class hierarchy - type of relationship](https://verificationacademy.com/forums/t/uvm-class-hierarchy-type-of-relationship/33884)

<div class="topic-metadata">

**Author:** [@verif\_learner1](https://verificationacademy.com/forums/u/verif_learner1)\
**Replies:** 4\
**Last updated:** [January 4, 2018, 3:44am UTC](https://verificationacademy.com/forums/t/uvm-class-hierarchy-type-of-relationship/33884 "2018-01-04T03:44:31Z")

</div>

I am looking at the UVM class hierarchy diagram and I am confused with the type of relationship across the class hierarchy. For example, everything is represented using an arrow with white arrow head. Does this mean th…

---

## [Trying debug a class object in env](https://verificationacademy.com/forums/t/trying-debug-a-class-object-in-env/33805)

<div class="topic-metadata">

**Author:** [@aliyar](https://verificationacademy.com/forums/u/aliyar)\
**Replies:** 2\
**Last updated:** [December 10, 2017, 8:38pm UTC](https://verificationacademy.com/forums/t/trying-debug-a-class-object-in-env/33805 "2017-12-10T20:38:03Z")

</div>

Hi I am trying to debug a monitor class in environment class. Everything seems fine, but I get this error which I haven’t figure out why? Error-\[SE\] Syntax error Following verilog source has syntax error : token ‘acc…

---

## [Writemem](https://verificationacademy.com/forums/t/writemem/31931)

<div class="topic-metadata">

**Author:** [@AnuradhaRangineni](https://verificationacademy.com/forums/u/AnuradhaRangineni)\
**Replies:** 7\
**Last updated:** [November 23, 2017, 2:47am UTC](https://verificationacademy.com/forums/t/writemem/31931 "2017-11-23T02:47:15Z")

</div>

Hi, Can the system task $writememh be executed within an object? Kindly let me know. In my case, the code outline is as follows: class environment\_c; bit \[7:0\] frame\_out \[1023:0\]; bit \[7:0\] input\[1023:0\]; task proce…

---

## [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 …

---

## [Class and object in system verilog](https://verificationacademy.com/forums/t/class-and-object-in-system-verilog/33513)

<div class="topic-metadata">

**Author:** [@vineet](https://verificationacademy.com/forums/u/vineet)\
**Replies:** 1\
**Last updated:** [September 19, 2017, 5:58am UTC](https://verificationacademy.com/forums/t/class-and-object-in-system-verilog/33513 "2017-09-19T05:58:48Z")

</div>

Are class and its object both are static? Or it depends on program?

---

## [Factory objects and components are virtual?](https://verificationacademy.com/forums/t/factory-objects-and-components-are-virtual/33508)

<div class="topic-metadata">

**Author:** [@chaitanya\_i](https://verificationacademy.com/forums/u/chaitanya_i)\
**Replies:** 1\
**Last updated:** [September 17, 2017, 4:36pm UTC](https://verificationacademy.com/forums/t/factory-objects-and-components-are-virtual/33508 "2017-09-17T16:36:08Z")

</div>

I am new to sv/uvm. my question may be basic. what is a virtual class and advantages of virtual/abstract class ? what about virtual methods? in UVM , Factory components and objects are virtual?

---

## [Why do we use classes in system verilog verification environment?](https://verificationacademy.com/forums/t/why-do-we-use-classes-in-system-verilog-verification-environment/33183)

<div class="topic-metadata">

**Author:** [@15mvd0038](https://verificationacademy.com/forums/u/15mvd0038)\
**Replies:** 4\
**Last updated:** [June 8, 2017, 3:08pm UTC](https://verificationacademy.com/forums/t/why-do-we-use-classes-in-system-verilog-verification-environment/33183 "2017-06-08T15:08:41Z")

</div>

class generator; --- --- -- endclass

[Next page](https://verificationacademy.com/forums/tag/class/4385.md?match_all_tags=true&page=1&tags%5B%5D=class)
