// "merge-merge_wchb_e1of2-03.hac"
// copy-modified from "merge-merge_wchb_e1of2-01.hac"

import "merge.hac";
import "env.hac";
import "alternator.hac";

bool _Reset, Reset;
e1of2 L[4], R;
e1of4 C;
c1of4 c;
C.d = c.d;
merge_wchb_e1of<2,4> X(L, C, R, _Reset);
cmos_source_e1of2 LS[4];
LS[0]<5, {0,0,1,1,1}>;
LS[1]<4, {0,0,1,1}>;
LS[2]<3, {0,1,1}>;
LS[3]<7, {0,0,1,0,1,1,1}>;
(;i:4:
	LS[i](L[i], _Reset, Reset);
)
onehot_counter<4> CS(C.e, c, _Reset, Reset);
// cmos_source_e1of4<4, {0,1,2,3}> CS(C, _Reset, Reset);
bitbucket_e1of2 B(R, _Reset);

