Stimulus Control Language (SCL) is a software language used to inject values onto pins or into data memory locations during execution of the MPLAB® X IDE Simulator. Loosely based on the VHSIC Hardware Description Language (VHDL), SCL should be familiar to VHDL users.
Some of the features of SCL include:
- Inject values onto pins, or into data memory locations.
- Test pin or data memory values
- Inject values from a separate data file
- Test simulation time, instruction cycles and PC
Typical uses of SCL include:
- Generate complex input wave forms
- Model peripheral operation not handled by the simulator.
- Model situations that cannot easily be performed on actual hardware to test error situations.
SCL is an intermediate subject. The reader is assumed to already have a working knowledge of MPLAB® X and PIC or dsPIC devices.
SCL is a labor of love by the MPLAB® X IDE Simulator team, it is not an official Microchip product. Customers are encouraged to use SCL, but are cautioned that SCL is an as-is product with no guarantees or warranties.
Further SCL is a complex language. Microchip has attempted to document it as well as possible. But we are sure we've got it wrong in a few places, and likely missed key features all together. The reader is encouraged to go to the forums for advanced help. There are many knowledgeable and helpful members. And many Microchip employees monitor the forums regularly.
Certain aspects of SCL’s implementation may seem counter-intuitive. As with most engineering endeavors, a short history can help explain how SCL arrived at where it is today.
SCL has been a part of the MPLAB® X IDE Simulator for some time, dating back to at least 2005. Unfortunately, the Microchip engineer who developed SCL left the company shortly after completing the task. This left the MPLAB® X IDE Simulator team somewhat reticent to take on maintenance of the poorly understood, and somewhat complex, SCL software. So the MPLAB® X IDE Simulator team built a front-end GUI to SCL called Stimulus. The idea was that Stimulus would only ever generate SCL code that the team was confident would work. Unfortunately, many of the SCL capabilities are not exposed by the Stimulus GUI.
The MPLAB® X project, which ported the MPLAB® IDE to operating systems other than Windows, required a complete rewrite of the entire Simulator, including the SCL portion. The rewrite effort provided an excellent opportunity to learn and document the SCL software. This manual is part of that effort.
Despite being somewhat hidden by the Stimulus GUI, MPLAB® X IDE Simulator users quickly discovered the underlying SCL language and began writing their own SCL processes. The Microchip Forums contain many detailed discussions of SCL, including a fairly detailed user deconstruction of the SCL language and an SCL code repository.