BartlebyScrivener
Member level 5
- Joined
- Feb 8, 2012
- Messages
- 90
- Helped
- 0
- Reputation
- 0
- Reaction score
- 0
- Trophy points
- 1,286
- Activity points
- 2,081
I would like to simulate a valid flag, on a clock edge, a certain percentage of the time. A simple way I have been doing this is to
valid <= ($urandom_range(100,1) <= RATE) ? 1 : 0;
So, if RATE was 50, valid will be high approximately 50% of the time. However, this is a pretty even traffic pattern. I would like to simulate traffic that comes in bursts, i.e more irregular, but still tend to an overall RATE over time.
Any ideas how to do this?
Many thanks.
valid <= ($urandom_range(100,1) <= RATE) ? 1 : 0;
So, if RATE was 50, valid will be high approximately 50% of the time. However, this is a pretty even traffic pattern. I would like to simulate traffic that comes in bursts, i.e more irregular, but still tend to an overall RATE over time.
Any ideas how to do this?
Many thanks.