dol: initial dol commit
[jump.git] / dol / examples / examplecell / examplecell.xml
diff --git a/dol/examples/examplecell/examplecell.xml b/dol/examples/examplecell/examplecell.xml
new file mode 100644 (file)
index 0000000..5e63359
--- /dev/null
@@ -0,0 +1,83 @@
+<?xml version="1.0" encoding="UTF-8"?>\r
+<processnetwork xmlns="http://www.tik.ee.ethz.ch/~shapes/schema/PROCESSNETWORK" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.tik.ee.ethz.ch/~shapes/schema/PROCESSNETWORK\r
+http://www.tik.ee.ethz.ch/~shapes/schema/processnetwork.xsd" name="example2"> \r
+\r
+  <variable value="9" name="N"/>\r
+
+\r
+  <!-- instantiate resources -->\r
+  <process name="generator">\r
+    <port type="output" name="10"/>\r
+    <source type="c" location="generator.c"/>\r
+  </process>\r
+\r
+  <iterator variable="i" range="N">\r
+    <process name="square">\r
+      <append function="i"/>\r
+      <port type="input" name="0"/>\r
+      <port type="output" name="1"/>\r
+      <source type="c" location="square.c"/>\r
+    </process>\r
+  </iterator>\r
+\r
+  <process name="consumer">\r
+    <port type="input" name="100"/>\r
+    <source type="c" location="consumer.c"/>\r
+  </process>\r
+\r
+  <iterator variable="i" range="N + 1">\r
+    <sw_channel type="fifo" size="10" name="C2">\r
+      <append function="i"/>\r
+      <port type="input" name="0"/>\r
+      <port type="output" name="1"/>\r
+    </sw_channel>\r
+  </iterator>\r
+\r
+  <!-- instantiate connection -->\r
+  <iterator variable="i" range="N">\r
+    <connection name="to_square">\r
+      <append function="i"/>\r
+      <origin name="C2">\r
+        <append function="i"/>\r
+        <port name="1"/>\r
+      </origin>\r
+      <target name="square">\r
+        <append function="i"/>\r
+        <port name="0"/>\r
+      </target>\r
+    </connection>\r
+\r
+    <connection name="from_square">\r
+        <append function="i"/>\r
+        <origin name="square">\r
+          <append function="i"/>\r
+          <port name="1"/>\r
+        </origin>\r
+        <target name="C2">\r
+          <append function="i + 1"/>\r
+          <port name="0"/>\r
+        </target>\r
+    </connection>\r
+  </iterator>\r
+\r
+  <connection name="g_">\r
+    <origin name="generator">\r
+     <port name="10"/>\r
+    </origin>\r
+    <target name="C2"> \r
+      <append function="0"/>\r
+      <port name="0"/>\r
+    </target>\r
+  </connection>\r
+\r
+  <connection name="_c">\r
+    <origin name="C2">\r
+      <append function="N"/>\r
+      <port name="1"/>\r
+    </origin>\r
+    <target name="consumer">\r
+      <port name="100"/>\r
+    </target>\r
+  </connection>\r
+\r
+</processnetwork>\r