in circuit emulator

Upload: jeeva-bharathi

Post on 02-Jun-2018

218 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/10/2019 IN CIRCUIT EMULATOR

    1/6

    In Circuit Emulators

    An ideal tool is one that provides visibility into the internal operation of the device or componentbeing emulated. In circuit emulators are hardware tools that both provide that visibility andbehave the same as the component being emulated. For microprocessor development there are

    two types of emulators; the in circuit emulator which is emulating the microprocessor, and, theROM emulator which emulates the ROM. istorically these emulators were sold as part of alogic or microprocessor development system !"#$ or M#$%, today they are an e&tension pod fora '( or wor)station, or even as a bo& on a networ).

    In-Circuit Emulators.

    Introduction

    An in*circuit emulator !I(+% consists of a small dual port pod. On one port is a probe that plugsinto the microprocessor soc)et of the target system. he second port is interfaced to awor)station. A typical emulator probe is illustrated below-

    he emulator probe ideally is physically and electrically identical to the target microprocessor.#uring system development the emulator probe will replace the target microprocessor. heoperation of the target system will then be monitored and controlled via the interface to thewor)station. Initially all the development will be on the wor)station. As target resources becomeavailable then these will be utilied. +ventually the target hardware and software will be fullyfunctional and the debugging capabilities of the in circuit emulator will be no longer re/uired.he in*circuit emulator can then be removed and replaced with the actual microprocessor.

    Features and capabilities available with an in*circuit emulator include- Ability to map resources between target and host. hat is, programs may be run in

    either the target or the host. !he host memory is )now as emulation or shadowmemory%. he mapping features provides the...

    Ability to run and test code in real time without target hardware.

    Ability to step or run programs from0to specified states or brea)points !usually a

    specified address butit is the ability to specify other trigger states that gives the in*circuit emulator its capabilities over and above other debugging tools * the hardware

  • 8/10/2019 IN CIRCUIT EMULATOR

    2/6

    to provide a uni/ue trigger point is similar to that re/uired to trigger a logic stateanalyer%.

    Ability to observe and modify microprocessor registers.

    Ability to observe and modify memory contents. !Often in real time%. his also allowse&haustive testing of the target hardware. $ee memory testing.

    Ability to trace program e&ecution using internal logic analyers. !see separate sectionon "ogic Analyers%

    1ote- $ome of the I(+ capabilities above are common to all debugging tools- single stepping, ability to display andmodify both memory and registers, and to run programs. owever it is only the I(+ that allows testing of thesoftware in real time prior to the target hardware becoming available.

    Limitations of In Circuit Emulators

    2. Availability and (ost

    $imple microprocessors are relatively easy to emulate, but there are several factorsthat reduce the potential mar)ets and hence increase the cost

    a.For even simple microcontrollers there are many variants so different I(+ hardware

    is re/uired for eachb.Modern cutting edge microprocessors are operating at very high speeds. o designemulators for these processors is very challenging and therefore e&tremely costly

    c.Other tools are available that handle many microprocessor development problems atmuch less cost so many large design teams may only need one I(+ !reducing sales%.he danger of this situation is that when the real difficult problems arise that re/uirean I(+ to solve no one has ta)en the opportunity to learn how to use its capabilities.

    3. On (hip Functions

    2. he I(+ capability is tied to the being able to monitor the microprocessor address,data and control buses. 4ith modern processors on chip cache and input*output

    these lines are buried deep in the internals of the microprocessor so are notavailable to the I(+ !or a logic analyer%.

    3. o address the above problems some microprocessors route internal buses tooutput pins !often at a performance cost so losing some of the real time capability%or aternatively other microprocessors supply 5#M !5ac)ground #ebug Mode%capability.

    6. ransparency

    ransparency implies that the target system does not )now if it is interfaced to an I(+or to the real microprocessor. ransparency is

    a.'hysical - basically this implies that the I(+ has the same pin*out and fits into thesame soc)et as the microprocessor being emulated. his is usually achieved using aremote pod !the emulator% and a short !shorter the better% cable connector.

    b.+lectrical implies that the drive and timing capabilities of the I(+ are identical tothe microprocessor being emulated. he e&tra cababling and circuitry with the I(+will degrade both the loading and timing. Any target system operating at the margincould 7fall over7 with an I(+. If the hardware is developed using the I(+ then thesystem can almost be guaranteed to wor) when the I(+ is replaced with a realmicroprocessor. owever, if the hardware has been developed without an I(+ and

  • 8/10/2019 IN CIRCUIT EMULATOR

    3/6

    then an I(+ is used late in the development to debug a software problem there may beproblems with hardware that is operating at the limits of timing and loading. !8singfaster memory for the prototype may give a platform where the I(+ can be used forsoftware debug.%

    c.Functionality- his implies that all the pins are functionally the same. For most pinsthis is true but usually the I(+ will use the 1on* Mas)able Interrupt for program

    control implying that it is not available to the target. +ven the reset pin may be acompromise. o control the I(+ from the wor)station implies that the reset will comefrom the wor)station and be an output pin at the I(+ reset pin whereas in practice thereset is an input.

    The ICE in More detail

    As noted one side the I(+ interfaces to the target system and is ideally physically and electricallyidentical to the microprocessor being emulated. he second side provides an interface to a hostcomputer or wor)station allowing monitoring and control of the I(+. It is this lin) that providesthe designer with a window into what is happening in the microprocessor system underdevelopment.

    he layout of two in*circuit emulators is shown below.

    Block Diagram of In-Circuit Emulators

    he first design consists essentially of a microprocessor manufacturers evaluation board with aserial lin) bac) to a wor)station. From the microprocessor there is a cable that plugs into themicroprocessor soc)et on the target system. he 7I(+7 includes RAM for program developmentand ROM containing a monitor program to interface with the wor)station. he monitor softwarecontains routines that will modify0display memory or microprocessor registers and allowprograms to be e&ecuted from an address to a brea) point. 4hen ever a command is issued fromthe wor)station the serial device will generate a 1MI !non mas)able interrupt% causing themicroprocessor to brea) to the appropriate actions. All communications between the emulatorand the wor)station will be via the serial lin).

  • 8/10/2019 IN CIRCUIT EMULATOR

    4/6

    he second design is typical of top of the range in circuit emulators. In this case all the emulatoror overlay RAM is dual port so the microprocessor can continue with its normal operation whilethe wor)station simultaneously accesses emulation or overlay memory. $ince the microprocessor

    ta)es no part in the transfer of information between the host wor)station and the emulationmemory there is no need for a monitor program in ROM, the monitor program is loaded intoRAM by the wor)station at power up. 4hen the microprocessor is re/uired, for operations suchas modify0display target memory, the wor)station invo)es the monitor by generating an 1MI !ore/uivalent%.

    Most I(+s for general purpose microprocessors are constructed using the actual microprocessorwith e&tra circuitry to provide the switching to0from the host wor)station as re/uired. For singlechip microprocessors the chip manufacturer often provides a bond out version, where the internaladdress and data information is presented on additional pins. Alternatively, these features couldbe provided by emulating the microprocessor using A$I( devices.

    he /uality, and therefore the cost of an in*circuit emulator, depends very heavily on how closelythe in*circuit emulator matches the target processor. Ideally to the target system it should betransparent whether there is an in*circuit emulator or the actual microprocessor that is pluggedinto its processor soc)et. In practice perfect emulation will be impossible, compromises in thedesign will be necessary.

    Memory Mapping

    Included with the I(+ is emulation or overlay memory, so e&cept for the I0O functions, users candevelop and verify all of their code on the I(+ prior to any hardware becoming available. Animportant part of the I(+ is the address mapping circuit. As shown in the figure below theaddress mapper is used to select what resources the I(+ will use. +&amples of how the mappingmay be used are-

  • 8/10/2019 IN CIRCUIT EMULATOR

    5/6

    5efore any target becomes available the mapper will point to emulation memory. Assome of the target becomes available the memory mapping circuit will be configuredto select between emulation or target resources. For e&ample, when themicroprocessor accesses address location 2999 the mapping circuit might enabletarget resources, while for address 3999 resources within the emulator are utilied.As more of the target becomes available, resources are moved from the emulator untilwhen the design is complete the I(+ will be utiliing only target system resources.he I(+ is then removed from the target and replaced with the actual microprocessor.he target will then operate as a stand alone system.

    For system maintenance the I(+ would be plugged into the target. he program areawould be mapped to emulation or overlay memory. $o instead of e&ecuting code fromthe target ROM!s% the program would be e&ecuted from emulation memory. It couldthen be upgraded and tested as re/uired, utiliing all the capabilities of the I(+,before burning replacement ROMs.

    Address Mapper and the In Circuit Emulator.

    1ote in the figure emulation memory and the address mapper are shown located in the host. Forstate of the art microprocessors, to enable high speed operation, minimum signal paths areessential so these components are located in the probe as close to the microprocessor as possible.

    Conclusion

    he ma:or advantage of using an in circuit emulator are-

    $oftware development, including testing in real time, can occur prior to any hardwarebecoming available;

    he I(+ provides facilities to modify0display memory and registers. hese facilitiescan be used to more confidently verify the operation of the system hardware andsoftware.

    he /uality of an in circuit emulator depends to a large degree on how closely it matches themicroprocessor being emulated. 8sually the better the match the higher the cost. 4ith some ofthe more modern microprocessors it has become prohibitively e&pensive to produce high /ualityin circuit emulators so designers sometimes have been forced to do their development by othermeans.

    ROM Emulators.

    $imilar to the in circuit emulator the ROM emulator replaces some of the target resources, in this

  • 8/10/2019 IN CIRCUIT EMULATOR

    6/6

    case the ROM. #uring program development the code is loaded into the ROM emulator from thehost station and the target microprocessor reset line released. he microprocessor should thene&ecute the code that is in the 7ROM7. he program e&ecution can be captured and verified usinga logic analyer. If the analyer is integrated into the host machine it will monitor all activity thatoccurs on the pins of the ROM.

    4ith the ROM emulator flying leads are necessary to both control the microprocessor and to

    capture information on the remaining address and control lines. For e&ample, the reset line willbe necessary to force the microprocessor into its reset state while an 1MI would be used to forcethe microprocessor to brea) to a monitor program. $ince the microprocessor read*write controlline is not normally wired to a soc)et designed for ROM a flying connection is necessary tocapture the status for use by any logic analyer.