XCSIM
(Hobbyist / Student PIC Edition)


TARGET SIMULATION

The user directly interacts with the target simultor via the simulator active component dialogs. There are currently four predefined such dialogs. The user is able to create others useing XEBOT. The predefined dialogs are:

CPU Simulation Dialog This dialog allows the user to directly control the simulation of an individual CPU.

With it the user can single step through target CPU machine code instructions, set break points and watch points, monitor the data space, registers, stack space and internal EEPROM. There is also a trace buffer that allows the user to work backwards from a break point or exception. While in synchronous free running mode, the trace buffer allows the user to investigate what is happening on each CPU in a multi CPU system when one of the CPUs hits a break point (or watch point) or exception.

There is usually one CPU simulator dialog active per CPU in a multi-CPU system. It is possible for the user to single step through all CPUs concurrently or to allow multiple CPUs to run freely while single stepping one or more others.
 
 


CPU Simulation Options This dialog allows the user to set CPU simulator options such as the clock frequency of the CPU, the number of instructions to store in the trace buffer, synchronous or asynchrounous simulation and many other options. These dialogs are invoked from the CPU simulator dialog and apply only to the simulator dialog from which they were invoked.
 
 
EEPROM Simulation Dialog This dialog allows the user to directly control the simulation of an individual external I2C based EEPROM device.

With it the user can watch data reads and writes beteen CPUs and EEPROM devices. There is a trace buffer that allows the user to tie EEPROM specific events (e.g. start / stop conditions, address mismatches etc) to the system clock and consequently to the exact state of each CPU and EEPROM for any given EEPROM event.
 
 


EEPROM Simulation Options This dialog allows the user to set EEPROM simulator options. These dialogs are invoked from the EEPROM simulator dialog and apply only to the simulator dialog from which they were invoked.
 
 


HOST SIMULATION CONTROL

The host simulator can be controlled via code placed in the target CPU assembler source code

Embedded XCASM Simulation Directives The user is able to add simulation directives directly to the assembler source code. These directives are equivalent to adding debug PRINT and STOP statements to a BASIC program to allow values to be formatted and printed and complex break points to be triggered depending on program flow.

The embedded simulation directives are not limited to PRINT and STOP. The mechanism is fully programmable with many high level language features which can be used to implement complex test scripts (e.g. read test data from a file, process it via simulated CPU, then write results to file for subsequent verification on a reference system). This language is called XPE and it is directly integrated into the core of the system (embedded XPE can be used to generate popup dialogs from within a simulated CPU).