generating random value within a range using vhdl

Status
Not open for further replies.

vivo_m

Member level 3
Joined
May 15, 2011
Messages
54
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Visit site
Activity points
1,903
hello everybody,

any idea how can i generate random values within a specific range using vhdl language

what i want to do is taking input value and generate random value within [input+15 , input-15]

any help plzzz..

thanks..
 

You can use the input as an offset for a fast running counter in your FPGA.
 

no FPGA...
simulation onlyy..

The ieee.math_real library has a procedure called 'uniform' that returns a number from 0 to 1. Scale and offset to fit the range that you happen to need.

Kevin
 
Reactions: vivo_m

    vivo_m

    Points: 2
    Helpful Answer Positive Rating
The ieee.math_real library has a procedure called 'uniform' that returns a number from 0 to 1. Scale and offset to fit the range that you happen to need.

Kevin

would you please declare how can i use this.. i want to generate random value +15 or -15 from the input value..

thanks alot Kevin..
 

Status
Not open for further replies.

Similar threads

Cookies are required to use this site. You must accept them to continue using the site. Learn more…