

-- Entity Declaration.

ENTITY  mx3sc_fp  IS
	PORT(
		 s0i0 : in        BIT;
		 s1i0 : in        BIT;
		 s2i0 : in        BIT;
		 s3i0 : in        BIT;
		 i0 : in        BIT;
		 i1 : in        BIT;
		 i2 : in        BIT;
		  o :   out MUX_BIT BUS;
		vdd : in        BIT;
		vss : in        BIT
	);
END  mx3sc_fp;


-- Architecture declaration.

ARCHITECTURE  behavior_data_flow  OF  mx3sc_fp  IS

signal o1 : MUX_BIT BUS;
signal ni2 : BIT;
BEGIN

	w1:BLOCK(((not s0i0 and not i1) or (not s1i0 and not i0)) = '1') 
    BEGIN
         o1 <= GUARDED '1';
    END BLOCK w1;

	w0:BLOCK(((s0i0 and i0) or (s1i0 and i1)) = '1') 
	BEGIN
         o1 <= GUARDED '0';
    END BLOCK w0;

	ni2 <= not i2;


    a1:BLOCK(((not s3i0 and not ni2) or (not s2i0 and not o1)) = '1')
    BEGIN
         o <= GUARDED '1';
    END BLOCK a1;

    a0:BLOCK(((s3i0 and o1) or (s2i0 and ni2)) = '1')
    BEGIN
         o <= GUARDED '0';
    END BLOCK a0;

	ASSERT(s0i0 = not s1i0)
		REPORT "s0i0 and s1i0 must have complementary value in mx3sc_fp."
		SEVERITY WARNING;

    ASSERT(s2i0 = not s3i0)
        REPORT "s2i0 and s3i0 must have complementary value in mx3sc_fp."
        SEVERITY WARNING;

    ASSERT((vdd = '1') and (vss = '0'))
    	REPORT "Power supply is missing on mx3sc_fp."
	    SEVERITY WARNING;
END  behavior_data_flow;
