Create a high level state machine for a digital bath water controller. The system has a 3bit input r?atio ?indicating the desired ratio of cold water to hot water, and a bit input o?n indic?ating that the water should flow. The system has two 4bit outputs h?fIow ?and cfIow,?controlling the hot water flow rate and the cold water flow rate. The sum of these two rates should always equal 16. Your high level state machine should determine the output values for h?flow?and c?flow?such that the ratio of hot water to cold water is as close as possible to the desired ratio. while the total flow is always l6.
Hint: A?s there are only 8 possible ratios. a reas?onable solution may use one state for each ratio.