Differences

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

Link to this comparison view

Next revision
Previous revision
std:gates [2026/03/18 11:14] – created rajitstd:gates [2026/03/18 11:22] (current) rajit
Line 1: Line 1:
-====== Common parameterized gates ======+====== Namespace std::gates ======
  
 +The namespace ''std::gates'' contains a collection of gates that are commonly used in digital design.
 +
 +<code act>
 +export template<pint N; pbool invert> defproc ortree (bool? in[N]; bool out);
 +</code>
 +This is an N-input OR tree constructed using a mixture of two and three input gates. If the ''invert'' parameter is true, this creates a NOR operation instead of an OR operation.
 +
 +<code act>
 +export template<pint N; pbool invert> defproc andtree (bool? in[N]; bool out);
 +</code>
 +This is an N-input AND tree constructed using a mixture of two and three input gates. If the ''invert'' parameter is true, this creates a NAND operation instead of an AND operation.
 +
 +<code act>
 +export template<pint N; pbool invert> defproc ctree (bool? in[N]; bool out);
 +</code>
 +This is an N-input completion tree (C-element tree) constructed using a mixture of two and three input gates. If the ''invert'' parameter is true, this creates a completion tree whose output is inverted.