State machine architecture providing increased resolution of output timing
BACKGROUND 
     The present invention concerns an improvement in state machine architecture and other devices, the improvement provides for half clock cycle output resolution while retaining full clock cycle internal logic delays. 
     In a typical state machine the state logic is logically followed by a clocked register. The clocked register, or output register, typically consists of a D flip-flop for each output of the state logic. Output of the clocked register is used both for output of the state machine and a feedback into the state logic. Based on the feedback and on external control inputs, the state logic generates a new set of outputs. 
     When designing the state logic it is important to take into account propagation delay of signals travelling through the state logic. In general, there needs to be enough time between clock signals so that inputs to the clocked register are settled before each clock signal. 
     Each clock signal has a rising edge and a falling edge. Generally, the rising edge and falling edge are separated by a period of time equivalent to one half of the total clock cycle. Sometimes it is desirable to have the output register operate on a different clock edge than the clock edge on which the external control inputs are clocked. For example, this may be used to assure that a device controlled by the state machine does not attempt to read output from the output register of the state machine when the output register is in transition. 
     The simplest method to have the output register operate on a different clock edge than the clock edge on which the external control inputs are clocked is to clock the output register on a different clock edge than the clock edge on which the external control inputs are clocked. In order to do this, however, the system must be designed so that signals are propagated through the state logic within one half of a clock cycle. Propagation delay, as a percentage of clock cycle, may be decreased in a number of ways. For example, the clock cycle can be lengthened. Alternately, the complexity of the state logic may be reduced, i.e., by reducing the number of components through which a signal needs to travel from the input of the state logic to the output of the state logic. Finally, the state logic may be implemented using faster components, reducing the total propagation delay of a signal by reducing the amount of delay in each component through which it travels. 
     Another method to have the output register operate on a different clock edge than the clock edge on which the external control inputs are clocked is to clock the output register on a different clock edge than the clock edge on which the external control inputs are clocked, but to only clock the output register on every other clock cycle. In this case, however, adjustments need to be made to the external control inputs to assure that the values are held long enough for the output of the state logic to be clocked into the output register. 
     The above-described prior art methods for having the output register operate on a different clock edge than the clock edge on which the external control inputs are clocked are effective, but can often result in a decrease in system performance or an increase in system manufacturing cost. 
     SUMMARY OF THE INVENTION 
     In accordance with the preferred embodiment of the present invention, a circuit is presented which allows for improved flexibility in the timing of device output, for example, from a state machine. Output for the device is placed in a first register. The output is forwarded from the first register to a second register. Each register may be built from, for example, a plurality of flip-flops. The first register and the second register are clocked on different edges of a clock signal. A selector selects contents of the first register or contents of the second register as the device output for an external device. For each bit of device output, the selector may be, for example, a one-bit multiplexor. Alternately, the selector may be a pair of tri-state gates, with one of the gates having an inverted input. 
     The selector may be controlled by the contents of one or more flip-flops. For example, if only one flip-flop is used, the entire contents of either the first register or the second register is chosen as device output available to an external device. In this case all device output would be in transition on the same clock edge. Alternately, more than one flip-flop may be used to control the selector, allowinq bits of the device output to change states on different clock edges. For example, a flip-flop may be used to control selection of each bit of device output. In the preferred embodiment, the content of the flip-flops is determined by control signals from the device. For example, if the device is a state machine, the output of each flip-flop may also be used as feedback to the state machine. 
     The present invention thus allows for an extreme amount of flexibility in the timing characteristics of a device, for example, a state machine. This increase in flexibility is accomplished without requiring changes in the duration of the clock cycle, without requiring that state logic circuitry be reduced in complexity, and without requiring an increase in the speed of performance of components of the state logic circuitry. 
    
    
     BRIEF DESCRIPTION OF THE DRAWINGS 
     FIGS. 1 is a block diagram of a typical prior art state machine. 
     FIG. 2 shows additional detail of the prior art state machine shown in FIG. 1. 
     FIGS. 3 and 4 are block diagrams of a state machine in accordance with a preferred embodiment of the present invention. 
     FIG. 5 is a block diagram of a state machine in accordance with an alternate preferred embodiment of the present invention. 
    
    
     DESCRIPTION OF THE PRIOR ART 
     FIG. 1 shows a block diagram of a typical prior art state machine. State logic circuitry 1 receives as input external control inputs 3 and feedback 4. From these inputs, state logic circuitry 1 produces state logic output 5. When state logic output 5 is settled, an output register 2 controlled by a clock signal on line 18 receives state logic output 5. The current contents of output register 2 are used as state machine output 6 and feedback 4. 
     FIG. 2 shows additional bit level implementation detail of output register 2. For each output bit of state logic circuitry 1, output register 2 includes a D flip-flop such as D flip-flop 12. D flip-flop 12 receives a bit of information from state logic circuitry 1 through a D input 17. Upon receiving a clock signal over clock line 18, D flip-flop 12 holds on Q output 16 a value placed on D input 17. Q output 6 may also be used to provide feedback to state logic circuitry 1 over feedback line 14. 
     DESCRIPTION OF THE PREFERRED EMBODIMENT 
     FIG. 3 shows a block diagram of a state machine in accordance with the preferred embodiment of the present invention. State logic circuitry 101 receives as input external control inputs 103 and feedback 104. From these inputs, state logic circuitry 101 produces state logic output 105. When state logic output 105 is settled, an output register 102 controlled by a clock signal on line 118 receives state logic output 105. The current contents of output register 102 are available as input to a multiplexor 117, as input to an output register 107 and as feedback 104. The current contents of output register 107 are available as an input to multiplexor 117. Output register 107, through an inverted clock input 119, is clocked on a different clock edge than register 102. Multiplexor selects either output from register 102 or output from register 107 to be forwarded as state machine output 106. Multiplexor 117 is controlled, for example, by a signal on an output line 127 connected to a Q output of a D flip-flop 122. The signal on output line 127 may also be used as feedback for state logic circuitry 101. Input to D flip-flop 122 is, for example, generated by state logic circuitry 101. This allows state logic circuitry 101 to determine on which clock edge state machine output 106 is in transition. 
     FIG. 3 shows additional bit level implementation detail of output register 102 and output register 105. For each output bit of state logic circuitry 101, output register 102 includes a D flip-flop such as D flip-flop 112. D flip-flop 112 receives a bit of information from state logic circuitry 101. Output from D flip-flop 112 is used as input for a one bit multiplexor slice 123 and a D flip-flop 121 within register 107. Output from D flip-flop 112 is also, for example, used to generate feedback for state logic circuitry 101 over a line 114. Output 127 from D flip-flop 122 is used to control one bit multiplexor slice 123. 
     FIG. 5 shows an alternate embodiment in which multiplexor 117, is replaced by a pair of tri-state gates for each bit of state machine output 106. For example, as shown in FIG. 5, one bit multiplexor slice 123 is replaced by a tri-state gate 131 and a tri-state gate 132. Both tri-state gate 131 and tri-state gate 132 are controlled by an the signal on an output line 147; however, tri-state 132 has an inverted input while the input to tri-state 131 is not inverted. The advantage of using pairs of tri-state gates is that this eliminates the propagation delay through a multiplexor. 
     Also, as part of the alternate embodiment, a signal on a separate line may be generated by a separate D flip-flop for each pair of tri-state gates (or one bit multiplexor slice). For example, in FIG. 5, a D flip-flop 142 is shown controlling tri-state gate 131 and tri-state gate 132. D flip-flop 142 may be used to control only tri-state gate 131 and tri-state gate 132, or D flip-flop 142 may be used to control two or more pairs of tri-state gates. Output line 147 may also be used to provide feedback to state logic circuitry 101 as shown. In this embodiment of the present invention, state logic circuitry 101 can continuously control output to the state machine so that certain bits of output are available on one clock edge and other bits of output are available on another clock edge. 
     The foregoing discussion discloses and describes merely exemplary methods and embodiments of the present invention. As will be understood by those familiar with the art, the invention may be embodied in other specific forms without departing from the spirit or essential characteristics thereof. Accordingly, the disclosure of the present invention is intended to be illustrative, but not limiting, of the scope of the invention, which is set forth in the following claims.