	TITLE "ALU DUP";

PARAMETERS (
	WIDTH=16
);

SUBDESIGN alu_5 (
	op1[WIDTH-1..0]	: input;
	op2[WIDTH-1..0]	: input;
	cmd[3..0]	: input;
	res[WIDTH-1..0]	: output;
)
VARIABLE
	logic[WIDTH-1..0]	: LCELL;
BEGIN
	CASE cmd[] IS
		WHEN 0 => logic[] = op1[]; -- dup
		WHEN 1 => logic[] = op2[]; -- over
		WHEN 2 => logic[] = -1;	-- true
		WHEN 3 => logic[] = 0; -- false
		WHEN 4,5,6,7 => logic[] = 1; -- one
		WHEN 8,9,10,11,12,13,14,15 => logic[] = 1; -- one
    END CASE;
	res[] = logic[];
--	res[] = H"00A5";
END;