Microprocessor hold and lock circuitry

Abstract: A logic circuit external to a microprocessor monitors selected processor I/O pins to determine the current processor cycle and, in response to a hold request signal, drives the processor into a hold state at the appropriate time in the cycle. The logic circuit also includes a "lockbus" feature that, when the processor is not idle, "locks" the microprocessor to the local CPU bus for a predetermined period of time immediately after the processor is released from a hold state.

Description: The present invention is related to a computer system and, more particularly, to a computer system comprising a logic circuit for placing a microprocessor in a hold state in response to a hold request signal, and for locking the microprocessor to the local central processing unit (CPU) bus for a predetermined minimum period of time. The Intel family of microprocessors, including the 80286, 80386 and 80486, support a common interface to allow other devices access to the local CPU bus. These other devices are typically other processors, such as direct memory access (DMA) controllers, which require access to the local CPU bus. The Intel microprocessor has a HOLD input pin for receiving a "hold request" from the device that requires access to the CPU bus. The processor responds to this request by releasing or "floating" the local CPU bus, to allow the requesting device temporary control of the bus. Upon releasing the bus, the microprocessor asserts its HOLDA ("Hold Acknowledge") pin active to notify the requesting device that the bus has been released. The microprocessor does not respond instantaneously when a hold request is asserted at the HOLD pin, but waits for the end of the current local bus cycle or the end of an "atomic" transfer. (An atomic transfer is a transfer of a predetermined number of bytes of code.) The HOLDA pin will remain in the active state until the requesting device removes the hold request from the HOLD pin. When HOLD goes inactive, the microprocessor will inactivate HOLDA and retake control on the local CPU bus. Thus, the device requesting control of the local CPU bus must wait until the microprocessor completes its current bus cycle or atomic transfer. This period of time between the hold request and the time the microprocessor acknowledges that it has released the bus is known as "hold latency". Typically, the longest hold latency period occurs when the hold request is asserted at the beginning of an atomic transfer. In an earlier generation of Intel processors, atomic transfers were only 2 or 4 bytes and hold latency was not a problem. The recently developed 80486 processor, however, treats all memory code reads (code prefetches) as 16 byte atomic transfers. If the processor is executing code from an eight bit device on the CPU bus, a latency period on the order of eight (8) microseconds may result (16 bytes x 0.5 microseconds/byte = 8 microseconds). This creates a problem in personal computer systems wherein a hold latency on the order of 8 microseconds has been known to create errors, such as diskette overruns, due to the length of time that the requesting device must wait for access to the local CPU bus. Also, over-all efficiency is reduced when the system is heavily loaded. An aim of the present invention is to provide a computer system having means for improving over-all efficiency. In accordance with the present invention, there is now provided a computer system comprising: a computer bus; a processor having a hold input port for receiving a hold signal, the processor being electrically coupled to the bus when the hold signal is in an inactive state, and decoupled from the bus when the hold signal is in an active state; characterised in that the computer system comprises a hold and lock circuit having a hold output port connected to the hold input port of the processor for sending a hold signal to the processor, a hold request input port for receiving a hold request signal, bus locking means connected to the hold output port and the hold request input port for locking the hold signal in an inactive state in response to a change in the hold request signal from an active state to an inactive state, and first bus unlocking means connected to the hold output port and the hold request input port for unlocking the hold signal from the inactive state at predetermined time after the hold request signal changes from the active state to the inactive state. In a particularly preferred embodiment, the logic circuit comprises a Programmable Array Logic (PAL) circuit. In a preferred embodiment of the present invention to be described later, there is provided a microprocessor-based computer system having a logic circuit external to the microprocessor suitable for use with an Intel 80486 or other microprocessor, that shortens the hold latency period inherent in the internal HOLD/HOLDA circuitry of the 80486 processor. The preferred embodiment includes programmable array logic (PAL) to determine the current state of the microprocessor by monitoring the processor's I/O pins, and the PAL generates a signal (BCKOFF) in response to a hold request that places the microprocessor in an immediate hold state. The PAL also generates a hold acknowledge signal. The preferred embodiment further provides a "lockbus" feature that "locks" the microprocessor, when not idle, to the local CPU bus for a predetermined minimum period of time. This lockbus feature insures that the CPU has adequate access to the local CPU bus. An example of the present invention will now be described with reference to the accompanying drawings in which: Fig. 1 is a block diagram of a computer system that incorporates the microprocessor hold and lock circuitry of the present invention. Fig. 2 is a schematic diagram of the microprocessor hold and lock circuitry of the present invention. TABLE 1-A is a list of logical equations that define the functions performed by the programmable array logic (PAL) of the present invention. TABLE 1-B is a list of signal definitions. Signal names enclosed in parenthesis are the equivalent Intel signal names as defined in the 80486 specification. Fig. 1 is a block diagram of a computer system that includes the present invention. Referring to this figure, Computer System 100 includes a processor 102, preferably an Intel 80486 microprocessor. A Local CPU Bus 104 includes an address bus, a data bus and a control bus, which are coupled between processor 102 and a buffer 106. System 100 also includes a System Bus 108 coupled between buffer 106 and a buffer 110. System Bus 108 also includes an address bus, a data bus and a control bus. System 100 includes a well known Bus Control and Timing Circuit 112 which is coupled to the address, data and control buses of System Bus 108. System Bus 108 is coupled via a well known Latch/Buffer/Decoder 114 to an Input/Output (I/O) Bus 116, which also includes an address bus, a data bus and a control bus. I/O Bus 116 is coupled to a plurality of Planar I/O Devices (only the first 118 and the "nth" 120 I/O device are illustrated in Fig. 1). These I/O Devices may be RS232 adapters, printer adapters, diskette adapters, interrupt controllers, read only memories (ROM's), or other well known I/O devices. A well known Micro Channel (TM) Bus 122 having address, data and control buses therein is coupled to system bus 108 via buffer 110. The architecture of the Micro Channel Bus is described in more detail in the IBM PS/2 Model 80 Technical Reference Manual. In accordance with the Micro Channel architecture, a well known Central Arbitration Control Point (CACP) 124 is coupled to Micro Channel Bus 122 and Bus Control and Timing Circuit 112 for purposes of managing the Micro Channel multi-device bus arbitration mechanism. The connection of Central Arbitration Point 124 and Bus Control and Timing Circuit 112 actually forms part of the Micro Channel Bus 122. A plurality of Micro Channel sockets 126 are coupled to Micro Channel Bus 122 for receiving adapter cards such as memory cards, video cards, communication cards, etc. One or more hard disk/floppy disk sockets 128 are coupled to Micro Channel Bus 122 to facilitate connection of a hard disk or floppy disk (not illustrated) to Bus 122. A well known Direct Memory Access (DMA) Controller 130 is coupled to the address, data and control buses of System Bus 108 for the purpose of permitting peripherals, such as hard disk drives, floppy disk drives and any Micro Channel DMA slave device, to have direct access to memory 134 to avoid the direct involvement of processor 102 in data transfers between such peripherals and the memory. A well known Memory Control Circuit 132 and associated Memory 134 are also coupled to System Bus 108 as shown in Fig. 1. A well known Programmable Array Logic (PAL) Circuit 136 is coupled between microprocessor 102, Local CPU Bus 104, a Planar I/O Device (e.g., 118), Bus Control and Timing Circuit 112, and Central Arbitration Control Point 124. The functions programmed into PAL 136 are shown in detail in Table-1A, while the signal definitions are described in Table-1B. The "hold request" signal output of Central Arbitration Control Point 124, which was formerly coupled to the HOLD input of the microprocessor in the prior art computer system, is now coupled to PAL 136 and labelled "HLDREQ" in the figures. The HOLD input of microprocessor 102 is unterminated in the present invention (more specifically, it is forced to the inactive state). In its place, PAL 136 generates a "backoff" signal BCKOFF that is connected to the BOFF input of microprocessor 102. When the BOFF pin of microprocessor 102 is asserted active, the 80486 processor will immediately release control of the Local CPU Bus, regardless of the state of the current processor bus cycle. Note that the function of the processor's BOFF input is different from that of the HOLD input. When the HOLD input is asserted active, as in the prior art system, and the processor is currently executing an atomic transfer cycle, the processor waits until the atomic transfer is complete before releasing control of the bus. Similarly, the "hold acknowledge" (more specifically, HOLDA) output of microprocessor 102, which was formerly connected to the Central Arbitration Control Point 124 in the prior art computer system, is unterminated in the present invention. In its place, PAL 136 generates a HLDACK signal, which is coupled back to Central Arbitration Control Point 124 and Bus Control and Timing Circuit 112. A Lockbus Counter/Timer 138 is coupled to PAL 136. The Lockbus signal establishes a predetermined minimum amount of time that a non-idle processor will be "locked" to the local CPU bus. Further details of the interconnection of PAL 136 and Lockbus Counter/Timer 138 with Computer System 100 are illustrated in the schematic diagram of Fig. 2. Referring to this figure, Lockbus Counter/Timer 138 is preferably a 74F393 integrated circuit counter, although other well know counter circuits may also be suitable. The clock input (first section only) of Counter/Timer 138 is coupled to the CPU system clock. When LOCKBUS is inactive (High), the counters are held clear and, consequently, are effectively disabled. When LOCKBUS is asserted active (Low), the counters are enabled and the TOC signal will go High sixty-four CPU clock periods later. (TOC may also be connected to other outputs of Counter/Timer 138, e.g., if connected to the QB output of the second half of the Counter/Timer, TOC will go High thirty-two CPU clock periods after LOCKBUS is asserted active.) Referring to Table-1A, an examination of the equation for LOCKBUS shows that, assuming that LOCKEN is enabled High, the first group of three terms asserts LOCKBUS active (Low) immediately after HLDREQ goes inactive (Low). (Immediately after HLDREQ goes inactive Low, BCKOFF will still be active Low). The second group of three terms holds LOCKBUS active (Low) until either a predetermined period of time has elapsed (i.e., TOC goes High), or the CPU has been idle for two consecutive clock samples (i.e., IDLE goes Low). The LOCKBUS term is then used in the BCKOFF equation to prevent a processor hold as long as LOCKBUS remains active. A quick examination of the equation for BCKOFF shows that the LOCKBUS term appears in each of the first three groups of terms. But, BCKOFF can only be asserted active (Low) if all of the conditions are meet in any one of the first three term groups (the fourth group of terms merely returns BCKOFF inactive when HLDREQ becomes inactive). Consequently, BCKOFF can not be asserted active (Low) as long as LOCKBUS is active (Low). Thus, as long as LOCKBUS is asserted active (Low), processor 102 controls the bus, or, in other words, the processor is "locked" to the bus. Referring to the BCKOFF equation, the first group of seven terms will cause BCKOFF to be driven active (Low) at the end of any non-cacheable bus cycle. Thus, this group of terms is responsible for breaking up the previously mentioned slow 16 byte atomic transfers (because these slow transfers are from non- cacheable memory). This group of terms will also drive BCKOFF active at the end of normal I/O bus cycles. Since this first group of terms waits for the end of the current bus cycle (the first term group requires CPURDY to be active Low to drive BCKOFF active), it maintains single bus transfers as atomic units. The second group of seven terms in the BCKOFF equation drives BCKOFF active (Low) at the end of cacheable bus cycles. In the preferred embodiment, cacheable memory must be defined as 32 bit data widths. Thus, it is guaranteed that these transfers will only require four (4) external bus cycles to complete, or about 2 microseconds (4 transfers x 0.5 microseconds/transfer = 2 microseconds). The third group of terms in the BCKOFF equation will drive BCKOFF active if the local CPU bus is currently inactive. And the fourth group of terms maintains BCKOFF active until HLDREQ is returned inactive. In the equation for HLDACK (hold acknowledge), the first group of three terms drives HLDACK active (High) one clock period after BCKOFF is driven active (Low). And the second group of two terms holds HLDACK active until HLDREQ is returned inactive. Symbol Definitions The symbols listed below have the following definitions throughout the specification and claims: Symbol Definition ! Logical NOT, i.e., logical inversion & Logical AND or Logical OR := "Synchronous Equals". This symbol implies that the term on the left side of the equation is clocked on an edge of the CPU clock. In other words, during any given CPU clock period, the logical state of the term on the left side of the equation is equal to the expression on the right side of the equation when the terms in the right-hand expression are evaluated at (more precisely, immediately before) the clock edge at the beginning of the clock period. = "Asynchronous Equals". This symbol implies its usual meaning, i.e., that the term on the left side of the equation is equal to the expression on the right side of the equation. No clocking is implied.

Claims: A computer system comprising: a computer bus (104); a processor (102) having a hold input port for receiving a hold signal (BCKOFF), the processor (102) being electrically coupled to the bus (104) when the hold signal is in an inactive state, and decoupled from the bus (104) when the hold signal (BOFF) is in an active state; characterised in that the computer system comprises a hold and lock circuit (136,138) having a hold output port connected to the hold input port of the processor (102) for sending a hold signal (BCKOFF) to the processor (102), a hold request input port for receiving a hold request signal (HLDREQ), bus locking means (136) connected to the hold output port and the hold request input port for locking the hold signal (BCKOFF) in an inactive state in response to a change in the hold request signal (HLDREQ) from an active state to an inactive state, and first bus unlocking means (136) connected to the hold output port and the hold request input port for unlocking the hold signal (BCKOFF) from the inactive state at predetermined time after the hold request signal (HLDREQ) changes from the active state to the inactive state. A computer system as claimed in claim 1, wherein the hold and lock circuit (136,138) comprises second bus unlocking means (136) connected to the hold output port and the hold request input port for unlocking the hold signal (BCKOFF) from the inactive state after a predetermined number of idle processor clock cycles following the change of the hold request signal from the active state to the inactive state. A computer system as claimed in claim 2, wherein the hold and lock circuit (136,138) comprises means (136) connected to the hold output port and the hold request input port for generating a lockbus signal (LOCKBUS), the hold signal (BCKOFF) being held in the inactive state in response to an active lockbus signal (LOCKBUS), the lockbus signal (LOCKBUS) being in an active state in response to an active hold request signal (HLDREQ) and an active hold signal (BCKOFF), or an active lockbus signal (LOCKBUS) and an inactive timer signal (TOC) and an inactive idle signal (IDLE) during a previous clock cycle of the processor (102), wherein the timer signal (TOC) is active at the end of the predetermined time, and the idle signal (IDLE) is active at the end of the predetermined number of idle processor clock cycles. A computer system as claimed in claim 1, wherein the hold and lock circuit comprises means (136) connected to the hold output port and the hold request input port for generating a lockbus signal (LOCKBUS), the hold signal (BCKOFF) being held in the inactive state in response to an active lockbus signal (LOCKBUS), the lockbus signal (LOCKBUS) being in an active state in response to an active hold request signal (HLDREQ) and an active hold signal (BCKOFF), or an active lockbus signal (LOCKBUS) and an inactive timer signal (TOC) during a previous clock cycle of the processor (102), wherein the timer signal (TOC) is active at the end of the predetermined time. A computer system as claimed in claim 3 or claim 4, wherein the hold and lock circuit (136,138) comprises a timer circuit (138) for generating the timer signal (ROC), the timer circuit (138) having an input (CLR) for receiving the lockbus signal (LOCKBUS), the timer circuit (138) being enabled when the lockbus signal (LOCKBUS) is active. A computer system as claimed in claim 3 or claim 4, wherein the hold and lock circuit (136,138) comprIses means (136) connected to the hold output port and the hold request input port for generating a hold acknowledge signal (HLDACK), the hold acknowledge signal (HLDACK) being active in response to the hold signal (BCKOFF) and the hold request signal (HLDREQ) being active. A computer system as claimed in any preceding claim wherein the hold and lock circuit (136,138) comprises a Programmable Array Logic (PAL) circuit (136). A computer system as claimed in any preceding claim wherein the processor (102) is an 80486 processor. A computer system as claimed in claim 5, wherein the timer circuit (138) comprises a 74F393 counter.

Inventors: BEGUN RALPH MURRAY, BLAND PATRICK MAURICE, DEAN MARK EDWARD, BEGUN, RALPH MURRAY, BLAND, PATRICK MAURICE, DEAN, MARK EDWARD
Applicants: IBM, INTERNATIONAL BUSINESS MACHINES CORPORATION
Application year: 1990
Main classification: G06F13
IPC codes: G06F13