2
CS269: HW/SW Engineering of Embedded Systems, Winter02
An example process
•Update
–Function may change the state of media that implements the interface
•Eval
–Function may NOT change the state of the media…
process IntX {
   port IntReader port0;
   port IntWriter port1;
      IntX(){}
      void thread() {
         int x;
         while(true) {
            Rd: x=port0.readInt();
            Wr: port1.writeInt(x);
}}}
interface IntReader extends Port {
   update int readInt();
   eval int n();
}
Interface IntWriter extends Port {
   update void writeInt(int data);
   eval int space();
}
p0