This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

What is emulator?

I wish to know what emulator is . Is emulator used in CC2530ZNP kit? I see FET is used to debug and program? IS it the emulator . What role does emuator play . I googled about emulator to find about them. Info are vague . I wish to know a practical example since i might have used it without knowing that ist he emulator :P  

  • Hi John.

    As I understand you are talking about CC2530ZDK-ZNP-MINI.  For this kit USB stick work as programmer/debugger and could be use to program target boards.

    From another side for debug and programming MSP430 MCU is used MSP-FET430UIF (Flash Emulation Tool) which is emulator for these MCUs.

    best regards,

    Oleksiy

  • John Flanno said:
    I wish to know what emulator is

    Funnily enough, the same question just came up on the Keil forum: http://www.keil.com/forum/21818/

    An emulator, as the name suggests, is a tool which emulates something else!

    In this particular context, an emulator is a piece of hardware which emulates the behaviour of a microcontroller/microprocessor/DSP chip.

    But why, I hear you ask, would one want to do that?

    This kind of emulator doesn't just emulate; more importantly, it provides access to view and control the inner workings of the emulated chip; eg,

    • View & modify memory;
    • View & modify registers;
    • Trace program execution;
    • Single-step program execution;
    • Set breakpoints.

    To use such an emulator, it replaces the emulated chip in the target hardware - hence its full name is In-Circuit Emulator - or "ICE" for short.

    This allows you to view and control the operation of your software in the target hardware.  Note this this is what distinguishes an emulator from a Simulator - which is purely a software tool, running on a PC, workstation, or suchlike.

    Here is a picture of an in-circuit emulator:

    Right at the bottom, you can see the plug where it fits into a socket in the target hardware - replacing the emulated chip.

    Clearly, this all relies upon:

    1. being able to remove the emulated chip;
    2. being able to reliably attach the emulator.

    That was all very well in the days of socketed chips in DIL & similar packages (the example above is for a 44-pin PLCC 8051)  but has long been impractical as chip packages have shrunk and/or grown in pin count.

    Also, as you can see from the picture, ICEs can be quite unwieldy - again, the example shown is just a simple 8051 emulator!

    ICEs are also very, very expensive!

    Therefore, nowadays, instead of true emulators, modern chips have built-in debug hardware on the chip itself - accessed via an interface such as JTAG.

    Motorola (now Freescale) pioneered this - calling it "Background Debug Mode" (or "BDM" for short).

    The on-chip debug hardware provides almost the same facilities as a true emulator; but it is not emulation - it is the real chip!

    When people speak of "emulators" or "ICE" today, they usually mean the on-chip debug hardware.

     

     

  • John Flanno said:
    I see FET is used to debug and program? IS it the emulator

    No, strictly it is not an emulator;  a true emulator would be something that replaced the chip and emulated it instead. See my previous post.

    The FET is the thing which gives you access to the chip's own internal debug hardware. It does not emulate the chip - it uses the actual chip itself, in situ!

    However, as noted, many (most?) people do refer to such things as "emulators".

    John Flanno said:
    What role does emuator play

    Hopefully that's answered above?

     

    http://en.wikipedia.org/wiki/In-circuit_emulator

  • Andy Neil said:
    However, as noted, many (most?) people do refer to such things as "emulators".

    Reason is that IAR (or was it CCS) allows you to switch between emulator and simulator mode. Here the use of 'emulator' is a relic from other microcontrollers where you can only debug using a 'real' hardware emulator. This setting has confused many people, running their code in a (software) simulator and wondering why the hardware doesn't show any signs of life.

    However, this discussions sheds some ligt about the strange name 'FET' (Flash Emulation Tool) for the JTAG programmer. It "emulates an emulator" by attaching to a real MSP. No need to replace the MSP by an emulator (so likely 'flash' is not related to the MSP having flash memory, but to the fact that you can quickly attach it)

  • Andy Neil said:
    However, as noted, many (most?) people do refer to such things as "emulators".

    Jens-Michael Gross said:
    Reason is that IAR (or was it CCS) allows you to switch between emulator and simulator mode.

    No, I don't think that is the reason. The (mis-)usage is widespread without IAR!

    A bit like the very common reference to "DB9" (sic) connectors..

    Jens-Michael Gross said:
    However, this discussions sheds some ligt about the strange name 'FET' (Flash Emulation Tool) for the JTAG programmer

    In the days of real In-Circuit Emulators, the low-cost alternative was an EPROM Emulator. This replaced the EPROM in the system (instead of the processor) - making it quicker & easier to reload code, and giving test access to the data & address busses.

    Maybe "Flash Emulation Tool" also harks back to that..?

  • Andy Neil said:
    In the days of real In-Circuit Emulators, the low-cost alternative was an EPROM Emulator.

    Not low-cost. High-speed. EPROM programming times of minutes and erase times of >10 minutes were a pain. And the number of erase cycles was limited too.
    The EPROM emulator usually was a dual-port RAM that behaved like an EPROM to the CPU and could be written quickly by the PC connection.
    And it didn't have anythign to do with ICEs at all. It was used for many CPUs as a replacement of the external EPROM chip with the firmware, e.g. on 8032, 6502, Z80 processors. The EPROM emulator was independent of the ICE for processors without internal EPROM (On those with internal EPROM or ROM, the EPROM emulator of course was part of the ICE too)

    Andy Neil said:
    Maybe "Flash Emulation Tool" also harks back to that..?

    I thought so too for a long time, especially since there have been some MSPs with ROM instead of flash.

    However, it doesn't make too much sense. AFAIK, the EEM does not support pushing an instruction into the CPU, which would be necessary to emulate flash on a non-flash device.

    Andy Neil said:
    The (mis-)usage is widespread without IAR!

    Without IAR, and perhaps the name 'FET', I don't think anyone in the MSP world (except those who use a real emulator on other MCUs) would use this term.

**Attention** This is a public forum