# \#Learning-System-Verilog

**URL:** https://verificationacademy.com/forums/tag/learning-system-verilog/5123.md

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

---

## [Problem with the associative array with queue (not taking data corrrectly)](https://verificationacademy.com/forums/t/problem-with-the-associative-array-with-queue-not-taking-data-corrrectly/37019)

<div class="topic-metadata">

**Author:** [@rahulraoece](https://verificationacademy.com/forums/u/rahulraoece)\
**Replies:** 2\
**Last updated:** [January 13, 2020, 4:20pm UTC](https://verificationacademy.com/forums/t/problem-with-the-associative-array-with-queue-not-taking-data-corrrectly/37019 "2020-01-13T16:20:27Z")

</div>

as i am randomizing handle for 5 times 5 different address are generated but when displaying the queue it is printing the same address value genetared at that transaction.push back is not working … class demo; rand …

---

## [Extern task body declared but out-of-body declaration must be in the same scope as the class](https://verificationacademy.com/forums/t/extern-task-body-declared-but-out-of-body-declaration-must-be-in-the-same-scope-as-the-class/36849)

<div class="topic-metadata">

**Author:** [@SangeethaN](https://verificationacademy.com/forums/u/SangeethaN)\
**Replies:** 1\
**Last updated:** [November 26, 2019, 8:07am UTC](https://verificationacademy.com/forums/t/extern-task-body-declared-but-out-of-body-declaration-must-be-in-the-same-scope-as-the-class/36849 "2019-11-26T08:07:36Z")

</div>

What should we do when this error strikes up? While compiling all files in Questa sim simulator tool, the following error came. What am I supposed to do? \*\* Error: \*\* while parsing file included at top\_pkg.sv(23) \*\* at …

---

## [Need for the $cast task in System Verilog](https://verificationacademy.com/forums/t/need-for-the-cast-task-in-system-verilog/34640)

<div class="topic-metadata">

**Author:** [@Shri\_Ganesh](https://verificationacademy.com/forums/u/Shri_Ganesh)\
**Replies:** 12\
**Last updated:** [November 1, 2019, 3:53pm UTC](https://verificationacademy.com/forums/t/need-for-the-cast-task-in-system-verilog/34640 "2019-11-01T15:53:24Z")

</div>

Can anyone please explain the need for $cast in System Verilog with a good example?

---

## [Where does the base class evolve from?](https://verificationacademy.com/forums/t/where-does-the-base-class-evolve-from/36278)

<div class="topic-metadata">

**Author:** [@AshinaA](https://verificationacademy.com/forums/u/AshinaA)\
**Replies:** 1\
**Last updated:** [July 11, 2019, 3:26pm UTC](https://verificationacademy.com/forums/t/where-does-the-base-class-evolve-from/36278 "2019-07-11T15:26:21Z")

</div>

In the following program coding line, class updn\_seq\_item extends uvm\_sequence\_item; this line means uvm\_sequence\_item is a base class and updn\_seq\_item is a sub class derived from base class. Now, my doubt is-where do…

---

## [Multiple Inheritance In system verilog](https://verificationacademy.com/forums/t/multiple-inheritance-in-system-verilog/34924)

<div class="topic-metadata">

**Author:** [@learning\_uvm](https://verificationacademy.com/forums/u/learning_uvm)\
**Replies:** 2\
**Last updated:** [August 27, 2018, 5:09pm UTC](https://verificationacademy.com/forums/t/multiple-inheritance-in-system-verilog/34924 "2018-08-27T17:09:40Z")

</div>

How can we perform the concept of multiple inheritance in system verilog. ie the child class is extended by two or more parent classes.

---

## [Randomization based on seed value](https://verificationacademy.com/forums/t/randomization-based-on-seed-value/32798)

<div class="topic-metadata">

**Author:** [@RajGopal](https://verificationacademy.com/forums/u/RajGopal)\
**Replies:** 1\
**Last updated:** [February 2, 2017, 12:30pm UTC](https://verificationacademy.com/forums/t/randomization-based-on-seed-value/32798 "2017-02-02T12:30:51Z")

</div>

Hello i have a class with random variable which can range between \[1:100\] I have a test-case which when I simulate with seed = 1 randomizes my class properties twice (meaning generating 2 random values for the variable…

---

## [Difference between shallow copy and deep copy?](https://verificationacademy.com/forums/t/difference-between-shallow-copy-and-deep-copy/32713)

<div class="topic-metadata">

**Author:** [@nag\_sv](https://verificationacademy.com/forums/u/nag_sv)\
**Replies:** 2\
**Last updated:** [January 2, 2017, 9:02pm UTC](https://verificationacademy.com/forums/t/difference-between-shallow-copy-and-deep-copy/32713 "2017-01-02T21:02:15Z")

</div>

Hi, Can any one explain me the definitions and differences between deep and shallow copy with simple example? Thanks in advance,

---

## [How to start developing system verilog environment testbench?](https://verificationacademy.com/forums/t/how-to-start-developing-system-verilog-environment-testbench/32688)

<div class="topic-metadata">

**Author:** [@nag\_sv](https://verificationacademy.com/forums/u/nag_sv)\
**Replies:** 1\
**Last updated:** [December 26, 2016, 5:24pm UTC](https://verificationacademy.com/forums/t/how-to-start-developing-system-verilog-environment-testbench/32688 "2016-12-26T17:24:03Z")

</div>

Hi, I am new to this forum, i learning system verilog by own . First i am understanding existing sv environment code for simple adder before developing by own. In environment we have so many blocks generator, driver ,…

---

## [Issue in Generating coverage when i have coverpoints with macros](https://verificationacademy.com/forums/t/issue-in-generating-coverage-when-i-have-coverpoints-with-macros/32177)

<div class="topic-metadata">

**Author:** [@TransVerif](https://verificationacademy.com/forums/u/TransVerif)\
**Replies:** 5\
**Last updated:** [August 23, 2016, 5:24am UTC](https://verificationacademy.com/forums/t/issue-in-generating-coverage-when-i-have-coverpoints-with-macros/32177 "2016-08-23T05:24:06Z")

</div>

Hi I am using macro based coverpoints in my class.I am using Quests10.4 for simulations. I am not getting any compilations issues and simulation is also clean but I am not getting any coverage output. My commands are: …

---

## [Event usage in a class member function](https://verificationacademy.com/forums/t/event-usage-in-a-class-member-function/32141)

<div class="topic-metadata">

**Author:** [@bharath123](https://verificationacademy.com/forums/u/bharath123)\
**Replies:** 6\
**Last updated:** [August 11, 2016, 5:14am UTC](https://verificationacademy.com/forums/t/event-usage-in-a-class-member-function/32141 "2016-08-11T05:14:34Z")

</div>

Hi can we use something like below in system Verilog class?I am getting compilation issue at event. ////////////////////////////////////////////////////////////////////////////////////////////////////// program main; …

---

## [Minimum number of RW required](https://verificationacademy.com/forums/t/minimum-number-of-rw-required/31338)

<div class="topic-metadata">

**Author:** [@rexjohn4u](https://verificationacademy.com/forums/u/rexjohn4u)\
**Replies:** 4\
**Last updated:** [December 24, 2015, 7:45am UTC](https://verificationacademy.com/forums/t/minimum-number-of-rw-required/31338 "2015-12-24T07:45:57Z")

</div>

Hi, Can anyone answer the below questions with solution. Scenarion: RAM with 8 bit Address bus, 8 bit Wdata bus, and 8 bit Rdata bus. Minimum number of WR operation required if 2 bits of Wdata is swapped? Minimum num…

---

## [Parameterised members of a class assigning new value](https://verificationacademy.com/forums/t/parameterised-members-of-a-class-assigning-new-value/31155)

<div class="topic-metadata">

**Author:** [@bharath123](https://verificationacademy.com/forums/u/bharath123)\
**Replies:** 4\
**Last updated:** [October 26, 2015, 6:26am UTC](https://verificationacademy.com/forums/t/parameterised-members-of-a-class-assigning-new-value/31155 "2015-10-26T06:26:55Z")

</div>

Hi I need help in Oveririding The parameter inside the class. class basic; parameter int My\_var=1; endclass module basic; //import abc#(My\_var=2)::\*; //import abc::\*; initial begin //abc::My\_var=2; b…

---

## [Parameter overriding which is declared inside package](https://verificationacademy.com/forums/t/parameter-overriding-which-is-declared-inside-package/31156)

<div class="topic-metadata">

**Author:** [@bharath123](https://verificationacademy.com/forums/u/bharath123)\
**Replies:** 2\
**Last updated:** [October 26, 2015, 6:19am UTC](https://verificationacademy.com/forums/t/parameter-overriding-which-is-declared-inside-package/31156 "2015-10-26T06:19:07Z")

</div>

Hi Please see below snippet of code where i want to override the parameter declared inside the package. I need help how can we do it? ///////////////////////////////////////////////////////////////////////////////////…

---

## [Where to put the \`include statement?](https://verificationacademy.com/forums/t/where-to-put-the-include-statement/30774)

<div class="topic-metadata">

**Author:** [@slittle](https://verificationacademy.com/forums/u/slittle)\
**Replies:** 2\
**Last updated:** [June 23, 2015, 10:59pm UTC](https://verificationacademy.com/forums/t/where-to-put-the-include-statement/30774 "2015-06-23T22:59:53Z")

</div>

I am new to SystemVerilog. So the following is certainly a basic question, but it has caused me a lot of trouble. Where is the best place to put an include statement? I have written a number of testbenches now that defi…

---

## [How to set the default value of all elements of a queue to zero before we know the length of the queue?](https://verificationacademy.com/forums/t/how-to-set-the-default-value-of-all-elements-of-a-queue-to-zero-before-we-know-the-length-of-the-queue/30614)

<div class="topic-metadata">

**Author:** [@ub\_ovm](https://verificationacademy.com/forums/u/ub_ovm)\
**Replies:** 1\
**Last updated:** [May 5, 2015, 9:12pm UTC](https://verificationacademy.com/forums/t/how-to-set-the-default-value-of-all-elements-of-a-queue-to-zero-before-we-know-the-length-of-the-queue/30614 "2015-05-05T21:12:13Z")

</div>

Hi, Is there way to set all the elements that will be accessed in a queue to a default value of say zero? so that when I use the queue I can go ahead and set some bits to 1 later? Thanks in advance

---

## [Coding practices in System Verilog](https://verificationacademy.com/forums/t/coding-practices-in-system-verilog/30456)

<div class="topic-metadata">

**Author:** [@MadhaviEerpina](https://verificationacademy.com/forums/u/MadhaviEerpina)\
**Replies:** 5\
**Last updated:** [April 1, 2015, 2:04am UTC](https://verificationacademy.com/forums/t/coding-practices-in-system-verilog/30456 "2015-04-01T02:04:06Z")

</div>

Dear all, I am getting started with System Verilog. So far I am good with the theoretical concepts. But I want to gain hands on coding experience on system verilog, assertions and coverage. Please suggest me a way to ac…
