Файл: Embedded Controller Hardware Design (Ken Arnold, 2000).pdf

ВУЗ: Не указан

Категория: Не указан

Дисциплина: Не указана

Добавлен: 13.06.2025

Просмотров: 2715

Скачиваний: 0

ВНИМАНИЕ! Если данный файл нарушает Ваши авторские права, то обязательно сообщите нам.

61CHAPTER THREE

Worst-Case Timing, Loading, Analysis, and Design

transition. Hold time is the amount of time that a sampled signal must be held valid and stable after a clock signal transition occurs. If these conditions are not met, the Q output may become invalid or even oscillate. This condition is referred to as metastabilit. The times of these and most other signals are frequently measured with respect to the 50% amplitude points of the clock signal rather than the valid logic one and zero levels. An analogy for the flipflop as a sampling device is that of an instant camera: the clock is the shutter, the D input is the lens, and the output is the film image. The input is sampled when the shutter is open, and if the subject moves with the shutter open the picture will be blurred. For the flip-flop, the “shutter open” time, referred to as the window of uncertainty, is shown in Figure 3-5 below along with some possible results.

Metastability of a storage device such as a flip-flop or register is caused by the change of an input signal too close to the edge of the clock signal. In other words, if the setup or hold time requirements are not met, the output of the device is unpredictable

and may even be unstable!

Window of

Setup Time

Hold Time

Uncertainty

Violation

Violation

The output may operate

normally, take an invalid

Clock

level, or oscillate (which

may also explain why

Data

indecisive people take

Q Output

bad photos!)

TSU

TH

TSU

TH

Figure 3-5: Metastability of a flip-flop.

Tri-State Bus Interfacing

When multiple devices are capable of driving the same line, the possibility exists that two or more of them will try to drive it in opposite directions at the same time. When tri-state devices fight like this it is called bus contention. Figure 3-6 illustrates this condition. While the data is unpredictable during this period, there are far worse things that can happen as a result of this condition. Since most tri-state devices have the ability to drive many loads, they are also capable of sourcing and sinking large currents. When two of these devices are in contention, very large currents with peaks in the tens

or hundreds of amperes can flow for times on the order of nanoseconds.


62EMBEDDED CONTROLLER

Hardware Design

TOE

TOD

Output

Output

Enable

Disable

Display

Display

Output A

Output A

Output Enable A

Enabled

Enabled

Output B

Output B

Output Enable B

Enabled

Enabled

Data Bus

Drive A Data

Drive B Data

A Data

B Data

Design

Bus

Overlap =

Margin

Contention

TODA - TOEB

Figure 3-6: Tri-state bus timing and contention.

The large current spikes that occur during contention may stress the devices and significantly reduce their reliability. A far more frequent problem, however, is the temporary drop or glitch in the local power supply wires that can cause any other nearby devices to change state. As you can imagine, this can create havoc in sequential logic, particularly for micros. Based on past experience with Murphy’s Law, these glitches generally seem to change the current instruction to “jump immediate to format hard disk routine,” thereby erasing all your data. In a properly designed system, there is a “dead time” when no device is driving the bus to act as a safety margin between the times that two devices are enabled to drive their outputs. The problems arise when the output enable time of a device which is just turning on is less than the output disable time of a device which is turning off.

Pulse Width and Clock Frequency

The width of a positive going pulse is the period beginning from its positive transition (rising edge or leading edge) to its negative transition (falling or trailing edge). Figure 3-7 illustrates these concepts. Pulse widths are important in defining the operation of control signals such as the memory read or write signals and clocks. Clock signals used for modern microprocessors usually, but do not always, have equal high and low pulse width requirements. The period (T) of a signal is the sum of the rise time, high time, fall time, and low time. The frequency of a processor clock (f = 1/T) may have a lower limit as well as an upper limit. The standard NMOS 8051 family of parts has a lower frequency limit of 1.2 MHz. That means that the processor cannot be operated


63CHAPTER THREE

Worst-Case Timing, Loading, Analysis, and Design

at a lower frequency. The reason is that the processor’s internal design requires a constant clock, in order to correctly maintain its state.

Other processors (such as the 80C51 series CMOS devices) can tolerate having their clock stopped completely, as they have been designed to maintain their

internal states indefinitely, as long as power is applied.

TPW

Pulse

Width

TCLK

Period = 1/Frequency

Figure 3-7: Pulse width, period, and clock frequency.

Fan-Out and Loading Analysis—DC and AC

Another important part of worst-case design is a realistic model of the signal loading for each of the circuit’s outputs. If insufficient drive is available, buffer circuits must be added or the number of loads must be reduced to guarantee correct operation. Fan-out is the number of equivalent inputs that can be safely driven by one output. A fan-out of 10 indicates that one device output can drive ten inputs. The fan-out is determined from:

The source, type and number of loads

DC characteristics sources and load

AC characteristics of the loads vs. the source test conditions

DC characteristics of the output and inputs consist of:

The maximum current that can be produced by an output

Maximum currents required to drive an input

The maximum output currents are specified as:

IOLmin

Minimum output low (sink) current for a valid zero output voltage

IOHmin

Minimum output high (source) current for a valid one output voltage

Note that a low output is sinking currents that are coming out of the inputs that are being driven. Likewise, a high output is sourcing current that goes into the inputs that are being driven.

64EMBEDDED CONTROLLER

Hardware Design

Maximum currents required to drive an input are specified as:

IILmax

Maximum input low current for a valid zero input voltage

IIHmax

Maximum input high current for a valid one input voltage

Another important convention has to do with the sign of the current flowing in or out of a device pin. In most cases, current flowing into a device pin is given a positive sign (as shown in Figure 3-8), while current flowing out of a pin is given a negative sign (as shown in Figure 3-9). In both Figures 3-8 and 3-9, the device on the left is the driving device, which tries to force its output to the desired logic state. In the logic one state, the output sources current (–50 microampere), and the receiving device absorbs that current (+50 microampere). In the example below, the available output current is exactly equal to the input current used by the load, resulting in a DC fan-out of 1.

V+

Logic '1'

V+

Current

Current

Output High

Input High

IOH

IIH

'1'

'1'

-50 A

+50 A

Current Out

Current

of Pin is

Into Pin is

Negative

Positive

Figure 3-8 (left):

Current sign for logic high.

Figure 3-9 (below): Current sign for logic low.

V+

Logic '0'

V+

Unfortunately, this

Current

Current

convention is not always

Output Low

Input Low

IOL

IIL

followed consistently,

. . .

. . .

so it is up to you to rec-

'0'

'0'

+1 mA

-1 mA

ognize the current direc-

Current

Current Out

tion from the context of

Into Pin is

of Pin is

Positive

Negative

the situation in which it appears. Generally, the

current direction can be determined by keeping these images in mind, especially since many data sheets do not specify the sign for the input and output currents.

The other type of fan-out limitation is the ability of an output to drive the capacitance of the loads and stray wiring capacitance, also known as AC fanout. The AC fan-out is determined by the specified test load for the driving