3 input MAJORITY combination logic

< Function description >

File name
MAJORITY3.nsl
Function
3input MAJORITY logic function.
I/O signal:
A_i= Input A.
B_i= Input B.
C_i= Input C.

Q_o= Output.

Specification
This code shown ‘any {…}’ block example for 3input MAJORITY function.
An ‘any’ statement check all input signals.
In this code case, check ‘A_i’, ‘B_i’ and ‘C_i’ in ‘any’ block and 2 of 3 signals are asserted, a ‘Q_o’ will be asserted.

A ‘any {…}’ statement is such kind of ‘case()’ statement of C/C++.
However, ‘any’ statement generate multiple output when many condition are matched.