Digital System Design using FSMs. Peter D. Minns

Чтение книги онлайн.

Читать онлайн книгу Digital System Design using FSMs - Peter D. Minns страница 14

Digital System Design using FSMs - Peter D. Minns

Скачать книгу

Schematic illustration of the state diagram for single-pulse generator with memory and dummy state.

      Note that the added state has the unique name of s3 and the unique flip‐flop assignment of A = 0 and B = 1.

      Also note that s2 uses the A and B values of A = 1 and B = 1. This provides the required unit distance coding. It also has the output P = 0, as it would in state s0 (the state it is going to go to when s = 0).

      In this design the addition of the extra state has not added any more flip‐flops to the design since two flip‐flops can have a maximum of 22 = 4 states (remember Frames 1.2 and 1.3).

      The addition of this extra state is usually called a dummy state.

      Look carefully at the state diagram in Frame 1.13 and satisfy yourself that the state diagram is doing the same thing as the one in Frame 1.11. If you cannot see this, consider reading Frames 1.111.13 again.

      Now let us add an additional input called r to our state diagram.

      Input r is to be added so that if r = 1 the FSM will continue to pulse output P (on and off) until r is made 0. At this point the FSM will return to state s0 but only if input s = 0.

       Draw the block diagram for the FSM.

       Draw the state diagram for this modified FSM.

      Take your time and think about what you are doing.

      

Schematic illustration of a block diagram for the FSM. Schematic illustration of the 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.

equation

      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.

equation

      In practice there is a tendency to show this active low output as:

equation

       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.

Скачать книгу