Design and Implementation of TinyGALS: A Programming Model for ...
Design and Implementation of TinyGALS: A Programming Model for ...
Design and Implementation of TinyGALS: A Programming Model for ...
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
Module definition <strong>for</strong> leds.<br />
include components{<br />
INT_TO_LEDS;<br />
};<br />
init{<br />
INT_TO_LEDS:init;<br />
};<br />
ports in{<br />
leds_in;<br />
};<br />
ports out{<br />
};<br />
leds_in INT_TO_LEDS:fire<br />
Figure 5: The definition <strong>of</strong> the leds module shown in Figure 1.<br />
2.2.3 <strong>TinyGALS</strong> Application<br />
At the top level <strong>of</strong> a <strong>TinyGALS</strong> program, modules are connected to <strong>for</strong>m a complete appli-<br />
cation. A <strong>TinyGALS</strong> application A is a 5-tuple:<br />
A = (MODULESA,GLOBALSA,VARMAPSA,CONNECT IONSA,STARTA), (3)<br />
where MODULESA is a list <strong>of</strong> modules in the application; GLOBALSA is a set <strong>of</strong> global<br />
variables; VARMAPSA is a set <strong>of</strong> mappings, each <strong>of</strong> which maps a global variable to a<br />
parameter (in PARAMET ERSMi ) <strong>of</strong> a module in MODULESA 6 ; CONNECT IONSA is a<br />
set <strong>of</strong> the connections between module output ports <strong>and</strong> input ports; STARTA is the name<br />
<strong>of</strong> an input port <strong>of</strong> exactly one module in the application. Section 2.3.4 describes which<br />
configurations <strong>of</strong> modules within an application are valid.<br />
Figure 6 shows the code <strong>for</strong> defining the application shown in Figure 1. The application<br />
contains two modules, count <strong>and</strong> leds. The output port count_out <strong>of</strong> module count<br />
is connected to the input port leds_in <strong>of</strong> module leds. The definition declares that the<br />
connection between count_out <strong>and</strong> leds_in has a FIFO queue <strong>of</strong> size 50. The last<br />
6 Refer to in<strong>for</strong>mation on TinyGUYS in Section 2.4.<br />
12