Electrical Engineering
      and Computer Sciences

Electrical Engineering and Computer Sciences

COLLEGE OF ENGINEERING

UC Berkeley

Real-time C Code Generation in Ptolemy II for the Giotto Model of Computation

Shanna-Shaye Forbes

EECS Department
University of California, Berkeley
Technical Report No. UCB/EECS-2009-76
May 20, 2009

http://www.eecs.berkeley.edu/Pubs/TechRpts/2009/EECS-2009-76.pdf

Giotto is a programming model for embedded control systems that is applicable to hard real-time specifications that are periodic and feature multi-modal behavior. Examples of such systems include fly-by-wire or brake-by-wire systems where sensor readings must be periodic and there are multiple modes of operation. Ptolemy II is a university based open source modeling and simulation framework that supports model-based design, and facilitates actor oriented and objected oriented programming. It serves as a laboratory for the modeling and simulation necessary in the design of a real-time embedded system. Ptolemy also has a C code generation framework that generates code for different targets. Ptolemy II has an implementation of the Giotto programming model, that allows the simulation of Giotto models in Ptolemy II. In this report we discuss our ability to implement Giotto semantics using code generation and a real-time operating system. We illustrate these techniques with Ptolemy II and the FreeRTOS embedded operating system. To illustrate these techniques we extend the code generation framework within Ptolemy II to generate C code for the Giotto programming model. We have implemented a C code generation adapter in Ptolemy II for the Giotto model of computation targeted to systems capable of running the FreeRTOS operating system. We present an elevator controller as an example that uses the code generation framework.

Advisor: Edward A. Lee


BibTeX citation:

@mastersthesis{Forbes:EECS-2009-76,
    Author = {Forbes, Shanna-Shaye},
    Title = {Real-time C Code Generation in Ptolemy II for the Giotto Model of Computation},
    School = {EECS Department, University of California, Berkeley},
    Year = {2009},
    Month = {May},
    URL = {http://www.eecs.berkeley.edu/Pubs/TechRpts/2009/EECS-2009-76.html},
    Number = {UCB/EECS-2009-76},
    Abstract = {Giotto is a programming model for embedded control systems that is applicable to hard real-time specifications that are periodic and feature multi-modal behavior. Examples of such systems include fly-by-wire or brake-by-wire systems where sensor readings must be periodic and there are
multiple modes of operation.

Ptolemy II is a university based open source modeling and simulation framework that supports model-based design, and facilitates actor oriented and objected oriented programming. It serves as a laboratory for the modeling and simulation necessary in the design of a real-time embedded
system. Ptolemy also has a C code generation framework that generates code for different targets.

Ptolemy II has an implementation of the Giotto programming model, that allows the simulation of Giotto models in Ptolemy II. In this report we discuss our ability to implement Giotto semantics using code generation and a real-time operating system. We illustrate these techniques
with Ptolemy II and the FreeRTOS embedded operating system. To illustrate these techniques we extend the code generation framework within Ptolemy II to generate C code for the Giotto programming model. We have implemented a C code generation adapter in Ptolemy II for the Giotto model of computation targeted to systems capable of running the FreeRTOS operating system. We present an elevator controller as an example that uses the code generation framework.}
}

EndNote citation:

%0 Thesis
%A Forbes, Shanna-Shaye
%T Real-time C Code Generation in Ptolemy II for the Giotto Model of Computation
%I EECS Department, University of California, Berkeley
%D 2009
%8 May 20
%@ UCB/EECS-2009-76
%U http://www.eecs.berkeley.edu/Pubs/TechRpts/2009/EECS-2009-76.html
%F Forbes:EECS-2009-76