# \#foreach

**URL:** https://verificationacademy.com/forums/tag/foreach/6644.md

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

---

## [Reduce the code for reset function](https://verificationacademy.com/forums/t/reduce-the-code-for-reset-function/39353)

<div class="topic-metadata">

**Author:** [@bachan21](https://verificationacademy.com/forums/u/bachan21)\
**Replies:** 4\
**Last updated:** [July 26, 2021, 10:32am UTC](https://verificationacademy.com/forums/t/reduce-the-code-for-reset-function/39353 "2021-07-26T10:32:08Z")

</div>

I am writing a function in scoreboard to check whether reset is working. This is the code function bit check(Packet obj); if(obj.a == 0&& obj.b == 0&& obj.c == 0&& obj.d == 0&& obj.e == 0) ret…

---

## [Multi dimensional array](https://verificationacademy.com/forums/t/multi-dimensional-array/36990)

<div class="topic-metadata">

**Author:** [@rabh](https://verificationacademy.com/forums/u/rabh)\
**Replies:** 2\
**Last updated:** [January 7, 2020, 5:47pm UTC](https://verificationacademy.com/forums/t/multi-dimensional-array/36990 "2020-01-07T17:47:23Z")

</div>

I have a three dimensional array, where the array length is 64, the members in the array are 8 bits wide and I have 4 such arrays. may be some thing like the following: bit\[7:0\] temp\_data \[\] \[:63\]; now using foreach l…

---

## [FOREACH](https://verificationacademy.com/forums/t/foreach/36738)

<div class="topic-metadata">

**Author:** [@lohithadm](https://verificationacademy.com/forums/u/lohithadm)\
**Replies:** 1\
**Last updated:** [October 29, 2019, 2:52pm UTC](https://verificationacademy.com/forums/t/foreach/36738 "2019-10-29T14:52:34Z")

</div>

hi sir/mam i am facing an issue that is in foreach loop my question is int a\[4\]; initial begin foreach(a\[i\]) a\[i\]=i; foreach(a\[i\]) $display(“\\tValue of a\[%0d\]=%0d”,i,a\[i\]); end this will print in the form of Va…

---

## [Modulo operation inside foreach loop throws fatal error](https://verificationacademy.com/forums/t/modulo-operation-inside-foreach-loop-throws-fatal-error/35104)

<div class="topic-metadata">

**Author:** [@anidea](https://verificationacademy.com/forums/u/anidea)\
**Replies:** 1\
**Last updated:** [September 28, 2018, 4:17pm UTC](https://verificationacademy.com/forums/t/modulo-operation-inside-foreach-loop-throws-fatal-error/35104 "2018-09-28T16:17:33Z")

</div>

Hi, Thanks for helping out. I have written a small code for 10 random 32 bit memory address generators. There are two constraints → 1) Memory address has to be \<1GB which works fine. 2) Select Memory address such that…
