# \#sequence-body

**URL:** https://verificationacademy.com/forums/tag/sequence-body/4929.md

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

---

## [Constraint failure while using a queue in a task](https://verificationacademy.com/forums/t/constraint-failure-while-using-a-queue-in-a-task/40800)

<div class="topic-metadata">

**Author:** [@bachan21](https://verificationacademy.com/forums/u/bachan21)\
**Replies:** 2\
**Last updated:** [August 30, 2022, 9:19pm UTC](https://verificationacademy.com/forums/t/constraint-failure-while-using-a-queue-in-a-task/40800 "2022-08-30T21:19:47Z")

</div>

I use following code in my base sequence as I need this to be used in other sequences. class base\_sequence extends uvm\_sequence#(sequence\_item); \`uvm\_object\_utils(base\_sequence) //Constructor function new(strin…

---

## [Sequence to that respond to done signal](https://verificationacademy.com/forums/t/sequence-to-that-respond-to-done-signal/39400)

<div class="topic-metadata">

**Author:** [@bachan21](https://verificationacademy.com/forums/u/bachan21)\
**Replies:** 14\
**Last updated:** [August 23, 2021, 11:20am UTC](https://verificationacademy.com/forums/t/sequence-to-that-respond-to-done-signal/39400 "2021-08-23T11:20:55Z")

</div>

I am writing the task body below task body(); req = packet::type\_id::create("rqst"); start\_item(req); void\`(randomize() with req.sel == 1; req.en == 1; req.…

---

## [Can we set a config\_db in environment and get in sequence body()?](https://verificationacademy.com/forums/t/can-we-set-a-config-db-in-environment-and-get-in-sequence-body/38509)

<div class="topic-metadata">

**Author:** [@baberali](https://verificationacademy.com/forums/u/baberali)\
**Replies:** 1\
**Last updated:** [December 24, 2020, 6:51pm UTC](https://verificationacademy.com/forums/t/can-we-set-a-config-db-in-environment-and-get-in-sequence-body/38509 "2020-12-24T18:51:41Z")

</div>

Can we set a field in config\_db in environment in build\_phase() and get in sequence body()?

---

## [Is putting tasks inside the 'body' task of uvm\_sequence class a good practice?](https://verificationacademy.com/forums/t/is-putting-tasks-inside-the-body-task-of-uvm-sequence-class-a-good-practice/34875)

<div class="topic-metadata">

**Author:** [@piyushkamalakar](https://verificationacademy.com/forums/u/piyushkamalakar)\
**Replies:** 5\
**Last updated:** [August 16, 2018, 5:58pm UTC](https://verificationacademy.com/forums/t/is-putting-tasks-inside-the-body-task-of-uvm-sequence-class-a-good-practice/34875 "2018-08-16T17:58:43Z")

</div>

I have a bunch of tasks for read and write transactions. I was wondering if there is any way I can put them inside the uvm\_sequence body task. Is it a good practice to do this? Thank you!

---

## [How else we can use pre\_body method and post\_body method in a sequence apart from raising and dropping objections?](https://verificationacademy.com/forums/t/how-else-we-can-use-pre-body-method-and-post-body-method-in-a-sequence-apart-from-raising-and-dropping-objections/32791)

<div class="topic-metadata">

**Author:** [@8Blades](https://verificationacademy.com/forums/u/8Blades)\
**Replies:** 6\
**Last updated:** [January 31, 2017, 4:30am UTC](https://verificationacademy.com/forums/t/how-else-we-can-use-pre-body-method-and-post-body-method-in-a-sequence-apart-from-raising-and-dropping-objections/32791 "2017-01-31T04:30:38Z")

</div>

The objection raising and dropping could be done at the beginning of sequence body and at the end of the body respectively, without using the pre\_body and post\_body tasks. What are the other possible use cases of these t…

---

## [Why the body of sequence is running for one time, even if the repeat statement is used in it?](https://verificationacademy.com/forums/t/why-the-body-of-sequence-is-running-for-one-time-even-if-the-repeat-statement-is-used-in-it/32266)

<div class="topic-metadata">

**Author:** [@swatisatpathy10](https://verificationacademy.com/forums/u/swatisatpathy10)\
**Replies:** 4\
**Last updated:** [September 30, 2016, 7:15am UTC](https://verificationacademy.com/forums/t/why-the-body-of-sequence-is-running-for-one-time-even-if-the-repeat-statement-is-used-in-it/32266 "2016-09-30T07:15:59Z")

</div>

//body of transaction class adder\_transaction extends uvm\_sequence\_item; rand bit \[3:0\]a0; rand bit \[3:0\]b0; rand bit doAdd0; bit \[3:0\]result0; \`uvm\_object\_utils(adder\_transaction) function new(string…

---

## [Tricky operation (reordering) in a sequence body()](https://verificationacademy.com/forums/t/tricky-operation-reordering-in-a-sequence-body/30044)

<div class="topic-metadata">

**Author:** [@new\_to\_uvm](https://verificationacademy.com/forums/u/new_to_uvm)\
**Replies:** 4\
**Last updated:** [October 22, 2014, 2:39pm UTC](https://verificationacademy.com/forums/t/tricky-operation-reordering-in-a-sequence-body/30044 "2014-10-22T14:39:13Z")

</div>

task foo::body() forever begin this.source\_sequencer.get\_next\_item(tmp); this.start\_item(tmp); this.finish\_item(tmp); this.source\_sequencer.item\_done(); end endtask: body In the above body(), I get only 1 item at …
