Design a finite state machine that determines the least

Publish By: Admin,
Last Updated: 16-Oct-23
Price: $120

  1. Question: Design a finite state machine that determines the least recently used number in a set. For this FSM, the set of numbers is (0, 1, or 2). For example, for the sequence 0, 1, 0, 2, 0, 2, where the left-most number is the first number to appear in the sequence, the least recently used number would be 1 because 0 and 2 were both used more recently than 1.

    Your FSM receives a 2-bit unsigned binary number (ab) that encodes the values 0, 1, or 2. Each cycle your FSM must output the 2-bit unsigned binary number (xy) that indicates which number was least recently used. Your start state should use the assumption that the numbers 0, 1, 2 were previously seen in that order, making 0 the least recently used number.

    If an illegal number that is not part of the set is received as an input, return to the same state.