Background of the Invention
The present invention relates to methods and circuits for emulating operation of computer systems, and more particularly to an emulator circuit for a microcontroller that can be selectively operated to provide data and address information at the same or different times, as needed for the particular operation of the emulator circuit.
When a new computer system, such as a microcontroller, is being developed, it is common to also develop a companion device for emulating operation of the computer system. An emulator may be functionally equivalent to the computer system and may be used for a variety of purposes well known in the art, including prototype development, pre-production of systems for mask program applications, and development systems. An emulator circuit may include connections for receiving data, for providing address information, and for signals to control operation of the emulator circuit. As used herein, "address information" may include both address signals for selecting memory locations, and memory control signals, such as read, write, and chip select signals for controlling memory operations.
The emulator circuit may be operated with external memory devices that require coincident availability of data and address information during a clock cycle, and with systems, such as development tools, that require address information and data at different times during the clock cycle. This may be more clearly understood with reference to FIGS. 1 and 2 that illustrate pairs of information streams, one for data and one for address information. Breaks between groups of information in the streams are indicated by X, and are denoted herein as transitions. The transitions may be any of the various breaks between information groups known in the art. A clock cycle is the time between adjacent transitions. In FIG. 1, the address information leads the data, normally by one-half clock cycle; this timing is typically required for conventional development tools used by an emulator circuit during development of the computer system, and is typical of the internal timing of an emulator circuit. In FIG. 2, the address information and data are coincident (or nearly so); this timing is typically required to interface with standard external memories.
Prior art emulators are designed for one or the other of these two timing requirements, and an emulator designed to meet one requirement will not meet the other requirement. This has led to the use of two emulator circuits, or the addition of external circuitry, adding time and cost to computer system development.
Accordingly, it is an object of the present invention to provide a novel circuit and method for emulating operation of a computer system that obviates the problems of the prior art.
It is another object of the present invention to provide a novel circuit and method for emulating operation of a computer system in which address information transitions and data transitions may be coincident when needed for emulator operation with external memories, or the address information transitions may lead data transitions when needed for operation with other systems.
It is yet another object of the present invention to provide a novel circuit and method for emulating operation of a computer system in which the time difference between address information transitions and data transitions may be selectively changed.
It is still another object of the present invention to provide a novel circuit and method for emulating operation of a computer system in which an address latch control (ALC) signal indicates whether the time difference between address information transitions and data transitions is to be zero or one-half clock cycle.
It is a further object of the present invention to provide a novel circuit and method for emulating operation of a computer system in which an ALC signal provides a signal to an address buffer with a latch therein for selecting whether the address information transitions are to lead the data transitions.
It is still a further object of the present invention to provide a novel circuit and method for emulating operation of a computer system in which an ALC signal provides either a high signal to indicate that the address information transition is to lead the data transition by one-half clock cycle, or a low signal to indicate that the transitions are to be coincident.
These and many other objects and advantages of the present invention will be readily apparent to one skilled in the art to which the invention pertains from a perusal of the claims, the appended drawings, and the following detailed description of the preferred embodiments.
Brief Description of the Drawings
FIG. 1 is an illustration of a timing sequence in which address information transitions lead data transitions.
FIG. 2 is an illustration of a timing sequence in which address information transitions are coincident with data transitions.
FIG. 3 is a partial block diagram of an embodiment of the present invention.
FIG. 4 is circuit diagram of an embodiment of the selection circuit of an embodiment of the present invention.
FIG. 5 is a circuit diagram of an address buffer of the embodiment of FIG. 4.
FIG. 6 is a circuit diagram of a latch of the embodiment of FIG. 5, and FIG. 6a illustrates an embodiment of a switch within the latch.
FIG. 7 is block diagram of a further embodiment of the present invention.
Description of Preferred Embodiments
In an embodiment of the present invention, an emulator for emulating operation of a microcontroller may be selectively operated with memory devices that require coincident availability of data and address information during a clock cycle, and with other systems, such as development tools, that require address information and data at different times during the clock cycle. With reference now to FIG. 3, an emulator 10 may include a data bus port 12 for receiving data from a data bus 14 (the data having a transition during each clock cycle), plural address information lines 16, each for communicating address information that has a transition during the clock cycle, an address latch control (ALC) switch 18 for the address lines with a first position wherein the data transition and address information transition occur at the same time (or nearly so) during a clock cycle, and a second position wherein the address information transition and the data transition do not occur at the same time. The switch 18 may be operated by an ALC signal provided to a controller 20. In a preferred embodiment, the ALC signal is either high or low. A clock 22 may provide clock signals for timing the data and address information transitions.
An embodiment of the switch 18 is shown in FIG. 4. An address buffer 24 for selectively changing the time difference of the address information transitions and the data transitions may be provided for each address line 16. The address information may be provided through inverters 26 to a first port (DL) of the address buffers 24, and control signals may be provided to a second port (CB). The ALC signals may be provided to a logical gate 28 (e.g., the NOR gate shown) with an address latch enable (ALE) signal provided internally. The output of the logical gate 28 may be provided through inverters 30 to the port CB of the address buffers 24.
With reference now to FIGS. 5 and 6, each address buffer 24 may include a latch 32 and inverters 34. Each latch 32 may be conventional, or may comprise the circuit of FIG. 6. As shown therein, two switches 36 may be connected through inverters 38. FIG. 6a illustrates a preferred embodiment of the switch 36 in which two inputs C and CB determine whether switch AB is open or closed. The truth table for the switch 36 may be:
In operation, data having a transition each clock cycle are received at data bus port 12 and are communicated as needed in the emulator. Address information for the received data is communicated through plural address lines 16, the address information also having a transition during each clock cycle. If the data transition and the address information transition are to be aligned so that they occur at the same time during each clock cycle, a first position of the ALC switch 18 may be selected, thereby enabling the latch 32 so that the address information is latched. When the latch 32 is enabled in the first position the address information transitions are delayed by one-half cycle to bring the external address and data bus signals into alignment.
If the data transition and the address information transition are to occur at different times during each clock cycle, a second position of the ALC switch 18 may be selected, thereby disabling the latch 32 so that the address transitions lead the data transitions, for example by one-half clock cycle. When the latch 32 is disabled in the second position the internal timing of the emulator may be presented directly to the outside pins so that the address information transitions are one-half cycle ahead of transitions on the data bus.
The ALC signal may be low (e.g., zero) to indicate that the first position is selected and high (e.g., one) to indicate that the second position is selected. The ALC signal may be manually or automatically provided to the emulator, as appropriate.
A more detailed embodiment of an emulator device in a single chip that incorporates the present invention may be seen in FIG. 7. As shown therein, the ALC signal is provided to a bus control. The address lines are indicated by lines A0-A12, and the data bus port by lines DB0-DB7. The remainder of the components and pins relate to the particular microcontroller being emulated by the emulator of FIG. 7. I/O lines PA and PD are software programmable, and emulator I/O signals VPWOUT and VPWIN(not) interface with a transceiver. The ALC signal may also change the behavior of other components. For example, when ALC is high (address transitions are one-half clock cycle ahead of the data transitions) the internal "STATIC RAM" is disabled and accesses to RAM space are mapped off-chip, and a fetch status (FS) true signal (indicating an opcode fetch is in progress) is provided ahead of data bus transitions, instead of coincident therewith. Further, RD(not) is a status output signal which indicates direction of data flow with respect to external or internal memory space (a low level indicates a read from memory space). A read from internal memory or I/O will place data on the external data bus. When ALC=0, RD(not) is internally gated to CE(not)--a chip enable signal used for selecting external memory of I/O--and generated in synchronization with data bus cycles. With ALC=0 standard RAM, ROM and EPROM devices can be directly connected. When ALC=1, RD(not) is not gated by CE(not) and is produced ahead of data bus transitions.
While preferred embodiments of the present invention have been described, it is to be understood that the embodiments described are illustrative only and the scope of the invention is to be defined solely by the appended claims when accorded a full range of equivalence, many variations and modifications naturally occurring to those of skill in the art from a perusal hereof.