Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Next revision Both sides next revision | ||
sim:start [2022/07/17 06:15] rajit [Namespace sim::rand] |
sim:start [2022/07/17 06:43] rajit [Exported processes] |
||
---|---|---|---|
Line 29: | Line 29: | ||
<code act> | <code act> | ||
- | export | + | template< |
defproc file_source(chan!(int< | defproc file_source(chan!(int< | ||
</ | </ | ||
Line 35: | Line 35: | ||
<code act> | <code act> | ||
- | export | + | template< |
defproc check_sink(chan? | defproc check_sink(chan? | ||
</ | </ | ||
Line 45: | Line 45: | ||
<code act> | <code act> | ||
- | export | + | template< |
defproc source(chan!(int< | defproc source(chan!(int< | ||
</ | </ | ||
Line 51: | Line 51: | ||
<code act> | <code act> | ||
- | export | + | function init(int< |
- | export | + | function init_range(int< |
</ | </ | ||
These functions are used to initialize a (pseudo) random number generator. They return an identifier to be used in subsequent calls to the functions below to access the generator. The first one initializes a random number generator of the specified bit-width, while the second one specifies an interval over which the random number is supposed to be uniformly distributed. | These functions are used to initialize a (pseudo) random number generator. They return an identifier to be used in subsequent calls to the functions below to access the generator. The first one initializes a random number generator of the specified bit-width, while the second one specifies an interval over which the random number is supposed to be uniformly distributed. | ||
<code act> | <code act> | ||
- | export | + | function get(int< |
</ | </ | ||
Returns the next random number from the generator specified by index '' | Returns the next random number from the generator specified by index '' | ||
<code act> | <code act> | ||
- | export | + | function seed(int< |
</ | </ | ||
Set the seed for the random number generator '' | Set the seed for the random number generator '' | ||