architecture Behavior_2 of TL_Controller is signal Controler_State : State := Highway_Light_Green; signal Y : State_Bits := B"00"; begin Y <= State_To_Bits(Controller_State); process variable SumOfProducts : Bit_Vector(0 to 6); begin Controller_State <= Bits_To_State(Y); if C = '0' and Y(0) = '0' and Y(1) = '0' then SumOfProducts := B"0000010" ; elsif TL = '0' and Y(0) = '0' and Y(1) = '0' then SumOfProducts := B"0000010" ; elsif C = '1' and TL = '1' and Y(0) = '0' and Y(1) = '0' then SumOfProducts := B"0110010" ; elsif TS = '0' and Y(0) = '0' and Y(1) = '1' then SumOfProducts := B"0100110" ; elsif TS = '1' and Y(0) = '0' and Y(1) = '1' then SumOfProducts := B"1110110" ; elsif C = '1' and TL = '0' and Y(0) = '1' and Y(1) = '1' then SumOfProducts := B"1101000" ; elsif C = '0' and Y(0) = '1' and Y(1) = '1' then SumOfProducts := B"1011000" ; elsif TL = '1' and Y(0) = '1' and Y(1) = '1' then SumOfProducts := B"1011000" ; elsif TS = '0' and Y(0) = '1' and Y(1) = '0' then SumOfProducts := B"1001001" ; elsif TS = '1' and Y(0) = '1' and Y(1) = '0' then SumOfProducts := B"0011001" ; end if; Controller_State <= transport Bits_to_State(State_Bits(SumOfProducts(0 to 1))); ST <= transport SumOfProducts(2); HL <= transport Color_Bits(SumOfProducts(3 to 4)); FL <= transport Color_Bits(SumOfProducts(5 to 6)); wait on C, TL, TS, Y(0), Y(1); end process; end Behavior_2;