The block diagram in Figure 1.14 is changing the behaviour of the state diagram.
Figure 1.14 Block diagram for the FSM.
The state diagram is shown in Figure 1.15.
Figure 1.15 State diagram of single‐pulse generator with a multipulse feature.
The new state diagram is essentially the same as that in Frame 1.13 except that now if r = 1 the state diagram sequence (with s = 1) becomes s0 → s1 → s2 → s1 → s2, and so on.
However, if s = 1 and r = 0 the sequence will be s0 → s1 → s2 → s3, which then stops until s = 0 then goes to s0.
From this you should understand that if we make r = 0 before we make s = 1 the state diagram will follow a single pulse on output P.
The Boolean equation for L can be active high or active low.
As active high, we look for states when the value of L is 1.
The Boolean equation for P was P = s1 = A/B (see Frame 1.12).
The Boolean equation for L = s1 + s2 + s3 = A + B since only in states s1, s2 and s3 is the output L = 1.
Note that an alternative equation for L could be the inverse equation for L, otherwise known as ‘active low’. Here we look for the states that make L = 0.
In practice there is a tendency to show this active low output as:
Note that to obtain the L = 0 the reader needs to invert s0 (/s0). This idea will be used later.
This is less complex so it may be used.
The latter equation is in terms of NOT L. This means that when in state s1, s2, or s3, L will be logic 1. Only when the FSM is NOT in any of these states will L = 0.
So in summary:
Input r is used with a two‐way branch from state s2.
If r = 0 there is no change in the operation of the FSM (single pulse from P).
However, if r = 1 the FSM will keep looping between s1 and s2 so as to keep turning the output P on and off, in effect using input r to change the operation of the FSM.
This shows how easily it is to change the behaviour of the FSM (in this case).
Note that this change was done in the state diagram then transferred to the actual FSM.
Please turn to Frame 1.15.
In the previous frames we have considered the flip‐flop output patterns. These are often referred to as the secondary state variables (SSVs) (Figure 1.16).
Figure 1.16 Block diagram showing secondary state variables in the FSM.
They are called ‘secondary state variables’ because they are (from the FSM architecture viewpoint) internal to the FSM (i.e. secondary not primary). If we consider the outside world inputs and outputs as being primary then it seems sensible to call the flip‐flop outputs SSVs (and state variables because they define the states of the state machine).
Moore and Mealy state diagram
The outputs in our FSM are seen to be dependent upon the SSVs or flip‐flops internal to the FSM. If you look back to Frame 1.5 you will see that Moore FSM outputs are dependent upon the flip‐flop outputs only. The output decoding logic in our P pulse example is:
That is it consists of an AND gate and a NAND gate. This means that a single P pulse is a Moore FSM.
How could we make our single‐pulse design into a Mealy FSM?
One way would be to make the output P depend on the FSM being in state s1 (A/B), but we could say that the output was to be the width of a single logic 0 of the clock pulse.
How would we modify our state diagram to do this?
Try doing this, and then turn to Frame 1.16 to find out if you got it right.
The modified state diagram is shown in Figure 1.17 (the r signal here has been dropped so we are back to a simple one‐pulse FSM). Also, /clk is clk inverted.
Figure 1.17 State diagram with Mealy output P.
Notice that now the output P is only equal to logic 1 when:
FSM