- ZMech is a complete visual CASE tool that allows complex event driven systems to be interactively designed and debugged using the state machine paradigm. The PIC edition of this product incorporates the following components
PIC MCU System Development Tool
Used to interactively design state machines for standalone uniprocessor and multiprocessor PIC based systems. Also usable as non-state machine PIC development tool.
Includes integrated IPAD-Pro core (visual interactive development system and MetaCASE tool runtime environment), XCASM assembler and XCSIM simulator.
PIC Simulation Tool
Used to interactively debug machine code for standalone uniprocessor and multiprocessor PIC based systems. Allows source level simulation and symbolic referenceing of code and data spaces. Capable of accepting hex only executables from third party assemblers, compilers and ROM dumps.
Fully intergrated into ZMech, XCSIM provides sophisticated highlevel object tracing and trapping (such as state transitions and missed events) and interaction (such as MCUs driving each others I/O pins)
In addition to low level machine code simulation XCSIM also provides I/O simulation between multiple MCUs and source level debugging for programs written in XCSB (XC Structured BASIC).
XCSIM is also capable of accepting embedded simulation directives placed in the PIC assembler source code by the user. These directives allow the user to:
- trap user defined error conditions occuring at specific code locations (e.g. index out of range)
- place specific information in the trace buffer
- popup user defined dilogs
- interface directly with the IPAD-Pro core via XPE (e.g. execute real hardware or user defined mimics drivers)
- read data from a file (possibly to allow complex system setup)
- write data to a file (possibly to compare results with those of a reference system)
PIC Assembler Tool
Used to combine user written PIC assembler source code with ZMech generated code. XCASM has the following features:
- Full macro assembler.
- Generates fully relocated and mapped listings
- Dynamic labels
- Complex expressions involving assembler variables, numbers, labels and strings
- String and label manipulation functions
- Assembler variables
- Forward referencing and dynamic referencing
- Multiple sections and overlays
- Assembler code generation directives (e.g. '.include' '.if' '.while')
- Allows the user to place embedded simulation directives directly in the assmebler source code (e.g. stop here if W=0, print value of FRED in trace buffer, read FRED from a file at this point, popup a dialog and ask the user for a value at this point)
- High level language compilation facility allowing the use of 'C' like expressions and high level statements in the assembler source code from which the assembler will generate an optimised assembler equivalent.
PIC High Level Language Compiler
The XCASM assembler provides high level compilation facilities for some 'C' like expressions and statements. These capabilities are so powerful that the XCASM assembler can be used purely as a high level language.
NOTE: The student / hobbyist LITE version of the compiler does not support 16 or 32 bit wide data types.
- Optimising 8 bit code generator producing very efficent accumulator bound partial results.
- Optimising 8 / 16 / 32 bit mixed mode code generator producing very efficent accumulator bound LSB of partial results.
- Seamless DATA and CODE space array indexing
- Supports address arithmetic and pointer variables.
- Optimised index register use involving common address computation elimination (e.g. arr[j] = arr[j] + 1, only calculates the address of arr[j] once and uses it twice)
- Support for "early out" operators such as logical AND and OR (&& and ||) and elimination of intermediate boolean values.
- Constant expression folding (e.g. A + (1 + 3) * 2 gives A + 8)
- Expensive operation optimisation (e.g. A * B + A * C gives A * (B + C) )
XCSB (Structured BASIC Compiler)The PIC LITE edition of XCSB is currently available free of charge for personal non-commercial use.
XCSB is an optimising Structured BASIC compiler capable of stand alone use or in conjunction with the ZMech CASE tool and XCSIM multiprocessor simulator (which provides source level debug facilities)
NOTE: XCSB is not currently provided as part of the PIC edition of ZMECH. It is available as a seperate product. The PIC LITE edition is available free of charge for personal non-commercial use.
- Structured BASIC (enhanced readability and maintainability over standard BASIC)
- mixed mode 8, 16 and 32 bit optimising compiler including floating point arithmetic.
- generates native 14 bit PIC core executable binary (suitable for direct execution on 16F84 and 16F628 - does not produce slow interpreted byte code)
- C style address of operator and pointer dereferencing (no need for peeks and pokes, resulting generated code is better optimised)
- C style early out logical AND and OR operators
- data (RAM) and code space arrays
- supports high level user defined functions in preference to 'gosub' and 'call' statements
- optimised generation of actual parameters used in function invokation based on user defined formal parameter list (known as function prototype in C language). Some compilers insist on generating a 'standard' parameter for every parameter which is not as efficient.
- statically allocated function context for fast execution
- function call analysis for efficient RAM reuse
- function local variables and arrays
Rapid Application Development (RAD) Tool
Used to build visual application quickly using visual development techneques (programming via diagrams and using drag and drop to place GUI controls). Particularly useful for building and tailoring IPAD-Pro derived CASE tools such as ZMECH.
IPAD-Pro Core Interface Language
The IPAD-Pro core API (Application Programming Interface) is not defined as a set of functions, but instead is defined as a language. This allows the programmer to define his own interface between the GUI, core and application layer (the backend code written by the programmer that implements the business logic of the application).
IPAD-Pro Drawing Interface
The drawing interface is the GUI layer that allows a user to draw and edit diagrams. It provides the mechanism by which the user can combine graphical objects on a diagram and set their properties. The drawing interface complements the programming interface (XPE).
By combining graphics objects with code (via the XPE interface) the user can produce code objects that interact with each other in user defined specialised ways. The ability to create new code objects is restricted to IPAD-Pro. IPAD-Pro derived sub-apps (such as ZMech and XEBOT) can only copy code objects, they cannot be used to create new ones.