Simulates the operation of 8-Bit microcontrollers in the MCS-51 family.

Specify the simulation mode

The model has two working modes: Hard or Soft. The difference is how the model accesses the external memory and the clock generator. The mode type is determined by the value of the SIMMODE parameter. Simulation in Soft mode is faster than in Hard mode.

SIMMODE=HARD

When the model is working in HARD mode, the capacity of the internal ROM is limited to the value specified by the ROMSIZE parameter. Like the actual component, access to the program memory is regulated by the state of the EA pin and the value of the address. If the external memory is accessed, all the required signals are generated. For example, when reading the opcode or executing a MOVC instruction, all the required signals are generated on the pins: ALE,PSEN,P0, and P2. This mode is only necessary when it is necessary to interact with external components.

When the model is working in HARD mode the clock generator can be internal or external. To use the internal generator, the oscillator frequency must be specified via the CLOCK parameter. If the CLOCK parameter is not specified, an external generator must be connected to pin X1. The clock signal (both internal and external) is replicated on pin X2.

SIMMODE=SOFT

When the model is working in SOFT mode, the value of the ROMSIZE parameter is ignored and the capacity of the internal ROM is always 64K. Regardless of the EA pin status, all program memory is internal to the model and consequently no signals will be generated on the pins: ALE,PSEN,P0 and P2 when reading the opcode or executing MOVC instructions.

When the model is operating in SOFT mode, the oscillator frequency must always be specified via the CLOCK parameter. Pin X1 is ignored and no signal is generated on pin X2.

SOFT mode allows you to simulate data memory as well. When executing a MOVX instruction to access the data memory, all the required signals are generated at the pins: ALE,RD,WR,P0 and P2. If the program continuously accesses the data memory, the simulation speed can be improved by using the simulated data space inside the model. To use internal RAM, you must assign values to the RAMMAP and SHAREMAP parameters.

Parameters

Parameter Description Default
SIMMODE Specifies the simulation mode. Specify the Hard or Soft value. Default=Soft. SOFT
CLOCK Specifies the frequency of the internal oscillator. Default=12Meg. 12Mhz
ROMSIZE Specifies the size of the internal ROM. The value must be specified in Kbytes (1..64). Default=64. 64
OPCODE Specifies the name of a opcode file in Intel Hex format. The internal program memory can be initialized by reading the data from a file or from an internal text document in the job. The format is Intel Hex. The file is searched in the following order:
  1. In the current Job folder.
  2. Within the current Job. As an attachment file.
  3. In the user's Jobs folder.
  4. In folders containing library files.
  5. Inside the SPICE libraries in the current job. As a data block.
  6. Within the current Job. As a text document.
 
RAMMAP Specifies the data memory space intervals to be assigned to the model's internal RAM. MOVX instructions usually interact with the external hardware, in cases where intensive use of external RAM access is required, it is possible to specify the address ranges that correspond to access to the RAM memory and this will be simulated inside the model without external access being generated. All external addresses at the specified intervals will generate the required signals on the ALE, RD, WR, P0 and P2 lines and can drive external hardware. The intervals shall be specified by two values separated by the '-' character. For example, to assign the lower 32K to RAM, specify: 0000H-7FFFH. If more than one interval is specified, they must be separated by commas.  
SHAREMAP Specifies the memory map for MOVX instructions that access the RAM memory shared with the ROM. In cases where RAM and ROM reside in the same address space. The MOVX instructions will operate in the ROM space inside the model without external access being generated. The values written with MOVX will also be visible to MOVC instructions and opcode fetching operations. The intervals shall be specified by two values separated by the '-' character. For example, if the address space beyond the first 8K is shared between program memory and data memory, specify: 2000H-FFFFH. If more than one interval is specified, they must be separated by commas.