sun_ray
Advanced Member level 3
- Joined
- Oct 3, 2011
- Messages
- 772
- Helped
- 5
- Reputation
- 10
- Reaction score
- 5
- Trophy points
- 1,298
- Activity points
- 6,828
Can there be cases where an if else statement is outside an always block?
Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
HelloSee section 18.5.7 if-else constraints if the 1800-2012 LRM
It might help to explain where your doubts are coming from?
class A
rand bit [7:0] len;
rand enum {big,middle,little} mode;
constraint c {if (mode == little)
len < 10;
else if (mode == big)
len > 100;}
endclass