State Machine Types
Two types of state machines exist, namelymealytype state machine andmooretype state machines, and in the experiments, the general realization of the two is as follows:
Where the only connections from input to output aremealystate machine only, and themooreThis line is not available for the type.
A way to distinguish between two types of state machines
- The output of mealy is determined by the input and the current state; the output of moore is determined only by the current state
When it comes to timing, we know that the output state of the state machine does not change during a clock cycle, so the final output of the moore does not change; however, the output of the mealy can change when the inputs change during the cycle. Therefore, when the question asksThe output is held for one cycleWhen it comes to choosing moore there is no doubt.
- The output of mealy is faster than moore. As an example:When the state machine goes from state3->state4, if we want state4 to go high, then moore will go high when the output of the register is state4, but mealy only needs to go high when the current state is 3 (regardless of the clock) and the inputs are such that state3 transitions to state4.
Identification of Temporal Logic
As shown in the figure, there are two ways of initializing the registers. Observation reveals that they both use counter (max_value = 0x1,stay at value), thus completing the comfortization before the first clock rising edge, theBut the difference is the mux placement of the twoThe implications of this are:
- When initializing themux is placed in front of the registersWhen this is achieved, the output of the first clock rising edge register is the initialized value.
- When initializing theThe mux is placed after the registers.When the first clock rising edge is realized, the output of the register is the new state after the initialization state is updated.
Therefore, mux will always output one cycle more after registering than before registering, and the choice between the two depends on the specific topic, e.g., when we use the state ofunique hot codeWhen numbering, our initial state may be state0 = 00001, and we want to transfer from state0 from the first rising edge of the clock, we should use the method where mux is placed after register.
Synchronous reset vs. asynchronous reset
Synchronous reset above, asynchronous reset below.
Introduction to Less Commonly Used Components
- pull resistor.
Play should look like a spring
Function: Connect to the input to make the float value go high or low or error.
- A transistor is used for analog switching, somewhat like a controlled buffer.
- The decoder is equivalent to a dmx (multi-bit allocator) with no inputs, except that the outputs are 1s.
- The bit selector outputs the value on the selected bit (bit 0 subscript).
- bit adder Outputs how many bits of a number are 1.
- bit finder Finds the position where 0 and 1 occur in the highest or lowest bit and outputs it.
- Both ram and rom are memories, the difference being that rom can only store, not write.