Clock Generator 82C84A

Similar documents
Chapter 9. Timing Design. (Based on Chapter 7 and Chapter 8 of Wakerly)

Chapter 9. Timing Design. (Based on Chapter 7 and Chapter 8 of Wakerly) Data Path Comb. Logic. Reg. Reg. Reg C <= A + B

Digital Fundamentals

2.6 Reset Design Strategy

Combinational vs Sequential

Introduction. NAND Gate Latch. Digital Logic Design 1 FLIP-FLOP. Digital Logic Design 1

ECEN454 Digital Integrated Circuit Design. Sequential Circuits. Sequencing. Output depends on current inputs

L4: Sequential Building Blocks (Flip-flops, Latches and Registers)

Review of digital electronics. Storage units Sequential circuits Counters Shifters

Lec 24 Sequential Logic Revisited Sequential Circuit Design and Timing

PGT104 Digital Electronics. PGT104 Digital Electronics

Chapter 6. Flip-Flops and Simple Flip-Flop Applications

Logic Gates, Timers, Flip-Flops & Counters. Subhasish Chandra Assistant Professor Department of Physics Institute of Forensic Science, Nagpur

Keeping The Clock Pure. Making The Impurities Digestible

CS8803: Advanced Digital Design for Embedded Hardware

Digital Logic & Computer Design CS Professor Dan Moldovan Spring Chapter 3 :: Sequential Logic Design

11. Sequential Elements

Engr354: Digital Logic Circuits

Software Engineering 2DA4. Slides 9: Asynchronous Sequential Circuits

BUSES IN COMPUTER ARCHITECTURE

FSM Cookbook. 1. Introduction. 2. What Functional Information Must be Modeled

Flip-Flops. Because of this the state of the latch may keep changing in circuits with feedback as long as the clock pulse remains active.

Chapter 7 Sequential Circuits

Clocking Spring /18/05

More on Flip-Flops Digital Design and Computer Architecture: ARM Edition 2015 Chapter 3 <98> 98

Lecture 8: Sequential Logic

CS8803: Advanced Digital Design for Embedded Hardware

Lecture 11: Sequential Circuit Design

RS flip-flop using NOR gate

Basis of sequential circuits: the R-S latch

Sequential Circuit Design: Part 1

Fundamentals of Computer Systems

EL302 DIGITAL INTEGRATED CIRCUITS LAB #3 CMOS EDGE TRIGGERED D FLIP-FLOP. Due İLKER KALYONCU, 10043

Chapter 2. Digital Circuits

Chapter 5 Flip-Flops and Related Devices

YEDITEPE UNIVERSITY DEPARTMENT OF COMPUTER ENGINEERING. EXPERIMENT VIII: FLIP-FLOPS, COUNTERS 2014 Fall

Unit 11. Latches and Flip-Flops

RS flip-flop using NOR gate

Digital Fundamentals 11/2/2017. Summary. Summary. Floyd. Chapter 7. Latches

Sequential Circuit Design: Part 1

Fundamentals of Computer Systems

CSE115: Digital Design Lecture 23: Latches & Flip-Flops

DEDICATED TO EMBEDDED SOLUTIONS

IT T35 Digital system desigm y - ii /s - iii

INTRODUCTION TO SEQUENTIAL CIRCUITS

6. Sequential Logic Flip-Flops

Sequential Logic. E&CE 223 Digital Circuits and Systems (A. Kennings) Page 1

CHAPTER 1 LATCHES & FLIP-FLOPS

EECS150 - Digital Design Lecture 10 - Interfacing. Recap and Topics

CPS311 Lecture: Sequential Circuits

COMP sequential logic 1 Jan. 25, 2016


The outputs are formed by a combinational logic function of the inputs to the circuit or the values stored in the flip-flops (or both).

System IC Design: Timing Issues and DFT. Hung-Chih Chiang

Chapter 11 Latches and Flip-Flops

Outline. EECS150 - Digital Design Lecture 27 - Asynchronous Sequential Circuits. Cross-coupled NOR gates. Asynchronous State Transition Diagram

UNIT-3: SEQUENTIAL LOGIC CIRCUITS

Name Of The Experiment: Sequential circuit design Latch, Flip-flop and Registers

Sequential Logic and Clocked Circuits

Fundamentals of Computer Systems

SEQUENTIAL LOGIC. Satish Chandra Assistant Professor Department of Physics P P N College, Kanpur

NH 67, Karur Trichy Highways, Puliyur C.F, Karur District UNIT-III SEQUENTIAL CIRCUITS

Topic D-type Flip-flops. Draw a timing diagram to illustrate the significance of edge

Sequencing. Lan-Da Van ( 范倫達 ), Ph. D. Department of Computer Science National Chiao Tung University Taiwan, R.O.C. Fall,

Memory, Latches, & Registers

Computer Science 324 Computer Architecture Mount Holyoke College Fall Topic Notes: Sequential Circuits

Logic Design ( Part 3) Sequential Logic (Chapter 3)

Slide Set 7. for ENEL 353 Fall Steve Norman, PhD, PEng. Electrical & Computer Engineering Schulich School of Engineering University of Calgary

EE 447/547 VLSI Design. Lecture 9: Sequential Circuits. VLSI Design EE 447/547 Sequential circuits 1

CPE/EE 427, CPE 527 VLSI Design I Sequential Circuits. Sequencing

Digital System Design

Digital Circuits 4: Sequential Circuits

Digital Integrated Circuits EECS 312

Chapter 5: Synchronous Sequential Logic

Project 6: Latches and flip-flops

Laboratory 1 - Introduction to Digital Electronics and Lab Equipment (Logic Analyzers, Digital Oscilloscope, and FPGA-based Labkit)

Figure 1 shows a simple implementation of a clock switch, using an AND-OR type multiplexer logic.

FLIP-FLOPS AND RELATED DEVICES

Asynchronous (Ripple) Counters

PRE J. Figure 25.1a J-K flip-flop with Asynchronous Preset and Clear inputs

Lecture 10: Sequential Circuits

EE 121 June 4, 2002 Digital Design Laboratory Handout #34 CLK

EECS150 - Digital Design Lecture 15 Finite State Machines. Announcements

Digital Integrated Circuits EECS 312. Review. Combinational vs. sequential logic. Sequential logic. Introduction to sequential elements

Synchronous Sequential Logic

Computer Science 324 Computer Architecture Mount Holyoke College Fall Topic Notes: Sequential Circuits

EEC 118 Lecture #9: Sequential Logic. Rajeevan Amirtharajah University of California, Davis Jeff Parkhurst Intel Corporation

EECS 270 Group Homework 4 Due Friday. June half credit if turned in by June

EECS 270 Midterm Exam Spring 2011

DEPARTMENT OF ELECTRICAL &ELECTRONICS ENGINEERING DIGITAL DESIGN

(CSC-3501) Lecture 7 (07 Feb 2008) Seung-Jong Park (Jay) CSC S.J. Park. Announcement

Logic Devices for Interfacing, The 8085 MPU Lecture 4

CSE140: Components and Design Techniques for Digital Systems. More D-Flip-Flops. Tajana Simunic Rosing. Sources: TSR, Katz, Boriello & Vahid

give sequence to events have memory (short-term) use feedback from output to input to store information

ECE 25 Introduction to Digital Design. Chapter 5 Sequential Circuits ( ) Part 1 Storage Elements and Sequential Circuit Analysis

DALHOUSIE UNIVERSITY Department of Electrical & Computer Engineering Digital Circuits - ECED 220. Experiment 4 - Latches and Flip-Flops

Synchronizing Multiple ADC08xxxx Giga-Sample ADCs

EMT 125 Digital Electronic Principles I CHAPTER 6 : FLIP-FLOP

ESE 570 STATIC SEQUENTIAL CMOS LOGIC CELLS. Kenneth R. Laker, University of Pennsylvania, updated 25Mar15

EITF35: Introduction to Structured VLSI Design

Transcription:

Clock Generator 82C84A The Intel Clock Generator chip 82C84A includes three functional blocks: Clock Generation circuitry Ready Synchronization Circuitry ivide by 3 Reset Synchronization Circuitry 1. Clock requirements of the 8088/8086 processor: T CLCH = 118.33ns min. T CHCL = 68.66ns min. T CLCL = 200 ns min.; 500 ns max Frequency = 5MHz max; 2MHz min. Note: 118.33 : 68.66 is about 2:1 T CLCH = 118.33ns min T CHCL = 68.66ns min T CLCL = 200 ns min; 500 ns max 8086 processor designer may be performing sub-clock operations (example: ALE, /EN, etc.) So, duty cycle of 33% for the clock may be the best for the processor. 33% uty Cycle is not a requirement. We can satisfy all three requirements, T CLCH min, T CHCL min, and T CLCL min by choosing 50% duty cycle clock of clock period 400ns! 2. 8086 processor vs. 80C86 processor: What does that C mean? Why there is a minimum frequency (2 MHz) requirement for the 8086 processor? 8086 HMOS up HMOS = High Performance MOS technology ynamic 80C86 80C86-2.C. Note:.C. Static.C. 80C86 CHMOS up High performance CMOS 1/29/07 2-50

CMOS is known as static logic to differentiate from the dynamic logic. In the case of dynamic sequential logic, data sometimes stays on the capacitors. So if the frequency is too low, the data will be lost due to leakage on the capacitors. More in EE477A/577A. φ 1 φ 2 C1 C2 φ 1 φ 2 C1 shall hold charge for this time Non-overlapping phases of 3. How to generate a 33% duty clock The piezoelectric crystal oscillator produces 50% duty clock. So to produce 33% duty cycle 4.77 MHz clock (as in the case of PC XT), they started with 14.31 MHz crystal, produced 14.31 MHz 50%.C. clock and then passed it through a divide-by-3 counter. 14.31MHz 50%.C. ivide- -by-3 4.77MHz 33%.C. 1 0 0 0 1 0 0 1 1 0 1 0 4. Asynchronous Inputs: Examples of asynchronous inputs: Inputs from human, inputs from other subsystems working on a different independent clock If the asynchronous input changes too late into the clock, the system can go into wrong states! A 1 0 X = 0 0 0 X = 1 C 1 0 1 B 0 1 0 0 1 1 0 1 1 Wrong state reached due to X changing rather late. X Asynchronous Next State Logic * * 0 1 State Memory 0 1 1/29/07 2-51

5. Synchronization of asynchronous signals by using a synchronizing FF: XA X_Asynchronous Synchronizing flip-flop Sample-and-hold flip-flop XS X_Synchronized Next State Logic * * 0 1 State Memory 0 1 Should this sampling edge be the same or opposite of the significant edge of the system? Simple intuitive answer: Well if it is the same edge we create a RACE condition. So it should be opposite edge. That is in fact a naive answer! A more thoughtful answer is that we use the same edge. Because of the finite propagation delay of the synchronizing FF (which is made sure to be greater than the hold time requirements of the receiving system/ffs), the RACE condition is carefully overcome in EVERY digital design. A 16-bit shift register needs only one clock to shift all 16 bits by 1-bit right. It does not need 16 clocks or 16 half-clocks! It works on one single edge of a clock because of the finite propagation delay of the left side FF exceeding the hold time requirement of the right-side FF. More on timing design in EE560. Serial_In 15 14 1 0 Remember for your life if you want to be a digital designer t P > t h What if the above relation is not satisfied? How do you fix it? 6. The clock for synchronization shall be the (sending/receiving) system's clock. Example from EE201L homework: System-33 System-44 System-33 System-44 System-33 System-44 System based on 33 MHZ Clock O-IT ONE System based on 44 MHZ Clock System based on 33 MHZ Clock O_IT 33 MHZ S_ONE S_O_IT ONE 44 MHZ System based on 44 MHZ Clock System based on 33 MHZ Clock O_IT S_O_IT 44 MHZ S_ONE ONE 33 MHZ System based on 44 MHZ Clock esign # 1 esign # 2 esign # 3 1/29/07 2-52

esign # 1 experiences synchronization problems as the O-IT signal is asynchronous to the (System-33/ System-44) and also the ONE signal is asynchronous to the (System-33/ System-44). Between esign #2 and # 3, is right and is wrong. 7. Metastability Even the sampling and hold flip-flop may not be able to help, if the asynchronous input actually changes right at the time of sampling. The output of the sampling flip-flop may go into metastability (a state which is neither a 1 nor a 0 ). To understand this, analyze what happens when you try to set a simple cross connected NANpair bistable, but do not hold the set input active long enough. S R If this pulse is short, then, may go into a metastable state In the case of a master-slave -FF, the master can go into a metastable state if the input changes during the setup time; and consequently, the slave goes into a metastable state. 8. What is meant by flip-flops hardened against metastability? S = 1=>0=>1 =0=>1 =1=>0 It should be noted that even if a flip-flop goes into a metastable state, it is generally difficult for it to remain in such a state. It is like... even if you manage to make a knife stand on its edge for a second, it is likely to fall one way or other very soon. By making the edge of the knife sharper, you reduce the probability of its standing on its edge for notable length of time. Similarly, by increasing the loop gain of the cross connected pair of NAN gates/nor gates making a bistable, any small disturbance (disturbance to the precarious metastable state) will get amplified and push the system to go into one of the two stable states of the bistable. Such flip-flops, which are made to very quickly come out of the metastable state even if they very rarely went in are called flip-flops hardened against metastability. R = 1 9. ouble-synchronization helps to reduce the probability of failure due to metastability: XA Increases MTBF (Mean Time Between failures) XS XSS Next State Logic * * 0 1 State Memory Here we employ two Synchronizing flip-flops. Even if the first one goes into a metastable state, it is expected that it would come out of the metastable state by the time the second flip-slop tries to sample the output of the first flip-flop. More in EE552/EE560: What do we do if we received a multi-bit asynchronous data? No, we do not use multiple synch. FFS. 0 1 1/29/07 2-53

10. Why does RES (asynchronous RESET) need to be synchronized to produce synchronous RESET? Isn t it true that if we are resetting the system anyway, we are aborting whatever we are doing and going into the INITIAL state. If so, does it matter if we abort synchronously or asynchronously? It is not about when you go into reset. It is about when you come out of reset. The RESET signal is usually generated using an R-C network. Hence it is an asynchronous signal. After the R-C time constant, if the reset signal becomes inactive just before (or at) the significant edge of the clock, then some flip-slops in the state memory may be able to come out of the reset state and start honoring the next-state bits standing at their -inputs, while some other flip-flops may still be in the reset state. This causes the system to go into wrong/illegal states. Let us first explain the problem using the 5-state dish-washer state-machine of EE201L. Let us assume that the ~RESET is asynchronous and becomes inactive just before (or at) the significant edge of the clock (positive edge in this problem). Also assume that the START happens to be true at that time. It is possible for the one-hot flip-flop ONE to continue to remain in the reset state ( ONE = 1), while at the same time the A_WATER flip-flop may come out of reset and go to 1 ( A_WATER = 1). So we have two FFs hot in the one-hot system! Solution: synchronize the asynchronous ~RESET to produce a synchronous reset signal ~SYNC_RESET CS= ~RESET S= START = 0 A WATER CS= S= RINSE RAIN RY ONE Too close to clock edge START = 1 ~RESET ONE A_WATER RAIN CS START NSL START S S CS A_WATER RINSE NSL RAIN RY NSL ONE ONE ~RESET ~RESET ~SYNC_RESET Better to replace this with this. 1/29/07 2-54

11. Why does RY need to be synchronized? It depends on whether RY is synchronous are asynchronous. Why do you expect that it would be asynchronous? Isn t it true that the WSG (wait state generator) ( which is a state machine) is clocked by the same clock as the processor? Yes and No! If the WSG is clocked by the same clock as the processor, then the RY is synchronous. Then we can choose to avoid going through the synchronizing FFs in the 82C84A and go directly to the input of the processor. same WSG up RY irect, bypassing FFs in 82C84A Or, alternatively, the RY output of the WSG can be taken through one or two flip-flops in the 82C84A before going to the input of the processor. In that case, we simply treat the synchronizing FFs in the 82C84 as simple delay flip-flops and accordingly design our WSG. 82C84A FF1 FF2 same up RY WSG If you want to pass through only ONE flip-flop, should it be FF1 or FF2 or any one of the two? If the WSG is clocked by a different clock (different from the processor clock), then the RY is asynchronous. If it is asynchronous, then it needs to be synchronized (perhaps by going through one of the two FFs in the 82C84A). 82C84A FF1 FF2 It is very common to have multiple clock domains in a major system such as a PC. The board runs at one clock and the PCI bus runs at a different clock for example. So it is possible that the WSG is running at a clock different from the clock of the processor. 12. If the WSG is working on a different clock, then it shall be designed as a NORMALLY NOT SYSTEM (NNR). Why? How about in the case of the same clock situation? (NR / NNR) up different RY WSG NORMALLY NOT SYSTEM 1/29/07 2-55

13. When should an input such as, INTR, HOL, etc. be valid and stable? Based on the bus activity sensed on the pins of the processor (as seen on logic analyzer in lab #4), we can assume that the BIU of 8088/8086 follows the simplified State iagram given on the side. Then, in the case of, you (the board-level designer) would expect that you need to provide a VALI and STABLE input to the processor well-in advance (or reasonably in advance) for the NSL (Next State Logic) of the BIU to produce proper desired next state after T3 (as T4 or TW) and after TW (as T4 or TW). Based on our synchronous system design experience in EE201L, we would expect that the should be valid and stable starting from Tsu (T setup time) before the state transition edge of the clock (negative-edge of the clock here) to Th (T hold time) after the edge. Simplified State iagram for the BIU of 8088/8086 P TI P P P T1 T2 T3 T4 TW P = There is a PENING bus-cycle to perform So the following is our expectation for the timing requirements imposed on the input: ALE T1 T2 T3 TW TW T4 Tsu Th Tsu Th Tsu Th While the expectation is reasonable and justified, the actual timing requirements published in the data sheets are quite different. It may be because, the actual design may not be following pure synchronous design principles, may be using sub-clock operations, may be affecting circuitry other than the simplified state machine for the BIU that we assumed. 1/29/07 2-56

14. A Normally Ready (NR) System and a Normally Not Ready (NNR) System Minus? -8 ns setup time 119ns setup time 30ns hold time Middle edge of T3! 119ns setup time 30ns hold time Reproduced above are diagrams from the 8086/8088 user manual. Several things to notice are: 1. There are two systems, NR and NNR, with different timing requirements. 2. The setup time and hold time are specified sometimes with respect to the middle-edge (positive-edge) of a T-state rather than the significant (state-transition) edge namely the negativeedge. 3. In the case of NNR, the setup time requirement is strangely negative (- 8 ns)! 1/29/07 2-57

14.1.A What is NR and what is NNR? Which is safe? Control room Field Let us take an example of a repair work in a chemical Pump On plant. There are 2 operators A and B and one assistant Off C. After detecting that the water pump in the field is not coming on (even after a low-water alarm from the water tank), operators A switches off power to the A B C pump and sends B and C to the field to open the pump and fix it. They estimated that it would take 30 minutes to fix the pump. Assume that there were no cell phones (or walkie-talkies) in those days! After B and C fix the pump, A needs to switch-on power so that the operator B in the field can see if the pump is now starting. Consider the following two understandings (protocols) among the operators. Normally Ready system: If the fixing job does not seem to be finishing in 30 minutes, B should send the assistant C to the control room to tell A not to switch-on power. In the absence of any such communication, A can assume that the job is done in 30 minutes (Normally Ready in the expected time) and A may switch-on power at the end of 30 minutes. Normally Not Ready system: Here A assumes that B and C are Normally Not Ready and will not switch-on power until there is a positive confirming message from B (through the messenger C) that he is done. While both systems can work, which is safe? And why? 14.1.B Well, we said that the Normally Not Ready system is safe because we do not want B and C to get hurt if they get so involved in fixing the pump that they forget to tell A that they are not done. So we are taking into account the human forgetfulness and consequent safety aspects. But if we are considering designing a wait-state generator, which is the safe system? First consider the following definitions of a NR and a NNR system in the context of a WSG (Wait State Generator). A Normally Ready System: The wait-state generator keeps the line by default active (i.e. normally = 1 during T1 and T2 for example) and will inactivate it (make = 0) if needed (i.e. if the WSG determines that the current bus cycle is addressing a slow memory or I/O device needing one or more wait states) and will eventually activate the ( = 1). See fig. 6-83. A Normally Not Ready System: The wait-state generator keeps the line by default inactive (i.e. normally = 0 during T1 and T2 for example) and will activate it (make = 1) as needed (i.e. if the WSG determines that the current bus cycle is addressing a fast or slow memory or I/O device decides when to make the active). See fig. 6-84. Safety? Preference? Well, unlike a human, who tends to be forgetful, an electronic system is not expected to be forgetful. It can malfunction and if it does malfunction, anyway we need to fix it. 1/29/07 2-58

But how about multiple clock-domains and synchronization across clock domains? What do you mean? Well, what if the processor is working on a clock different from the wait state generator? A simple example of such a situation is in the context of a multi-processor system where is each processor is working on its own clock and the global memory has its own clock. Even in a single-processor system, in current day systems, the processor often works at a very high frequency (say, 3 GHz) compared to memory and I/O. Subsystems such as RAM subsystem, EPROM subsystem, and PCI subsystem have their own clocks. Even if all these clocks are related to each other (perhaps derived from one primary clock source), we can not guarantee good phase relation between them because of varying delays on clock traces on PCB. So these clocks have to be treated as asynchronous to each other. So a signal originating from one subsystem is an asynchronous signal input to another subsystem. OK, how would we judge if NR is better or NNR is better (or neither is good enough!) if the WSG is using a clock different from the processor s clock. Whenever, we convey information (such as active or inactive) from one subsystem to another subsystem working on a different clock, we need to go through the synchronizing flipflops (sample and hold flip-flops). The synchronizing flip-flop may miss to capture the latest value if the latest value has arrived at or around receiving systems sampling. You have heard the phrase, err on the safe side. It means that even if we are making an error, it should only be increasing safety rather than decreasing it. So a loss of a clock or two in synchronizing (in producing the synchronous output from the asynchronous RY input) should not result in producing wrong results. It is fine if we end up adding a couple more wait states where we O NOT need, because it only wastes a couple of clocks but still produces correct result. However, you should never end up missing to add the necessary wait states because then you will be reading/writing wrong data from/into memory. Please note that the NNR system is safe as you started with saying that you are NOT. After sometime you say that you are ready. This new information may reach sometimes quickly and sometimes with an additional clock delay of the receiver s clock. That means you will have either the exact number of wait states or sometimes one extra wait state (which is safe). You will never have one less wait state. 14.2 We notice that the setup is measured with respect to the middle edge (positive-edge) of TW (and T3 in the case of NNR system) where as we were expecting that it should be measured with respect to the ending-edge (negative-edge) of these T states. True, but then we do not know the actual internal design of the 8086/8088 CPU. They may have some of the internal circuitry sensitive to positive edges, they may be doing gated-clock operations (covered in EE560), and so on. So we need to just go by the data sheet and meet all timing requirements stated there (collectively and individually). 1/29/07 2-59

14.3 In the case of NR system, setup time requirement was stated as -8 (negative 8, minus 8) with respect to the beginning of T3 (end of T2). How is it negative??!! Well, let us go through the EE201L homework problem below. 6.1 The setup and hold time of a flip-flop are 0.3ns and 0.1ns, respectively; but because of the routing issues, some delay may happen on one or both input signals ( and ). The amount of this delay which can be modeled by a buffer is 0.04ns. In the presence of this delay, the setup and hold time of the whole circuit may change. t setup = 0.3ns t hold = 0.1ns A 0.04ns 0.04ns B delay=0.04ns C 0.04ns 0.04ns The setup and hold time of circuit A are t setup = ; t hold = The setup and hold time of circuit B are t setup = ; t hold = The setup and hold time of circuit C are t setup = ; t hold = So now you agree that even though the internal FF has +20 ns setup time, due to a 28 ns delay in the clock buffer, externally it looks like a FF with -8 ns (negative 8 ns) setup time! i.e. The external input can start 8 ns after the external clock and yet be 20 ns before the internal clock because the 28 ns delay incurred by the clock signal. delay = 28 ns t setup = 20 ns t setup (overall) = - 8 ns 1/29/07 2-60

15. F/C and EFI inputs to 82C84A: You see a 2-to-1 mux controlled by the select line F/C (Frequency/Crystal) to select between the External Frequency Input (EFI) and clock produced by the crystal oscillator. In a multiprocessor system of (say) 2 processors, to keep the two processors to work of the same frequency, you employ two 82C84A chips (one in each processor subsystem), but you would use a crystal with one of the two and use EFI for the other as shown below. The common CSYNC (which is active initially for a short time) will start the two divide-by-3 counters in the same phase. V GN Common CSYNC 16. ouble synchronization and the ASYNC input:. to P0 to P1 The system designer (boardlevel designer) has a choice of using two Flip-Flops or FF1 one Flip-Flop for synchronization by tying the ASYNC FF2 input to GN or V. Also note that they used a positive-edge triggered flip-flop for FF1 (flip-flop1). It means that they are allowing only one-half of a clock (to be precise one-third of a clock if we are using a 33%.C. clock) for the FF1 to come out of metastable condition (if it ever goes into metastable condition). That is reasonable because the clocks at that time were very slow. A clock with 210 ns clock period will provide 70ns for the FF1 to settle. In some of the current high-speed designs, sometimes they do one of the following two: (i) allow multiple clocks for the synchronizing flip-flops to settle by clocking them by a derived clock of say one-fourth frequency. (ii) use three or four flip-flops to make sure that even if the first could not come out of the metastable condition at the end of a clock, hopefully the second, which consequently goes into a metastable condition, would come out of that condition in one clock. The expectation is that we shouldn t be that unlucky to have a series of flip-flops to go into metastability and not come out of this condition in one clock! Refer to the book, igital esign - Principles and Practices by Wakerly for a detailed discussion on this issue. 1/29/07 2-61

17. To satisfy the timing requirements of the input on the CPU, we can choose the severe most requirement of the multiple requirements and satisfy the same. ALE T1 T2 T3 TW T4 Out of the three cases shown here, the severe most requirement comes from the normally ready system which requires that the input be stable latest by 8ns into T3. So if we make sure that we follow this requirement by using the synchronizing Flip- Flop FF2 in 82C84A (triggered by the neg. edge of ), then the input will be Tsu1= -8ns should go low latest by 8ns into T3 Tsu2 = 119ns Normally Ready System valid from the beginning of T3 (and Tw). And since FF2 updates the sample at every neg-edge, the output of FF2 is definitely stable at the positive edges. This explains how the 82C84A (with FF2 producing ) satisfies the requirements of the input of the CPU. Th = 30ns T1 T2 T3 TW T4 T1 T2 T3 T4 T4 ALE ALE Tsu2 = 119ns Th = 30ns Tsu2 = 119ns Th = 30ns Normally NOT Ready System 35ns RY 0ns 8ns 1/29/07 2-62

oes the fig. 6-86 depict the timing requirements for the RY input assuming that it is lead to the FF#2 directly or it is led to FF#1 and FF#2? How do you tell? How would you draw a timing requirements diagram for the other? 18. Wait State Generator (WSG) design: 18.1 Here, in our EE454L, most of the time, we are using the processor clock or some clock derived from the processor clock to control the WSG. So it is possible to bypass the RY synchronization circuit in the 82C84A. Or if we go through the synchronization Flip-Flop in the 82C84A, we can accordingly produce an appropriate RY (appropriately timed RY). 18.2 While we can generally say that if we are planning to go through an intermediate stage/ff, we need to say whatever we would like to say a little early, we should be careful in deciding whether it should be early by one clock or half clock or one and a half clock or zero clocks! o not make a hasty decision. 18.3 Basic design idea we use here is as follows: The WSG is a state machine. It gets initialized at the beginning of a bus cycle (i.e. during T1 state). The special signal which identifies the T1 state is the ALE (Address Latch Enable). When the BIU in the CPU) is going though the T1 state the ALE puts the WSG in a state called (let us call) WT1 (Wait State Generator s T1 state). We want the WSG to track the CPU. So when the CPU moves to T2, the WSG shall move to WT2. Whether WT2 matches T2 exactly in time or with a half clock delay or a full clock delay depends on your design. It depends upon two aspects: 1. when is WSG coming out of asynchronous/synchronous resetting and 2. what significant clock edge is used for WSG state transitions. 18.4 A simple design would use a shift register asynchronously initialized by the ALE when it is active. We can first clear the shift register using ALE, then we can start shifting a 1 from one end of the shift register. So the shift register s outputs provide a step-like waveform (0 goes high, then 1 goes high, so on and so forth). 18.5 Note that, once the CPU (the BIU, the Bus Interface Unit) reaches T4 state, it does not care what your WSG is telling and what value it sees on until the T3 of the next bus cycle. So, it is fine to have = 1 or = 0 constantly during T4 and subsequent Ti (T_idle state of the BIU). It is fine even to make the signal go up and down! 18.6 While ALE initialization of WSG is common to bring the WSG to WT1 state (Wait-State Generator s T1 state), some designers may use the inactive-state of the R and WR signals (both inactive together, i.e. R = 1 and WR = 1) to initialize the WSG. 18.7 Consider the interrupt acknowledge (INTA) bus cycles also in designing the WSG and note that the address (A19-A0) is unknown during the INTA bus cycle. You can use (R = 1 and WR = 1 and INTA = 1) as a better initialization mechanism. You can consider producing a different 1/29/07 2-63

number of wait-states for the read bus cycles and another different number of wait-states for the write bus cycles. For example, a design problem statement could be as follows: The address range of 80000-8FFFF is occupied by a memory which needs one wait state for the read bus cycles and two wait states for the write bus cycle. In the same system, the address range of 90000-9FFFF is occupied by a memory which needs two wait states for the read bus cycles and one wait state for the write bus cycle. uring the interrupt acknowledge (INTA) bus cycles we need 2 wait states. Note that the address is unknown during the interrupt acknowledge (INTA) bus cycles. In most of the problems in the homework on the WSG design, we do not bring-in the interrupt acknowledge (INTA) bus cycles, as interrupts are covered much later. 18.8 One could think of using a regular state machine instead of a shift register to have greater flexibility in what to do in what bus cycle. ALE=1 WT2_REA else R = 0 WT1 WR = 0 ALE=1 INTA = 0 ALE=1 ALE=1 WT2_WRITE WT2_INTA WT2_REA WT2_delayed_REA WT3_REA WTx_REA WTy_WRITE WTz_INTA 18.9 ALE, (which goes active consequent to the beginning negative edge of in the T1 state), goes inactive consequent to the middle positive edge of. So it is important to understand that at the middle positive edge of the T1 state, the FFs in the shift register of the WSG can not start shifting data from the inputs as they are still forced to remain in the initialization state. Similarly, if you are using R = 1 and WR = 1 as an initialization mechanism, since one of them goes inactive only consequent to the beginning edge of T2 state, the initialization is in force at the beginning negative edge of T2. ALE R T1 T2 T3 T4 Ti T1 T2 T3 T4 Ti 1/29/07 2-64

18.10 An example design of a WSG using a shift register: 18.10.1 raw the waveforms of 1, 2, 3, 4 and 5. If 4 is used as RY1 and is passed through FF2 (only FF2) in the 82C84A (i.e. with ASYNC tied to V) how many wait states are inserted in each bus cycle. VCC VCC VCC VCC VCC 1 2 3 4 5 V PRE PRE PRE PRE PRE CLR CLR CLR CLR CLR ALE 82C84 8088 Explain why you need an inverter here. 4 RY1 T1 T2 T3 TW T V ASYNC ALE 1 2 3 4 (RY1) 5 18.10.2 Now consider a slightly modified version of the above problem. RY1 is passed through FF1 and FF2 by tying the ASYNC input to GN. Are we violating any setup time or hold time? 1/29/07 2-65

18.10.3 In the 18.10.1 problem, if we used negative-edge triggered flip-flops instead of positive-edge triggered flip-flops and passed RY1 through FF1 and FF2 by tying the ASYNC input to GN, what happens? ALE T1 T2 T3 TW T 4 82C84 RY1 ASYNC 8088 1 GN 2 3 4 (RY1) 5 1/29/07 2-66