Differences

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

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
std:start [2022/07/17 10:20] rajitstd:start [2022/07/17 10:38] – [Nested namespaces] rajit
Line 24: Line 24:
 </code> </code>
 Computes the quantity ''n'' to the power of ''m''. Note that ''pint''s use 64-bit representation.  Computes the quantity ''n'' to the power of ''m''. Note that ''pint''s use 64-bit representation. 
 +
 +====== 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 ======
 +
 +The ''std'' namespace contains a number of nested namespaces:
 +
 +  * [[data|data]]: Standard data types
 +  * [[channels|channels]]: Standard channel definitions
 +  * [[gates|gates]]: Commonly used gates
 +  * [[cells|cells]]: A simple synchronous standard-cell library
 +  * [[io|io]]: Standard I/O primitives
 +
 +