Version 1.11 – released on July 24, 2015

This release features substantial improvements in the scheduler implementation to reduce jitters and overhead. Several minor changes have been made to the CPAL language in order to improve its consistently (e.g. handling of time units in language constructions). The set of freely available versions of CPAL now includes Raspberry PI.

What is new

  • Added support for Freescale FRDM-K64F and Raspberry Pi boards
  • Added sample files in the distribution
  • Added interpreter options to choose between real-time execution mode (timing-accurate execution) and simulation mode (execution ASAP)
    • Added state and named block annotations for timing accurate simulation and schedulability analysis. These annotations can be inserted by an external program (e.g. worst-case execution time analyzer)

      
      processdef AProcess() {
        state Main {
          @cpal:time {
            Main.execution_time = 3ms;
          }
        }
      }
      
      process AProcess: aTask[100ms]();
      

      State annotations can be conditional:

      
      processdef AProcess() {
        state Main {
          @cpal:time {
            if (somecond) {
              Main.execution_time = 3ms;
            } else {
              Main.execution_time = 5ms;
            }
          }
        }
      }
      
    • Added random number generation in negative ranges: int32.rand_uniform(-100, 100)
    • The parser now generates by default an out.ast file if no output file has been specified
    • Const initialization possibilities have been extended to support any valid expression. The following code is now a valid CPAL code:

      
      const uint32: NS_COMMON =  257;
      const uint32: NES_COMMON = uint32(2 + 512);
      const uint32: D1_COMMON =  (NS_COMMON ^ NES_TRANS);
      
    • Added multi-level file includes

    What has been fixed or improved

    • Changed: textual name for boolean operators: not and or operators for booleans instead of ‘&&’ and ‘||’ operators
    • Fixed: scheduler’s behavior in case of transient overload situation
    • Fixed: crash in uint32.rand_uniform(0,x)
    • Improved: nanosecond (ns) and picoseconds (ps) now recognised as a valid time unit (in addition to ms and s)
    • Improved: Gantt chart of the processes’ scheduling possible on Windows systems too and without requiring internet connectivity (all platforms)
    • Strengthened language behaviors wrt comparisons. Parser now issues warnings on suspicious comparisons:

      
      0 < 3 > 2
      0 >= -1 < 2
      2 >= 2 < 4
      

      Following comparisons are now forbidden:

      
      0 != 1 == 1
      0 < 1 == 1
      0 >= -1 != 2
      

      These are syntactically correct comparisons:

      
      0 < 1 < 2
      0 <= 0 < 1
      3 < 2 <= 1
      2 == 2 == 2
      3 != 1 != 3
      
    • [CPAL-editor] if new command-line binaries are installed, the user is asked if he wants to use the new binaries or keep using the old ones

    Code metrics and overhead data

    • Test code coverage for the execution engine: 87.1% (loc), 90% (functions)
    • Parsing and execution tests: 1250
    • Functional tests: 102
    • Timing overhead (Cortex M4 at 120MHz with floating point unit): timer interrupt = 0.6us, scheduler overhead at process activation = 1.6us + n x 4.6 us where n is the number of active processes, process switching time = 2us