# Case statement range

**URL:** <https://verificationacademy.com/forums/t/case-statement-range/47340>\
**Category:** SystemVerilog\
**Tags:** Verilog\
**Created:** [May 16, 2024, 10:28am UTC](https://verificationacademy.com/forums/t/case-statement-range/47340 "2024-05-16T10:28:50Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![ashish\_saroj](https://verificationacademy.com/forums/user_avatar/verificationacademy.com/ashish_saroj/32/1534_2.png) [@ashish\_saroj](https://verificationacademy.com/forums/u/ashish_saroj)\
**Post date:** [May 16, 2024, 10:28am UTC](https://verificationacademy.com/forums/t/case-statement-range/47340/1 "2024-05-16T10:28:50Z")

</div>

Hello,

my scenario is **dccc** variable get randomze and generate between range **'h80 to 'h100** and in driver i am using:

```auto
 case(req.dccc) 
  req.dccc with {item inside {['h80:'h90]}: begin
                                                                         dccc_detect; //task called
                                                                         end
  req.dccc with {item inside {['h90:'h100]}: begin
                                                                         dccc_send; //task called
                                                                         end

```

i want solution for this logic which is not working properly hoping best solution on this…

---

<div class="post-metadata">

**Author:** ![dave\_59](https://verificationacademy.com/forums/user_avatar/verificationacademy.com/dave_59/32/4499_2.png) [@dave\_59](https://verificationacademy.com/forums/u/dave_59)\
**Post date:** [May 16, 2024, 5:35pm UTC](https://verificationacademy.com/forums/t/case-statement-range/47340/2 "2024-05-16T17:35:52Z")

</div>

We don’t know what “working properly” means. The code shown makes no sense (there is no randomization)

Show us a [minimal, complete reproducible example](https://stackoverflow.com/help/minimal-reproducible-example)

---

<div class="post-metadata">

**Author:** ![ashish\_saroj](https://verificationacademy.com/forums/user_avatar/verificationacademy.com/ashish_saroj/32/1534_2.png) [@ashish\_saroj](https://verificationacademy.com/forums/u/ashish_saroj)\
**Post date:** [May 17, 2024, 5:10am UTC](https://verificationacademy.com/forums/t/case-statement-range/47340/3 "2024-05-17T05:10:23Z")

</div>

its coming random value from sequence i want that in case this type of syntax is valid or not ?

---

<div class="post-metadata">

**Author:** ![dave\_59](https://verificationacademy.com/forums/user_avatar/verificationacademy.com/dave_59/32/4499_2.png) [@dave\_59](https://verificationacademy.com/forums/u/dave_59)\
**Post date:** [May 17, 2024, 3:21pm UTC](https://verificationacademy.com/forums/t/case-statement-range/47340/4 "2024-05-17T15:21:50Z")

</div>

Not valid syntax.
