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:10] rajit [Exported processes] |
sim:start [2023/04/16 11:31] rajit [Exported processes] |
||
---|---|---|---|
Line 29: | Line 29: | ||
<code act> | <code act> | ||
- | export | + | template< |
defproc file_source(chan!(int< | defproc file_source(chan!(int< | ||
</ | </ | ||
- | This process is also a '' | + | This process is also a '' |
<code act> | <code act> | ||
- | export | + | template< |
defproc check_sink(chan? | defproc check_sink(chan? | ||
</ | </ | ||
Line 41: | Line 41: | ||
===== Namespace sim::rand ===== | ===== Namespace sim::rand ===== | ||
+ | |||
+ | The '' | ||
+ | |||
+ | <code act> | ||
+ | template< | ||
+ | defproc source(chan!(int< | ||
+ | </ | ||
+ | This defines a source whose output is generated using the underlying library' | ||
+ | |||
+ | <code act> | ||
+ | function init(int< | ||
+ | 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. | ||
+ | |||
+ | <code act> | ||
+ | function get(int< | ||
+ | </ | ||
+ | Returns the next random number from the generator specified by index '' | ||
+ | |||
+ | <code act> | ||
+ | function seed(int< | ||
+ | </ | ||
+ | Set the seed for the random number generator '' | ||
+ | |||