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
std:start [2022/07/17 06:31]
rajit [Functions]
std:start [2022/07/17 06:38]
rajit [Nested namespaces]
Line 26: Line 26:
  
 ====== Definitions ====== ====== Definitions ======
 +
 +<code act>
 +export template<pint ID, N,W>
 +defproc rom (chan?(int<std::ceil_log2(N)>) addr; chan!(int<W>) dout);
 +</code>
 +(This can be used after ''actsim'' is installed.)
 +
 +<code act>
 +export template<pint N, W>
 +defproc ram (chan?(int<2>) rd; chan?(int<std::ceil_log2(N)>) addr;  
 +             chan?(int<W>) din;  chan!(int<W>) dout);
 +</code>
 +
 +<code act>
 +export defcell buf_arbiter(bool? a, b; bool! u, v) ;
 +</code>
 +
 +<code act>
 +export defcell ideal_arbiter(bool? a, b; bool! u, v) ;
 +</code>
 +
 +<code act>
 +export template<pint N, M>
 +defproc arbiter(chan?(int<N>) A; chan?(int<M>) B; chan!(int<N>) Ap; chan!(int<M>) Bp);
 +</code>
  
 ====== Nested namespaces ====== ====== Nested namespaces ======
Line 31: Line 56:
 The ''std'' namespace contains a number of nested namespaces: The ''std'' namespace contains a number of nested namespaces:
  
-  * [[channels|channels]]: Standard channel definitions 
   * [[data|data]]: Standard data types   * [[data|data]]: Standard data types
 +  * [[channels|channels]]: Standard channel definitions
   * [[gates|gates]]: Commonly used gates   * [[gates|gates]]: Commonly used gates
   * [[cells|cells]]: A simple synchronous standard-cell library   * [[cells|cells]]: A simple synchronous standard-cell library