# \#solve-before

**URL:** https://verificationacademy.com/forums/tag/solve-before/6914.md

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

---

## [Queries on Randomization](https://verificationacademy.com/forums/t/queries-on-randomization/51654)

<div class="topic-metadata">

**Author:** [@TC\_2017](https://verificationacademy.com/forums/u/TC_2017)\
**Replies:** 1\
**Last updated:** [June 4, 2026, 4:49pm UTC](https://verificationacademy.com/forums/t/queries-on-randomization/51654 "2026-06-04T16:49:15Z")

</div>

Hi Forum, (1) 18.5.9 Variable ordering from SV LRM-2023 mentions Variables may be solved in an order that is not consistent with the ordering constraints, provided that the outcome is the same. An example situation wh…

---

## [Calculating probability for solve x,y before z](https://verificationacademy.com/forums/t/calculating-probability-for-solve-x-y-before-z/51625)

<div class="topic-metadata">

**Author:** [@AGS91](https://verificationacademy.com/forums/u/AGS91)\
**Replies:** 3\
**Last updated:** [May 22, 2026, 3:59pm UTC](https://verificationacademy.com/forums/t/calculating-probability-for-solve-x-y-before-z/51625 "2026-05-22T15:59:31Z")

</div>

Hi Forum, I am trying to calculate the probability of each possible output using solve before constraint Solve before using 2 random variables solve x before y rand bit x; rand bit \[1:0\] y; constraint a2 { (x == 0) -\>…

---

## [Is there any way to set a global solve...before?](https://verificationacademy.com/forums/t/is-there-any-way-to-set-a-global-solve-before/46673)

<div class="topic-metadata">

**Author:** [@rgarcia07](https://verificationacademy.com/forums/u/rgarcia07)\
**Replies:** 1\
**Last updated:** [April 3, 2024, 4:23pm UTC](https://verificationacademy.com/forums/t/is-there-any-way-to-set-a-global-solve-before/46673 "2024-04-03T16:23:01Z")

</div>

Hello, It’s being a while for me to write constraints, is there a way to create a global solve … before in SystemVerilog? For example imagine I have a class: class transaction; typedef enum {NORMAL, INVALID, PRESET1…

---

## [How to resolve the warning "The expression "xaction\_1.example\_struct.trans" is a member of a packed structure and cannot be used in a solve-before constraint."](https://verificationacademy.com/forums/t/how-to-resolve-the-warning-the-expression-xaction-1-example-struct-trans-is-a-member-of-a-packed-structure-and-cannot-be-used-in-a-solve-before-constraint/40673)

<div class="topic-metadata">

**Author:** [@Aniruth\_54](https://verificationacademy.com/forums/u/Aniruth_54)\
**Replies:** 1\
**Last updated:** [July 25, 2022, 6:44am UTC](https://verificationacademy.com/forums/t/how-to-resolve-the-warning-the-expression-xaction-1-example-struct-trans-is-a-member-of-a-packed-structure-and-cannot-be-used-in-a-solve-before-constraint/40673 "2022-07-25T06:44:20Z")

</div>

typedef struct packed { logic \[5:0\] ctr; logic \[2:0\] source; logic \[5:0\] addr; } pkt\_a; typedef struct packed { pkt\_a LOC\_ID; pkt\_a PARENT\_ID; pkt\_a TRANS\_ID; } t\_struct; class xaction; rand t\_struct exa…

---

## [SystemVerilog: Solve before constraint on random child classes](https://verificationacademy.com/forums/t/systemverilog-solve-before-constraint-on-random-child-classes/36026)

<div class="topic-metadata">

**Author:** [@sharatk](https://verificationacademy.com/forums/u/sharatk)\
**Replies:** 3\
**Last updated:** [April 28, 2019, 4:58pm UTC](https://verificationacademy.com/forums/t/systemverilog-solve-before-constraint-on-random-child-classes/36026 "2019-04-28T16:58:40Z")

</div>

Consider the below code. class b; rand bit A; rand bit \[1:0\] B; endclass class c; rand b arr\[\]; constraint constraints\_c { foreach(arr\[i\]) { if(i\>0) { arr\[i\].B != ret…
