Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revision Both sides next revision
sim:start [2022/07/17 06:43]
rajit [Exported processes]
sim:start [2023/04/16 11:30]
rajit [Exported processes]
Line 32: Line 32:
 defproc file_source(chan!(int<W>) O); defproc file_source(chan!(int<W>) O);
 </code> </code>
-This process is also a ''W''-bit source, except the values produced are taken from a file. The identified ''ID'' is used to determine the file name, and the file is assumed to have at least one data value. By default, the file name is ''_infile_.{ID}''. The file format is a sequence of hexadecimal values, one per line. If ''LOOP'' is set to true, then the sequence of values specified in the file is repeated forever.+This process is also a ''W''-bit source, except the values produced are taken from a file. The identified ''ID'' is used to determine the file name, and the file is assumed to have at least one data value. By default, the file name is ''_infile_.{ID}''. The file format is a sequence of hexadecimal values, one per line. If ''LOOP'' is set to true, then the sequence of values specified in the file is repeated forever. The file name can be modified using [[run-time configuration options|tools:actsim#standard_sim_namespace_helper_functions]].
  
 <code act> <code act>
Line 42: Line 42:
 ===== Namespace sim::rand ===== ===== Namespace sim::rand =====
  
-The ''sim::rand'' namespace contains support for random number generation, and includes the definition of a random source.+The ''sim::rand'' namespace contains support for random number generation, and includes the definition of a number of processes that use this random number generation functionality. The underlying random number generator used is a pseudo-random number generator, and hence the sequence of "random" numbers is deterministic. To ensure that these numbers remain unchanged on different platforms, we use a local mirror of the ''rand_r'' function from glibc.
  
 <code act> <code act>
Line 48: Line 48:
 defproc source(chan!(int<W>) O); defproc source(chan!(int<W>) O);
 </code> </code>
-This defines a source whose output is generated using the underlying library's pseudo-random number generator.+This defines a source whose output is generated using the underlying library's pseudo-random number generator.
  
 <code act> <code act>