Namespace std::gates

The namespace std::gates contains a collection of gates that are commonly used in digital design.

export template<pint N; pbool invert> defproc ortree (bool? in[N]; bool out);

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.

export template<pint N; pbool invert> defproc andtree (bool? in[N]; bool out);

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.

export template<pint N; pbool invert> defproc ctree (bool? in[N]; bool out);

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.