// "inverters.hac"
// to be connected to VPI and back

template <pint D>
defproc inv (bool a, b) {
prs {
[after=D]	a	=> b-
}
}

template <pint N, D>
defproc inv_chain(bool i, o) {
inv<D> Z[N];
bool x[N+1];
x[0] = i;
x[N] = o;
(;j:N: Z[j](x[j], x[j+1]);	)
}

bool in0, out0;
bool in1, out1;
bool in2, out2;
bool in3, out3;
bool in4, out4;

prs {
	in0	=> out0-
	in1	=> out1-
	in2	=> out2-
	in3	=> out3-
	in4	=> out4-
}

