--CNT[0] is CNT[0] at LC2
CNT[0]_p1_out = !Floor_Arrive & !Slave_Request_Arrive & !CNT[0];
CNT[0]_p2_out = !CNT[0] & En;
CNT[0]_p3_out = !CNT[0] & Reset;
CNT[0]_or_out = CNT[0]_p1_out # CNT[0]_p2_out # CNT[0]_p3_out;
CNT[0]_reg_input = !CNT[0]_or_out;
CNT[0] = TFFE(CNT[0]_reg_input, GLOBAL(Clock_1Hz), , , );


--CNT[1] is CNT[1] at LC3
CNT[1]_p1_out = Floor_Arrive & !En & !Reset & CNT[1] & !CNT[0];
CNT[1]_p2_out = Floor_Arrive & !En & !Reset & !CNT[1] & CNT[0];
CNT[1]_p3_out = !En & !Reset & CNT[1] & !CNT[0] & Slave_Request_Arrive;
CNT[1]_p4_out = !En & !Reset & !CNT[1] & CNT[0] & Slave_Request_Arrive;
CNT[1]_or_out = CNT[1]_p1_out # CNT[1]_p2_out # CNT[1]_p3_out # CNT[1]_p4_out;
CNT[1]_reg_input = CNT[1]_or_out;
CNT[1] = DFFE(CNT[1]_reg_input, GLOBAL(Clock_1Hz), , , );


--CNT[2] is CNT[2] at LC4
CNT[2]_p1_out = !En & !Reset;
CNT[2]_p0_out = !En & !Reset & CNT[1] & CNT[2] & CNT[0];
CNT[2]_p2_out = !Floor_Arrive & !Slave_Request_Arrive & !En & !Reset;
CNT[2]_p3_out = !En & !Reset & !CNT[1] & !CNT[2];
CNT[2]_p4_out = !En & !Reset & !CNT[2] & !CNT[0];
CNT[2]_or_out = CNT[2]_p0_out # CNT[2]_p2_out # CNT[2]_p3_out # CNT[2]_p4_out;
CNT[2]_reg_input = CNT[2]_p1_out $ CNT[2]_or_out;
CNT[2] = DFFE(CNT[2]_reg_input, GLOBAL(Clock_1Hz), , , );


--A1L9 is Door_on_off~45 at LC1
A1L9_p0_out = !En & !Reset & Slave_Request_Arrive;
A1L9_p1_out = !CNT[2] & Delay_Request & !Ahead_Request & !En & !Reset;
A1L9_p2_out = Delay_Request & !Ahead_Request & !En & !Reset & !CNT[1];
A1L9_p3_out = Delay_Request & !Ahead_Request & !En & !Reset & !CNT[0];
A1L9_p4_out = !En & !Reset & Floor_Arrive;
A1L9_or_out = A1L9_p0_out # A1L9_p1_out # A1L9_p2_out # A1L9_p3_out # A1L9_p4_out;
A1L9 = A1L9_or_out;


--Reset is Reset at PIN_51
--operation mode is input

Reset = INPUT();


--En is En at PIN_34
--operation mode is input

En = INPUT();


--Clock_1Hz is Clock_1Hz at PIN_83
--operation mode is input

Clock_1Hz = INPUT();


--Floor_Arrive is Floor_Arrive at PIN_58
--operation mode is input

Floor_Arrive = INPUT();


--Slave_Request_Arrive is Slave_Request_Arrive at PIN_81
--operation mode is input

Slave_Request_Arrive = INPUT();


--Ahead_Request is Ahead_Request at PIN_73
--operation mode is input

Ahead_Request = INPUT();


--Delay_Request is Delay_Request at PIN_12
--operation mode is input

Delay_Request = INPUT();


--Door_on_off is Door_on_off at PIN_11
--operation mode is output

Door_on_off = OUTPUT(A1L9);






