component orn "N input OR gate";
description """\ \\fBout\\fR is computed from the result of logic or applied
to all input pins. """;

// Input Pins
pin in bit in#.[pincount];
pin out bit out;

instanceparam int pincount = 2;

option MAXCOUNT 16;

license "GPL";

author "Alexander Roessler";

function _ nofp;
;;


FUNCTION(_)
{
    hal_s32_t n;
    hal_bit_t value = false;

    // loop through inputs
    for (n = 0; n < local_pincount; n++)
    {
        value = value || in_(n);
    }
    out = value;

    return 0;
}
