The gpsim software simulator for Microchip PIC microcontrollers has been made available for download and is distributed under the GNU General Public License, Version 2 or higher, and some of it’s libraries under GNU Lesser General Public License, Version 2 or higher.
It is intended to cover from the core to the I/O pins and including all of the internal peripherals. Thus it’s possible to create stimuli and tie them to the I/O pins and test the PIC the same PIC the same way you would in the real world.
The developer says real time simulation speeds of 20MHz pics are possible with a ‘goto $’ program running at the same speed as a 25MHz pic when simulated on his 400Mhz PII Linux Box. As you add stimuli and begin interacting with peripherals, the performance drops.
The standard simulation paradigm including breakpoints, single stepping, disassembling, memory inspect and change, and so on has been implemented. In addition, gpsim supports many debugging features that are only available with in-circuit emulators. For example, a continuous trace buffer tracks every action of the simulator (whether you want it or not). Also, it’s possible to set read and write break points on values (e.g. break if a specific value is read from or written to a register).
It supports loadable modules which means that it is is possible to add devices to gpsim that are totally separate from gpsim. They reside in their own libraries and are distributed separately. The goal, of course, is to provide the simulation infrastructure for users to easily construct a custom simulation environment.
The gpsim simulator provides a basic module library with the following components:
- Pullup/Pulldown resistors,
- AND, OR, XOR, and NOT Logic Gates,
- Single or 7-segment LEDs,
- PAL Video emulator,
- Rotary Encoder,
- I2C EEPROM.
Gpsim software simulator for Microchip PIC microcontrollers can be downloaded here