Following are performed sequentially during model build process
· Model Validation:
User created model is thoroughly checked and validated for
§ Block parameter inconsistencies
§ Block port dependencies
§ Block port connection mismatches
§ Block compatibility with selected target hardware
· Block Ordering:
Blocks are required to be ordered to meet input/output dependencies before code generation. Blocks are ordered based on following criteria
§ Blocks connected to input ports are executed before current block execution.
§ In a feedback system model, blocks without internal states are ordered before blocks with internal states.
§ User hints for block ordering are also taken into consideration.
§ Ordered blocks are further grouped for execution on multi core CPU platforms
· Nodal Network Creation:
Nodal network is created in case, model contains blocks with physical ports. The created nodal network is then split at user specified locations for execution on multi core CPU platforms.
· Code Generation:
Each block is represented by a sub-routine (code) at back end. During code generation sub-routines of all blocks in a model and execution engine code are interlinked and combined code is generated. Generated code files during build process are located in <project>/bin directory
· Code Compilation:
The generated code is to be compiled before execution on target hardware. Compilation is done as follows:
· CASP uses compiler supplied by hardware vendor to compile generated code.
· In general, compilation process involves following work flow:
· Code is compiled to generate intermediate object files
· Object files are linked to generate executable file
· Additional step may be required to convert executable file to binary image file that can be flashed to target hardware memory
· Compiler is started as separate process and its behaviour is controlled by supplying suitable command line arguments during its invocation.
· Generated files during compilation are located in <project>/bin directory.
· CASP provides required user interface to add new target hardware along with compiler. The user interface can be accessed from Start->Settings->Target Hardware.
· If target hardware compiler is not compatible with provided user interface then user can create an intermediate wrapper process that act as front end and compatible with CASP compilation workflow.