Simulation of Microcontrollers

I have been working on microcontrolers like 8051 and intel's 80c196. I have never simulated microcontrolers before starting development however I know that Proteus can be used to simulate 8051 and few othe uControllers.

Can Orcad be used to simulate microcontrollers? Are there other softwares which can be used?

I normally work with microcontrollers, opamps and A/D converters.

Eventually I would like to develop every thing by simulating it firs rather than going in without any software simulation.

Please guide to any pertinent info or books that may be availabe.

Reply to
arslan
Loading thread data ...

You need to decide at what level you will be simulating. i.e. What are you trying to acheive ?

There are several levels

- The RTL level i.e. The CPU design in isolation. Needed if you are designing the CPU

- At the PCB level (Functional) e.g. Checking that the CPU can talk to on board peripherals at functional level. For this you will need Bus Functional Models (BFM's) of the components on the board, which you can develop or buy from the component and/or simulator vendor I have used "smartmodels" models of CPUs in the past (synopsys own them I think)

- At the PCB level (signal integrity)

i.e. Cross talk, terminations etc. Component vendors should be able to provide a simplified electrical model of I/O buffers that you can use as the basis for this simulation. (IBIS files)

- Higher Level

Instruction set simulators and C models.

Look on the mentor graphics website

formatting link
for further info and background

Thanks,

Steven

Once you know why you are simulating

Reply to
moogyd

If you are already familiar with microcontrollers you might consider the option to program your own simulator. I have been doing it for thirty years. It can be a trivial job.

I simulated many variations in new micro designs to help make hardware design decisions based on extensive software simulations of variations in architecture, instruction set, and coding for a number of intended application problems. You can make changes quickly and get detailed statistical analysis of runtime details. Depending on the nature of the problem being solved you can simulate at, above, or below the instruction set level.

At a startup a few years ago I wrote a "high level" environment simulator, tested and delivered it in the first week for other programmers to start development. Simulating the microcontroller only took a day. But the idea was that simulating all the connected devices in addition to the microcontroller(s) is what is needed to develop an app. It took a week to simulate the lcd in a desktop window, and the modem in the embedded system with the modem in the PC, and the embedded system's keyboard with the PC keyboard etc. and provide developers with an environment accessing these services using the same API as would be used in the embedded system.

Then I created a low level simulator, that simulated every bit in the embedded system and had to include all the low level drivers that matched the high level environment simulator I had tossed together in a couple of days. This system also used desktop resources to simulate the operation of all the devices in the system beyond just the micro(s). This system was done in a couple of weeks and was optimized for runtime performance to allow simulation.

Applications could be developed and tested on a PC before the hardware was complete. When the hardware was complete we could drop in tested flash firmware and have it run exactly like it did in simulation from the application's point of view. It is nice to have the software done when the hardware is ready.

Simulation allowed for internal analysis that was not possible on real hardware and allowed for such invasive debugging that it could become a crutch if you were not careful. If you are a programmer and familiar with microcontrollers already you have the option to create simulators as needed for your project development. I have done a lot of different simulators on different projects starting in the seventies and with full custom VLSI microprocessors and microcontrollers for the last twenty years.

Best Wishes

Reply to
Jeff Fox

It would seem to be much easier/quicker to just make the board and test it, you can't simulate the noise, for instance. Granted we use simulators all the time to help with developement, but off the shelf, not internally developed.

Reply to
steve

You must find better technical manuals for the processors than I've seen...

Reply to
Everett M. Greene

If you are not designing something new around chips that are not out yet when you do the design then off the shelf stuff will do.

If you don't need to develop software until after hardware is done because schedule is not important than you don't need to have a simulator for development before new chips are available.

You can simulate at the app level, the api level, the instruction level, the logic block level, the transistor level, or a quantum model level and in many cases simulating noise is important if not essential. Someone had to simulate noise in the design phase at some level.

Best Wishes

Reply to
Jeff Fox

It is harder when the technical manuals have not been written yet either and neither chips nor manuals or compilers are available off any shelf. Instruction level simulators for software development tend to be pretty simple or when timing simulations only need nanosecond accuracy.

Best Wishes

Reply to
Jeff Fox

Your description seems a little baffling -- you have no information about the processor but you whip out a simulator for it in a day.

I can do a simulator for the conditions you describe in about ten seconds:

void simulate_x(void) { }

Reply to
Everett M. Greene

I never said I had 'no information' on the processor. ;-)

When designs begin there are ideas and some written documentation. Talking to the other designers and/or reading CAD source can provide a description suitable for writing the formal chip documentation, programming manuals, simulators, compilers, and applications. Writing an instruction level simulator may be a much smaller job than writing all the documentation that other people will need.

In one project since the simulator was done before any manuals it followed each of the changes in hardware in cad and in tested hardware and other documentation followed the simulator because the simulator description was closer to what a programmer needs to know than the cad description of the circuitry.

Some programmers can write software for target systems by reading only a cad source code description of the target processor but most will need documentation written from the perspective of software execution. If you are familiar enough with the design to be working on the cad source code then 'whipping out' a real software simulator in some high level language is no big deal whether anyone else has written any manuals yet or not.

And, no, I wasn't talking about writing an empty loop. ;-)

If your job is to write a ROM BIOS for a new full custom embedded design you can't say that you need to wait for someone to write a compiler, spec sheets, manuals, and give you a working chip before you can write the BIOS that will go into the ROM to make the chip work. Given the risks due to the investment level in full custom development and fabrication runs simulation of complex software before it becomes hardware is useful.

What I said was if someone says that they been working with a design and are familiar with it and that they are a programmer that they have the option to write a simulator for their microcontroller project. It may not be a big job and shouldn't baffle anyone.

If I wanted to baffle I might say that if you have access to the full source of the OS you are using, and if you have access to the full source of the high level language compiler that you are using, and if you have access to source code for the VLSI CAD system suite of programs that you are using, and if you have access to all that software source and the full source code for several chips, and if all of that and an equal amount of documentation fits on a floppy disk and you have been working on it for a long time and have written dozens of simulators then the idea that some could be 'whipped out' in day is no big deal or joke. What is more worthy of interest is what the cad software does and what the circuits and embedded chip designs and software do. Many people are baffled by those details.

Best Wishes

Reply to
Jeff Fox

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.