What is finite state machine?

Source: Internet
Author: User

State machines: State machines are composed of state registers and combinational logic circuits, which can be transferred according to the pre-set state of the control signal, which is the control center of coordinating the related signal action and accomplishing the specific operation finite.

Category:

~ If the output is only relevant to the state and is not related to the input, it is called the Moore State Machine

     ~ output is not only related to the state but also to the input, it is called the mealy state machine     an extremely precise description of the state machine is that it is a forward graph consisting of a set of nodes and a corresponding set of transfer functions. A state machine "runs" by responding to a series of events. Each event is within the control of the transfer function belonging to the current node, where the scope of the function is a subset of the node. The function returns the "next" (perhaps the same) node. At least one of these nodes must be an end state. When the end state is reached, the state machine stops. A calculation model that contains a set of state sets (states), a starting state (start), a set of input symbol sets (alphabet), a conversion function that maps the input symbol and the current state to the next state (transition function). When the symbol string is entered, the model enters the starting state. It's going to change to a new state, depending on the conversion function. In finite state machines, there are many variables, for example, a state machine has many actions associated with an action (actions) Transformation (mealy) or state (mole machine), multiple start states, a conversion based on no input symbols, or multiple transformations that specify symbols and states (non-finite state machines). One or more states assigned to the receive state (the recognizer), and so on. The control flow of   traditional applications is basically sequential: follow the pre-set logic and execute from start to finish. Few events can change the standard execution process, and these events mainly involve anomalies. The command-line utility is a typical example of this traditional application.   Another type of application is driven by events that occur externally-in other words, events are generated outside the application and cannot be controlled by the application or programmer. The code that needs to be executed depends on the event received, or its arrival time relative to the other event. Therefore, the control process cannot be sequential or predetermined, because it relies on external events. Event-driven GUI applications are typical examples of such applications that are driven by commands and choices (that is, user-created events).  web applications are driven by submitted forms and user-requested Web pages, which can also be grouped into the categories described above. However, GUI applications still have a degree of control over the received events, because they depend on the windows and controls that are displayed to the user, and the windows and controls are controlled by the programmer. Web applications are not, because once a user takes an action that is not expected (such as using the browser's history, manually entering a link, and simulating a form submission, etc.), it is easy to disrupt the design of the application logic. Clearly, different techniques must be adopted to deal with these situations. It can handle any sequence of events and can provide meaningful responses-even if theseThe order in which the events occurred is different from the expected. The finite state machine is designed to meet the requirements of this field.   Finite state machine is a conceptual machine that can take some kind of action to respond to an external event. The actions taken can depend not only on the events received, but also on the relative order in which each event occurs. This can be done because the machine can track an internal state, which is updated after the event is received. Actions that respond to an event depend not only on the event itself, but also on the internal state of the machine. In addition, the action taken will also determine and update the state of the machine. In this way, any logic can be modeled as a series of event/state combinations. [2]   state machine can be summed up as 4 elements, namely, present state, condition, action, and sub-state. This induction is mainly due to the internal causal relationship of the state machine to consider. "Present state" and "condition" are the result of, "action" and "sub-state" is the fruit. This is explained as follows: ① Present state: Refers to the current position. ② condition: Also known as an "event", when a condition is satisfied, an action is triggered, or a state migration is performed. ③ Action: The action performed after the condition is met. After the action is completed, you can migrate to a new state, or you can still remain in the original state. The action is not required, and when the condition is met, you can move directly to the new state without performing any action. ④: The new state to be moved when the condition is satisfied. "Secondary state" is relative to the "present state", the "secondary state" once activated, it becomes a new "present state".  

What is finite state machine?

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.