diff --git a/MPSoC/Makefile.forsoclib b/MPSoC/Makefile.forsoclib index a7abb1e60665e4a03c647299101be110d9b14daa..2950db6fd0c7e7a48d1511a0ac63418660d7e034 100755 --- a/MPSoC/Makefile.forsoclib +++ b/MPSoC/Makefile.forsoclib @@ -18,8 +18,8 @@ updateruntime: cp mutekh/libmwmr/include/mwmr/mwmr.h mutekh/examples/avatar cp mutekh/libsyscams/*.c mutekh/examples/avatar cp mutekh/libsyscams/*.h mutekh/examples/avatar - cp src/*.c ~/TTool/MPSoC/mutekh/examples/avatar - cp src/*.h ~/TTool/MPSoC/mutekh/examples/avatar + cp src/*.c mutekh/examples/avatar + cp src/*.h mutekh/examples/avatar updategeneratedcode: diff --git a/build.txt b/build.txt index 501af610fa6e015835b86a43b7579ebc6dd61705..4e3d1d185d25ce5dc0ae577f583f35685c73447b 100644 --- a/build.txt +++ b/build.txt @@ -1 +1 @@ -13000 \ No newline at end of file +13005 \ No newline at end of file diff --git a/modeling/DIPLODOCUS/SmartCardProtocol.xml b/modeling/DIPLODOCUS/SmartCardProtocol.xml index 09c91d19398243c16bfb1a8a4c6f317736a3a15f..48a002a7f8b98474fb8b84f2a597af2fe7a62ace 100755 --- a/modeling/DIPLODOCUS/SmartCardProtocol.xml +++ b/modeling/DIPLODOCUS/SmartCardProtocol.xml @@ -1330,8 +1330,8 @@ </SUBCOMPONENT> <COMPONENT type="1010" id="245" > -<cdparam x="479" y="129" /> -<sizeparam width="66" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<cdparam x="476" y="129" /> +<sizeparam width="72" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <enabled value="true" /> <cdrectangleparam minX="10" maxX="1400" minY="10" maxY="900" /> @@ -1344,8 +1344,8 @@ </COMPONENT> <COMPONENT type="1008" id="248" > -<cdparam x="449" y="192" /> -<sizeparam width="125" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<cdparam x="442" y="192" /> +<sizeparam width="139" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <enabled value="true" /> <cdrectangleparam minX="10" maxX="1400" minY="10" maxY="900" /> @@ -1371,7 +1371,7 @@ <SUBCOMPONENT type="-1" id="249" > <father id="256" num="0" /> <cdparam x="470" y="524" /> -<sizeparam width="12" height="15" minWidth="10" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<sizeparam width="14" height="15" minWidth="10" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="-75" maxX="-20" minY="10" maxY="35" /> <infoparam name="guard 1" value="[ ]" /> @@ -1379,7 +1379,7 @@ <SUBCOMPONENT type="-1" id="250" > <father id="256" num="1" /> <cdparam x="530" y="524" /> -<sizeparam width="12" height="15" minWidth="10" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<sizeparam width="14" height="15" minWidth="10" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="35" maxX="55" minY="10" maxY="35" /> <infoparam name="guard 2" value="[ ]" /> @@ -1387,7 +1387,7 @@ <SUBCOMPONENT type="-1" id="251" > <father id="256" num="2" /> <cdparam x="515" y="559" /> -<sizeparam width="12" height="15" minWidth="10" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<sizeparam width="14" height="15" minWidth="10" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="20" maxX="40" minY="45" maxY="70" /> <infoparam name="guard 3" value="[ ]" /> @@ -1403,8 +1403,8 @@ </COMPONENT> <COMPONENT type="1008" id="261" > -<cdparam x="482" y="71" /> -<sizeparam width="47" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<cdparam x="479" y="71" /> +<sizeparam width="52" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <enabled value="true" /> <cdrectangleparam minX="10" maxX="1400" minY="10" maxY="900" /> @@ -1417,8 +1417,8 @@ </COMPONENT> <COMPONENT type="1006" id="264" > -<cdparam x="469" y="353" /> -<sizeparam width="80" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<cdparam x="467" y="353" /> +<sizeparam width="84" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <enabled value="true" /> <cdrectangleparam minX="10" maxX="1400" minY="10" maxY="900" /> @@ -1431,8 +1431,8 @@ </COMPONENT> <COMPONENT type="1008" id="267" > -<cdparam x="471" y="399" /> -<sizeparam width="75" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<cdparam x="468" y="399" /> +<sizeparam width="80" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <enabled value="true" /> <cdrectangleparam minX="10" maxX="1400" minY="10" maxY="900" /> @@ -1455,8 +1455,8 @@ </COMPONENT> <COMPONENT type="1008" id="272" > -<cdparam x="563" y="589" /> -<sizeparam width="49" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<cdparam x="560" y="589" /> +<sizeparam width="54" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <enabled value="true" /> <cdrectangleparam minX="10" maxX="1400" minY="10" maxY="900" /> @@ -1469,8 +1469,8 @@ </COMPONENT> <COMPONENT type="1008" id="275" > -<cdparam x="410" y="597" /> -<sizeparam width="47" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<cdparam x="407" y="597" /> +<sizeparam width="53" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <enabled value="true" /> <cdrectangleparam minX="10" maxX="1400" minY="10" maxY="900" /> @@ -1596,7 +1596,7 @@ <SUBCOMPONENT type="-1" id="289" > <father id="292" num="0" /> <cdparam x="1021" y="663" /> -<sizeparam width="33" height="15" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<sizeparam width="35" height="15" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="-75" maxX="30" minY="10" maxY="30" /> <infoparam name="value of the time interval" value="[b, b]" /> @@ -1606,8 +1606,8 @@ </SUBCOMPONENT> <COMPONENT type="1008" id="295" > -<cdparam x="159" y="424" /> -<sizeparam width="62" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<cdparam x="156" y="424" /> +<sizeparam width="68" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <enabled value="true" /> <cdrectangleparam minX="10" maxX="2900" minY="10" maxY="1900" /> @@ -1633,7 +1633,7 @@ <SUBCOMPONENT type="-1" id="296" > <father id="303" num="0" /> <cdparam x="2061" y="1388" /> -<sizeparam width="12" height="15" minWidth="10" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<sizeparam width="14" height="15" minWidth="10" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="-75" maxX="-20" minY="10" maxY="35" /> <infoparam name="guard 1" value="[ ]" /> @@ -1641,7 +1641,7 @@ <SUBCOMPONENT type="-1" id="297" > <father id="303" num="1" /> <cdparam x="2121" y="1388" /> -<sizeparam width="39" height="15" minWidth="10" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<sizeparam width="44" height="15" minWidth="10" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <enabled value="true" /> <cdrectangleparam minX="35" maxX="55" minY="10" maxY="35" /> @@ -1650,7 +1650,7 @@ <SUBCOMPONENT type="-1" id="298" > <father id="303" num="2" /> <cdparam x="2106" y="1426" /> -<sizeparam width="124" height="15" minWidth="10" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<sizeparam width="135" height="15" minWidth="10" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <enabled value="true" /> <cdrectangleparam minX="20" maxX="40" minY="45" maxY="70" /> @@ -1671,7 +1671,7 @@ <SUBCOMPONENT type="-1" id="304" > <father id="311" num="0" /> <cdparam x="2212" y="961" /> -<sizeparam width="116" height="15" minWidth="10" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<sizeparam width="127" height="15" minWidth="10" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <enabled value="true" /> <cdrectangleparam minX="-75" maxX="-20" minY="10" maxY="35" /> @@ -1680,7 +1680,7 @@ <SUBCOMPONENT type="-1" id="305" > <father id="311" num="1" /> <cdparam x="2301" y="975" /> -<sizeparam width="116" height="15" minWidth="10" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<sizeparam width="127" height="15" minWidth="10" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <enabled value="true" /> <cdrectangleparam minX="35" maxX="55" minY="10" maxY="35" /> @@ -1689,7 +1689,7 @@ <SUBCOMPONENT type="-1" id="306" > <father id="311" num="2" /> <cdparam x="2282" y="996" /> -<sizeparam width="39" height="15" minWidth="10" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<sizeparam width="44" height="15" minWidth="10" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <enabled value="true" /> <cdrectangleparam minX="20" maxX="40" minY="45" maxY="70" /> @@ -1710,7 +1710,7 @@ <SUBCOMPONENT type="-1" id="312" > <father id="319" num="0" /> <cdparam x="1934" y="1356" /> -<sizeparam width="116" height="15" minWidth="10" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<sizeparam width="127" height="15" minWidth="10" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <enabled value="true" /> <cdrectangleparam minX="-75" maxX="-20" minY="10" maxY="35" /> @@ -1719,7 +1719,7 @@ <SUBCOMPONENT type="-1" id="313" > <father id="319" num="1" /> <cdparam x="2016" y="1356" /> -<sizeparam width="39" height="15" minWidth="10" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<sizeparam width="44" height="15" minWidth="10" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <enabled value="true" /> <cdrectangleparam minX="35" maxX="55" minY="10" maxY="35" /> @@ -1728,7 +1728,7 @@ <SUBCOMPONENT type="-1" id="314" > <father id="319" num="2" /> <cdparam x="2001" y="1391" /> -<sizeparam width="120" height="15" minWidth="10" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<sizeparam width="131" height="15" minWidth="10" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <enabled value="true" /> <cdrectangleparam minX="20" maxX="40" minY="45" maxY="70" /> @@ -1749,7 +1749,7 @@ <SUBCOMPONENT type="-1" id="320" > <father id="327" num="0" /> <cdparam x="1762" y="1279" /> -<sizeparam width="116" height="15" minWidth="10" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<sizeparam width="127" height="15" minWidth="10" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <enabled value="true" /> <cdrectangleparam minX="-75" maxX="-20" minY="10" maxY="35" /> @@ -1758,7 +1758,7 @@ <SUBCOMPONENT type="-1" id="321" > <father id="327" num="1" /> <cdparam x="1846" y="1279" /> -<sizeparam width="39" height="15" minWidth="10" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<sizeparam width="44" height="15" minWidth="10" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <enabled value="true" /> <cdrectangleparam minX="35" maxX="55" minY="10" maxY="35" /> @@ -1767,7 +1767,7 @@ <SUBCOMPONENT type="-1" id="322" > <father id="327" num="2" /> <cdparam x="1831" y="1314" /> -<sizeparam width="116" height="15" minWidth="10" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<sizeparam width="127" height="15" minWidth="10" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <enabled value="true" /> <cdrectangleparam minX="20" maxX="40" minY="45" maxY="70" /> @@ -1788,7 +1788,7 @@ <SUBCOMPONENT type="-1" id="328" > <father id="335" num="0" /> <cdparam x="1688" y="1151" /> -<sizeparam width="12" height="15" minWidth="10" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<sizeparam width="14" height="15" minWidth="10" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="-75" maxX="-20" minY="10" maxY="35" /> <infoparam name="guard 1" value="[ ]" /> @@ -1796,7 +1796,7 @@ <SUBCOMPONENT type="-1" id="329" > <father id="335" num="1" /> <cdparam x="1748" y="1151" /> -<sizeparam width="12" height="15" minWidth="10" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<sizeparam width="14" height="15" minWidth="10" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="35" maxX="55" minY="10" maxY="35" /> <infoparam name="guard 2" value="[ ]" /> @@ -1804,7 +1804,7 @@ <SUBCOMPONENT type="-1" id="330" > <father id="335" num="2" /> <cdparam x="1733" y="1186" /> -<sizeparam width="12" height="15" minWidth="10" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<sizeparam width="14" height="15" minWidth="10" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="20" maxX="40" minY="45" maxY="70" /> <infoparam name="guard 3" value="[ ]" /> @@ -1862,7 +1862,7 @@ <SUBCOMPONENT type="-1" id="344" > <father id="351" num="0" /> <cdparam x="1542" y="1016" /> -<sizeparam width="124" height="15" minWidth="10" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<sizeparam width="135" height="15" minWidth="10" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <enabled value="true" /> <cdrectangleparam minX="-75" maxX="-20" minY="10" maxY="35" /> @@ -1871,7 +1871,7 @@ <SUBCOMPONENT type="-1" id="345" > <father id="351" num="1" /> <cdparam x="1627" y="1016" /> -<sizeparam width="39" height="15" minWidth="10" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<sizeparam width="44" height="15" minWidth="10" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <enabled value="true" /> <cdrectangleparam minX="35" maxX="55" minY="10" maxY="35" /> @@ -1880,7 +1880,7 @@ <SUBCOMPONENT type="-1" id="346" > <father id="351" num="2" /> <cdparam x="1612" y="1051" /> -<sizeparam width="12" height="15" minWidth="10" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<sizeparam width="14" height="15" minWidth="10" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="20" maxX="40" minY="45" maxY="70" /> <infoparam name="guard 3" value="[ ]" /> @@ -1900,7 +1900,7 @@ <SUBCOMPONENT type="-1" id="352" > <father id="359" num="0" /> <cdparam x="1688" y="885" /> -<sizeparam width="12" height="15" minWidth="10" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<sizeparam width="14" height="15" minWidth="10" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="-75" maxX="-20" minY="10" maxY="35" /> <infoparam name="guard 1" value="[ ]" /> @@ -1908,7 +1908,7 @@ <SUBCOMPONENT type="-1" id="353" > <father id="359" num="1" /> <cdparam x="1748" y="885" /> -<sizeparam width="12" height="15" minWidth="10" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<sizeparam width="14" height="15" minWidth="10" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="35" maxX="55" minY="10" maxY="35" /> <infoparam name="guard 2" value="[ ]" /> @@ -1916,7 +1916,7 @@ <SUBCOMPONENT type="-1" id="354" > <father id="359" num="2" /> <cdparam x="1733" y="920" /> -<sizeparam width="12" height="15" minWidth="10" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<sizeparam width="14" height="15" minWidth="10" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="20" maxX="40" minY="45" maxY="70" /> <infoparam name="guard 3" value="[ ]" /> @@ -1993,7 +1993,7 @@ <SUBCOMPONENT type="-1" id="372" > <father id="379" num="0" /> <cdparam x="1168" y="1030" /> -<sizeparam width="12" height="15" minWidth="10" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<sizeparam width="14" height="15" minWidth="10" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="-75" maxX="-20" minY="10" maxY="35" /> <infoparam name="guard 1" value="[ ]" /> @@ -2001,7 +2001,7 @@ <SUBCOMPONENT type="-1" id="373" > <father id="379" num="1" /> <cdparam x="1228" y="1030" /> -<sizeparam width="39" height="15" minWidth="10" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<sizeparam width="44" height="15" minWidth="10" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <enabled value="true" /> <cdrectangleparam minX="35" maxX="55" minY="10" maxY="35" /> @@ -2010,7 +2010,7 @@ <SUBCOMPONENT type="-1" id="374" > <father id="379" num="2" /> <cdparam x="1213" y="1065" /> -<sizeparam width="116" height="15" minWidth="10" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<sizeparam width="127" height="15" minWidth="10" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <enabled value="true" /> <cdrectangleparam minX="20" maxX="40" minY="45" maxY="70" /> @@ -2050,7 +2050,7 @@ <SUBCOMPONENT type="-1" id="384" > <father id="391" num="0" /> <cdparam x="482" y="747" /> -<sizeparam width="120" height="15" minWidth="10" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<sizeparam width="131" height="15" minWidth="10" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <enabled value="true" /> <cdrectangleparam minX="-75" maxX="-20" minY="10" maxY="35" /> @@ -2059,7 +2059,7 @@ <SUBCOMPONENT type="-1" id="385" > <father id="391" num="1" /> <cdparam x="592" y="722" /> -<sizeparam width="39" height="15" minWidth="10" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<sizeparam width="44" height="15" minWidth="10" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <enabled value="true" /> <cdrectangleparam minX="35" maxX="55" minY="10" maxY="35" /> @@ -2068,7 +2068,7 @@ <SUBCOMPONENT type="-1" id="386" > <father id="391" num="2" /> <cdparam x="577" y="757" /> -<sizeparam width="12" height="15" minWidth="10" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<sizeparam width="14" height="15" minWidth="10" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="20" maxX="40" minY="45" maxY="70" /> <infoparam name="guard 3" value="[ ]" /> @@ -2126,7 +2126,7 @@ <SUBCOMPONENT type="-1" id="400" > <father id="407" num="0" /> <cdparam x="959" y="974" /> -<sizeparam width="116" height="15" minWidth="10" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<sizeparam width="127" height="15" minWidth="10" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <enabled value="true" /> <cdrectangleparam minX="-75" maxX="-20" minY="10" maxY="35" /> @@ -2135,7 +2135,7 @@ <SUBCOMPONENT type="-1" id="401" > <father id="407" num="1" /> <cdparam x="1070" y="949" /> -<sizeparam width="39" height="15" minWidth="10" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<sizeparam width="44" height="15" minWidth="10" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <enabled value="true" /> <cdrectangleparam minX="35" maxX="55" minY="10" maxY="35" /> @@ -2144,7 +2144,7 @@ <SUBCOMPONENT type="-1" id="402" > <father id="407" num="2" /> <cdparam x="1054" y="984" /> -<sizeparam width="116" height="15" minWidth="10" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<sizeparam width="127" height="15" minWidth="10" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <enabled value="true" /> <cdrectangleparam minX="20" maxX="40" minY="45" maxY="70" /> @@ -2184,7 +2184,7 @@ <SUBCOMPONENT type="-1" id="412" > <father id="419" num="0" /> <cdparam x="753" y="885" /> -<sizeparam width="116" height="15" minWidth="10" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<sizeparam width="127" height="15" minWidth="10" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <enabled value="true" /> <cdrectangleparam minX="-75" maxX="-20" minY="10" maxY="35" /> @@ -2193,7 +2193,7 @@ <SUBCOMPONENT type="-1" id="413" > <father id="419" num="1" /> <cdparam x="863" y="879" /> -<sizeparam width="39" height="15" minWidth="10" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<sizeparam width="44" height="15" minWidth="10" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <enabled value="true" /> <cdrectangleparam minX="35" maxX="55" minY="10" maxY="35" /> @@ -2202,7 +2202,7 @@ <SUBCOMPONENT type="-1" id="414" > <father id="419" num="2" /> <cdparam x="848" y="914" /> -<sizeparam width="112" height="15" minWidth="10" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<sizeparam width="123" height="15" minWidth="10" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <enabled value="true" /> <cdrectangleparam minX="20" maxX="40" minY="45" maxY="70" /> @@ -2261,7 +2261,7 @@ <SUBCOMPONENT type="-1" id="428" > <father id="435" num="0" /> <cdparam x="949" y="793" /> -<sizeparam width="12" height="15" minWidth="10" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<sizeparam width="14" height="15" minWidth="10" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="-75" maxX="-20" minY="10" maxY="35" /> <infoparam name="guard 1" value="[ ]" /> @@ -2269,7 +2269,7 @@ <SUBCOMPONENT type="-1" id="429" > <father id="435" num="1" /> <cdparam x="1028" y="790" /> -<sizeparam width="12" height="15" minWidth="10" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<sizeparam width="14" height="15" minWidth="10" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="35" maxX="55" minY="10" maxY="35" /> <infoparam name="guard 2" value="[ ]" /> @@ -2277,7 +2277,7 @@ <SUBCOMPONENT type="-1" id="430" > <father id="435" num="2" /> <cdparam x="1013" y="825" /> -<sizeparam width="12" height="15" minWidth="10" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<sizeparam width="14" height="15" minWidth="10" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="20" maxX="40" minY="45" maxY="70" /> <infoparam name="guard 3" value="[ ]" /> @@ -2354,7 +2354,7 @@ <SUBCOMPONENT type="-1" id="448" > <father id="455" num="0" /> <cdparam x="98" y="521" /> -<sizeparam width="112" height="15" minWidth="10" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<sizeparam width="123" height="15" minWidth="10" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <enabled value="true" /> <cdrectangleparam minX="-75" maxX="-20" minY="10" maxY="35" /> @@ -2363,7 +2363,7 @@ <SUBCOMPONENT type="-1" id="449" > <father id="455" num="1" /> <cdparam x="208" y="496" /> -<sizeparam width="39" height="15" minWidth="10" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<sizeparam width="44" height="15" minWidth="10" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <enabled value="true" /> <cdrectangleparam minX="35" maxX="55" minY="10" maxY="35" /> @@ -2372,7 +2372,7 @@ <SUBCOMPONENT type="-1" id="450" > <father id="455" num="2" /> <cdparam x="193" y="531" /> -<sizeparam width="12" height="15" minWidth="10" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<sizeparam width="14" height="15" minWidth="10" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="20" maxX="40" minY="45" maxY="70" /> <infoparam name="guard 3" value="[ ]" /> @@ -2392,7 +2392,7 @@ <SUBCOMPONENT type="-1" id="456" > <father id="463" num="0" /> <cdparam x="317" y="202" /> -<sizeparam width="81" height="15" minWidth="10" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<sizeparam width="88" height="15" minWidth="10" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <enabled value="true" /> <cdrectangleparam minX="-75" maxX="-20" minY="10" maxY="35" /> @@ -2401,7 +2401,7 @@ <SUBCOMPONENT type="-1" id="457" > <father id="463" num="1" /> <cdparam x="394" y="202" /> -<sizeparam width="91" height="15" minWidth="10" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<sizeparam width="98" height="15" minWidth="10" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <enabled value="true" /> <cdrectangleparam minX="35" maxX="55" minY="10" maxY="35" /> @@ -2410,7 +2410,7 @@ <SUBCOMPONENT type="-1" id="458" > <father id="463" num="2" /> <cdparam x="379" y="237" /> -<sizeparam width="12" height="15" minWidth="10" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<sizeparam width="14" height="15" minWidth="10" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="20" maxX="40" minY="45" maxY="70" /> <infoparam name="guard 3" value="[ ]" /> @@ -2430,7 +2430,7 @@ <SUBCOMPONENT type="-1" id="464" > <father id="471" num="0" /> <cdparam x="404" y="592" /> -<sizeparam width="116" height="15" minWidth="10" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<sizeparam width="127" height="15" minWidth="10" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <enabled value="true" /> <cdrectangleparam minX="-75" maxX="-20" minY="10" maxY="35" /> @@ -2439,7 +2439,7 @@ <SUBCOMPONENT type="-1" id="465" > <father id="471" num="1" /> <cdparam x="500" y="599" /> -<sizeparam width="39" height="15" minWidth="10" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<sizeparam width="44" height="15" minWidth="10" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <enabled value="true" /> <cdrectangleparam minX="35" maxX="55" minY="10" maxY="35" /> @@ -2448,7 +2448,7 @@ <SUBCOMPONENT type="-1" id="466" > <father id="471" num="2" /> <cdparam x="469" y="627" /> -<sizeparam width="252" height="15" minWidth="10" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<sizeparam width="277" height="15" minWidth="10" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <enabled value="true" /> <cdrectangleparam minX="20" maxX="40" minY="45" maxY="70" /> @@ -2469,7 +2469,7 @@ <SUBCOMPONENT type="-1" id="472" > <father id="479" num="0" /> <cdparam x="228" y="574" /> -<sizeparam width="116" height="15" minWidth="10" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<sizeparam width="127" height="15" minWidth="10" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <enabled value="true" /> <cdrectangleparam minX="-75" maxX="-20" minY="10" maxY="35" /> @@ -2478,7 +2478,7 @@ <SUBCOMPONENT type="-1" id="473" > <father id="479" num="1" /> <cdparam x="317" y="584" /> -<sizeparam width="39" height="15" minWidth="10" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<sizeparam width="44" height="15" minWidth="10" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <enabled value="true" /> <cdrectangleparam minX="35" maxX="55" minY="10" maxY="35" /> @@ -2487,7 +2487,7 @@ <SUBCOMPONENT type="-1" id="474" > <father id="479" num="2" /> <cdparam x="306" y="616" /> -<sizeparam width="116" height="15" minWidth="10" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<sizeparam width="127" height="15" minWidth="10" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <enabled value="true" /> <cdrectangleparam minX="20" maxX="40" minY="45" maxY="70" /> @@ -2505,7 +2505,7 @@ <COMPONENT type="301" id="498" > <cdparam x="10" y="30" /> -<sizeparam width="92" height="135" minWidth="50" minHeight="20" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<sizeparam width="98" height="135" minWidth="50" minHeight="20" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="2900" minY="10" maxY="1900" /> <infoparam name="UML Note" value="0: closed @@ -2552,8 +2552,8 @@ </COMPONENT> <COMPONENT type="1011" id="501" > -<cdparam x="98" y="549" /> -<sizeparam width="100" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<cdparam x="94" y="549" /> +<sizeparam width="109" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <enabled value="true" /> <cdrectangleparam minX="10" maxX="2900" minY="10" maxY="1900" /> @@ -2572,8 +2572,8 @@ </COMPONENT> <COMPONENT type="1009" id="506" > -<cdparam x="967" y="585" /> -<sizeparam width="83" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<cdparam x="964" y="585" /> +<sizeparam width="88" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <enabled value="true" /> <cdrectangleparam minX="10" maxX="2900" minY="10" maxY="1900" /> @@ -2586,8 +2586,8 @@ </COMPONENT> <COMPONENT type="1014" id="510" > -<cdparam x="150" y="85" /> -<sizeparam width="170" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<cdparam x="145" y="85" /> +<sizeparam width="180" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <enabled value="true" /> <cdrectangleparam minX="10" maxX="2900" minY="10" maxY="1900" /> @@ -2610,8 +2610,8 @@ </COMPONENT> <COMPONENT type="1011" id="515" > -<cdparam x="187" y="144" /> -<sizeparam width="96" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<cdparam x="183" y="144" /> +<sizeparam width="105" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <enabled value="true" /> <cdrectangleparam minX="10" maxX="2900" minY="10" maxY="1900" /> @@ -2621,8 +2621,8 @@ </COMPONENT> <COMPONENT type="1017" id="518" > -<cdparam x="316" y="133" /> -<sizeparam width="116" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<cdparam x="311" y="133" /> +<sizeparam width="127" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <enabled value="true" /> <cdrectangleparam minX="10" maxX="2900" minY="10" maxY="1900" /> @@ -2635,8 +2635,8 @@ </COMPONENT> <COMPONENT type="1009" id="521" > -<cdparam x="692" y="589" /> -<sizeparam width="60" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<cdparam x="690" y="589" /> +<sizeparam width="64" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <enabled value="true" /> <cdrectangleparam minX="10" maxX="2900" minY="10" maxY="1900" /> @@ -2649,8 +2649,8 @@ </COMPONENT> <COMPONENT type="1010" id="524" > -<cdparam x="689" y="534" /> -<sizeparam width="67" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<cdparam x="686" y="534" /> +<sizeparam width="73" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <enabled value="true" /> <cdrectangleparam minX="10" maxX="2900" minY="10" maxY="1900" /> @@ -2663,8 +2663,8 @@ </COMPONENT> <COMPONENT type="1010" id="527" > -<cdparam x="977" y="528" /> -<sizeparam width="63" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<cdparam x="974" y="528" /> +<sizeparam width="69" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <enabled value="true" /> <cdrectangleparam minX="10" maxX="2900" minY="10" maxY="1900" /> @@ -2677,8 +2677,8 @@ </COMPONENT> <COMPONENT type="1010" id="530" > -<cdparam x="439" y="492" /> -<sizeparam width="51" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<cdparam x="436" y="492" /> +<sizeparam width="57" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <enabled value="true" /> <cdrectangleparam minX="10" maxX="2900" minY="10" maxY="1900" /> @@ -2691,8 +2691,8 @@ </COMPONENT> <COMPONENT type="1010" id="533" > -<cdparam x="250" y="468" /> -<sizeparam width="79" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<cdparam x="247" y="468" /> +<sizeparam width="84" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <enabled value="true" /> <cdrectangleparam minX="10" maxX="2900" minY="10" maxY="1900" /> @@ -2705,8 +2705,8 @@ </COMPONENT> <COMPONENT type="1010" id="536" > -<cdparam x="163" y="383" /> -<sizeparam width="51" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<cdparam x="160" y="383" /> +<sizeparam width="56" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <enabled value="true" /> <cdrectangleparam minX="10" maxX="2900" minY="10" maxY="1900" /> @@ -2757,8 +2757,8 @@ </COMPONENT> <COMPONENT type="1010" id="554" > -<cdparam x="275" y="228" /> -<sizeparam width="53" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<cdparam x="272" y="228" /> +<sizeparam width="58" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <enabled value="true" /> <cdrectangleparam minX="10" maxX="2900" minY="10" maxY="1900" /> @@ -2781,7 +2781,7 @@ <COMPONENT type="301" id="573" > <cdparam x="602" y="86" /> -<sizeparam width="360" height="51" minWidth="50" minHeight="20" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<sizeparam width="393" height="51" minWidth="50" minHeight="20" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="2900" minY="10" maxY="1900" /> <infoparam name="UML Note" value="b est le nombre d'instructions necessaires pour paquetiser @@ -2814,8 +2814,8 @@ On prend b=1 comme exemple </COMPONENT> <COMPONENT type="1009" id="576" > -<cdparam x="188" y="808" /> -<sizeparam width="84" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<cdparam x="186" y="808" /> +<sizeparam width="88" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <enabled value="true" /> <cdrectangleparam minX="10" maxX="2900" minY="10" maxY="1900" /> @@ -2828,8 +2828,8 @@ On prend b=1 comme exemple </COMPONENT> <COMPONENT type="1006" id="579" > -<cdparam x="191" y="1002" /> -<sizeparam width="79" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<cdparam x="188" y="1002" /> +<sizeparam width="84" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <enabled value="true" /> <cdrectangleparam minX="10" maxX="2900" minY="10" maxY="1900" /> @@ -2851,8 +2851,8 @@ On prend b=1 comme exemple </COMPONENT> <COMPONENT type="1011" id="584" > -<cdparam x="414" y="1032" /> -<sizeparam width="100" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<cdparam x="410" y="1032" /> +<sizeparam width="109" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <enabled value="true" /> <cdrectangleparam minX="10" maxX="2900" minY="10" maxY="1900" /> @@ -2871,8 +2871,8 @@ On prend b=1 comme exemple </COMPONENT> <COMPONENT type="1011" id="589" > -<cdparam x="84" y="1041" /> -<sizeparam width="96" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<cdparam x="80" y="1041" /> +<sizeparam width="105" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <enabled value="true" /> <cdrectangleparam minX="10" maxX="2900" minY="10" maxY="1900" /> @@ -2882,8 +2882,8 @@ On prend b=1 comme exemple </COMPONENT> <COMPONENT type="1006" id="592" > -<cdparam x="93" y="938" /> -<sizeparam width="79" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<cdparam x="90" y="938" /> +<sizeparam width="84" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <enabled value="true" /> <cdrectangleparam minX="10" maxX="2900" minY="10" maxY="1900" /> @@ -2896,8 +2896,8 @@ On prend b=1 comme exemple </COMPONENT> <COMPONENT type="1011" id="595" > -<cdparam x="292" y="1026" /> -<sizeparam width="108" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<cdparam x="288" y="1026" /> +<sizeparam width="117" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <enabled value="true" /> <cdrectangleparam minX="10" maxX="2900" minY="10" maxY="1900" /> @@ -2916,8 +2916,8 @@ On prend b=1 comme exemple </COMPONENT> <COMPONENT type="1006" id="600" > -<cdparam x="425" y="941" /> -<sizeparam width="79" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<cdparam x="422" y="941" /> +<sizeparam width="84" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <enabled value="true" /> <cdrectangleparam minX="10" maxX="2900" minY="10" maxY="1900" /> @@ -2930,8 +2930,8 @@ On prend b=1 comme exemple </COMPONENT> <COMPONENT type="1006" id="603" > -<cdparam x="307" y="900" /> -<sizeparam width="79" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<cdparam x="304" y="900" /> +<sizeparam width="84" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <enabled value="true" /> <cdrectangleparam minX="10" maxX="2900" minY="10" maxY="1900" /> @@ -2981,8 +2981,8 @@ On prend b=1 comme exemple </COMPONENT> <COMPONENT type="1011" id="625" > -<cdparam x="678" y="965" /> -<sizeparam width="100" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<cdparam x="674" y="965" /> +<sizeparam width="109" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <enabled value="true" /> <cdrectangleparam minX="10" maxX="2900" minY="10" maxY="1900" /> @@ -3001,8 +3001,8 @@ On prend b=1 comme exemple </COMPONENT> <COMPONENT type="1006" id="630" > -<cdparam x="761" y="1086" /> -<sizeparam width="79" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<cdparam x="758" y="1086" /> +<sizeparam width="84" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <enabled value="true" /> <cdrectangleparam minX="10" maxX="2900" minY="10" maxY="1900" /> @@ -3016,7 +3016,7 @@ On prend b=1 comme exemple <COMPONENT type="301" id="647" > <cdparam x="781" y="950" /> -<sizeparam width="89" height="20" minWidth="50" minHeight="20" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<sizeparam width="94" height="20" minWidth="50" minHeight="20" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="2900" minY="10" maxY="1900" /> <infoparam name="UML Note" value="Active Open @@ -3044,7 +3044,7 @@ On prend b=1 comme exemple <COMPONENT type="301" id="664" > <cdparam x="715" y="907" /> -<sizeparam width="97" height="20" minWidth="50" minHeight="20" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<sizeparam width="104" height="20" minWidth="50" minHeight="20" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="2900" minY="10" maxY="1900" /> <infoparam name="UML Note" value="Passive Open @@ -3071,8 +3071,8 @@ On prend b=1 comme exemple </COMPONENT> <COMPONENT type="1011" id="667" > -<cdparam x="750" y="1193" /> -<sizeparam width="100" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<cdparam x="746" y="1193" /> +<sizeparam width="109" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <enabled value="true" /> <cdrectangleparam minX="10" maxX="2900" minY="10" maxY="1900" /> @@ -3082,8 +3082,8 @@ On prend b=1 comme exemple </COMPONENT> <COMPONENT type="1011" id="670" > -<cdparam x="446" y="768" /> -<sizeparam width="100" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<cdparam x="442" y="768" /> +<sizeparam width="109" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <enabled value="true" /> <cdrectangleparam minX="10" maxX="2900" minY="10" maxY="1900" /> @@ -3102,8 +3102,8 @@ On prend b=1 comme exemple </COMPONENT> <COMPONENT type="1006" id="675" > -<cdparam x="904" y="1123" /> -<sizeparam width="79" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<cdparam x="901" y="1123" /> +<sizeparam width="84" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <enabled value="true" /> <cdrectangleparam minX="10" maxX="2900" minY="10" maxY="1900" /> @@ -3117,7 +3117,7 @@ On prend b=1 comme exemple <COMPONENT type="301" id="692" > <cdparam x="884" y="1068" /> -<sizeparam width="108" height="20" minWidth="50" minHeight="20" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<sizeparam width="115" height="20" minWidth="50" minHeight="20" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="2900" minY="10" maxY="1900" /> <infoparam name="UML Note" value="send Ack of Fin @@ -3144,8 +3144,8 @@ On prend b=1 comme exemple </COMPONENT> <COMPONENT type="1011" id="695" > -<cdparam x="893" y="1234" /> -<sizeparam width="100" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<cdparam x="889" y="1234" /> +<sizeparam width="109" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <enabled value="true" /> <cdrectangleparam minX="10" maxX="2900" minY="10" maxY="1900" /> @@ -3164,8 +3164,8 @@ On prend b=1 comme exemple </COMPONENT> <COMPONENT type="1006" id="700" > -<cdparam x="1010" y="1155" /> -<sizeparam width="79" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<cdparam x="1007" y="1155" /> +<sizeparam width="84" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <enabled value="true" /> <cdrectangleparam minX="10" maxX="2900" minY="10" maxY="1900" /> @@ -3179,7 +3179,7 @@ On prend b=1 comme exemple <COMPONENT type="301" id="717" > <cdparam x="1000" y="1094" /> -<sizeparam width="108" height="20" minWidth="50" minHeight="20" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<sizeparam width="115" height="20" minWidth="50" minHeight="20" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="2900" minY="10" maxY="1900" /> <infoparam name="UML Note" value="send Ack of Fin @@ -3206,8 +3206,8 @@ On prend b=1 comme exemple </COMPONENT> <COMPONENT type="1011" id="720" > -<cdparam x="999" y="1266" /> -<sizeparam width="100" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<cdparam x="995" y="1266" /> +<sizeparam width="109" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <enabled value="true" /> <cdrectangleparam minX="10" maxX="2900" minY="10" maxY="1900" /> @@ -3226,8 +3226,8 @@ On prend b=1 comme exemple </COMPONENT> <COMPONENT type="1006" id="725" > -<cdparam x="683" y="758" /> -<sizeparam width="79" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<cdparam x="680" y="758" /> +<sizeparam width="84" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <enabled value="true" /> <cdrectangleparam minX="10" maxX="2900" minY="10" maxY="1900" /> @@ -3249,8 +3249,8 @@ On prend b=1 comme exemple </COMPONENT> <COMPONENT type="1007" id="730" > -<cdparam x="93" y="1100" /> -<sizeparam width="78" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<cdparam x="92" y="1100" /> +<sizeparam width="81" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <enabled value="true" /> <cdrectangleparam minX="10" maxX="2900" minY="10" maxY="1900" /> @@ -3263,8 +3263,8 @@ On prend b=1 comme exemple </COMPONENT> <COMPONENT type="1006" id="733" > -<cdparam x="104" y="1167" /> -<sizeparam width="56" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<cdparam x="102" y="1167" /> +<sizeparam width="60" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <enabled value="true" /> <cdrectangleparam minX="10" maxX="2900" minY="10" maxY="1900" /> @@ -3286,8 +3286,8 @@ On prend b=1 comme exemple </COMPONENT> <COMPONENT type="1007" id="738" > -<cdparam x="191" y="1102" /> -<sizeparam width="78" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<cdparam x="190" y="1102" /> +<sizeparam width="81" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <enabled value="true" /> <cdrectangleparam minX="10" maxX="2900" minY="10" maxY="1900" /> @@ -3300,8 +3300,8 @@ On prend b=1 comme exemple </COMPONENT> <COMPONENT type="1006" id="741" > -<cdparam x="202" y="1169" /> -<sizeparam width="56" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<cdparam x="200" y="1169" /> +<sizeparam width="60" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <enabled value="true" /> <cdrectangleparam minX="10" maxX="2900" minY="10" maxY="1900" /> @@ -3314,8 +3314,8 @@ On prend b=1 comme exemple </COMPONENT> <COMPONENT type="1007" id="744" > -<cdparam x="307" y="1106" /> -<sizeparam width="78" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<cdparam x="306" y="1106" /> +<sizeparam width="81" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <enabled value="true" /> <cdrectangleparam minX="10" maxX="2900" minY="10" maxY="1900" /> @@ -3328,8 +3328,8 @@ On prend b=1 comme exemple </COMPONENT> <COMPONENT type="1006" id="747" > -<cdparam x="318" y="1173" /> -<sizeparam width="56" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<cdparam x="316" y="1173" /> +<sizeparam width="60" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <enabled value="true" /> <cdrectangleparam minX="10" maxX="2900" minY="10" maxY="1900" /> @@ -3342,8 +3342,8 @@ On prend b=1 comme exemple </COMPONENT> <COMPONENT type="1007" id="750" > -<cdparam x="425" y="1090" /> -<sizeparam width="78" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<cdparam x="424" y="1090" /> +<sizeparam width="81" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <enabled value="true" /> <cdrectangleparam minX="10" maxX="2900" minY="10" maxY="1900" /> @@ -3356,8 +3356,8 @@ On prend b=1 comme exemple </COMPONENT> <COMPONENT type="1006" id="753" > -<cdparam x="436" y="1159" /> -<sizeparam width="56" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<cdparam x="434" y="1159" /> +<sizeparam width="60" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <enabled value="true" /> <cdrectangleparam minX="10" maxX="2900" minY="10" maxY="1900" /> @@ -3370,8 +3370,8 @@ On prend b=1 comme exemple </COMPONENT> <COMPONENT type="1011" id="756" > -<cdparam x="56" y="861" /> -<sizeparam width="153" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<cdparam x="52" y="861" /> +<sizeparam width="160" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <enabled value="true" /> <cdrectangleparam minX="10" maxX="2900" minY="10" maxY="1900" /> @@ -3381,8 +3381,8 @@ On prend b=1 comme exemple </COMPONENT> <COMPONENT type="1011" id="759" > -<cdparam x="154" y="940" /> -<sizeparam width="153" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<cdparam x="150" y="940" /> +<sizeparam width="160" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <enabled value="true" /> <cdrectangleparam minX="10" maxX="2900" minY="10" maxY="1900" /> @@ -3392,8 +3392,8 @@ On prend b=1 comme exemple </COMPONENT> <COMPONENT type="1011" id="762" > -<cdparam x="388" y="865" /> -<sizeparam width="153" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<cdparam x="384" y="865" /> +<sizeparam width="160" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <enabled value="true" /> <cdrectangleparam minX="10" maxX="2900" minY="10" maxY="1900" /> @@ -3403,8 +3403,8 @@ On prend b=1 comme exemple </COMPONENT> <COMPONENT type="1011" id="765" > -<cdparam x="270" y="831" /> -<sizeparam width="153" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<cdparam x="266" y="831" /> +<sizeparam width="160" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <enabled value="true" /> <cdrectangleparam minX="10" maxX="2900" minY="10" maxY="1900" /> @@ -3414,8 +3414,8 @@ On prend b=1 comme exemple </COMPONENT> <COMPONENT type="1008" id="768" > -<cdparam x="207" y="1052" /> -<sizeparam width="46" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<cdparam x="205" y="1052" /> +<sizeparam width="51" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <enabled value="true" /> <cdrectangleparam minX="10" maxX="2900" minY="10" maxY="1900" /> @@ -3428,8 +3428,8 @@ On prend b=1 comme exemple </COMPONENT> <COMPONENT type="1008" id="771" > -<cdparam x="323" y="962" /> -<sizeparam width="46" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<cdparam x="321" y="962" /> +<sizeparam width="51" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <enabled value="true" /> <cdrectangleparam minX="10" maxX="2900" minY="10" maxY="1900" /> @@ -3442,8 +3442,8 @@ On prend b=1 comme exemple </COMPONENT> <COMPONENT type="1008" id="774" > -<cdparam x="441" y="983" /> -<sizeparam width="46" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<cdparam x="439" y="983" /> +<sizeparam width="51" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <enabled value="true" /> <cdrectangleparam minX="10" maxX="2900" minY="10" maxY="1900" /> @@ -3456,8 +3456,8 @@ On prend b=1 comme exemple </COMPONENT> <COMPONENT type="1008" id="777" > -<cdparam x="109" y="986" /> -<sizeparam width="46" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<cdparam x="107" y="986" /> +<sizeparam width="51" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <enabled value="true" /> <cdrectangleparam minX="10" maxX="2900" minY="10" maxY="1900" /> @@ -3470,8 +3470,8 @@ On prend b=1 comme exemple </COMPONENT> <COMPONENT type="1008" id="780" > -<cdparam x="699" y="813" /> -<sizeparam width="46" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<cdparam x="697" y="813" /> +<sizeparam width="51" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <enabled value="true" /> <cdrectangleparam minX="10" maxX="2900" minY="10" maxY="1900" /> @@ -3484,8 +3484,8 @@ On prend b=1 comme exemple </COMPONENT> <COMPONENT type="1008" id="783" > -<cdparam x="777" y="1141" /> -<sizeparam width="46" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<cdparam x="775" y="1141" /> +<sizeparam width="51" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <enabled value="true" /> <cdrectangleparam minX="10" maxX="2900" minY="10" maxY="1900" /> @@ -3498,8 +3498,8 @@ On prend b=1 comme exemple </COMPONENT> <COMPONENT type="1008" id="786" > -<cdparam x="920" y="1178" /> -<sizeparam width="46" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<cdparam x="918" y="1178" /> +<sizeparam width="51" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <enabled value="true" /> <cdrectangleparam minX="10" maxX="2900" minY="10" maxY="1900" /> @@ -3512,8 +3512,8 @@ On prend b=1 comme exemple </COMPONENT> <COMPONENT type="1008" id="789" > -<cdparam x="1026" y="1211" /> -<sizeparam width="46" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<cdparam x="1024" y="1211" /> +<sizeparam width="51" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <enabled value="true" /> <cdrectangleparam minX="10" maxX="2900" minY="10" maxY="1900" /> @@ -3544,8 +3544,8 @@ On prend b=1 comme exemple </COMPONENT> <COMPONENT type="1006" id="796" > -<cdparam x="1169" y="1214" /> -<sizeparam width="79" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<cdparam x="1166" y="1214" /> +<sizeparam width="84" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <enabled value="true" /> <cdrectangleparam minX="10" maxX="2900" minY="10" maxY="1900" /> @@ -3559,7 +3559,7 @@ On prend b=1 comme exemple <COMPONENT type="301" id="813" > <cdparam x="1159" y="1153" /> -<sizeparam width="108" height="20" minWidth="50" minHeight="20" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<sizeparam width="115" height="20" minWidth="50" minHeight="20" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="2900" minY="10" maxY="1900" /> <infoparam name="UML Note" value="send Ack of Fin @@ -3586,8 +3586,8 @@ On prend b=1 comme exemple </COMPONENT> <COMPONENT type="1011" id="816" > -<cdparam x="1158" y="1295" /> -<sizeparam width="100" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<cdparam x="1154" y="1295" /> +<sizeparam width="109" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <enabled value="true" /> <cdrectangleparam minX="10" maxX="2900" minY="10" maxY="1900" /> @@ -3606,8 +3606,8 @@ On prend b=1 comme exemple </COMPONENT> <COMPONENT type="1011" id="821" > -<cdparam x="1158" y="1402" /> -<sizeparam width="100" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<cdparam x="1154" y="1402" /> +<sizeparam width="109" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <enabled value="true" /> <cdrectangleparam minX="10" maxX="2900" minY="10" maxY="1900" /> @@ -3617,8 +3617,8 @@ On prend b=1 comme exemple </COMPONENT> <COMPONENT type="1008" id="824" > -<cdparam x="1185" y="1351" /> -<sizeparam width="46" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<cdparam x="1183" y="1351" /> +<sizeparam width="51" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <enabled value="true" /> <cdrectangleparam minX="10" maxX="2900" minY="10" maxY="1900" /> @@ -3649,8 +3649,8 @@ On prend b=1 comme exemple </COMPONENT> <COMPONENT type="1006" id="831" > -<cdparam x="1489" y="1132" /> -<sizeparam width="80" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<cdparam x="1487" y="1132" /> +<sizeparam width="84" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <enabled value="true" /> <cdrectangleparam minX="10" maxX="2900" minY="10" maxY="1900" /> @@ -3663,8 +3663,8 @@ On prend b=1 comme exemple </COMPONENT> <COMPONENT type="1006" id="834" > -<cdparam x="1490" y="1348" /> -<sizeparam width="79" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<cdparam x="1487" y="1348" /> +<sizeparam width="84" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <enabled value="true" /> <cdrectangleparam minX="10" maxX="2900" minY="10" maxY="1900" /> @@ -3677,8 +3677,8 @@ On prend b=1 comme exemple </COMPONENT> <COMPONENT type="1008" id="837" > -<cdparam x="1707" y="1026" /> -<sizeparam width="43" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<cdparam x="1704" y="1026" /> +<sizeparam width="48" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <enabled value="true" /> <cdrectangleparam minX="10" maxX="2900" minY="10" maxY="1900" /> @@ -3692,7 +3692,7 @@ On prend b=1 comme exemple <COMPONENT type="301" id="854" > <cdparam x="1759" y="1192" /> -<sizeparam width="86" height="20" minWidth="50" minHeight="20" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<sizeparam width="92" height="20" minWidth="50" minHeight="20" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="2900" minY="10" maxY="1900" /> <infoparam name="UML Note" value="Correct ack @@ -3720,7 +3720,7 @@ On prend b=1 comme exemple <COMPONENT type="301" id="871" > <cdparam x="1635" y="1168" /> -<sizeparam width="71" height="20" minWidth="50" minHeight="20" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<sizeparam width="76" height="20" minWidth="50" minHeight="20" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="2900" minY="10" maxY="1900" /> <infoparam name="UML Note" value="false ack @@ -3747,8 +3747,8 @@ On prend b=1 comme exemple </COMPONENT> <COMPONENT type="1006" id="874" > -<cdparam x="1602" y="1299" /> -<sizeparam width="79" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<cdparam x="1599" y="1299" /> +<sizeparam width="84" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <enabled value="true" /> <cdrectangleparam minX="10" maxX="2900" minY="10" maxY="1900" /> @@ -3771,7 +3771,7 @@ On prend b=1 comme exemple <COMPONENT type="301" id="893" > <cdparam x="1469" y="1295" /> -<sizeparam width="127" height="20" minWidth="50" minHeight="20" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<sizeparam width="137" height="20" minWidth="50" minHeight="20" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="2900" minY="10" maxY="1900" /> <infoparam name="UML Note" value="return acknowldge @@ -3826,8 +3826,8 @@ On prend b=1 comme exemple </COMPONENT> <COMPONENT type="1008" id="913" > -<cdparam x="1506" y="1405" /> -<sizeparam width="46" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<cdparam x="1504" y="1405" /> +<sizeparam width="51" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <enabled value="true" /> <cdrectangleparam minX="10" maxX="2900" minY="10" maxY="1900" /> @@ -3840,8 +3840,8 @@ On prend b=1 comme exemple </COMPONENT> <COMPONENT type="1008" id="916" > -<cdparam x="1618" y="1348" /> -<sizeparam width="46" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<cdparam x="1616" y="1348" /> +<sizeparam width="51" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <enabled value="true" /> <cdrectangleparam minX="10" maxX="2900" minY="10" maxY="1900" /> @@ -3854,8 +3854,8 @@ On prend b=1 comme exemple </COMPONENT> <COMPONENT type="1006" id="919" > -<cdparam x="1613" y="1404" /> -<sizeparam width="56" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<cdparam x="1611" y="1404" /> +<sizeparam width="60" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <enabled value="true" /> <cdrectangleparam minX="10" maxX="2900" minY="10" maxY="1900" /> @@ -3877,8 +3877,8 @@ On prend b=1 comme exemple </COMPONENT> <COMPONENT type="1011" id="924" > -<cdparam x="1776" y="1349" /> -<sizeparam width="100" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<cdparam x="1772" y="1349" /> +<sizeparam width="109" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <enabled value="true" /> <cdrectangleparam minX="10" maxX="2900" minY="10" maxY="1900" /> @@ -3897,8 +3897,8 @@ On prend b=1 comme exemple </COMPONENT> <COMPONENT type="1011" id="929" > -<cdparam x="1870" y="1411" /> -<sizeparam width="100" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<cdparam x="1866" y="1411" /> +<sizeparam width="109" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <enabled value="true" /> <cdrectangleparam minX="10" maxX="2900" minY="10" maxY="1900" /> @@ -3926,8 +3926,8 @@ On prend b=1 comme exemple </COMPONENT> <COMPONENT type="1011" id="936" > -<cdparam x="2051" y="1466" /> -<sizeparam width="100" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<cdparam x="2047" y="1466" /> +<sizeparam width="109" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <enabled value="true" /> <cdrectangleparam minX="10" maxX="2900" minY="10" maxY="1900" /> @@ -3946,8 +3946,8 @@ On prend b=1 comme exemple </COMPONENT> <COMPONENT type="1011" id="941" > -<cdparam x="1946" y="1493" /> -<sizeparam width="100" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<cdparam x="1942" y="1493" /> +<sizeparam width="109" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <enabled value="true" /> <cdrectangleparam minX="10" maxX="2900" minY="10" maxY="1900" /> @@ -3957,8 +3957,8 @@ On prend b=1 comme exemple </COMPONENT> <COMPONENT type="1011" id="944" > -<cdparam x="1946" y="1434" /> -<sizeparam width="100" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<cdparam x="1942" y="1434" /> +<sizeparam width="109" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <enabled value="true" /> <cdrectangleparam minX="10" maxX="2900" minY="10" maxY="1900" /> @@ -4024,8 +4024,8 @@ On prend b=1 comme exemple </COMPONENT> <COMPONENT type="1006" id="981" > -<cdparam x="2198" y="1198" /> -<sizeparam width="79" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<cdparam x="2195" y="1198" /> +<sizeparam width="84" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <enabled value="true" /> <cdrectangleparam minX="10" maxX="2900" minY="10" maxY="1900" /> @@ -4047,8 +4047,8 @@ On prend b=1 comme exemple </COMPONENT> <COMPONENT type="1007" id="986" > -<cdparam x="2198" y="1298" /> -<sizeparam width="78" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<cdparam x="2197" y="1298" /> +<sizeparam width="81" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <enabled value="true" /> <cdrectangleparam minX="10" maxX="2900" minY="10" maxY="1900" /> @@ -4061,8 +4061,8 @@ On prend b=1 comme exemple </COMPONENT> <COMPONENT type="1006" id="989" > -<cdparam x="2209" y="1365" /> -<sizeparam width="56" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<cdparam x="2207" y="1365" /> +<sizeparam width="60" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <enabled value="true" /> <cdrectangleparam minX="10" maxX="2900" minY="10" maxY="1900" /> @@ -4075,8 +4075,8 @@ On prend b=1 comme exemple </COMPONENT> <COMPONENT type="1011" id="992" > -<cdparam x="2161" y="1136" /> -<sizeparam width="153" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<cdparam x="2157" y="1136" /> +<sizeparam width="160" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <enabled value="true" /> <cdrectangleparam minX="10" maxX="2900" minY="10" maxY="1900" /> @@ -4086,8 +4086,8 @@ On prend b=1 comme exemple </COMPONENT> <COMPONENT type="1008" id="995" > -<cdparam x="2214" y="1248" /> -<sizeparam width="46" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<cdparam x="2212" y="1248" /> +<sizeparam width="51" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <enabled value="true" /> <cdrectangleparam minX="10" maxX="2900" minY="10" maxY="1900" /> @@ -4100,8 +4100,8 @@ On prend b=1 comme exemple </COMPONENT> <COMPONENT type="1011" id="998" > -<cdparam x="2187" y="1424" /> -<sizeparam width="100" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<cdparam x="2183" y="1424" /> +<sizeparam width="109" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <enabled value="true" /> <cdrectangleparam minX="10" maxX="2900" minY="10" maxY="1900" /> @@ -4111,8 +4111,8 @@ On prend b=1 comme exemple </COMPONENT> <COMPONENT type="1006" id="1001" > -<cdparam x="2278" y="1122" /> -<sizeparam width="79" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<cdparam x="2275" y="1122" /> +<sizeparam width="84" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <enabled value="true" /> <cdrectangleparam minX="10" maxX="2900" minY="10" maxY="1900" /> @@ -4126,7 +4126,7 @@ On prend b=1 comme exemple <COMPONENT type="301" id="1018" > <cdparam x="2283" y="1065" /> -<sizeparam width="114" height="20" minWidth="50" minHeight="20" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<sizeparam width="121" height="20" minWidth="50" minHeight="20" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="2900" minY="10" maxY="1900" /> <infoparam name="UML Note" value="send Ack of SYN @@ -4153,8 +4153,8 @@ On prend b=1 comme exemple </COMPONENT> <COMPONENT type="1011" id="1021" > -<cdparam x="2267" y="1267" /> -<sizeparam width="100" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<cdparam x="2263" y="1267" /> +<sizeparam width="109" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <enabled value="true" /> <cdrectangleparam minX="10" maxX="2900" minY="10" maxY="1900" /> @@ -4173,8 +4173,8 @@ On prend b=1 comme exemple </COMPONENT> <COMPONENT type="1008" id="1026" > -<cdparam x="2294" y="1199" /> -<sizeparam width="46" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<cdparam x="2292" y="1199" /> +<sizeparam width="51" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <enabled value="true" /> <cdrectangleparam minX="10" maxX="2900" minY="10" maxY="1900" /> @@ -4214,8 +4214,8 @@ On prend b=1 comme exemple </COMPONENT> <COMPONENT type="1008" id="1035" > -<cdparam x="1465" y="1192" /> -<sizeparam width="129" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<cdparam x="1459" y="1192" /> +<sizeparam width="140" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <enabled value="true" /> <cdrectangleparam minX="10" maxX="2900" minY="10" maxY="1900" /> @@ -4228,8 +4228,8 @@ On prend b=1 comme exemple </COMPONENT> <COMPONENT type="1009" id="1038" > -<cdparam x="1698" y="1086" /> -<sizeparam width="60" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<cdparam x="1696" y="1086" /> +<sizeparam width="64" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <enabled value="true" /> <cdrectangleparam minX="10" maxX="2900" minY="10" maxY="1900" /> @@ -4317,7 +4317,7 @@ On prend b=1 comme exemple <cdparam x="371" y="93" /> <sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="600" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <infoparam name="connector from for loop to notified event" value="null" /> -<P1 x="320" y="99" id="508" /> +<P1 x="325" y="99" id="508" /> <P2 x="374" y="128" id="516" /> <AutomaticDrawing data="true" /> </CONNECTOR> @@ -5525,8 +5525,8 @@ On prend b=1 comme exemple <TMLActivityDiagramPanel name="InterfaceDevice" minX="10" maxX="1400" minY="10" maxY="900" > <COMPONENT type="1008" id="1210" > -<cdparam x="320" y="433" /> -<sizeparam width="40" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<cdparam x="318" y="433" /> +<sizeparam width="44" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <enabled value="true" /> <cdrectangleparam minX="10" maxX="1400" minY="10" maxY="900" /> @@ -5553,7 +5553,7 @@ On prend b=1 comme exemple <SUBCOMPONENT type="-1" id="1211" > <father id="1218" num="0" /> <cdparam x="521" y="386" /> -<sizeparam width="12" height="15" minWidth="10" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<sizeparam width="14" height="15" minWidth="10" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="-75" maxX="-20" minY="10" maxY="35" /> <infoparam name="guard 1" value="[ ]" /> @@ -5561,7 +5561,7 @@ On prend b=1 comme exemple <SUBCOMPONENT type="-1" id="1212" > <father id="1218" num="1" /> <cdparam x="581" y="386" /> -<sizeparam width="12" height="15" minWidth="10" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<sizeparam width="14" height="15" minWidth="10" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="35" maxX="55" minY="10" maxY="35" /> <infoparam name="guard 2" value="[ ]" /> @@ -5569,7 +5569,7 @@ On prend b=1 comme exemple <SUBCOMPONENT type="-1" id="1213" > <father id="1218" num="2" /> <cdparam x="566" y="421" /> -<sizeparam width="12" height="15" minWidth="10" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<sizeparam width="14" height="15" minWidth="10" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="20" maxX="40" minY="45" maxY="70" /> <infoparam name="guard 3" value="[ ]" /> @@ -5589,7 +5589,7 @@ On prend b=1 comme exemple <SUBCOMPONENT type="-1" id="1219" > <father id="1226" num="0" /> <cdparam x="599" y="527" /> -<sizeparam width="51" height="15" minWidth="10" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<sizeparam width="52" height="15" minWidth="10" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <enabled value="true" /> <cdrectangleparam minX="-75" maxX="-20" minY="10" maxY="35" /> @@ -5598,7 +5598,7 @@ On prend b=1 comme exemple <SUBCOMPONENT type="-1" id="1220" > <father id="1226" num="1" /> <cdparam x="679" y="527" /> -<sizeparam width="12" height="15" minWidth="10" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<sizeparam width="14" height="15" minWidth="10" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="35" maxX="55" minY="10" maxY="35" /> <infoparam name="guard 2" value="[ ]" /> @@ -5606,7 +5606,7 @@ On prend b=1 comme exemple <SUBCOMPONENT type="-1" id="1221" > <father id="1226" num="2" /> <cdparam x="664" y="562" /> -<sizeparam width="41" height="15" minWidth="10" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<sizeparam width="42" height="15" minWidth="10" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <enabled value="true" /> <cdrectangleparam minX="20" maxX="40" minY="45" maxY="70" /> @@ -5623,8 +5623,8 @@ On prend b=1 comme exemple </COMPONENT> <COMPONENT type="1007" id="1231" > -<cdparam x="192" y="137" /> -<sizeparam width="72" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<cdparam x="188" y="137" /> +<sizeparam width="81" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <enabled value="true" /> <cdrectangleparam minX="10" maxX="1400" minY="10" maxY="900" /> @@ -5637,8 +5637,8 @@ On prend b=1 comme exemple </COMPONENT> <COMPONENT type="1008" id="1234" > -<cdparam x="205" y="237" /> -<sizeparam width="47" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<cdparam x="202" y="237" /> +<sizeparam width="53" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <enabled value="true" /> <cdrectangleparam minX="10" maxX="1400" minY="10" maxY="900" /> @@ -5652,8 +5652,8 @@ On prend b=1 comme exemple </COMPONENT> <COMPONENT type="1010" id="1237" > -<cdparam x="173" y="288" /> -<sizeparam width="110" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<cdparam x="168" y="288" /> +<sizeparam width="120" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <enabled value="true" /> <cdrectangleparam minX="10" maxX="1400" minY="10" maxY="900" /> @@ -5666,8 +5666,8 @@ On prend b=1 comme exemple </COMPONENT> <COMPONENT type="1008" id="1240" > -<cdparam x="208" y="337" /> -<sizeparam width="40" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<cdparam x="207" y="337" /> +<sizeparam width="43" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <enabled value="true" /> <cdrectangleparam minX="10" maxX="1400" minY="10" maxY="900" /> @@ -5680,8 +5680,8 @@ On prend b=1 comme exemple </COMPONENT> <COMPONENT type="1010" id="1243" > -<cdparam x="390" y="152" /> -<sizeparam width="89" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<cdparam x="387" y="152" /> +<sizeparam width="94" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <enabled value="true" /> <cdrectangleparam minX="10" maxX="1400" minY="10" maxY="900" /> @@ -5696,7 +5696,7 @@ On prend b=1 comme exemple <COMPONENT type="301" id="1260" > <cdparam x="453" y="214" /> -<sizeparam width="105" height="20" minWidth="50" minHeight="20" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<sizeparam width="114" height="20" minWidth="50" minHeight="20" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="1400" minY="10" maxY="900" /> <infoparam name="UML Note" value="data exchange @@ -5723,8 +5723,8 @@ On prend b=1 comme exemple </COMPONENT> <COMPONENT type="1006" id="1263" > -<cdparam x="433" y="448" /> -<sizeparam width="87" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<cdparam x="429" y="448" /> +<sizeparam width="94" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <enabled value="true" /> <cdrectangleparam minX="10" maxX="1400" minY="10" maxY="900" /> @@ -5737,8 +5737,8 @@ On prend b=1 comme exemple </COMPONENT> <COMPONENT type="1008" id="1266" > -<cdparam x="422" y="507" /> -<sizeparam width="109" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<cdparam x="419" y="507" /> +<sizeparam width="115" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <enabled value="true" /> <cdrectangleparam minX="10" maxX="1400" minY="10" maxY="900" /> @@ -5763,8 +5763,8 @@ On prend b=1 comme exemple </COMPONENT> <COMPONENT type="1017" id="1271" > -<cdparam x="593" y="447" /> -<sizeparam width="133" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<cdparam x="588" y="447" /> +<sizeparam width="142" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <enabled value="true" /> <cdrectangleparam minX="10" maxX="1400" minY="10" maxY="900" /> @@ -5786,8 +5786,8 @@ On prend b=1 comme exemple </COMPONENT> <COMPONENT type="1009" id="1276" > -<cdparam x="614" y="700" /> -<sizeparam width="91" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<cdparam x="610" y="700" /> +<sizeparam width="98" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <enabled value="true" /> <cdrectangleparam minX="10" maxX="1400" minY="10" maxY="900" /> @@ -5800,8 +5800,8 @@ On prend b=1 comme exemple </COMPONENT> <COMPONENT type="1010" id="1279" > -<cdparam x="604" y="619" /> -<sizeparam width="110" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<cdparam x="600" y="619" /> +<sizeparam width="119" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <enabled value="true" /> <cdrectangleparam minX="10" maxX="1400" minY="10" maxY="900" /> @@ -5824,8 +5824,8 @@ On prend b=1 comme exemple </COMPONENT> <COMPONENT type="1014" id="1285" > -<cdparam x="307" y="287" /> -<sizeparam width="254" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<cdparam x="300" y="287" /> +<sizeparam width="268" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <enabled value="true" /> <cdrectangleparam minX="10" maxX="1400" minY="10" maxY="900" /> @@ -5875,7 +5875,7 @@ On prend b=1 comme exemple <cdparam x="561" y="301" /> <sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <infoparam name="connector" value="null" /> -<P1 x="561" y="301" id="1283" /> +<P1 x="568" y="301" id="1283" /> <P2 x="561" y="366" id="1214" /> <AutomaticDrawing data="true" /> </CONNECTOR> @@ -6041,8 +6041,8 @@ On prend b=1 comme exemple </COMPONENT> <COMPONENT type="1010" id="1314" > -<cdparam x="418" y="364" /> -<sizeparam width="44" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<cdparam x="416" y="364" /> +<sizeparam width="48" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <enabled value="true" /> <cdrectangleparam minX="10" maxX="1400" minY="10" maxY="900" /> @@ -6055,8 +6055,8 @@ On prend b=1 comme exemple </COMPONENT> <COMPONENT type="1010" id="1317" > -<cdparam x="238" y="201" /> -<sizeparam width="129" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<cdparam x="231" y="201" /> +<sizeparam width="143" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <enabled value="true" /> <cdrectangleparam minX="10" maxX="1400" minY="10" maxY="900" /> @@ -6079,8 +6079,8 @@ On prend b=1 comme exemple </COMPONENT> <COMPONENT type="1010" id="1322" > -<cdparam x="141" y="129" /> -<sizeparam width="51" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<cdparam x="138" y="129" /> +<sizeparam width="57" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <enabled value="true" /> <cdrectangleparam minX="10" maxX="1400" minY="10" maxY="900" /> @@ -6094,8 +6094,8 @@ On prend b=1 comme exemple </COMPONENT> <COMPONENT type="1008" id="1325" > -<cdparam x="113" y="182" /> -<sizeparam width="106" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<cdparam x="108" y="182" /> +<sizeparam width="116" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <enabled value="true" /> <cdrectangleparam minX="10" maxX="1400" minY="10" maxY="900" /> @@ -6108,8 +6108,8 @@ On prend b=1 comme exemple </COMPONENT> <COMPONENT type="1010" id="1328" > -<cdparam x="144" y="237" /> -<sizeparam width="44" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<cdparam x="143" y="237" /> +<sizeparam width="47" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <enabled value="true" /> <cdrectangleparam minX="10" maxX="1400" minY="10" maxY="900" /> @@ -6123,8 +6123,8 @@ On prend b=1 comme exemple </COMPONENT> <COMPONENT type="1008" id="1331" > -<cdparam x="124" y="308" /> -<sizeparam width="85" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<cdparam x="121" y="308" /> +<sizeparam width="90" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <enabled value="true" /> <cdrectangleparam minX="10" maxX="1400" minY="10" maxY="900" /> @@ -6138,7 +6138,7 @@ On prend b=1 comme exemple <COMPONENT type="301" id="1348" > <cdparam x="376" y="98" /> -<sizeparam width="233" height="39" minWidth="50" minHeight="20" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<sizeparam width="249" height="39" minWidth="50" minHeight="20" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="1400" minY="10" maxY="900" /> <infoparam name="UML Note" value="The first two layers of the OSI model @@ -6169,8 +6169,8 @@ the smart card and the terminal </COMPONENT> <COMPONENT type="1007" id="1351" > -<cdparam x="254" y="97" /> -<sizeparam width="89" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<cdparam x="250" y="97" /> +<sizeparam width="96" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <enabled value="true" /> <cdrectangleparam minX="10" maxX="1400" minY="10" maxY="900" /> @@ -6183,8 +6183,8 @@ the smart card and the terminal </COMPONENT> <COMPONENT type="1007" id="1354" > -<cdparam x="241" y="148" /> -<sizeparam width="114" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<cdparam x="236" y="148" /> +<sizeparam width="125" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <enabled value="true" /> <cdrectangleparam minX="10" maxX="1400" minY="10" maxY="900" /> @@ -6207,8 +6207,8 @@ the smart card and the terminal </COMPONENT> <COMPONENT type="1008" id="1359" > -<cdparam x="240" y="471" /> -<sizeparam width="106" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<cdparam x="236" y="471" /> +<sizeparam width="115" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <enabled value="true" /> <cdrectangleparam minX="10" maxX="1400" minY="10" maxY="900" /> @@ -6230,8 +6230,8 @@ the smart card and the terminal </COMPONENT> <COMPONENT type="1009" id="1364" > -<cdparam x="252" y="429" /> -<sizeparam width="83" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<cdparam x="249" y="429" /> +<sizeparam width="88" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <enabled value="true" /> <cdrectangleparam minX="10" maxX="1400" minY="10" maxY="900" /> @@ -6244,8 +6244,8 @@ the smart card and the terminal </COMPONENT> <COMPONENT type="1010" id="1367" > -<cdparam x="268" y="385" /> -<sizeparam width="50" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<cdparam x="266" y="385" /> +<sizeparam width="55" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <enabled value="true" /> <cdrectangleparam minX="10" maxX="1400" minY="10" maxY="900" /> @@ -6258,8 +6258,8 @@ the smart card and the terminal </COMPONENT> <COMPONENT type="1006" id="1370" > -<cdparam x="250" y="513" /> -<sizeparam width="87" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<cdparam x="246" y="513" /> +<sizeparam width="94" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <enabled value="true" /> <cdrectangleparam minX="10" maxX="1400" minY="10" maxY="900" /> @@ -6272,8 +6272,8 @@ the smart card and the terminal </COMPONENT> <COMPONENT type="1008" id="1373" > -<cdparam x="562" y="472" /> -<sizeparam width="59" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<cdparam x="559" y="472" /> +<sizeparam width="65" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <enabled value="true" /> <cdrectangleparam minX="10" maxX="1400" minY="10" maxY="900" /> @@ -6286,8 +6286,8 @@ the smart card and the terminal </COMPONENT> <COMPONENT type="1009" id="1376" > -<cdparam x="546" y="433" /> -<sizeparam width="91" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<cdparam x="542" y="433" /> +<sizeparam width="98" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <enabled value="true" /> <cdrectangleparam minX="10" maxX="1400" minY="10" maxY="900" /> @@ -6300,8 +6300,8 @@ the smart card and the terminal </COMPONENT> <COMPONENT type="1006" id="1379" > -<cdparam x="552" y="509" /> -<sizeparam width="79" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<cdparam x="549" y="509" /> +<sizeparam width="84" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <enabled value="true" /> <cdrectangleparam minX="10" maxX="1400" minY="10" maxY="900" /> @@ -6314,8 +6314,8 @@ the smart card and the terminal </COMPONENT> <COMPONENT type="1010" id="1382" > -<cdparam x="536" y="390" /> -<sizeparam width="110" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<cdparam x="532" y="390" /> +<sizeparam width="118" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <enabled value="true" /> <cdrectangleparam minX="10" maxX="1400" minY="10" maxY="900" /> @@ -6332,7 +6332,7 @@ the smart card and the terminal <COMPONENT type="1014" id="1386" > <cdparam x="236" y="261" /> -<sizeparam width="125" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<sizeparam width="124" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <enabled value="true" /> <cdrectangleparam minX="10" maxX="1400" minY="10" maxY="900" /> @@ -6548,7 +6548,7 @@ the smart card and the terminal <cdparam x="391" y="341" /> <sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="600" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <infoparam name="connector from for loop to select" value="null" /> -<P1 x="361" y="275" id="1384" /> +<P1 x="360" y="275" id="1384" /> <P2 x="439" y="275" id="1389" /> <AutomaticDrawing data="true" /> </CONNECTOR> @@ -6899,7 +6899,7 @@ the smart card and the terminal <TGConnectingPoint num="23" id="1596" /> <extraparam> <info stereotype="BUS-RR" nodeName="Bus0" /> -<attributes byteDataSize="4" arbitrationPolicy="0" sliceTime="10000" pipelineSize="1" clockRatio="5" privacy="0" referenceAttack="ReadDataFromBus" /> +<attributes byteDataSize="4" arbitrationPolicy="0" sliceTime="10000" pipelineSize="1" clockRatio="5" privacy="0" referenceAttack="null" /> </extraparam> </COMPONENT> @@ -6940,10 +6940,10 @@ the smart card and the terminal </COMPONENT> <SUBCOMPONENT type="1101" id="1606" > <father id="1631" num="0" /> -<cdparam x="49" y="276" /> -<sizeparam width="172" height="40" minWidth="75" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<cdparam x="56" y="276" /> +<sizeparam width="163" height="40" minWidth="75" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> -<cdrectangleparam minX="0" maxX="-7" minY="0" maxY="86" /> +<cdrectangleparam minX="0" maxX="2" minY="0" maxY="86" /> <infoparam name="TGComponent" value="AppC::InterfaceDevice" /> <TGConnectingPoint num="0" id="1598" /> <TGConnectingPoint num="1" id="1599" /> @@ -6959,8 +6959,8 @@ the smart card and the terminal </SUBCOMPONENT> <COMPONENT type="1100" id="1683" > -<cdparam x="266" y="59" /> -<sizeparam width="272" height="167" minWidth="150" minHeight="100" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<cdparam x="262" y="63" /> +<sizeparam width="272" height="161" minWidth="150" minHeight="100" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> <cdrectangleparam minX="10" maxX="1400" minY="10" maxY="900" /> <infoparam name="CPU0" value="name" /> @@ -6995,10 +6995,10 @@ the smart card and the terminal </COMPONENT> <SUBCOMPONENT type="1101" id="1640" > <father id="1683" num="0" /> -<cdparam x="276" y="90" /> -<sizeparam width="109" height="40" minWidth="75" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<cdparam x="272" y="94" /> +<sizeparam width="108" height="40" minWidth="75" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> -<cdrectangleparam minX="0" maxX="163" minY="0" maxY="127" /> +<cdrectangleparam minX="0" maxX="164" minY="0" maxY="121" /> <infoparam name="TGComponent" value="AppC::TCPIP" /> <TGConnectingPoint num="0" id="1632" /> <TGConnectingPoint num="1" id="1633" /> @@ -7014,10 +7014,10 @@ the smart card and the terminal </SUBCOMPONENT> <SUBCOMPONENT type="1101" id="1649" > <father id="1683" num="1" /> -<cdparam x="292" y="165" /> -<sizeparam width="144" height="40" minWidth="75" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<cdparam x="288" y="169" /> +<sizeparam width="139" height="40" minWidth="75" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> -<cdrectangleparam minX="0" maxX="128" minY="0" maxY="127" /> +<cdrectangleparam minX="0" maxX="133" minY="0" maxY="121" /> <infoparam name="TGComponent" value="AppC::Application" /> <TGConnectingPoint num="0" id="1641" /> <TGConnectingPoint num="1" id="1642" /> @@ -7033,10 +7033,10 @@ the smart card and the terminal </SUBCOMPONENT> <SUBCOMPONENT type="1101" id="1658" > <father id="1683" num="2" /> -<cdparam x="391" y="119" /> -<sizeparam width="141" height="37" minWidth="75" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> +<cdparam x="387" y="123" /> +<sizeparam width="136" height="37" minWidth="75" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <hidden value="false" /> -<cdrectangleparam minX="0" maxX="131" minY="0" maxY="130" /> +<cdrectangleparam minX="0" maxX="136" minY="0" maxY="124" /> <infoparam name="TGComponent" value="AppC::SmartCard" /> <TGConnectingPoint num="0" id="1650" /> <TGConnectingPoint num="1" id="1651" /> @@ -7110,7 +7110,7 @@ the smart card and the terminal <cdparam x="388" y="162" /> <sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="1000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" /> <infoparam name="connector from CPU0 to Bus0" value="{info}" /> -<P1 x="402" y="226" id="1665" /> +<P1 x="398" y="224" id="1665" /> <P2 x="403" y="269" id="1574" /> <AutomaticDrawing data="true" /> <extraparam> diff --git a/simulators/c++2/src_simulator/TMLTransaction.cpp b/simulators/c++2/src_simulator/TMLTransaction.cpp index 14a1066796506633e634d361bc1ae03654f72c8d..6b46b17489bb96bb4b0f33e9e65d2a925e6828f2 100755 --- a/simulators/c++2/src_simulator/TMLTransaction.cpp +++ b/simulators/c++2/src_simulator/TMLTransaction.cpp @@ -46,7 +46,7 @@ MemPoolNoDel<TMLTransaction> TMLTransaction::memPool(BLOCK_SIZE_TRANS); -TMLTransaction::TMLTransaction():_runnableTime(0), _startTime(0), _length(0), _virtualLength(0), _command(0), +TMLTransaction::TMLTransaction():_runnableTime(0), _startTime(0), _length(0), _virtualLength(0), _command(0),_transactCoreNumber(0),_transVcdOutputState(END_IDLE_TRANS), #ifdef PENALTIES_ENABLED _idlePenalty(0), _taskSwitchingPenalty(0), //, _branchingPenalty(0), #endif diff --git a/simulators/c++2/src_simulator/TMLTransaction.h b/simulators/c++2/src_simulator/TMLTransaction.h index bb82e10398784bfd60dcd476a9e150cbbf2e1244..0dbe766c721e9bf51ba9d4be265572e777490779 100644 --- a/simulators/c++2/src_simulator/TMLTransaction.h +++ b/simulators/c++2/src_simulator/TMLTransaction.h @@ -48,6 +48,13 @@ //class TMLCommand; class TMLChannel; +enum vcdTransVisState + { + END_IDLE_TRANS, + END_PENALTY_TRANS, + END_TASK_TRANS +}; + class TMLTransaction { public: ///Constructor @@ -241,6 +248,10 @@ class TMLTransaction { inline void setStateID(ID iID) {_stateID=iID;} inline ID getStateID() {return _stateID;} inline void setTaskID(ID iID) {_taskID=iID;} + inline unsigned int getTransactCoreNumber() {return _transactCoreNumber;} + inline void setTransactCoreNumber(unsigned int num) {_transactCoreNumber=num;} + inline void setTransVcdOutPutState(vcdTransVisState n) {_transVcdOutputState=n;} + inline vcdTransVisState getTransVcdOutPutState() { return _transVcdOutputState;} void toXML(std::ostringstream& glob, int deviceID, std::string deviceName) const; @@ -255,6 +266,10 @@ class TMLTransaction { TMLLength _virtualLength; ///Pointer to the command the transaction belongs to TMLCommand* _command; + ///Core number of the transaction + unsigned int _transactCoreNumber; + ///State variable for the cpu VCD output + vcdTransVisState _transVcdOutputState; #ifdef PENALTIES_ENABLED ///Idle penalty TMLTime _idlePenalty; diff --git a/simulators/c++2/src_simulator/app/TMLChannel.cpp b/simulators/c++2/src_simulator/app/TMLChannel.cpp index da05937a11545bf0f771f12b73753285e54eba5c..0f2bb5bafd489365fcb12cee6dd3c2f40bc99552 100755 --- a/simulators/c++2/src_simulator/app/TMLChannel.cpp +++ b/simulators/c++2/src_simulator/app/TMLChannel.cpp @@ -67,9 +67,10 @@ BusMaster* TMLChannel::getNextMaster(TMLTransaction* iTrans){ } BusMaster* TMLChannel::getFirstMaster(TMLTransaction* iTrans){ + std::cout<<"get First master"<<std::endl; //if (iTrans->getCommand()->getTask()==_writeTask){ //std::cout << "fima 1\n"; - if (_masters==0 || _slaves==0 || _numberOfHops==0) return 0; + if (_masters==0 || _slaves==0 || _numberOfHops==0 ) {return 0;} //std::cout << "fima 2\n"; if (iTrans==_writeTrans){ //if (iTrans->getCommand()->getTask()==_writeTask){ @@ -78,9 +79,10 @@ BusMaster* TMLChannel::getFirstMaster(TMLTransaction* iTrans){ return _masters[_writeTransCurrHop]; }else{ //std::cout << "fima 4\n"; - if (_slaves[(_numberOfHops/2)]==0) return 0; //NEW!!! + if (_slaves[(_numberOfHops/2)]==0) {return 0;} //NEW!!! //std::cout << "fima 5\n"; _readTransCurrHop=_numberOfHops-1; + return _masters[_readTransCurrHop]; } } diff --git a/simulators/c++2/src_simulator/app/TMLbrbwChannel.cpp b/simulators/c++2/src_simulator/app/TMLbrbwChannel.cpp index ee88335d2e58531c46ac4564cca2183e0a956fa6..16017733dcb7a02a18e3027c8047d1f11fde2845 100755 --- a/simulators/c++2/src_simulator/app/TMLbrbwChannel.cpp +++ b/simulators/c++2/src_simulator/app/TMLbrbwChannel.cpp @@ -61,6 +61,7 @@ void TMLbrbwChannel::testRead(TMLTransaction* iTrans){ } void TMLbrbwChannel::write(){ +std::cout<<"write!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"<<std::endl; #ifdef LOSS_ENABLED if (_maxNbOfLosses > _nbOfLosses){ TMLLength aLostBytes = _writeTrans->getVirtualLength() * _lossRate + _lossRemainder; diff --git a/simulators/c++2/src_simulator/arch/Bus.cpp b/simulators/c++2/src_simulator/arch/Bus.cpp index 420ba0ffad572905dd345122d8ee12f7d415c6dd..b23b737ebcc6e10b753fde552f457f08399a57e4 100644 --- a/simulators/c++2/src_simulator/arch/Bus.cpp +++ b/simulators/c++2/src_simulator/arch/Bus.cpp @@ -91,7 +91,7 @@ void Bus::schedule(){ //Adds the transaction determined by the scheduling algorithm to the internal list of scheduled transactions bool Bus::addTransaction(TMLTransaction* iTransToBeAdded){ - //std::cout << "Bus add trans " << _nextTransaction << "\n"; + std::cout << "Bus add trans ####" << _nextTransaction << "\n"; _endSchedule = _nextTransaction->getEndTime(); //std::cout << "set end time to " << _endSchedule << "\n"; //_transactList.push_back(_nextTransaction); @@ -257,12 +257,14 @@ void Bus::latencies2XML(std::ostringstream& glob, unsigned int id1, unsigned int //Returns the next signal change (for vcd output) void Bus::getNextSignalChange(bool iInit, SignalChangeData* oSigData){ + std::cout<<"bus getnext"<<std::endl; //std::ostringstream outp; //std::cout << _transactList.size() << " elements in List of " << _name << std::endl; if (iInit){ _posTrasactListVCD=_transactList.begin(); _previousTransEndTime=0; _vcdOutputState=INIT_BUS; + std::cout<<"bus init"<<std::endl; } if (_posTrasactListVCD == _transactList.end()){ //outp << VCD_PREFIX << vcdValConvert(END_IDLE_BUS) << "bus" << _ID; @@ -270,11 +272,13 @@ void Bus::getNextSignalChange(bool iInit, SignalChangeData* oSigData){ //oNoMoreTrans=true; //return _previousTransEndTime; new (oSigData) SignalChangeData(END_IDLE_BUS, _previousTransEndTime, this); + std::cout<<"bus end "<<std::endl; }else{ TMLTransaction* aCurrTrans=*_posTrasactListVCD; //oNoMoreTrans=false; switch (_vcdOutputState){ case END_READ_BUS: + std::cout<<"BUS END_READ_BUS"<<std::endl; do{ _previousTransEndTime=(*_posTrasactListVCD)->getEndTime(); _posTrasactListVCD++; @@ -293,6 +297,7 @@ void Bus::getNextSignalChange(bool iInit, SignalChangeData* oSigData){ //return _previousTransEndTime; break; case END_WRITE_BUS: + std::cout<<"BUS END_WRTIE_BUS"<<std::endl; do{ _previousTransEndTime=(*_posTrasactListVCD)->getEndTime(); _posTrasactListVCD++; @@ -311,6 +316,7 @@ void Bus::getNextSignalChange(bool iInit, SignalChangeData* oSigData){ //return _previousTransEndTime; break; case INIT_BUS: + std::cout<<"BUS INIT_BUS"<<std::endl; if (aCurrTrans->getStartTimeOperation()!=0){ _vcdOutputState=END_IDLE_BUS; //outp << VCD_PREFIX << vcdValConvert(END_IDLE_BUS) << "bus" << _ID; @@ -320,6 +326,7 @@ void Bus::getNextSignalChange(bool iInit, SignalChangeData* oSigData){ return; } case END_IDLE_BUS: + std::cout<<"BUS END_IDLE_BUS"<<std::endl; if (aCurrTrans->getCommand()->getTask()==aCurrTrans->getChannel()->getBlockedReadTask()){ _vcdOutputState=END_READ_BUS; new (oSigData) SignalChangeData(END_READ_BUS, aCurrTrans->getStartTimeOperation(), this); diff --git a/simulators/c++2/src_simulator/arch/CPU.h b/simulators/c++2/src_simulator/arch/CPU.h index 1c125bd2cd82e1be824e840a1b39f6b5cfb48814..eac87b327251efc34217b5bcd427378e86c54040 100755 --- a/simulators/c++2/src_simulator/arch/CPU.h +++ b/simulators/c++2/src_simulator/arch/CPU.h @@ -70,7 +70,7 @@ public: \param iName Name of the device \param iScheduler Pointer to the scheduler object */ - CPU(ID iID, std::string iName, WorkloadSource* iScheduler): SchedulableDevice(iID, iName, iScheduler), _lastTransaction(0)/*,_schedulingNeeded(false)*/{ + CPU(ID iID, std::string iName, WorkloadSource* iScheduler, unsigned int iAmountOfCore): SchedulableDevice(iID, iName, iScheduler), _lastTransaction(0), amountOfCore(iAmountOfCore)/*,_schedulingNeeded(false)*/{ } ///Destructor virtual ~CPU(){ @@ -111,6 +111,7 @@ public: SchedulableDevice::writeObject(os); return os; } + inline unsigned int getAmoutOfCore(){ return amountOfCore;} ///Invalidate schedule of CPU /*void setRescheduleFlag(){ _schedulingNeeded=true; @@ -158,6 +159,109 @@ public: std::cout << "Current Trans " << _name << ": "; if (_nextTransaction==0) std::cout << "0\n"; else std::cout << _nextTransaction->toString() << "\n"; }*/ + void schedule2HTML(std::ofstream& myfile) const { + myfile << "<h2><span>Scheduling for device: "<< _name << "</span></h2>" << std::endl; + + if ( _transactList.size() == 0 ) { + myfile << "<h4>Device never activated</h4>" << std::endl; + } + else { + myfile << "<table>" << std::endl << "<tr>"; + + std::map<TMLTask*, std::string> taskCellClasses; + unsigned int nextCellClassIndex = 0; + TMLTime aCurrTime = 0; + + for( TransactionList::const_iterator i = _transactList.begin(); i != _transactList.end(); ++i ) { + std::cout<<"get transaction core number is: "<<(*i)->getTransactCoreNumber()<<std::endl; + std::cout<<"time : "<<_cycleTime<<std::endl; + //std::cout << "CPU:calcSTL: html of CPU " << _name << ": " << (*i)->toString() << std::endl; + if( (*i)->getTransactCoreNumber() == this->_cycleTime ){ + TMLTransaction* aCurrTrans = *i; + unsigned int aBlanks = aCurrTrans->getStartTime() - aCurrTime; + + if ( aBlanks > 0 ) { + writeHTMLColumn( myfile, aBlanks, "not", "idle time" ); + } + + unsigned int aLength = aCurrTrans->getPenalties(); + + if ( aLength != 0 ) { + std::ostringstream title; + title << "idle:" << aCurrTrans->getIdlePenalty() << " switch:" << aCurrTrans->getTaskSwitchingPenalty(); + writeHTMLColumn( myfile, aLength, "not", title.str() ); + } + + aLength = aCurrTrans->getOperationLength(); + + // Issue #4 + TMLTask* task = aCurrTrans->getCommand()->getTask(); + const std::string cellClass = determineHTMLCellClass( taskCellClasses, task, nextCellClassIndex ); + + writeHTMLColumn( myfile, aLength, cellClass, aCurrTrans->toShortString() ); + + aCurrTime = aCurrTrans->getEndTime(); + } + } + + + myfile << "</tr>" << std::endl << "<tr>"; + + for ( unsigned int aLength = 0; aLength < aCurrTime; aLength++ ) { + myfile << "<th></th>"; + } + + myfile << "</tr>" << std::endl << "<tr>"; + + for ( unsigned int aLength = 0; aLength <= aCurrTime; aLength += 5 ) { + std::ostringstream spanVal; + spanVal << aLength; + writeHTMLColumn( myfile, 5, "sc", "", spanVal.str(), false ); + //myfile << "<td colspan=\"5\" class=\"sc\">" << aLength << "</td>"; + } + + myfile << "</tr>" << std::endl << "</table>" << std::endl << "<table>" << std::endl << "<tr>"; + + for( std::map<TMLTask*, std::string>::iterator taskColIt = taskCellClasses.begin(); taskColIt != taskCellClasses.end(); ++taskColIt ) { + TMLTask* task = (*taskColIt).first; + // Unset the default td max-width of 5px. For some reason setting the max-with on a specific t style does not work + myfile << "<td class=\"" << taskCellClasses[ task ] << "\"></td><td style=\"max-width: unset;\">" << task->toString() << "</td><td class=\"space\"></td>"; + } + + myfile << "</tr>" << std::endl; + + #ifdef ADD_COMMENTS + bool aMoreComments = true, aInit = true; + Comment* aComment; + + while ( aMoreComments ) { + aMoreComments = false; + myfile << "<tr>"; + + for( std::map<TMLTask*, std::string>::iterator taskColIt = taskCellClasses.begin(); taskColIt != taskCellClasses.end(); ++taskColIt ) { + //for(TaskList::const_iterator j=_taskList.begin(); j != _taskList.end(); ++j){ + TMLTask* task = (*taskColIt).first; + std::string aCommentString = task->getNextComment( aInit, aComment ); + + if ( aComment == 0 ) { + myfile << "<td></td><td></td><td class=\"space\"></td>"; + } + else { + replaceAll(aCommentString,"<","<"); + replaceAll(aCommentString,">",">"); + aMoreComments = true; + myfile << "<td style=\"max-width: unset;\">" << aComment->_time << "</td><td><pre>" << aCommentString << "</pre></td><td class=\"space\"></td>"; + } + } + + aInit = false; + myfile << "</tr>" << std::endl; + } + #endif + myfile << "</table>" << std::endl; + } + } + protected: ///List of all tasks running on the CPU TaskList _taskList; @@ -165,6 +269,8 @@ protected: TMLTransaction* _lastTransaction; ///List of bus masters BusMasterList _busMasterList; + ///Amount of cores + unsigned int amountOfCore; ///Dirty flag of the current scheduling decision //bool _schedulingNeeded; }; diff --git a/simulators/c++2/src_simulator/arch/MultiCoreCPU.cpp b/simulators/c++2/src_simulator/arch/MultiCoreCPU.cpp index caa144b3352a36326145129efccbe4e68ebfe5a2..7358e2b3e910475b75830005ec277cc6477554b8 100644 --- a/simulators/c++2/src_simulator/arch/MultiCoreCPU.cpp +++ b/simulators/c++2/src_simulator/arch/MultiCoreCPU.cpp @@ -48,25 +48,38 @@ //#include <TransactionListener.h> -MultiCoreCPU::MultiCoreCPU(ID iID, std::string iName, WorkloadSource* iScheduler, WorkloadSource* iScheduler2, TMLTime iTimePerCycle, unsigned int iCyclesPerExeci, unsigned int iCyclesPerExecc, unsigned int iPipelineSize, unsigned int iTaskSwitchingCycles, unsigned int iBranchingMissrate, unsigned int iChangeIdleModeCycles, unsigned int iCyclesBeforeIdle, unsigned int ibyteDataSize): CPU(iID, iName, iScheduler), /*_lastTransaction(0),*/ _masterNextTransaction(0), _timePerCycle(iTimePerCycle) +MultiCoreCPU::MultiCoreCPU(ID iID, + std::string iName, + WorkloadSource* iScheduler, + TMLTime iTimePerCycle, + unsigned int iCyclesPerExeci, + unsigned int iCyclesPerExecc, + unsigned int iPipelineSize, + unsigned int iTaskSwitchingCycles, + unsigned int iBranchingMissrate, + unsigned int iChangeIdleModeCycles, + unsigned int iCyclesBeforeIdle, + unsigned int ibyteDataSize, + unsigned int iAmountOfCore): CPU(iID, iName, iScheduler, iAmountOfCore), /*_lastTransaction(0),*/ _masterNextTransaction(0), _timePerCycle(iTimePerCycle), coreNumber(0) #ifdef PENALTIES_ENABLED - , _pipelineSize(iPipelineSize), _taskSwitchingCycles(iTaskSwitchingCycles),_brachingMissrate(iBranchingMissrate) - , _changeIdleModeCycles(iChangeIdleModeCycles), _cyclesBeforeIdle(iCyclesBeforeIdle) + , _pipelineSize(iPipelineSize), _taskSwitchingCycles(iTaskSwitchingCycles),_brachingMissrate(iBranchingMissrate) + , _changeIdleModeCycles(iChangeIdleModeCycles), _cyclesBeforeIdle(iCyclesBeforeIdle) #endif - , _cyclesPerExeci(iCyclesPerExeci) /*, _busyCycles(0)*/ + , _cyclesPerExeci(iCyclesPerExeci) /*, _busyCycles(0)*/ #ifdef PENALTIES_ENABLED - , _timePerExeci(_cyclesPerExeci * _timePerCycle * (_pipelineSize * _brachingMissrate + 100 - _brachingMissrate) /100.0) - ,_taskSwitchingTime(_taskSwitchingCycles*_timePerCycle) - , _timeBeforeIdle(_cyclesBeforeIdle*_timePerCycle) - , _changeIdleModeTime(_changeIdleModeCycles*_timePerCycle) + , _timePerExeci(_cyclesPerExeci * _timePerCycle * (_pipelineSize * _brachingMissrate + 100 - _brachingMissrate) /100.0) + ,_taskSwitchingTime(_taskSwitchingCycles*_timePerCycle) + , _timeBeforeIdle(_cyclesBeforeIdle*_timePerCycle) + , _changeIdleModeTime(_changeIdleModeCycles*_timePerCycle) #else - , _timePerExeci(_cyclesPerExeci*_timePerCycle) + , _timePerExeci(_cyclesPerExeci*_timePerCycle) #endif - //, _pipelineSizeTimesExeci(_pipelineSize * _timePerExeci) - //,_missrateTimesPipelinesize(_brachingMissrate*_pipelineSize) + //, _pipelineSizeTimesExeci(_pipelineSize * _timePerExeci) + //,_missrateTimesPipelinesize(_brachingMissrate*_pipelineSize) { //std::cout << "Time per EXECIiiiiiiiiiiiiiiiiiiiiii: " << _timePerExeci << "\n"; //_transactList.reserve(BLOCK_SIZE); + initCore(); } MultiCoreCPU::~MultiCoreCPU(){ @@ -76,7 +89,38 @@ MultiCoreCPU::~MultiCoreCPU(){ //delete _scheduler; } +///test/// +void MultiCoreCPU::initCore(){ + for (unsigned int i = 0; i < amountOfCore; i++) + multiCore[i] = 0; +} + +/*unsigned int MultiCoreCPU::getCoreNumber(){ + unsigned int i; + for( i = 0; i < amountOfCore; i++){ + if(multiCore[i] == 0){ + multiCore[i]=-1; + break; + } + } + return i; +}*/ + +TMLTime MultiCoreCPU::getMinEndSchedule(){ + TMLTime minTime=multiCore[0]; + for( TMLTime i = 0; i < multiCore.size(); i++){ + std::cout<<"core number is: "<<i<<" end schedule is "<<multiCore[i]<<std::endl; + if( minTime >= multiCore[i]){ + minTime=multiCore[i]; + coreNumber=i; + } + } + std::cout<<"in getMinEndSchedule core number is "<<coreNumber<<std::endl; + return minTime; +} + TMLTransaction* MultiCoreCPU::getNextTransaction(){ +std::cout<<"getNextTransaction"<<_name<<std::endl; #ifdef BUS_ENABLED if (_masterNextTransaction == 0 || _nextTransaction == 0){ return _nextTransaction; @@ -84,7 +128,7 @@ TMLTransaction* MultiCoreCPU::getNextTransaction(){ #ifdef DEBUG_CPU std::cout << "CPU:getNT: " << _name << " has bus transaction on master " << _masterNextTransaction->toString() << std::endl; #endif - //std::cout << "CRASH Trans:" << _nextTransaction->toString() << std::endl << "Channel: " << _nextTransaction->getChannel() << "\n"; + std::cout << "CRASH Trans:" << _nextTransaction->toString() << std::endl << "Channel: " << _nextTransaction->getChannel() << "\n"; BusMaster* aTempMaster = getMasterForBus(_nextTransaction->getChannel()->getFirstMaster(_nextTransaction)); //std::cout << "1 aTempMaster: " << aTempMaster << std::endl; bool aResult = aTempMaster->accessGranted(); @@ -104,11 +148,13 @@ TMLTransaction* MultiCoreCPU::getNextTransaction(){ } void MultiCoreCPU::calcStartTimeLength(TMLTime iTimeSlice){ +std::cout<<"calcStartTimeLength"<<_name<<std::endl; #ifdef DEBUG_CPU std::cout << "CPU:calcSTL: scheduling decision of CPU " << _name << ": " << _nextTransaction->toString() << std::endl; #endif #ifdef BUS_ENABLED - //std::cout << "get channel " << std::endl; +std::cout << "CPU:calcSTL: scheduling decision of CPU " << _name << ": " << _nextTransaction->toString() << std::endl; + //std::cout << " " << std::endl; TMLChannel* aChannel=_nextTransaction->getCommand()->getChannel(0); //std::cout << "after get channel " << std::endl; if(aChannel == 0){ @@ -129,7 +175,7 @@ void MultiCoreCPU::calcStartTimeLength(TMLTime iTimeSlice){ TMLTime aStartTime = max(_endSchedule,_nextTransaction->getRunnableTime()); TMLTime aReminder = aStartTime % _timePerCycle; if (aReminder!=0) aStartTime+=_timePerCycle - aReminder; - std::cout << "CPU: set starttime in CPU=" << aStartTime << "\n"; + std::cout << _name << "CPU: set starttime in CPU=" << aStartTime << "\n"; _nextTransaction->setStartTime(aStartTime); @@ -222,7 +268,7 @@ TMLTime MultiCoreCPU::truncateNextTransAt(TMLTime iTime){ _nextTransaction->setLength(_nextTransaction->getVirtualLength() *_timePerExeci); } #else - if (iTime <= _nextTransaction->getStartTime()) return 0; //before: <= + if (iTime <= _nextTransaction->getStartTime()) return 0; //before TMLTime aNewDuration = iTime - _nextTransaction->getStartTime(); _nextTransaction->setVirtualLength(max((TMLTime)(aNewDuration /_timePerExeci), (TMLTime)1)); _nextTransaction->setLength(_nextTransaction->getVirtualLength() *_timePerExeci); @@ -236,6 +282,7 @@ TMLTime MultiCoreCPU::truncateNextTransAt(TMLTime iTime){ } bool MultiCoreCPU::addTransaction(TMLTransaction* iTransToBeAdded){ +std::cout<<"addTransaction"<<_name<<std::endl; bool aFinish; //TMLTransaction* aTransCopy=0; if (_masterNextTransaction==0){ @@ -286,7 +333,26 @@ bool MultiCoreCPU::addTransaction(TMLTransaction* iTransToBeAdded){ #endif //_nextTransaction->getCommand()->execute(); //NEW!!!! std::cout << "CPU:addt: to be started" << std::endl; +std::cout << "CPU:calcSTL: addtransaction of CPU " << _name << ": " << _nextTransaction->toString() << std::endl; _endSchedule=_nextTransaction->getEndTime(); + ////test/// + // unsigned int iCoreNumber=getCoreNumber(); + static unsigned int time=0; + std::cout<<"multicore number "<<coreNumber<<" end schedule "<<_endSchedule<<std::endl; + multiCore[coreNumber]=_endSchedule; + // std::cout<<"cycle time is "<<_cycleTime<<std::endl; + if (time < amountOfCore -1){ + _endSchedule=0; + _nextTransaction->setTransactCoreNumber(coreNumber); + ++coreNumber; + std::cout<<"haha1: "<<coreNumber<<std::endl; + }else { + _nextTransaction->setTransactCoreNumber(coreNumber); + _endSchedule=getMinEndSchedule(); + std::cout<<"haha2: "<<coreNumber<<std::endl; + } + time++; + std::cout <<"test transaction core number !!!! "<<_nextTransaction->getTransactCoreNumber()<<std::endl; std::cout << "set end schedule CPU: " << _endSchedule << "\n"; _simulatedTime=max(_simulatedTime,_endSchedule); _overallTransNo++; //NEW!!!!!!!! @@ -310,7 +376,7 @@ bool MultiCoreCPU::addTransaction(TMLTransaction* iTransToBeAdded){ void MultiCoreCPU::schedule(){ //std::cout <<"Hello\n"; - //std::cout << "CPU:schedule BEGIN " << _name << "+++++++++++++++++++++++++++++++++\n"; + std::cout << "CPU:schedule BEGIN " << _name << "+++++++++++++++++++++++++++++++++\n"; TMLTime aTimeSlice = _scheduler->schedule(_endSchedule); //_schedulingNeeded=false; 05/05/11 //std::cout << "1\n"; @@ -331,6 +397,8 @@ void MultiCoreCPU::schedule(){ //std::cout << "5\n"; if (_nextTransaction!=0 && aOldTransaction != _nextTransaction) calcStartTimeLength(aTimeSlice); //std::cout << "CPU:schedule END " << _name << "+++++++++++++++++++++++++++++++++\n"; + else std::cout<<"no need calcStartTimeLength"<<std::endl; + std::cout << "CPU:schedule END " << _name << "+++++++++++++++++++++++++++++++++\n"; } //std::string MultiCoreCPU::toString() const{ @@ -339,7 +407,7 @@ void MultiCoreCPU::schedule(){ std::string MultiCoreCPU::toShortString() const{ std::ostringstream outp; - outp << "cpu" << _ID; + outp << "cpu" << _ID ; return outp.str(); } @@ -469,72 +537,95 @@ void MultiCoreCPU::latencies2XML(std::ostringstream& glob, unsigned int id1, uns -//TMLTime MultiCoreCPU::getNextSignalChange(bool iInit, std::string& oSigChange, bool& oNoMoreTrans){ + void MultiCoreCPU::getNextSignalChange(bool iInit, SignalChangeData* oSigData){ - //new (oSigData) SignalChangeData(RUNNING, aCurrTrans->getStartTimeOperation(), this); - //std::ostringstream outp; - //oNoMoreTrans=false; - if (iInit){ - _posTrasactListVCD=_transactList.begin(); - _previousTransEndTime=0; - _vcdOutputState=END_IDLE_CPU; - if (_posTrasactListVCD != _transactList.end() && (*_posTrasactListVCD)->getStartTime()!=0){ - //outp << VCD_PREFIX << vcdValConvert(END_IDLE_CPU) << "cpu" << _ID; - //oSigChange=outp.str(); - new (oSigData) SignalChangeData(END_IDLE_CPU, 0, this); - //return 0 - return; - } - } - if (_posTrasactListVCD == _transactList.end()){ - //outp << VCD_PREFIX << vcdValConvert(END_IDLE_CPU) << "cpu" << _ID; - //oSigChange=outp.str(); - //oNoMoreTrans=true; - //return _previousTransEndTime; - new (oSigData) SignalChangeData(END_IDLE_CPU, _previousTransEndTime, this); - }else{ - TMLTransaction* aCurrTrans=*_posTrasactListVCD; - switch (_vcdOutputState){ - case END_TASK_CPU: - do{ - _previousTransEndTime=(*_posTrasactListVCD)->getEndTime(); - _posTrasactListVCD++; - }while (_posTrasactListVCD != _transactList.end() && (*_posTrasactListVCD)->getStartTimeOperation()==_previousTransEndTime); - if (_posTrasactListVCD != _transactList.end() && (*_posTrasactListVCD)->getStartTime()==_previousTransEndTime){ - //outp << VCD_PREFIX << vcdValConvert(END_PENALTY_CPU) << "cpu" << _ID; - _vcdOutputState=END_PENALTY_CPU; - new (oSigData) SignalChangeData(END_PENALTY_CPU, _previousTransEndTime, this); - }else{ - //outp << VCD_PREFIX << vcdValConvert(END_IDLE_CPU) << "cpu" << _ID; - _vcdOutputState=END_IDLE_CPU; - //if (_posTrasactListVCD == _transactList.end()) oNoMoreTrans=true; - new (oSigData) SignalChangeData(END_IDLE_CPU, _previousTransEndTime, this); + static bool _end=false; + std::cout<<"getNextSignalChangemulticore!!!---------"<<std::endl; + for( TransactionList::iterator i = _transactList.begin(); i != _transactList.end(); ++i ) { + std::cout<<"transaction core number is "<< (*i)->getTransactCoreNumber()<<std::endl; + std::cout<<"cycle time is "<< this->_cycleTime<<std::endl; + if( (*i)->getTransactCoreNumber() == this->_cycleTime ){ + _posTrasactListVCD= i; + std::cout<<"bingo!!"<<(*i)->toShortString()<<std::endl; + if (iInit){ + //_posTrasactListVCD= i; + _previousTransEndTime=0; + (*i)->setTransVcdOutPutState(END_IDLE_TRANS); + std::cout<<"init"<<std::endl; + if (_posTrasactListVCD != _transactList.end() && (*_posTrasactListVCD)->getStartTime()!=0){ + //outp << VCD_PREFIX << vcdValConvert(END_IDLE_CPU) << "cpu" << _ID; + //oSigChange=outp.str(); + new (oSigData) SignalChangeData(END_IDLE_TRANS, 0, this); + //return 0 + return; + } } - //oSigChange=outp.str(); - //return _previousTransEndTime; - break; - case END_PENALTY_CPU: - //outp << VCD_PREFIX << vcdValConvert(END_TASK_CPU) << "cpu" << _ID; - //oSigChange=outp.str(); - _vcdOutputState=END_TASK_CPU; - //return aCurrTrans->getStartTimeOperation(); - new (oSigData) SignalChangeData(END_TASK_CPU, aCurrTrans->getStartTimeOperation(), this); - break; - case END_IDLE_CPU: - if (aCurrTrans->getPenalties()==0){ - //outp << VCD_PREFIX << vcdValConvert(END_TASK_CPU) << "cpu" << _ID; - _vcdOutputState=END_TASK_CPU; - new (oSigData) SignalChangeData(END_TASK_CPU, aCurrTrans->getStartTime(), this); + if (_end==true || _posTrasactListVCD == _transactList.end()){ + //outp << VCD_PREFIX << vcdValConvert(END_IDLE_CPU) << "cpu" << _ID; + //oSigChange=outp.str(); + //oNoMoreTrans=true; + //return _previousTransEndTime; + std::cout<<"end transact"<<std::endl; + new (oSigData) SignalChangeData(END_IDLE_TRANS, _previousTransEndTime, this); + this->_cycleTime++; + _end=false; + break; }else{ - //outp << VCD_PREFIX << vcdValConvert(END_PENALTY_CPU) << "cpu" << _ID; - _vcdOutputState=END_PENALTY_CPU; - new (oSigData) SignalChangeData(END_PENALTY_CPU, aCurrTrans->getStartTime(), this); - } - //oSigChange=outp.str(); - //return aCurrTrans->getStartTime(); - break; + //_posTrasactListVCD = i; + TMLTransaction* aCurrTrans=*_posTrasactListVCD; + switch (aCurrTrans->getTransVcdOutPutState()){ + case END_TASK_TRANS: + std::cout<<"END_TASK_CPU"<<std::endl; + do{ + _previousTransEndTime=(*_posTrasactListVCD)->getEndTime(); + _posTrasactListVCD++; + }while (_posTrasactListVCD != _transactList.end() && (*_posTrasactListVCD)->getStartTimeOperation()==_previousTransEndTime); + if (_posTrasactListVCD != _transactList.end() && (*_posTrasactListVCD)->getStartTime()==_previousTransEndTime){ + //outp << VCD_PREFIX << vcdValConvert(END_PENALTY_CPU) << "cpu" << _ID; + aCurrTrans->setTransVcdOutPutState(END_PENALTY_TRANS); + new (oSigData) SignalChangeData(END_PENALTY_TRANS, _previousTransEndTime, this); + }else{ + //outp << VCD_PREFIX << vcdValConvert(END_IDLE_CPU) << "cpu" << _ID; + aCurrTrans->setTransVcdOutPutState(END_IDLE_TRANS); + //if (_posTrasactListVCD == _transactList.end()) oNoMoreTrans=true; + new (oSigData) SignalChangeData(END_IDLE_TRANS, _previousTransEndTime, this); + _end=true; + } + //oSigChange=outp.str(); + //return _previousTransEndTime; + // this->_cycleTime++; + break; + case END_PENALTY_TRANS: + + std::cout<<"END_PENALTY_CPU"<<std::endl; + //outp << VCD_PREFIX << vcdValConvert(END_TASK_CPU) << "cpu" << _ID; + //oSigChange=outp.str(); + aCurrTrans->setTransVcdOutPutState(END_TASK_TRANS); + //return aCurrTrans->getStartTimeOperation(); + new (oSigData) SignalChangeData(END_TASK_TRANS, aCurrTrans->getStartTimeOperation(), this); + break; + case END_IDLE_TRANS: + std::cout<<"END_IDLE_CPU"<<std::endl; + if (aCurrTrans->getPenalties()==0){ + //outp << VCD_PREFIX << vcdValConvert(END_TASK_CPU) << "cpu" << _ID; + aCurrTrans->setTransVcdOutPutState(END_TASK_TRANS); + new (oSigData) SignalChangeData(END_TASK_TRANS, aCurrTrans->getStartTime(), this); + }else{ + //outp << VCD_PREFIX << vcdValConvert(END_PENALTY_CPU) << "cpu" << _ID; + aCurrTrans->setTransVcdOutPutState(END_PENALTY_TRANS); + new (oSigData) SignalChangeData(END_PENALTY_TRANS, aCurrTrans->getStartTime(), this); + } + //oSigChange=outp.str(); + //return aCurrTrans->getStartTime(); + break; + } + } } + } + + //if (*_posTrasactListVCD != 0) + // std::cout<<"pos trans is !!!!!"<<(*_posTrasactListVCD)->toString()<<std::endl; //return 0; } diff --git a/simulators/c++2/src_simulator/arch/MultiCoreCPU.h b/simulators/c++2/src_simulator/arch/MultiCoreCPU.h index 4e9f7b938f041335b37a82b0731df3c202e9d9be..7f062e9fdb8187926ac4e331b86f5c2801d0d63c 100644 --- a/simulators/c++2/src_simulator/arch/MultiCoreCPU.h +++ b/simulators/c++2/src_simulator/arch/MultiCoreCPU.h @@ -77,7 +77,7 @@ public: \param iCyclesBeforeIdle Idle cycles which elapse before entering idle mode \param ibyteDataSize Machine word length */ - MultiCoreCPU(ID iID, std::string iName, WorkloadSource* iScheduler, WorkloadSource* iScheduler2,TMLTime iTimePerCycle, unsigned int iCyclesPerExeci, unsigned int iCyclesPerExecc, unsigned int iPipelineSize, unsigned int iTaskSwitchingCycles, unsigned int iBranchingMissrate, unsigned int iChangeIdleModeCycles, unsigned int iCyclesBeforeIdle, unsigned int ibyteDataSize); + MultiCoreCPU(ID iID, std::string iName, WorkloadSource* iScheduler,TMLTime iTimePerCycle, unsigned int iCyclesPerExeci, unsigned int iCyclesPerExecc, unsigned int iPipelineSize, unsigned int iTaskSwitchingCycles, unsigned int iBranchingMissrate, unsigned int iChangeIdleModeCycles, unsigned int iCyclesBeforeIdle, unsigned int ibyteDataSize, unsigned int iAmountOfCore); ///Destructor virtual ~MultiCoreCPU(); ///Determines the next CPU transaction to be executed @@ -145,6 +145,20 @@ protected: BusMaster* _masterNextTransaction; ///1/Processor frequency TMLTime _timePerCycle; + ///test//// + unsigned int coreNumber; + //first parameter is the core number + ///second parameter is the end schedule in the core + std::map <unsigned int, unsigned int> multiCore; + ///initialization of all cores + void initCore(); + ///get the avaliable core + unsigned int getCoreNumber(); + //inline void setCoreNumber(unsigned int n) { coreNumber=n;} + ///return the minimum time of the end schedule in all cores + TMLTime getMinEndSchedule(); + ///end + #ifdef PENALTIES_ENABLED ///Pipeline size unsigned int _pipelineSize; @@ -170,7 +184,7 @@ protected: TMLTime _changeIdleModeTime; #endif ///State variable for the VCD output - vcdCPUVisState _vcdOutputState; + //vcdCPUVisState _vcdOutputState; }; #endif diff --git a/simulators/c++2/src_simulator/arch/SchedulableDevice.cpp b/simulators/c++2/src_simulator/arch/SchedulableDevice.cpp index 01ab6a13a60d7dadeae9b676b89673b695921877..373694424338bbe144a48f29a8a20b1eb6c048cb 100644 --- a/simulators/c++2/src_simulator/arch/SchedulableDevice.cpp +++ b/simulators/c++2/src_simulator/arch/SchedulableDevice.cpp @@ -51,7 +51,8 @@ SchedulableDevice::SchedulableDevice( ID iID, _deleteScheduler(true), _busyCycles(0), _static_consumPerCycle (15), - _dynamic_consumPerCycle (35) { + _dynamic_consumPerCycle (35), + _cycleTime(0) { _transactList.reserve( BLOCK_SIZE_TRANS ); } @@ -183,7 +184,7 @@ std::string SchedulableDevice::determineHTMLCellClass( std::map<TMLTask*, std:: return taskColors[ task ]; } -void SchedulableDevice::schedule2HTML(std::ofstream& myfile) const { +void SchedulableDevice::schedule2HTML(std::ofstream& myfile) const { myfile << "<h2><span>Scheduling for device: "<< _name << "</span></h2>" << std::endl; if ( _transactList.size() == 0 ) { @@ -197,6 +198,10 @@ void SchedulableDevice::schedule2HTML(std::ofstream& myfile) const { TMLTime aCurrTime = 0; for( TransactionList::const_iterator i = _transactList.begin(); i != _transactList.end(); ++i ) { + std::cout<<"get transaction core number is: "<<(*i)->getTransactCoreNumber()<<std::endl; + std::cout<<"time : "<<_cycleTime<<std::endl; + std::cout << "CPU:calcSTL: html of CPU " << _name << ": " << (*i)->toString() << std::endl; + //if( (*i)->getTransactCoreNumber() == this->_cycleTime ){ TMLTransaction* aCurrTrans = *i; unsigned int aBlanks = aCurrTrans->getStartTime() - aCurrTime; @@ -221,7 +226,9 @@ void SchedulableDevice::schedule2HTML(std::ofstream& myfile) const { writeHTMLColumn( myfile, aLength, cellClass, aCurrTrans->toShortString() ); aCurrTime = aCurrTrans->getEndTime(); + // } } + myfile << "</tr>" << std::endl << "<tr>"; diff --git a/simulators/c++2/src_simulator/arch/SchedulableDevice.h b/simulators/c++2/src_simulator/arch/SchedulableDevice.h index 0d37a9f56491125b30ef1fb2f96603a99c5c9f8d..022937405b5c494b16c40609ddf7388c1a002d1c 100644 --- a/simulators/c++2/src_simulator/arch/SchedulableDevice.h +++ b/simulators/c++2/src_simulator/arch/SchedulableDevice.h @@ -148,6 +148,8 @@ public: static TMLTime getOverallTransNo() { return _overallTransNo; } static TMLTime getOverallTransSize() { return _overallTransSize; } + inline void setCycleTime (unsigned int t) { _cycleTime =t; } + inline unsigned int getCycleTime() { return _cycleTime; } protected: ///Unique ID of the device @@ -171,9 +173,10 @@ protected: ///Busy cycles since simulation start TMLTime _busyCycles; unsigned int _static_consumPerCycle; - unsigned int _dynamic_consumPerCycle; + unsigned int _dynamic_consumPerCycle; static TMLTime _overallTransNo; static TMLTime _overallTransSize; + unsigned int _cycleTime; static void writeHTMLColumn( std::ofstream& myfile, const unsigned int colSpan, diff --git a/simulators/c++2/src_simulator/arch/SingleCoreCPU.cpp b/simulators/c++2/src_simulator/arch/SingleCoreCPU.cpp index 6db43dc279601ad6eb261083c425d5806b28477b..2f33ab17d891c906081e5e2d4e75d94bf847c696 100644 --- a/simulators/c++2/src_simulator/arch/SingleCoreCPU.cpp +++ b/simulators/c++2/src_simulator/arch/SingleCoreCPU.cpp @@ -59,7 +59,7 @@ SingleCoreCPU::SingleCoreCPU( ID iID, unsigned int iBranchingMissrate, unsigned int iChangeIdleModeCycles, unsigned int iCyclesBeforeIdle, - unsigned int ibyteDataSize ) : CPU( iID, iName, iScheduler ), /*_lastTransaction(0),*/ _masterNextTransaction(0), _timePerCycle(iTimePerCycle) + unsigned int ibyteDataSize ) : CPU( iID, iName, iScheduler, 1), /*_lastTransaction(0),*/ _masterNextTransaction(0), _timePerCycle(iTimePerCycle) #ifdef PENALTIES_ENABLED , _pipelineSize(iPipelineSize), _taskSwitchingCycles(iTaskSwitchingCycles),_brachingMissrate(iBranchingMissrate) , _changeIdleModeCycles(iChangeIdleModeCycles), _cyclesBeforeIdle(iCyclesBeforeIdle) diff --git a/simulators/c++2/src_simulator/sim/Simulator.cpp b/simulators/c++2/src_simulator/sim/Simulator.cpp index 43f3fe4674ad0e2fc30ae504f6572ea7e8548f1e..044d7f6c1a2c054fa335651209cdaa445a5485ca 100644 --- a/simulators/c++2/src_simulator/sim/Simulator.cpp +++ b/simulators/c++2/src_simulator/sim/Simulator.cpp @@ -289,6 +289,7 @@ void Simulator::latencies2XML(std::ostringstream& glob, int id1, int id2) { } void Simulator::schedule2HTML(std::string& iTraceFileName) const { +std::cout<<"schedule2HTML--------------------------------------******************"<<std::endl; struct timeval aBegin,aEnd; gettimeofday(&aBegin,NULL); @@ -297,6 +298,7 @@ void Simulator::schedule2HTML(std::string& iTraceFileName) const { } std::ofstream myfile(iTraceFileName.c_str()); + myfile<<iTraceFileName.c_str()<<std::endl; if (myfile.is_open()) { // DB: Issue #4 @@ -309,23 +311,24 @@ void Simulator::schedule2HTML(std::string& iTraceFileName) const { if ( findSlash == std::string::npos ) { indexSlash = 0; + myfile<<"indexSlash=0\n"; } else { indexSlash = findSlash; } const std::string ext( EXT_HTML ); - const std::string cssFileName = iTraceFileName.substr( indexSlash + 1, iTraceFileName.length() - indexSlash - ext.length() - 1 ) + EXT_CSS; - + const std::string cssFileName = iTraceFileName.substr( indexSlash + 1, iTraceFileName.length() - indexSlash - ext.length() - 1 ) + EXT_CSS; + myfile<<"length is "<< iTraceFileName.length() - indexSlash - ext.length() - 1<<std::endl; const std::string cssFullFileName = iTraceFileName.substr( 0, indexSlash + 1 ) + cssFileName; std::ofstream cssfile( cssFullFileName.c_str() ); - + myfile<<"full name is "<<cssFullFileName<<std::endl; if ( cssfile.is_open() ) { cssfile << SCHED_HTML_CSS_CONTENT; cssfile.close(); myfile << SCHED_HTML_CSS_BEG_LINK; - myfile << cssFileName; + myfile << cssFullFileName; myfile << SCHED_HTML_CSS_END_LINK; } else { @@ -343,7 +346,14 @@ void Simulator::schedule2HTML(std::string& iTraceFileName) const { //for(CPUList::const_iterator i=_simComp->getCPUIterator(false); i != _simComp->getCPUIterator(true); ++i){ for(CPUList::const_iterator i=_simComp->getCPUList().begin(); i != _simComp->getCPUList().end(); ++i){ - (*i)->schedule2HTML(myfile); + for(unsigned int j = 0; j < (*i)->getAmoutOfCore(); j++) { + std::cout<<"core number is "<<(*i)->getAmoutOfCore()<<std::endl; + (*i)->schedule2HTML(myfile); + (*i)->setCycleTime((*i)->getCycleTime()+1); + std::cout<<"~~~~~~~~~~~~~~~~~~"<<std::endl; + } + if((*i)->getAmoutOfCore() == 1) + (*i)->setCycleTime(0); } //for(BusList::const_iterator j=_simComp->getBusIterator(false); j != _simComp->getBusIterator(true); ++j){ for(BusList::const_iterator j=_simComp->getBusList().begin(); j != _simComp->getBusList().end(); ++j){ @@ -365,6 +375,7 @@ void Simulator::schedule2HTML(std::string& iTraceFileName) const { } void Simulator::schedule2VCD(std::string& iTraceFileName) const{ + std::cout<<"schedule2VCD~~~~~~~~~~~~"<<std::endl; time_t aRawtime; struct tm * aTimeinfo; struct timeval aBegin,aEnd; @@ -381,7 +392,8 @@ void Simulator::schedule2VCD(std::string& iTraceFileName) const{ if (myfile.is_open()){ //std::cout << "File is open" << std::endl; SignalChangeQueue aQueue; - std::string aSigString; + SignalChangeQueue aQueueCPU; + //std::string aSigString; //bool aNoMoreTrans; //TraceableDevice* actDevice; TMLTime aCurrTime=-1; @@ -390,7 +402,7 @@ void Simulator::schedule2VCD(std::string& iTraceFileName) const{ myfile << "$date\n" << asctime(aTimeinfo) << "$end\n\n$version\nDaniel's TML simulator\n$end\n\n"; myfile << "$timescale\n5 ns\n$end\n\n$scope module Simulation $end\n"; //std::cout << "Before 1st loop" << std::endl; - //for (TraceableDeviceList::const_iterator i=_simComp->getVCDIterator(false); i!= _simComp->getVCDIterator(true); ++i){ + for (TraceableDeviceList::const_iterator i=_simComp->getVCDList().begin(); i!= _simComp->getVCDList().end(); ++i){ //TraceableDevice* a=*i; // a->streamBenchmarks(std::cout); @@ -398,56 +410,142 @@ void Simulator::schedule2VCD(std::string& iTraceFileName) const{ //std::cout << "in 1st loop " << a << std::endl; //std::cout << "device: " << (*i)->toString() << std::endl; //myfile << "$var integer 3 " << (*i)->toShortString() << " " << (*i)->toString() << " $end\n"; - myfile << "$var wire 1 " << (*i)->toShortString() << " " << (*i)->toString() << " $end\n"; - //std::cout << "get next signal change" << std::endl; - //aTime = (*i)->getNextSignalChange(true, aSigString, aNoMoreTrans); - aTopElement = new SignalChangeData(); - (*i)->getNextSignalChange(true, aTopElement); - aQueue.push(aTopElement); - //std::cout << "push" << std::endl; - //aQueue.push(new SignalChangeData(aSigString, aTime, (aNoMoreTrans)?0:(*i))); + + if ((*i)->toShortString().substr(0,3) == "cpu"){ + for(unsigned int j = 0; j < (dynamic_cast<CPU*>(*i))->getAmoutOfCore(); j++) { + myfile << "$var wire 1 " << (*i)->toShortString() << " " << (*i)->toString() <<"_Core"<<(j+1)<< " $end\n"; + aTopElement = new SignalChangeData(); + (*i)->getNextSignalChange(true, aTopElement); + aQueueCPU.push(aTopElement); + myfile << "$var integer 32 clk Clock $end\n"; + myfile << "$upscope $end\n$enddefinitions $end\n\n"; + while (!aQueueCPU.empty()){ + //static unsigned int count = 0; + + std::cout<<"this is CPU queue"<<std::endl; + aTopElement=aQueueCPU.top(); + std::cout<<"the member of queue is "<<aTopElement->_device->toShortString()<<std::endl; + + while (aNextClockEvent < aTopElement->_time){ + myfile << "#" << aNextClockEvent << "\nr" << aNextClockEvent << " clk\n"; + aNextClockEvent+=CLOCK_INC; + } + if (aCurrTime!=aTopElement->_time){ + aCurrTime=aTopElement->_time; + myfile << "#" << aCurrTime << "\n"; + } + if (aNextClockEvent == aTopElement->_time){ + myfile << "b" << vcdTimeConvert(aNextClockEvent) << " clk\n"; + aNextClockEvent+=CLOCK_INC; + } + //myfile << aTopElement->_sigChange << "\n"; + myfile << vcdValConvert(aTopElement->_sigChange) << aTopElement->_device->toShortString() << "\n"; + aQueueCPU.pop(); + TMLTime aTime = aTopElement->_time; + + //std::cout<<"lets get next signal : )"<<std::endl; + //if (aTopElement->_device->toShortString().substr(0,3) == "cpu") + // std::cout<<"!!!!!"<<(dynamic_cast<CPU*>(aTopElement->_device))->getCycleTime()<<std::endl; + std::cout<<"The cycle is cpu is ~~~!!"<<dynamic_cast<CPU*>(aTopElement->_device)->getCycleTime()<<std::endl; + aTopElement->_device->getNextSignalChange(false, aTopElement); + //dynamic_cast<CPU*>(aTopElement->_device)->setCycleTime((++count)% (dynamic_cast<CPU*>(aTopElement->_device)->getAmoutOfCore())); + std::cout<<"aTime is "<<aTime<<std::endl; + std::cout<<"top element time is "<<aTopElement->_time<<std::endl; + if (aTopElement->_time == aTime){ + delete aTopElement; + std::cout<<"delete"<<std::endl; + } + else{ + aQueueCPU.push(aTopElement); + std::cout<<"no delete"<<std::endl; + } + } + // (dynamic_cast<CPU*>(*i))->setCycleTime( (dynamic_cast<CPU*>(*i))->getCycleTime()+1); + } + } + else{ + myfile << "$var wire 1 " << (*i)->toShortString() << " " << (*i)->toString() << " $end\n"; + aTopElement = new SignalChangeData(); + (*i)->getNextSignalChange(true, aTopElement); + aQueue.push(aTopElement); + } } + + + // (dynamic_cast<CPU*>(*i))->setCycleTime( (dynamic_cast<CPU*>(*i))->getCycleTime()+1); + + + + + //if sucess, make it as a fonction !!!! change + /* for (TraceableDeviceList::const_iterator i=_simComp->getVCDList().begin(); i!= _simComp->getVCDList().end(); ++i){ + if ((*i)->toShortString().substr(0,3) == "cpu"){ + for(unsigned int j = 0; j < (dynamic_cast<CPU*>(*i))->getAmoutOfCore(); j++) { + (dynamic_cast<CPU*>(*i))->setCycleTime(0); + } + } + }*/ + myfile << "$var integer 32 clk Clock $end\n"; myfile << "$upscope $end\n$enddefinitions $end\n\n"; - //std::cout << "Before 2nd loop" << std::endl; + //TMLTime aTimeCPU=0; + + + while (!aQueue.empty()){ + std::cout<<"this is queue"<<std::endl; aTopElement=aQueue.top(); + std::cout<<"the member of queue is "<<aTopElement->_device->toShortString()<<std::endl; + while (aNextClockEvent < aTopElement->_time){ - myfile << "#" << aNextClockEvent << "\nr" << aNextClockEvent << " clk\n"; - aNextClockEvent+=CLOCK_INC; + myfile << "#" << aNextClockEvent << "\nr" << aNextClockEvent << " clk\n"; + aNextClockEvent+=CLOCK_INC; } if (aCurrTime!=aTopElement->_time){ - aCurrTime=aTopElement->_time; - myfile << "#" << aCurrTime << "\n"; + aCurrTime=aTopElement->_time; + myfile << "#" << aCurrTime << "\n"; } if (aNextClockEvent == aTopElement->_time){ - myfile << "b" << vcdTimeConvert(aNextClockEvent) << " clk\n"; - aNextClockEvent+=CLOCK_INC; + myfile << "b" << vcdTimeConvert(aNextClockEvent) << " clk\n"; + aNextClockEvent+=CLOCK_INC; } //myfile << aTopElement->_sigChange << "\n"; myfile << vcdValConvert(aTopElement->_sigChange) << aTopElement->_device->toShortString() << "\n"; aQueue.pop(); TMLTime aTime = aTopElement->_time; aTopElement->_device->getNextSignalChange(false, aTopElement); - if (aTopElement->_time == aTime) - delete aTopElement; - else - aQueue.push(aTopElement); + std::cout<<"aTime is "<<aTime<<std::endl; + std::cout<<"top element time is "<<aTopElement->_time<<std::endl; + if (aTopElement->_time == aTime){ + delete aTopElement; + std::cout<<"delete"<<std::endl; + } + else{ + aQueue.push(aTopElement); + std::cout<<"no delete"<<std::endl; + } + } + //actDevice=aTopElement->_device; //if (actDevice!=0) aTime = actDevice->getNextSignalChange(false, aSigString, aNoMoreTrans); //delete aTopElement; //aQueue.pop(); //if (actDevice!=0) aQueue.push(new SignalChangeData(aSigString, aTime, (aNoMoreTrans)?0:actDevice)); - } + myfile << "#" << aCurrTime+1 << "\n"; std::cout << "Simulated cycles: " << aCurrTime << std::endl; //for (TraceableDeviceList::const_iterator i=_simComp->getVCDIterator(false); i!= _simComp->getVCDIterator(true); ++i){ + ///////test////////// for (TraceableDeviceList::const_iterator i=_simComp->getVCDList().begin(); i!= _simComp->getVCDList().end(); ++i){ + if ((*i)->toShortString().substr(0,3)=="cpu"){ + for (unsigned int j = 0; j < (dynamic_cast<CPU*>(*i))->getAmoutOfCore();j++){ + myfile << "0" << (*i)->toShortString() << "\n"; + } + } //myfile << VCD_PREFIX << "100 " << (*i)->toShortString() << "\n"; - myfile << "0" << (*i)->toShortString() << "\n"; + else myfile << "0" << (*i)->toShortString() << "\n"; //std::cout << "Utilization of component " << (*i)->toString() << ": " << ((float)(*i)->getBusyCycles()) / ((float)aCurrTime) << std::endl; } - myfile.close(); } else @@ -490,9 +588,10 @@ bool Simulator::simulate(TMLTransaction*& oLastTrans){ //std::cout << "after loop2" << std::endl; //for_each(_simComp->getCPUIterator(false), _simComp->getCPUIterator(true),std::mem_fun(&CPU::setRescheduleFlag)); //for_each(_simComp->getCPUIterator(false), _simComp->getCPUIterator(true),std::mem_fun(&CPU::schedule)); + std::cout<<"simulate"<<std::endl; for_each(_simComp->getCPUList().begin(), _simComp->getCPUList().end(),std::mem_fun(&CPU::schedule)); //std::cout << "after schedule" << std::endl; - transLET=getTransLowestEndTime(cpuLET); + transLET=getTransLowestEndTime(cpuLET); //std::cout << "after getTLET" << std::endl; #ifdef LISTENERS_ENABLED if (_wasReset) NOTIFY_SIM_STARTED(); @@ -511,7 +610,11 @@ bool Simulator::simulate(TMLTransaction*& oLastTrans){ std::cout << "cpuLET= " << cpuLET->toString() << std::endl; std::cout << "kernel:simulate:cpuLET printed" << std::endl; #endif + std::cout<<"in simulator begin addTransaction "<<std::endl; bool x = cpuLET->addTransaction(0); + // cpuLET->setCycleTime(0); + std::cout<<"in simulator end addTransactin "<<std::endl; + //std::cout << "kernel:simulate: x=" << x << std::endl; #ifdef DEBUG_KERNEL std::cout << "kernel:simulate: AFTER add trans: " << x << std::endl; diff --git a/src/main/java/syscamstranslator/SysCAMSSpecification.java b/src/main/java/syscamstranslator/SysCAMSSpecification.java index 6f214d7749f83e5925ed1e2f54bcf6908929194a..6003750dc6ba7a9c132d9e1d0970fb0b86967112 100644 --- a/src/main/java/syscamstranslator/SysCAMSSpecification.java +++ b/src/main/java/syscamstranslator/SysCAMSSpecification.java @@ -91,6 +91,7 @@ public class SysCAMSSpecification{ for (SysCAMSTComponent blockGPIO2VCI : components) { if (blockGPIO2VCI instanceof SysCAMSTBlockGPIO2VCI) { blocksGPIO2VCI.add((SysCAMSTBlockGPIO2VCI) blockGPIO2VCI); + //System.out.println("@@@@@GPIO block found in spec"); } } return blocksGPIO2VCI; @@ -238,6 +239,14 @@ public class SysCAMSSpecification{ } return cons; } + + public LinkedList<SysCAMSTConnector> getAllConnectors(){ + LinkedList<SysCAMSTConnector> cons = new LinkedList<SysCAMSTConnector>(); + for (SysCAMSTConnector con : connectors) { + cons.add(con); + } + return cons; + } public int getNbBlockTDF(){ return (getAllBlockTDF()).size(); diff --git a/src/main/java/syscamstranslator/SysCAMSTBlockDE.java b/src/main/java/syscamstranslator/SysCAMSTBlockDE.java index dba0be54f7dcf9009ed094d8b102051933c58105..ea5bc822604116ba9bd47e4b1d19e211cc1dfd12 100644 --- a/src/main/java/syscamstranslator/SysCAMSTBlockDE.java +++ b/src/main/java/syscamstranslator/SysCAMSTBlockDE.java @@ -59,13 +59,14 @@ public class SysCAMSTBlockDE extends SysCAMSTComponent { private DefaultListModel<String> listStruct; private String nameTemplate; private String typeTemplate; + private String valueTemplate; private DefaultListModel<String> listTypedef; private SysCAMSTCluster cluster; private LinkedList<SysCAMSTPortDE> portDE; - public SysCAMSTBlockDE(String _name, String _nameFn, String _code, DefaultListModel<String> _listStruct, String _nameTemplate, String _typeTemplate, DefaultListModel<String> _listTypedef, SysCAMSTCluster _cluster) { + public SysCAMSTBlockDE(String _name, String _nameFn, String _code, DefaultListModel<String> _listStruct, String _nameTemplate, String _typeTemplate, String _valueTemplate, DefaultListModel<String> _listTypedef, SysCAMSTCluster _cluster) { name = _name; // period = _period; // time = _time; @@ -74,6 +75,7 @@ public class SysCAMSTBlockDE extends SysCAMSTComponent { listStruct = _listStruct; nameTemplate = _nameTemplate; typeTemplate = _typeTemplate; + valueTemplate = _valueTemplate; listTypedef = _listTypedef; cluster = _cluster; portDE = new LinkedList<SysCAMSTPortDE>(); @@ -110,6 +112,10 @@ public class SysCAMSTBlockDE extends SysCAMSTComponent { public String getTypeTemplate() { return typeTemplate; } + + public String getValueTemplate() { + return valueTemplate; + } public DefaultListModel<String> getListTypedef() { return listTypedef; @@ -126,4 +132,4 @@ public class SysCAMSTBlockDE extends SysCAMSTComponent { public void addPortDE(SysCAMSTPortDE de){ portDE.add(de); } -} \ No newline at end of file +} diff --git a/src/main/java/syscamstranslator/SysCAMSTBlockTDF.java b/src/main/java/syscamstranslator/SysCAMSTBlockTDF.java index 6b59d50f5056295d44133a274fa47879b374366a..083bb78420b820bcee22d8f133ee6e87e39c3886 100644 --- a/src/main/java/syscamstranslator/SysCAMSTBlockTDF.java +++ b/src/main/java/syscamstranslator/SysCAMSTBlockTDF.java @@ -57,9 +57,11 @@ public class SysCAMSTBlockTDF extends SysCAMSTComponent { private double period; private String time; private String processCode; + private String constructorCode; private DefaultListModel<String> listStruct; private String nameTemplate; private String typeTemplate; + private String valueTemplate; private DefaultListModel<String> listTypedef; private SysCAMSTCluster cluster; @@ -67,21 +69,25 @@ public class SysCAMSTBlockTDF extends SysCAMSTComponent { private LinkedList<SysCAMSTPortTDF> portTDF; private LinkedList<SysCAMSTPortConverter> portConverter; private SysCAMSTPortConverter localPortConverter; + private LinkedList<SysCAMSTPortConverter> localPortConverterList; private int n; private boolean isTimestepPropagated; - public SysCAMSTBlockTDF(String _name, double _period, String _time, String _processCode, DefaultListModel<String> _listStruct, String _nameTemplate, String _typeTemplate, DefaultListModel<String> _listTypedef, SysCAMSTCluster _cluster) { + public SysCAMSTBlockTDF(String _name, double _period, String _time, String _processCode, String _constructorCode, DefaultListModel<String> _listStruct, String _nameTemplate, String _typeTemplate, String _valueTemplate, DefaultListModel<String> _listTypedef, SysCAMSTCluster _cluster) { name = _name; period = _period; time = _time; processCode = _processCode; + constructorCode = _constructorCode; listStruct = _listStruct; nameTemplate = _nameTemplate; typeTemplate = _typeTemplate; + valueTemplate = _valueTemplate; listTypedef = _listTypedef; cluster = _cluster; portTDF = new LinkedList<SysCAMSTPortTDF>(); portConverter = new LinkedList<SysCAMSTPortConverter>(); + localPortConverterList = new LinkedList<SysCAMSTPortConverter>(); n = 0; isTimestepPropagated = false; } @@ -105,6 +111,10 @@ public class SysCAMSTBlockTDF extends SysCAMSTComponent { public String getProcessCode() { return processCode; } + + public String getConstructorCode() { + return constructorCode; + } public DefaultListModel<String> getListStruct() { return listStruct; @@ -117,6 +127,10 @@ public class SysCAMSTBlockTDF extends SysCAMSTComponent { public String getTypeTemplate() { return typeTemplate; } + + public String getValueTemplate() { + return valueTemplate; + } public DefaultListModel<String> getListTypedef() { return listTypedef; @@ -153,8 +167,19 @@ public class SysCAMSTBlockTDF extends SysCAMSTComponent { public void syncTDFBlockDEBlock(double[] time_prev) throws SysCAMSValidateException { double tp; try{ + //Order list to have input converter ports first, in case of multirate-multiport single-modules + localPortConverterList.clear(); for(int i = 0; i < portConverter.size(); i++) { localPortConverter = portConverter.get(i); + if(localPortConverter.getOrigin() == 0) { //Input + localPortConverterList.addFirst(localPortConverter); + } else if (localPortConverter.getOrigin() == 1) { //Output + localPortConverterList.addLast(localPortConverter); + } + } + + for(int i = 0; i < localPortConverterList.size(); i++) { + localPortConverter = localPortConverterList.get(i); if(localPortConverter.getOrigin() == 0) { //Input check_causality_in(time_prev); } else if (localPortConverter.getOrigin() == 1) { //Output @@ -169,8 +194,7 @@ public class SysCAMSTBlockTDF extends SysCAMSTComponent { } private void check_causality_in(double[] time_prev_max) throws SysCAMSValidateException { - double time_now_min_tdf, time_now_max_tdf, time_tmp_tdf, time_tmp_de, - time_now_min_de, time_now_max_de; + double time_now_max_de; double tm = 0.0; double tp = 0.0; int r = 1; @@ -185,41 +209,22 @@ public class SysCAMSTBlockTDF extends SysCAMSTComponent { if(localPortConverter.getDelay() > 0) d = localPortConverter.getDelay(); - time_now_min_tdf = (n*tm)+((k-1)*tp); - time_now_max_tdf = (n*tm)+((k-1)*tp); - time_now_min_de = (n*tm)+((k-1)*tp)-(d*tp); - time_now_max_de = (n*tm)+((k-1)*tp)-(d*tp); - - for (k = 1; k <= r; k++) { - time_tmp_tdf = (n*tm)+((k-1)*tp); - time_tmp_de = (n*tm)+((k-1)*tp)-(d*tp); - System.out.println("tmstmp_in_tdf: " + time_tmp_tdf); - System.out.println("tmstmp_in_de: " + time_tmp_de); - time_now_min_tdf = Math.min(time_tmp_tdf, time_now_min_tdf); - time_now_max_tdf = Math.max(time_tmp_tdf, time_now_max_tdf); - time_now_min_de = Math.min(time_tmp_de, time_now_min_de); - time_now_max_de = Math.max(time_tmp_de, time_now_max_de); - System.out.println("time_now_min_de: " + time_now_min_de); - System.out.println("time_now_max_de: " + time_now_max_de); - System.out.println("time_now_min_tdf: " + time_now_min_tdf); - System.out.println("time_now_max_tdf: " + time_now_max_tdf); - } + time_now_max_de = (n*tm)+((r-1)*tp)-(d*tp); - System.out.println("time_prev_max_out: " + time_prev_max[1]); - if(time_now_min_tdf < time_prev_max[1]) { - localPortConverter.setDelay((int)Math.ceil((time_prev_max[1]-time_now_min_de)/tp) + d); + + /*if(time_now_min_tdf2 < time_prev_max[1]) { + localPortConverter.setDelay((int)Math.ceil((time_prev_max[1]-time_now_min_tdf2)/tp) + d); localPortConverter.setRecompute(true); throw new SysCAMSValidateException("Timestamp of previous write port executed module is: " + time_prev_max[1] + " and current timestamp is: " + time_now_min_tdf + ".\n" - + "Suggested delay in port \"" + localPortConverter.getName() + "\": " + (Math.ceil((time_prev_max[1]-time_now_min_tdf)/tp) + d)); - } + + "Suggested delay in port \"" + localPortConverter.getName() + "\" using time_now_min_tdf: " + (Math.ceil((time_prev_max[1]-time_now_min_tdf)/tp) + d) + + " and using time_now_min_de: " + (Math.ceil((time_prev_max[1]-time_now_min_de)/tp) + d)); + }*/ time_prev_max[0] = Double.valueOf(Math.max(time_prev_max[0],time_now_max_de)); - System.out.println("New time_prev_max_in: " + time_prev_max[0]); } private void check_causality_out(double[] time_prev_max) throws SysCAMSValidateException { - double time_now_min_tdf, time_now_max_tdf, time_tmp_tdf, time_tmp_de, - time_now_min_de, time_now_max_de; + double time_now_min_tdf, time_now_max_de2; double tm = 0.0; double tp = 0.0; int r = 1; @@ -234,36 +239,19 @@ public class SysCAMSTBlockTDF extends SysCAMSTComponent { if(localPortConverter.getDelay() > 0) d = localPortConverter.getDelay(); - time_now_min_tdf = (n*tm)+((k-1)*tp); - time_now_max_tdf = (n*tm)+((k-1)*tp); - time_now_min_de = (n*tm)+((k-1)*tp)+(d*tp); - time_now_max_de = (n*tm)+((k-1)*tp)+(d*tp); + time_now_min_tdf = (n*tm)+((1-1)*tp)+(d*tp); + + time_now_max_de2 = (n*tm)+((r-1)*tp)-(d*tp); - for (k = 1; k <= r; k++) { - time_tmp_tdf = (n*tm)+((k-1)*tp); - time_tmp_de = (n*tm)+((k-1)*tp)+(d*tp);; - System.out.println("tmstmp_out_tdf: " + time_tmp_tdf); - System.out.println("tmstmp_out_de: " + time_tmp_de); - time_now_min_tdf = Math.min(time_tmp_tdf, time_now_min_tdf); - time_now_max_tdf = Math.max(time_tmp_tdf, time_now_max_tdf); - time_now_min_de = Math.min(time_tmp_de, time_now_min_de); - time_now_max_de = Math.max(time_tmp_de, time_now_max_de); - System.out.println("time_now_min_de: " + time_now_min_de); - System.out.println("time_now_max_de: " + time_now_max_de); - System.out.println("time_now_min_tdf: " + time_now_min_tdf); - System.out.println("time_now_max_tdf: " + time_now_max_tdf); - } - System.out.println("time_prev_max_in: " + time_prev_max[0]); - if(time_now_min_de < time_prev_max[0]) { - localPortConverter.setDelay((int)Math.ceil((time_prev_max[0]-time_now_min_de)/tp) + d); + if(time_now_min_tdf < time_prev_max[0]) { + localPortConverter.setDelay((int)Math.ceil((time_prev_max[0]-time_now_min_tdf)/tp) + d); localPortConverter.setRecompute(true); throw new SysCAMSValidateException("Timestamp of previous read port executed module is: " + time_prev_max[0] - + " and current timestamp is: " + time_now_min_de + ".\n" - + "Suggested delay in port " + localPortConverter.getName() + ": " + (Math.ceil((time_prev_max[0]-time_now_min_de)/tp) + d)); + + " and current timestamp is: " + time_now_min_tdf + ".\n" + + "Suggested delay in port " + localPortConverter.getName() + ": " + (Math.ceil((time_prev_max[0]-time_now_min_tdf)/tp) + d)); } - time_prev_max[1] = Double.valueOf(Math.max(time_prev_max[1],time_now_max_tdf)); - System.out.println("New time_prev_max_out: " + time_prev_max[1]); + time_prev_max[1] = Double.valueOf(Math.max(time_prev_max[1],time_now_max_de2)); } public void setN(int _n) { diff --git a/src/main/java/syscamstranslator/SysCAMSTPortTDF.java b/src/main/java/syscamstranslator/SysCAMSTPortTDF.java index ef12060e8313aa8acdb27fda1f9e783d4bb10a37..48e3ab275ef78aebf92a114192f443ed0cbe775f 100644 --- a/src/main/java/syscamstranslator/SysCAMSTPortTDF.java +++ b/src/main/java/syscamstranslator/SysCAMSTPortTDF.java @@ -58,6 +58,7 @@ public class SysCAMSTPortTDF extends SysCAMSTComponent { private int delay; private int origin; private String TDFType; + private boolean recompute; private SysCAMSTBlockTDF blockTDF; private ELNTCluster cluster; @@ -71,6 +72,7 @@ public class SysCAMSTPortTDF extends SysCAMSTComponent { delay = _delay; origin = _origin; TDFType = _TDFType; + recompute = false; blockTDF = _blockTDF; } @@ -127,6 +129,14 @@ public class SysCAMSTPortTDF extends SysCAMSTComponent { public void setDelay(int _delay) { delay = _delay; } + + public boolean getRecompute() { + return recompute; + } + + public void setRecompute(boolean _recompute) { + recompute = _recompute; + } public int getOrigin() { return origin; diff --git a/src/main/java/syscamstranslator/toSysCAMS/Header.java b/src/main/java/syscamstranslator/toSysCAMS/Header.java index 6a08a46d7c90bdaf13a68fcb9cb315754abfe718..c5a14792643758157ea7f9e114eeb9566bc7144f 100644 --- a/src/main/java/syscamstranslator/toSysCAMS/Header.java +++ b/src/main/java/syscamstranslator/toSysCAMS/Header.java @@ -104,4 +104,4 @@ public class Header { } return headerCluster; } -} \ No newline at end of file +} diff --git a/src/main/java/syscamstranslator/toSysCAMS/PrimitiveCode.java b/src/main/java/syscamstranslator/toSysCAMS/PrimitiveCode.java index 595b6121ee147c2fa2e495404e58c1e0d9a274c9..03552b4092f251ceeabe8f429f9be362d2a813ee 100644 --- a/src/main/java/syscamstranslator/toSysCAMS/PrimitiveCode.java +++ b/src/main/java/syscamstranslator/toSysCAMS/PrimitiveCode.java @@ -370,7 +370,7 @@ public class PrimitiveCode { } } } - corpsPrimitiveTDF = corpsPrimitiveTDF + "};" + CR2 + "#endif" + " // " + tdf.getName().toUpperCase() + "_H"; + corpsPrimitiveTDF = corpsPrimitiveTDF + "};" + CR2 + "#endif" + " // " + tdf.getName().toUpperCase() + "_H"; } else { corpsPrimitiveTDF = ""; } @@ -596,10 +596,10 @@ public class PrimitiveCode { String pc = buffer.toString(); corpsPrimitiveDE = corpsPrimitiveDE + "\t" + pc; - corpsPrimitiveDE = corpsPrimitiveDE + CR + "};" + CR2 + "#endif" + " // " + de.getName().toUpperCase() + "_H"; + corpsPrimitiveDE = corpsPrimitiveDE + CR + "};" + CR2 + "#endif" + " // " + de.getName().toUpperCase() + "_H"; } else { corpsPrimitiveDE = ""; } return corpsPrimitiveDE; } -} \ No newline at end of file +} diff --git a/src/main/java/syscamstranslator/toSysCAMS/TopCellGenerator.java b/src/main/java/syscamstranslator/toSysCAMS/TopCellGenerator.java index 07a99113fb6b29e7dc8cb43712af7a6969b8e326..7bb2dc6ebefaa6cbb2480b21a17bfc721d5d555e 100644 --- a/src/main/java/syscamstranslator/toSysCAMS/TopCellGenerator.java +++ b/src/main/java/syscamstranslator/toSysCAMS/TopCellGenerator.java @@ -63,6 +63,8 @@ public class TopCellGenerator { private final static String GENERATED_PATH1 = "generated_CPP" + File.separator; private final static String GENERATED_PATH2 = "generated_H" + File.separator; + private final static String CR = "\n"; + private final static String CR2 = "\n\n"; public TopCellGenerator(SysCAMSSpecification sys) { syscams = sys; @@ -94,40 +96,57 @@ public class TopCellGenerator { return (top); } - public void saveFile(String path) { + public void saveFile(String path, Boolean standalone) { SysCAMSTCluster cluster = TopCellGenerator.syscams.getCluster(); LinkedList<SysCAMSTConnector> connectors = TopCellGenerator.syscams.getAllConnectorCluster(); - + FileWriter fw; String top; try { // Save file .cpp System.err.println(path + GENERATED_PATH1 + cluster.getClusterName() + ".cpp"); - FileWriter fw = new FileWriter(path + GENERATED_PATH1 + "/" + cluster.getClusterName() + "_tb.cpp"); + System.err.println(path + cluster.getClusterName() + ".cpp"); + if(standalone==true){ + //System.out.println("@@@@ topcell standalone @@@@"); + fw = new FileWriter(path + "/" + cluster.getClusterName() + "_tb.cpp");} + else{ + fw = new FileWriter(path + GENERATED_PATH1 + "/" + cluster.getClusterName() + "_tb.cpp"); + } + fw = new FileWriter(path + "/" + cluster.getClusterName() + "_tb.cpp"); top = generateTopCell(cluster, connectors); fw.write(top); fw.close(); + } catch (Exception ex) { ex.printStackTrace(); } // Save files .h - saveFileBlock(path, cluster); + saveFileBlock(path, cluster, standalone); } - public void saveFileBlock(String path, SysCAMSTCluster c) { + public void saveFileBlock(String path, SysCAMSTCluster c, Boolean standalone) { String headerTDF, headerDE, codeTDF, codeDE; LinkedList<SysCAMSTBlockTDF> tdf = c.getBlockTDF(); LinkedList<SysCAMSTBlockDE> de = c.getBlockDE(); - + FileWriter fw; for (SysCAMSTBlockTDF t : tdf) { try { System.err.println(path + GENERATED_PATH2 + t.getName() + ".h"); - FileWriter fw = new FileWriter(path + GENERATED_PATH2 + "/" + t.getName() + ".h"); + System.err.println(path + t.getName() + ".h"); + if(standalone==true){ + //System.out.println("@@@@ TDF standalone @@@@"); + fw = new FileWriter(path + "/" + t.getName() + ".h");} + else + fw = new FileWriter(path + GENERATED_PATH2 + "/" + t.getName() + ".h"); + headerTDF = Header.getPrimitiveHeaderTDF(t); fw.write(headerTDF); codeTDF = PrimitiveCode.getPrimitiveCodeTDF(t); + // if(standalone==false) + // codeTDF = codeTDF + CR + "};" + CR2 + "#endif"; fw.write(codeTDF); fw.close(); + } catch (Exception ex) { ex.printStackTrace(); } @@ -135,12 +154,21 @@ public class TopCellGenerator { for (SysCAMSTBlockDE t : de) { try { System.err.println(path + GENERATED_PATH2 + t.getName() + ".h"); - FileWriter fw = new FileWriter(path + GENERATED_PATH2 + "/" + t.getName() + ".h"); + System.err.println(path + t.getName() + ".h");//ajoute DG + + if(standalone==true){ + //System.out.println("@@@@ DE standalone @@@@"); + fw = new FileWriter(path + "/" + t.getName() + ".h");} + else + fw = new FileWriter(path + GENERATED_PATH2 + "/" + t.getName() + ".h"); headerDE = Header.getPrimitiveHeaderDE(t); fw.write(headerDE); codeDE = PrimitiveCode.getPrimitiveCodeDE(t); + // if(standalone==false) + // codeDE = codeDE + CR + "};" + CR2 + "#endif";//DG fw.write(codeDE); fw.close(); + } catch (Exception ex) { ex.printStackTrace(); } diff --git a/src/main/java/syscamstranslator/toSysCAMSCluster/ClusterCode.java b/src/main/java/syscamstranslator/toSysCAMSCluster/ClusterCode.java index d76cc5ddced8e6a5e6c42ab8811f6c334c9c1717..cd066c181fd4c942000bee8e16373b05be962d2b 100644 --- a/src/main/java/syscamstranslator/toSysCAMSCluster/ClusterCode.java +++ b/src/main/java/syscamstranslator/toSysCAMSCluster/ClusterCode.java @@ -69,39 +69,42 @@ public class ClusterCode { LinkedList<SysCAMSTBlockTDF> tdf = cluster.getBlockTDF(); LinkedList<SysCAMSTBlockDE> de = cluster.getBlockDE(); - System.out.println("Number of AMS connectors: " + connectors.size()); corpsCluster = "template <typename vci_param>" + CR + "class " +cluster.getClusterName()+ " : public sc_core::sc_module { "+ CR; + + for (SysCAMSTBlockTDF t : tdf) { + if (!t.getListTypedef().isEmpty()) { + for (int i = 0; i < t.getListTypedef().getSize(); i++) { + String select = t.getListTypedef().get(i); + String[] split = select.split(" : "); + corpsCluster = corpsCluster + "\ttypedef " + split[1] + "<"+ t.getValueTemplate() +"> " + split[0] + ";" + CR; + } + } + } + + for (SysCAMSTBlockDE t : de) { + if (!t.getListTypedef().isEmpty()) { + for (int i = 0; i < t.getListTypedef().getSize(); i++) { + String select = t.getListTypedef().get(i); + String[] split = select.split(" : "); + corpsCluster = corpsCluster + "\ttypedef " + split[1] + "<"+ t.getValueTemplate() +"> " + split[0] + ";" + CR; + } + } + } - corpsCluster = corpsCluster + "\t// Declare signals to interconnect." + CR; + corpsCluster = corpsCluster + CR + "\t// Declare signals to interconnect." + CR; - //for (SysCAMSTConnector c : connectors) { for (int i = 0; i < connectors.size(); i++) { nb_con = i; if ( !((connectors.get(i).get_p1().getComponent() instanceof SysCAMSTPortDE && ((SysCAMSTPortDE) connectors.get(i).get_p1().getComponent()).getBlockGPIO2VCI() != null) || (connectors.get(i).get_p2().getComponent() instanceof SysCAMSTPortDE && ((SysCAMSTPortDE) connectors.get(i).get_p2().getComponent()).getBlockGPIO2VCI() != null)) ) { - /*if (connectors.get(i).get_p1().getComponent() instanceof SysCAMSTPortTDF) { - corpsCluster = corpsCluster + "\tsca_tdf::sca_signal<" + ((SysCAMSTPortTDF) connectors.get(i).get_p1().getComponent()).getTDFType() + "> " - + "sig_" + nb_con + ";" + CR; - //nb_con++; - } else if (connectors.get(i).get_p1().getComponent() instanceof SysCAMSTPortConverter) { - corpsCluster = corpsCluster + "\tsc_core::sc_signal<" + ((SysCAMSTPortConverter) connectors.get(i).get_p1().getComponent()).getConvType() + "> " - + "sig_" + nb_con + ";" + CR; - //nb_con++; - } else if (connectors.get(i).get_p1().getComponent() instanceof SysCAMSTPortDE) { - corpsCluster = corpsCluster + "\tsc_core::sc_signal<" + ((SysCAMSTPortDE) connectors.get(i).get_p1().getComponent()).getDEType() + "> " - + "sig_" + nb_con + ";" + CR; - //nb_con++; - }*/ - if ((connectors.get(i).get_p1().getComponent() instanceof SysCAMSTPortTDF && connectors.get(i).get_p2().getComponent() instanceof SysCAMSTPortTDF) || (connectors.get(i).get_p1().getComponent() instanceof SysCAMSTPortTDF && connectors.get(i).get_p2().getComponent() instanceof SysCAMSTPortTDF)) { if (connectors.get(i).getName().equals("")) { corpsCluster = corpsCluster + "\tsca_tdf::sca_signal<" + ((SysCAMSTPortTDF) connectors.get(i).get_p1().getComponent()).getTDFType() + "> " + "sig_" + nb_con + ";" + CR; names.add("sig_" + nb_con); - //nb_con++; } else { corpsCluster = corpsCluster + "\tsca_tdf::sca_signal<" + ((SysCAMSTPortTDF) connectors.get(i).get_p1().getComponent()).getTDFType() + "> " + connectors.get(i).getName() + ";" + CR; @@ -112,7 +115,6 @@ public class ClusterCode { corpsCluster = corpsCluster + "\tsc_core::sc_signal<" + ((SysCAMSTPortConverter) connectors.get(i).get_p1().getComponent()).getConvType() + "> " + "sig_" + nb_con + ";" + CR; names.add("sig_" + nb_con); - //nb_con++; } else { corpsCluster = corpsCluster + "\tsc_core::sc_signal<" + ((SysCAMSTPortConverter) connectors.get(i).get_p1().getComponent()).getConvType() + "> " + connectors.get(i).getName() + ";" + CR; @@ -123,7 +125,6 @@ public class ClusterCode { corpsCluster = corpsCluster + "\tsc_core::sc_signal<" + ((SysCAMSTPortConverter) connectors.get(i).get_p2().getComponent()).getConvType() + "> " + "sig_" + nb_con + ";" + CR; names.add("sig_" + nb_con); - //nb_con++; } else { corpsCluster = corpsCluster + "\tsc_core::sc_signal<" + ((SysCAMSTPortConverter) connectors.get(i).get_p2().getComponent()).getConvType() + "> " + connectors.get(i).getName() + ";" + CR; @@ -135,7 +136,6 @@ public class ClusterCode { corpsCluster = corpsCluster + "\tsc_core::sc_signal<" + ((SysCAMSTPortDE) connectors.get(i).get_p1().getComponent()).getDEType() + "> " + "sig_" + nb_con + ";" + CR; names.add("sig_" + nb_con); - //nb_con++; } else { corpsCluster = corpsCluster + "\tsc_core::sc_signal<" + ((SysCAMSTPortDE) connectors.get(i).get_p1().getComponent()).getDEType() + "> " + connectors.get(i).getName() + ";" + CR; @@ -150,14 +150,20 @@ public class ClusterCode { corpsCluster = corpsCluster + CR + "\t// Instantiate cluster's modules." + CR; for (SysCAMSTBlockTDF t : tdf) { - corpsCluster = corpsCluster + "\t" + t.getName() + " " + - t.getName() + "_" + nb_block + ";" + CR; + corpsCluster = corpsCluster + "\t" + t.getName(); + if (!t.getListTypedef().isEmpty()) { + corpsCluster += "<"+t.getValueTemplate()+">"; + } + corpsCluster += " " + t.getName() + "_" + nb_block + ";" + CR; nb_block++; } for (SysCAMSTBlockDE t : de) { - corpsCluster = corpsCluster + "\t" + t.getName() + " " + - t.getName() + "_" + nb_block + ";" + CR; + corpsCluster = corpsCluster + "\t" + t.getName(); + if (!t.getListTypedef().isEmpty()) { + corpsCluster += "<"+t.getValueTemplate()+">"; + } + corpsCluster += " " + t.getName() + "_" + nb_block + ";" + CR; nb_block++; } @@ -244,33 +250,40 @@ public class ClusterCode { for (SysCAMSTPortDE p : portDE) { for (int i = 0; i < connectors.size(); i++) { - /*nb_con = i; - if (connectors.get(i).get_p1().getComponent() instanceof SysCAMSTPortDE) { - if (((SysCAMSTPortDE) connectors.get(i).get_p1().getComponent()).getName().equals(p.getName()) && ((SysCAMSTPortDE) connectors.get(i).get_p1().getComponent()).getBlockDE().getName().equals(t.getName())) { - corpsCluster = corpsCluster + "\t\t" + t.getName() + "_" + nb_block + "." + p.getName() + "(" + "sig_" + nb_con + ");" + CR; - } - } else if (connectors.get(i).get_p2().getComponent() instanceof SysCAMSTPortDE) { - if (((SysCAMSTPortDE) connectors.get(i).get_p2().getComponent()).getName().equals(p.getName()) && ((SysCAMSTPortDE) connectors.get(i).get_p2().getComponent()).getBlockDE().getName().equals(t.getName())) { - corpsCluster = corpsCluster + "\t\t" + t.getName() + "_" + nb_block + "." + p.getName() + "(" + "sig_" + nb_con + ");" + CR; - } - }*/ - if (connectors.get(i).get_p1().getComponent() instanceof SysCAMSTPortDE && connectors.get(i).get_p2().getComponent() instanceof SysCAMSTPortDE) { - if (((SysCAMSTPortDE) connectors.get(i).get_p1().getComponent()).getName().equals(p.getName()) && ((SysCAMSTPortDE) connectors.get(i).get_p1().getComponent()).getBlockDE().getName().equals(t.getName())) { - corpsCluster = corpsCluster + "\t\t" + t.getName() + "_" + nb_block + "." + p.getName() + "(" + names.get(i) + ");" + CR; - } else if (((SysCAMSTPortDE) connectors.get(i).get_p2().getComponent()).getName().equals(p.getName()) && ((SysCAMSTPortDE) connectors.get(i).get_p2().getComponent()).getBlockDE().getName().equals(t.getName())) { - corpsCluster = corpsCluster + "\t\t" + t.getName() + "_" + nb_block + "." + p.getName() + "(" + names.get(i) + ");" + CR; - } - } else if (connectors.get(i).get_p1().getComponent() instanceof SysCAMSTPortConverter && connectors.get(i).get_p2().getComponent() instanceof SysCAMSTPortDE) { - if (((SysCAMSTPortConverter) connectors.get(i).get_p1().getComponent()).getName().equals(p.getName()) && ((SysCAMSTPortConverter) connectors.get(i).get_p1().getComponent()).getBlockTDF().getName().equals(t.getName())) { - corpsCluster = corpsCluster + "\t\t" + t.getName() + "_" + nb_block + "." + p.getName() + "(" + names.get(i) + ");" + CR; - } else if (((SysCAMSTPortDE) connectors.get(i).get_p2().getComponent()).getName().equals(p.getName()) && ((SysCAMSTPortDE) connectors.get(i).get_p2().getComponent()).getBlockDE().getName().equals(t.getName())) { - corpsCluster = corpsCluster + "\t\t" + t.getName() + "_" + nb_block + "." + p.getName() + "(" + names.get(i) + ");" + CR; + if ( !((connectors.get(i).get_p1().getComponent() instanceof SysCAMSTPortDE && ((SysCAMSTPortDE) connectors.get(i).get_p1().getComponent()).getBlockGPIO2VCI() != null) + || (connectors.get(i).get_p2().getComponent() instanceof SysCAMSTPortDE && ((SysCAMSTPortDE) connectors.get(i).get_p2().getComponent()).getBlockGPIO2VCI() != null)) ) { + if (connectors.get(i).get_p1().getComponent() instanceof SysCAMSTPortDE && connectors.get(i).get_p2().getComponent() instanceof SysCAMSTPortDE) { + if (((SysCAMSTPortDE) connectors.get(i).get_p1().getComponent()).getName().equals(p.getName()) && ((SysCAMSTPortDE) connectors.get(i).get_p1().getComponent()).getBlockDE().getName().equals(t.getName())) { + corpsCluster = corpsCluster + "\t\t" + t.getName() + "_" + nb_block + "." + p.getName() + "(" + names.get(i) + ");" + CR; + } else if (((SysCAMSTPortDE) connectors.get(i).get_p2().getComponent()).getName().equals(p.getName()) && ((SysCAMSTPortDE) connectors.get(i).get_p2().getComponent()).getBlockDE().getName().equals(t.getName())) { + corpsCluster = corpsCluster + "\t\t" + t.getName() + "_" + nb_block + "." + p.getName() + "(" + names.get(i) + ");" + CR; + } + } else if (connectors.get(i).get_p1().getComponent() instanceof SysCAMSTPortConverter && connectors.get(i).get_p2().getComponent() instanceof SysCAMSTPortDE) { + if (((SysCAMSTPortConverter) connectors.get(i).get_p1().getComponent()).getName().equals(p.getName()) && ((SysCAMSTPortConverter) connectors.get(i).get_p1().getComponent()).getBlockTDF().getName().equals(t.getName())) { + corpsCluster = corpsCluster + "\t\t" + t.getName() + "_" + nb_block + "." + p.getName() + "(" + names.get(i) + ");" + CR; + } else if (((SysCAMSTPortDE) connectors.get(i).get_p2().getComponent()).getName().equals(p.getName()) && ((SysCAMSTPortDE) connectors.get(i).get_p2().getComponent()).getBlockDE().getName().equals(t.getName())) { + corpsCluster = corpsCluster + "\t\t" + t.getName() + "_" + nb_block + "." + p.getName() + "(" + names.get(i) + ");" + CR; + } + } else if (connectors.get(i).get_p2().getComponent() instanceof SysCAMSTPortConverter && connectors.get(i).get_p1().getComponent() instanceof SysCAMSTPortDE) { + if (((SysCAMSTPortConverter) connectors.get(i).get_p2().getComponent()).getName().equals(p.getName()) && ((SysCAMSTPortConverter) connectors.get(i).get_p2().getComponent()).getBlockTDF().getName().equals(t.getName())) { + corpsCluster = corpsCluster + "\t\t" + t.getName() + "_" + nb_block + "." + p.getName() + "(" + names.get(i) + ");" + CR; + } else if (((SysCAMSTPortDE) connectors.get(i).get_p1().getComponent()).getName().equals(p.getName()) && ((SysCAMSTPortDE) connectors.get(i).get_p1().getComponent()).getBlockDE().getName().equals(t.getName())) { + corpsCluster = corpsCluster + "\t\t" + t.getName() + "_" + nb_block + "." + p.getName() + "(" + names.get(i) + ");" + CR; + } } - } else if (connectors.get(i).get_p2().getComponent() instanceof SysCAMSTPortConverter && connectors.get(i).get_p1().getComponent() instanceof SysCAMSTPortDE) { - if (((SysCAMSTPortConverter) connectors.get(i).get_p2().getComponent()).getName().equals(p.getName()) && ((SysCAMSTPortConverter) connectors.get(i).get_p2().getComponent()).getBlockTDF().getName().equals(t.getName())) { - corpsCluster = corpsCluster + "\t\t" + t.getName() + "_" + nb_block + "." + p.getName() + "(" + names.get(i) + ");" + CR; - } else if (((SysCAMSTPortDE) connectors.get(i).get_p1().getComponent()).getName().equals(p.getName()) && ((SysCAMSTPortDE) connectors.get(i).get_p1().getComponent()).getBlockDE().getName().equals(t.getName())) { - corpsCluster = corpsCluster + "\t\t" + t.getName() + "_" + nb_block + "." + p.getName() + "(" + names.get(i) + ");" + CR; + } else { + if (connectors.get(i).get_p1().getComponent() instanceof SysCAMSTPortDE && ((SysCAMSTPortDE) connectors.get(i).get_p1().getComponent()).getBlockGPIO2VCI() != null) { + if (connectors.get(i).get_p2().getComponent() instanceof SysCAMSTPortDE) { + if (((SysCAMSTPortDE) connectors.get(i).get_p2().getComponent()).getName().equals(p.getName()) && ((SysCAMSTPortDE) connectors.get(i).get_p2().getComponent()).getBlockDE().getName().equals(t.getName())) { + corpsCluster = corpsCluster + "\t\t" + t.getName() + "_" + nb_block + "." + p.getName() + "(in_ams);" + CR; + } + } + } else if (connectors.get(i).get_p2().getComponent() instanceof SysCAMSTPortDE && ((SysCAMSTPortDE) connectors.get(i).get_p2().getComponent()).getBlockGPIO2VCI() != null) { + if (connectors.get(i).get_p1().getComponent() instanceof SysCAMSTPortDE) { + if (((SysCAMSTPortDE) connectors.get(i).get_p1().getComponent()).getName().equals(p.getName()) && ((SysCAMSTPortDE) connectors.get(i).get_p1().getComponent()).getBlockDE().getName().equals(t.getName())) { + corpsCluster = corpsCluster + "\t\t" + t.getName() + "_" + nb_block + "." + p.getName() + "(out_ams);" + CR; + } + } } } } @@ -281,23 +294,18 @@ public class ClusterCode { corpsCluster = corpsCluster + "\t}" + CR2; - /*corpsCluster = corpsCluster + "\t// Configure signal tracing." + CR - + "\tsca_trace_file* tfp = sca_create_tabular_trace_file(\"" + cluster.getClusterName() + "_tb\");" + CR; - - nb_con = 0; + corpsCluster = corpsCluster + "\t// Configure signal tracing." + CR; + corpsCluster += "\tvoid trace_" + cluster.getClusterName() +"(sca_util::sca_trace_file* tf) {" + CR; for (int i = 0; i < connectors.size(); i++) { if ( !((connectors.get(i).get_p1().getComponent() instanceof SysCAMSTPortDE && ((SysCAMSTPortDE) connectors.get(i).get_p1().getComponent()).getBlockGPIO2VCI() != null) - || (connectors.get(i).get_p2().getComponent() instanceof SysCAMSTPortDE && ((SysCAMSTPortDE) connectors.get(i).get_p2().getComponent()).getBlockGPIO2VCI() != null)) ) { - corpsCluster = corpsCluster + "\tsca_trace(tfp, "+ "sig_" + nb_con + ", \"" + "sig_" + nb_con + "\");" + CR; - nb_con++; + || (connectors.get(i).get_p2().getComponent() instanceof SysCAMSTPortDE && ((SysCAMSTPortDE) connectors.get(i).get_p2().getComponent()).getBlockGPIO2VCI() != null)) ) { + corpsCluster += "\t\tsca_trace(tf, "+ names.get(i) + ", \"" + names.get(i) + "\");" + CR; } } - corpsCluster = corpsCluster + CR + "\t// Close trace file and stop simulation to enable clean-up by" + CR - + "\t// asking SystemC to execute all end_of_simulation() callbacks." + CR - + "\tsca_close_tabular_trace_file(tfp);" + CR; - */ + corpsCluster += "\t}" +CR; + corpsCluster = corpsCluster + "};" + CR2; - corpsCluster = corpsCluster + "#endif // " + cluster.getClusterName().toUpperCase() + "_TDF_H"+ CR; + // corpsCluster = corpsCluster + "#endif // " + cluster.getClusterName().toUpperCase() + "_TDF_H"+ CR;//DG } else { corpsCluster = ""; } diff --git a/src/main/java/syscamstranslator/toSysCAMSCluster/Header.java b/src/main/java/syscamstranslator/toSysCAMSCluster/HeaderCluster.java similarity index 97% rename from src/main/java/syscamstranslator/toSysCAMSCluster/Header.java rename to src/main/java/syscamstranslator/toSysCAMSCluster/HeaderCluster.java index ba78e5bef3624f1f90758ac40c9980548a811366..a5f7b5b97c014e21a40517e7118297e8b736be49 100644 --- a/src/main/java/syscamstranslator/toSysCAMSCluster/Header.java +++ b/src/main/java/syscamstranslator/toSysCAMSCluster/HeaderCluster.java @@ -45,8 +45,8 @@ import java.util.LinkedList; import syscamstranslator.*; /** - * Class Header - * Header of files .h and .cpp + * Class HeaderCluster + * HeaderCluster of files .h and .cpp * Creation: 14/05/2018 * @version 1.0 14/05/2018 * @author Irina Kit Yan LEE @@ -54,7 +54,7 @@ import syscamstranslator.*; * @author Rodrigo CORTES PORTO */ -public class Header { +public class HeaderCluster { static private String headerPrimitiveTDF; static private String headerPrimitiveDE; static private String headerCluster; @@ -62,7 +62,7 @@ public class Header { private final static String CR = "\n"; private final static String CR2 = "\n\n"; - Header() {} + HeaderCluster() {} public static String getPrimitiveHeaderTDF(SysCAMSTBlockTDF tdf) { if (tdf != null) { @@ -107,4 +107,4 @@ public class Header { } return headerCluster; } -} \ No newline at end of file +} diff --git a/src/main/java/syscamstranslator/toSysCAMS_rodrigo/MakefileCodeRodrigo.java b/src/main/java/syscamstranslator/toSysCAMSCluster/MakefileCodeCluster.java similarity index 95% rename from src/main/java/syscamstranslator/toSysCAMS_rodrigo/MakefileCodeRodrigo.java rename to src/main/java/syscamstranslator/toSysCAMSCluster/MakefileCodeCluster.java index 0482f7b278eed16a4a0b329974f948aa18ee12b3..2d11f97b0b37228e51511017fe0f126d9f2750e9 100644 --- a/src/main/java/syscamstranslator/toSysCAMS_rodrigo/MakefileCodeRodrigo.java +++ b/src/main/java/syscamstranslator/toSysCAMSCluster/MakefileCodeCluster.java @@ -50,21 +50,21 @@ import java.util.LinkedList; import syscamstranslator.*; /** - * Class MakefileCodeRodrigo Principal code of a makefile Creation: 02/06/2018 + * Class MakefileCodeCluster Principal code of a makefile Creation: 02/06/2018 * * @version 1.0 02/06/2018 * @author Irina Kit Yan LEE */ -public class MakefileCodeRodrigo { +public class MakefileCodeCluster { static private String corpsMakefile; private final static String CR = "\n"; private final static String CR2 = "\n\n"; - MakefileCodeRodrigo() { + MakefileCodeCluster() { } - public static String getMakefileCodeRodrigo(LinkedList<SysCAMSTCluster> clusters) { + public static String getMakefileCode(LinkedList<SysCAMSTCluster> clusters) { if (clusters != null) { corpsMakefile = "# Compiler and linker flags" + CR + "CXXFLAGS = -g -Wall -I. $(SYSTEMC_INCLUDE_DIRS)" + CR + "LDFLAGS = $(SYSTEMC_LIBRARY_DIRS)" + CR2 + "# List of all ecutables to be compiled" + CR diff --git a/src/main/java/syscamstranslator/toSysCAMSCluster/PrimitiveCode.java b/src/main/java/syscamstranslator/toSysCAMSCluster/PrimitiveCodeCluster.java similarity index 91% rename from src/main/java/syscamstranslator/toSysCAMSCluster/PrimitiveCode.java rename to src/main/java/syscamstranslator/toSysCAMSCluster/PrimitiveCodeCluster.java index b5bc316143abb564b37a08cc8f4fbfef4518c948..e8a1b1e4f94ccc50f2f4a17d0a3f66e276a209d4 100644 --- a/src/main/java/syscamstranslator/toSysCAMSCluster/PrimitiveCode.java +++ b/src/main/java/syscamstranslator/toSysCAMSCluster/PrimitiveCodeCluster.java @@ -50,20 +50,20 @@ import java.util.LinkedList; import syscamstranslator.*; /** - * Class PrimitiveCode + * Class PrimitiveCodeCluster * Principal code of a primive component * Creation: 14/05/2018 * @version 1.0 14/05/2018 * @author Irina Kit Yan LEE */ -public class PrimitiveCode { +public class PrimitiveCodeCluster { static private String corpsPrimitiveTDF; static private String corpsPrimitiveDE; private final static String CR = "\n"; private final static String CR2 = "\n\n"; - PrimitiveCode() {} + PrimitiveCodeCluster() {} public static String getPrimitiveCodeTDF(SysCAMSTBlockTDF tdf) { corpsPrimitiveTDF = ""; @@ -127,14 +127,12 @@ public class PrimitiveCode { if (i == 0) { corpsPrimitiveTDF = corpsPrimitiveTDF + "\t\t: " + identifier + "(" + value + ")" + CR; } - if ((i > 0) && (i < tdf.getListStruct().getSize()-1)) { + if ((i > 0)) { corpsPrimitiveTDF = corpsPrimitiveTDF + "\t\t, " + identifier + "(" + value + ")" + CR; } - if (i == tdf.getListStruct().getSize()-1 && i != 0) { - corpsPrimitiveTDF = corpsPrimitiveTDF + "\t\t, " + identifier + "(" + value + ")" + CR + "\t\t{}" + CR; - } else { - corpsPrimitiveTDF = corpsPrimitiveTDF + "\t\t{}" + CR; - } + if (i == tdf.getListStruct().getSize()-1) { + corpsPrimitiveTDF = corpsPrimitiveTDF + "\t\t{}" + CR; + } } corpsPrimitiveTDF = corpsPrimitiveTDF + "\t};" + CR2; } @@ -218,8 +216,9 @@ public class PrimitiveCode { } } } - corpsPrimitiveTDF = corpsPrimitiveTDF + "\t{}" + CR2 + "protected:" + CR; } + String ctorcode = tdf.getConstructorCode(); + corpsPrimitiveTDF = corpsPrimitiveTDF + "\t{\n"+ctorcode+"\n\t}" + CR2 + "protected:" + CR; if (tdf.getPeriod() != -1) { corpsPrimitiveTDF = corpsPrimitiveTDF + "\tvoid set_attributes() {" + CR + "\t\t" + "set_timestep(" + tdf.getPeriod() + ", sc_core::SC_" + tdf.getTime().toUpperCase() + ");" + CR; @@ -370,7 +369,7 @@ public class PrimitiveCode { } } } - corpsPrimitiveTDF = corpsPrimitiveTDF + "};" + CR2 + "#endif" + " // " + tdf.getName().toUpperCase() + "_TDF_H"; + corpsPrimitiveTDF = corpsPrimitiveTDF + "};" + CR2 + "#endif" + " // " + tdf.getName().toUpperCase() + "_TDF_H"; } else { corpsPrimitiveTDF = ""; } @@ -389,7 +388,7 @@ public class PrimitiveCode { corpsPrimitiveDE = corpsPrimitiveDE + "template<" + de.getTypeTemplate() + " " + de.getNameTemplate() + ">" + CR; } //corpsPrimitive = "SCA_TDF_MODULE(" + de.getName() + ") {" + CR2; - corpsPrimitiveDE = corpsPrimitiveDE + "class " + de.getName() + " : public sca_core::sca_module {" + CR2 + "public:" + CR; + corpsPrimitiveDE = corpsPrimitiveDE + "class " + de.getName() + " : public sc_core::sc_module {" + CR2 + "public:" + CR; if (!de.getListTypedef().isEmpty()) { for (int i = 0; i < de.getListTypedef().getSize(); i++) { @@ -438,14 +437,12 @@ public class PrimitiveCode { if (i == 0) { corpsPrimitiveDE = corpsPrimitiveDE + "\t\t: " + identifier + "(" + value + ")" + CR; } - if ((i > 0) && (i < de.getListStruct().getSize()-1)) { + if ((i > 0)) { corpsPrimitiveDE = corpsPrimitiveDE + "\t\t, " + identifier + "(" + value + ")" + CR; } - if (i == de.getListStruct().getSize()-1 && i != 0) { - corpsPrimitiveDE = corpsPrimitiveDE + "\t\t, " + identifier + "(" + value + ")" + CR + "\t\t{}" + CR; - } else { - corpsPrimitiveDE = corpsPrimitiveDE + "\t\t{}" + CR; - } + if (i == de.getListStruct().getSize()-1) { + corpsPrimitiveDE = corpsPrimitiveDE + "\t\t{}" + CR; + } } corpsPrimitiveDE = corpsPrimitiveDE + "\t};" + CR2; } @@ -453,9 +450,9 @@ public class PrimitiveCode { if (!deports.isEmpty()) { for (SysCAMSTPortDE t : deports) { if (t.getOrigin() == 0) { - corpsPrimitiveDE = corpsPrimitiveDE + "\tsca_core::sca_in<" + t.getDEType() + "> " + t.getName() + ";" + CR; + corpsPrimitiveDE = corpsPrimitiveDE + "\tsc_core::sc_in< " + t.getDEType() + " > " + t.getName() + ";" + CR; } else if (t.getOrigin() == 1) { - corpsPrimitiveDE = corpsPrimitiveDE + "\tsca_core::sca_out<" + t.getDEType() + "> " + t.getName() + ";" + CR; + corpsPrimitiveDE = corpsPrimitiveDE + "\tsc_core::sc_out< " + t.getDEType() + " > " + t.getName() + ";" + CR; } } } @@ -518,12 +515,14 @@ public class PrimitiveCode { if (method == false) { corpsPrimitiveDE = corpsPrimitiveDE + "\t{" + CR; } - corpsPrimitiveDE = corpsPrimitiveDE + "\t\tsensitive << " + t.getName() + "."; + corpsPrimitiveDE = corpsPrimitiveDE + "\t\tsensitive << " + t.getName(); if (t.getSensitiveMethod().equals("positive")) { - corpsPrimitiveDE = corpsPrimitiveDE + "pos();" + CR; + corpsPrimitiveDE = corpsPrimitiveDE + ".pos();" + CR; } else if (t.getSensitiveMethod().equals("negative")) { - corpsPrimitiveDE = corpsPrimitiveDE + "neg();" + CR; - } + corpsPrimitiveDE = corpsPrimitiveDE + ".neg();" + CR; + } else if (t.getSensitiveMethod().equals("")) { + corpsPrimitiveDE = corpsPrimitiveDE + ";" + CR; + } sensitive = true; } } @@ -596,10 +595,10 @@ public class PrimitiveCode { String pc = buffer.toString(); corpsPrimitiveDE = corpsPrimitiveDE + "\t" + pc; - corpsPrimitiveDE = corpsPrimitiveDE + CR + "};" + CR2 + "#endif" + " // " + de.getName().toUpperCase() + "_TDF_H"; + corpsPrimitiveDE = corpsPrimitiveDE + CR + "};" + CR2 + "#endif" + " // " + de.getName().toUpperCase() + "_TDF_H"; } else { corpsPrimitiveDE = ""; } return corpsPrimitiveDE; } -} \ No newline at end of file +} diff --git a/src/main/java/syscamstranslator/toSysCAMSCluster/TopCellGeneratorCluster.java b/src/main/java/syscamstranslator/toSysCAMSCluster/TopCellGeneratorCluster.java index ccdc017d7be379f32c1fb7009b54b10c84c975f0..949e6b4f0fc7b484452202edf79ef62f1e04c8bd 100644 --- a/src/main/java/syscamstranslator/toSysCAMSCluster/TopCellGeneratorCluster.java +++ b/src/main/java/syscamstranslator/toSysCAMSCluster/TopCellGeneratorCluster.java @@ -66,6 +66,9 @@ public class TopCellGeneratorCluster { private final static String GENERATED_PATH1 = "generated_CPP" + File.separator; private final static String GENERATED_PATH2 = "generated_H" + File.separator; + private final static String CR = "\n"; + private final static String CR2 = "\n\n"; + public TopCellGeneratorCluster(SysCAMSSpecification sys) { syscams = sys; } @@ -74,7 +77,7 @@ public class TopCellGeneratorCluster { if (c == null) { System.out.println("***Warning: require at least one cluster***"); } - if (TopCellGeneratorCluster.syscams.getNbBlockTDF() == 0) { + /*if (TopCellGeneratorCluster.syscams.getNbBlockTDF() == 0) { System.out.println("***Warning: require at least one TDF block***"); } if (TopCellGeneratorCluster.syscams.getNbPortTDF() == 0) { @@ -91,58 +94,89 @@ public class TopCellGeneratorCluster { } if (TopCellGeneratorCluster.syscams.getNbConnectorCluster() == 0) { System.out.println("***Warning: require at least one connector***"); - } - String top = Header.getClusterHeader(c) + ClusterCode.getClusterCode(c, connectors); + }*/ + String top = HeaderCluster.getClusterHeader(c) + ClusterCode.getClusterCode(c, connectors); return (top); } - public void saveFile(String path) { + public void saveFile(String path, Boolean standalone) { SysCAMSTCluster cluster = TopCellGeneratorCluster.syscams.getCluster(); - LinkedList<SysCAMSTConnector> connectors = TopCellGeneratorCluster.syscams.getAllConnectorsCluster4Soclib(); - + LinkedList<SysCAMSTConnector> connectors = TopCellGeneratorCluster.syscams.getAllConnectors(); + FileWriter fw; String top; try { // Save file .cpp System.err.println(path + GENERATED_PATH1 + cluster.getClusterName() + "_tdf.h"); - FileWriter fw = new FileWriter(path + GENERATED_PATH1 + "/" + cluster.getClusterName() + "_tdf.h"); + System.err.println(path + cluster.getClusterName() + "_tdf.h"); + if(standalone==true){ + //System.out.println("@@@ Cluster standalone"); + fw = new FileWriter(path + cluster.getClusterName() + "_tdf.h"); + } + else + fw = new FileWriter(path + GENERATED_PATH1 + "/" + cluster.getClusterName() + "_tdf.h"); + top = generateTopCell(cluster, connectors); fw.write(top); fw.close(); + } catch (Exception ex) { ex.printStackTrace(); } // Save files .h - saveFileBlock(path, cluster); + saveFileBlock(path, cluster, standalone); } - public void saveFileBlock(String path, SysCAMSTCluster c) { + public void saveFileBlock(String path, SysCAMSTCluster c, Boolean standalone) { String headerTDF, headerDE, codeTDF, codeDE; LinkedList<SysCAMSTBlockTDF> tdf = c.getBlockTDF(); LinkedList<SysCAMSTBlockDE> de = c.getBlockDE(); + + FileWriter fw; for (SysCAMSTBlockTDF t : tdf) { try { System.err.println(path + GENERATED_PATH2 + t.getName() + "_tdf.h"); - FileWriter fw = new FileWriter(path + GENERATED_PATH2 + "/" + t.getName() + "_tdf.h"); - headerTDF = Header.getPrimitiveHeaderTDF(t); + System.err.println(path + t.getName() + "_tdf.h"); + if(standalone==true){ + //System.out.println("@@@ TDF Cluster standalone"); + fw = new FileWriter(path + "/" + t.getName() + "_tdf.h"); + } + + else + fw = new FileWriter(path + GENERATED_PATH2 + "/" + t.getName() + "_tdf.h"); + headerTDF = HeaderCluster.getPrimitiveHeaderTDF(t); fw.write(headerTDF); - codeTDF = PrimitiveCode.getPrimitiveCodeTDF(t); + codeTDF = PrimitiveCodeCluster.getPrimitiveCodeTDF(t); + //if(standalone==false) + // codeTDF = codeTDF + "#endif"+ CR; fw.write(codeTDF); fw.close(); + } catch (Exception ex) { ex.printStackTrace(); } } for (SysCAMSTBlockDE t : de) { try { - System.err.println(path + GENERATED_PATH2 + t.getName() + "_tdf.h"); - FileWriter fw = new FileWriter(path + GENERATED_PATH2 + "/" + t.getName() + "_tdf.h"); - headerDE = Header.getPrimitiveHeaderDE(t); + System.err.println(path + GENERATED_PATH2 + t.getName() + "_tdf.h"); System.err.println(path + GENERATED_PATH2 + t.getName() + "_tdf.h"); + + + if(standalone==true) + { + //System.out.println("@@@ DE Cluster standalone"); + fw = new FileWriter(path +"/" + t.getName() + "_tdf.h");} + else + fw = new FileWriter(path + GENERATED_PATH2 + "/" + t.getName() + "_tdf.h"); + + headerDE = HeaderCluster.getPrimitiveHeaderDE(t); fw.write(headerDE); - codeDE = PrimitiveCode.getPrimitiveCodeDE(t); + codeDE = PrimitiveCodeCluster.getPrimitiveCodeDE(t); + //if(standalone==false) + // codeDE = codeDE + "#endif "+ CR; fw.write(codeDE); fw.close(); + } catch (Exception ex) { ex.printStackTrace(); } diff --git a/src/main/java/syscamstranslator/toSysCAMS_rodrigo/ClusterCodeRodrigo.java b/src/main/java/syscamstranslator/toSysCAMSSoclib/ClusterCodeSoclib.java similarity index 96% rename from src/main/java/syscamstranslator/toSysCAMS_rodrigo/ClusterCodeRodrigo.java rename to src/main/java/syscamstranslator/toSysCAMSSoclib/ClusterCodeSoclib.java index fa186bc8d1a4d114a8c3516e9f357af34ee9d3c0..adf429f7934d93b82f2f1172bf06379b46654635 100644 --- a/src/main/java/syscamstranslator/toSysCAMS_rodrigo/ClusterCodeRodrigo.java +++ b/src/main/java/syscamstranslator/toSysCAMSSoclib/ClusterCodeSoclib.java @@ -50,19 +50,19 @@ import java.util.LinkedList; import syscamstranslator.*; /** - * Class ClusterCodeRodrigo + * Class ClusterCodeSoclib * Principal code of a cluster component * Creation: 14/05/2018 * @version 1.0 14/05/2018 * @author Irina Kit Yan LEE */ -public class ClusterCodeRodrigo { +public class ClusterCodeSoclib { static private String corpsCluster; private final static String CR = "\n"; private final static String CR2 = "\n\n"; - ClusterCodeRodrigo() {} + ClusterCodeSoclib() {} public static String getClusterCode(SysCAMSTCluster cluster, LinkedList<SysCAMSTConnector> connectors) { int nb_con = 0; @@ -227,7 +227,7 @@ public class ClusterCodeRodrigo { + "\tsca_close_tabular_trace_file(tfp);" + CR; */ corpsCluster = corpsCluster + "};" + CR2; - corpsCluster = corpsCluster + "#endif // " + cluster.getClusterName().toUpperCase() + "_TDF_H"+ CR; + // corpsCluster = corpsCluster + "#endif // " + cluster.getClusterName().toUpperCase() + "_TDF_H"+ CR;//DG } else { corpsCluster = ""; } diff --git a/src/main/java/syscamstranslator/toSysCAMS_rodrigo/HeaderRodrigo.java b/src/main/java/syscamstranslator/toSysCAMSSoclib/HeaderSoclib.java similarity index 97% rename from src/main/java/syscamstranslator/toSysCAMS_rodrigo/HeaderRodrigo.java rename to src/main/java/syscamstranslator/toSysCAMSSoclib/HeaderSoclib.java index 84cd9c951944f54724f88dbca16ef9364b6d4eb2..da5fd35df1bcd7cf93d7bc79dd15fcbf2e49bd15 100644 --- a/src/main/java/syscamstranslator/toSysCAMS_rodrigo/HeaderRodrigo.java +++ b/src/main/java/syscamstranslator/toSysCAMSSoclib/HeaderSoclib.java @@ -50,14 +50,14 @@ import java.util.LinkedList; import syscamstranslator.*; /** - * Class HeaderRodrigo - * Header of files .h and .cpp + * Class HeaderSoclib + * HeaderSoclib of files .h and .cpp * Creation: 14/05/2018 * @version 1.0 14/05/2018 * @author Irina Kit Yan LEE */ -public class HeaderRodrigo { +public class HeaderSoclib { static private String headerPrimitiveTDF; static private String headerPrimitiveDE; static private String headerCluster; @@ -65,7 +65,7 @@ public class HeaderRodrigo { private final static String CR = "\n"; private final static String CR2 = "\n\n"; - HeaderRodrigo() {} + HeaderSoclib() {} public static String getPrimitiveHeaderTDF(SysCAMSTBlockTDF tdf) { if (tdf != null) { diff --git a/src/main/java/syscamstranslator/toSysCAMSCluster/MakefileCode.java b/src/main/java/syscamstranslator/toSysCAMSSoclib/MakefileSoclibCode.java similarity index 96% rename from src/main/java/syscamstranslator/toSysCAMSCluster/MakefileCode.java rename to src/main/java/syscamstranslator/toSysCAMSSoclib/MakefileSoclibCode.java index e438ff4d5b7defcf042833235b819f56504b5f77..50640d57c8fc6cb7ce0b9928f1975dec464a0d11 100644 --- a/src/main/java/syscamstranslator/toSysCAMSCluster/MakefileCode.java +++ b/src/main/java/syscamstranslator/toSysCAMSSoclib/MakefileSoclibCode.java @@ -43,25 +43,25 @@ /* authors: v1.0 Raja GATGOUT 2014 v2.0 Daniela GENIUS, Julien HENON 2015 */ -package syscamstranslator.toSysCAMSCluster; +package syscamstranslator.toSysCAMS; import java.util.LinkedList; import syscamstranslator.*; /** - * Class MakefileCode Principal code of a makefile Creation: 02/06/2018 + * Class MakefileSoclibCode Principal code of a makefile Creation: 02/06/2018 * * @version 1.0 02/06/2018 * @author Irina Kit Yan LEE */ -public class MakefileCode { +public class MakefileSoclibCode { static private String corpsMakefile; private final static String CR = "\n"; private final static String CR2 = "\n\n"; - MakefileCode() { + MakefileSoclibCode() { } public static String getMakefileCode(LinkedList<SysCAMSTCluster> clusters) { @@ -110,4 +110,4 @@ public class MakefileCode { } return corpsMakefile; } -} \ No newline at end of file +} diff --git a/src/main/java/syscamstranslator/toSysCAMS_rodrigo/PrimitiveCodeRodrigo.java b/src/main/java/syscamstranslator/toSysCAMSSoclib/PrimitiveCodeSoclib.java similarity index 95% rename from src/main/java/syscamstranslator/toSysCAMS_rodrigo/PrimitiveCodeRodrigo.java rename to src/main/java/syscamstranslator/toSysCAMSSoclib/PrimitiveCodeSoclib.java index ef1f58c8cd4421ac0d28ccb25a35f99fe6d6601e..f32342d03a41b591cbc0a55117e569effaf81de6 100644 --- a/src/main/java/syscamstranslator/toSysCAMS_rodrigo/PrimitiveCodeRodrigo.java +++ b/src/main/java/syscamstranslator/toSysCAMSSoclib/PrimitiveCodeSoclib.java @@ -50,20 +50,20 @@ import java.util.LinkedList; import syscamstranslator.*; /** - * Class PrimitiveCodeRodrigo + * Class PrimitiveCodeSoclib * Principal code of a primive component * Creation: 14/05/2018 * @version 1.0 14/05/2018 * @author Irina Kit Yan LEE */ -public class PrimitiveCodeRodrigo { +public class PrimitiveCodeSoclib { static private String corpsPrimitiveTDF; static private String corpsPrimitiveDE; private final static String CR = "\n"; private final static String CR2 = "\n\n"; - PrimitiveCodeRodrigo() {} + PrimitiveCodeSoclib() {} public static String getPrimitiveCodeTDF(SysCAMSTBlockTDF tdf) { corpsPrimitiveTDF = ""; @@ -370,7 +370,7 @@ public class PrimitiveCodeRodrigo { } } } - corpsPrimitiveTDF = corpsPrimitiveTDF + "};" + CR2 + "#endif" + " // " + tdf.getName().toUpperCase() + "_H"; + corpsPrimitiveTDF = corpsPrimitiveTDF + "};" + CR2 + "#endif" + " // " + tdf.getName().toUpperCase() + "_H";//DG } else { corpsPrimitiveTDF = ""; } @@ -596,7 +596,7 @@ public class PrimitiveCodeRodrigo { String pc = buffer.toString(); corpsPrimitiveDE = corpsPrimitiveDE + "\t" + pc; - corpsPrimitiveDE = corpsPrimitiveDE + CR + "};" + CR2 + "#endif" + " // " + de.getName().toUpperCase() + "_TDF_H"; + corpsPrimitiveDE = corpsPrimitiveDE + CR + "};" + CR2 + "#endif" + " // " + de.getName().toUpperCase() + "_TDF_H";//DG } else { corpsPrimitiveDE = ""; } diff --git a/src/main/java/syscamstranslator/toSysCAMS_rodrigo/TopCellGeneratorRodrigo.java b/src/main/java/syscamstranslator/toSysCAMSSoclib/TopCellGeneratorSoclib.java similarity index 64% rename from src/main/java/syscamstranslator/toSysCAMS_rodrigo/TopCellGeneratorRodrigo.java rename to src/main/java/syscamstranslator/toSysCAMSSoclib/TopCellGeneratorSoclib.java index 0d24c64c61194d50ab7a2f3c4125dc2c7e604a04..119ea536cd41ed6af7e7076d4c4fbe0d084187b0 100644 --- a/src/main/java/syscamstranslator/toSysCAMS_rodrigo/TopCellGeneratorRodrigo.java +++ b/src/main/java/syscamstranslator/toSysCAMSSoclib/TopCellGeneratorSoclib.java @@ -51,20 +51,23 @@ import java.io.*; import java.util.LinkedList; /** - * Class TopCellGenerator + * Class TopCellGeneratorSoclib * Save the components and connectors in files * Creation: 14/05/2018 * @version 1.0 14/05/2018 * @author Irina Kit Yan LEE */ -public class TopCellGeneratorRodrigo { +public class TopCellGeneratorSoclib { public static SysCAMSSpecification syscams; private final static String GENERATED_PATH1 = "generated_CPP" + File.separator; private final static String GENERATED_PATH2 = "generated_H" + File.separator; + private final static String CR = "\n"; + private final static String CR2 = "\n\n"; - public TopCellGeneratorRodrigo(SysCAMSSpecification sys) { + + public TopCellGeneratorSoclib(SysCAMSSpecification sys) { syscams = sys; } @@ -72,62 +75,81 @@ public class TopCellGeneratorRodrigo { if (c == null) { System.out.println("***Warning: require at least one cluster***"); } - if (TopCellGeneratorRodrigo.syscams.getNbBlockTDF() == 0) { + if (TopCellGenerator.syscams.getNbBlockTDF() == 0) { System.out.println("***Warning: require at least one TDF block***"); } - if (TopCellGeneratorRodrigo.syscams.getNbPortTDF() == 0) { + if (TopCellGenerator.syscams.getNbPortTDF() == 0) { System.out.println("***Warning: require at least one TDF port***"); } - if (TopCellGeneratorRodrigo.syscams.getNbBlockDE() == 0) { + if (TopCellGenerator.syscams.getNbBlockDE() == 0) { System.out.println("***Warning: require at least one DE block***"); } - if (TopCellGeneratorRodrigo.syscams.getNbPortDE() == 0) { + if (TopCellGenerator.syscams.getNbPortDE() == 0) { System.out.println("***Warning: require at least one DE port***"); } - if (TopCellGeneratorRodrigo.syscams.getNbPortConverter() == 0) { + if (TopCellGenerator.syscams.getNbPortConverter() == 0) { System.out.println("***Warning: require at least one converter port***"); } - if (TopCellGeneratorRodrigo.syscams.getNbConnectorCluster() == 0) { + if (TopCellGenerator.syscams.getNbConnectorCluster() == 0) { System.out.println("***Warning: require at least one connector***"); } - String top = HeaderRodrigo.getClusterHeader(c) + ClusterCodeRodrigo.getClusterCode(c, connectors); + String top = HeaderSoclib.getClusterHeader(c) + ClusterCodeSoclib.getClusterCode(c, connectors); return (top); } - public void saveFile(String path) { - SysCAMSTCluster cluster = TopCellGeneratorRodrigo.syscams.getCluster(); - LinkedList<SysCAMSTConnector> connectors = TopCellGeneratorRodrigo.syscams.getAllConnectorCluster(); - + public void saveFile(String path, Boolean standalone) { + SysCAMSTCluster cluster = TopCellGenerator.syscams.getCluster(); + LinkedList<SysCAMSTConnector> connectors = TopCellGenerator.syscams.getAllConnectorCluster(); + FileWriter fw; String top; try { // Save file .cpp System.err.println(path + GENERATED_PATH1 + cluster.getClusterName() + "_tdf.h"); - FileWriter fw = new FileWriter(path + GENERATED_PATH1 + "/" + cluster.getClusterName() + "_tdf.h"); + System.err.println(path + cluster.getClusterName() + "_tdf.h"); + + if(standalone==true) + fw = new FileWriter(path + cluster.getClusterName() + "_tdf.h"); + else + fw = new FileWriter(path + GENERATED_PATH1 + "/" + cluster.getClusterName() + "_tdf.h"); top = generateTopCell(cluster, connectors); fw.write(top); fw.close(); + } catch (Exception ex) { ex.printStackTrace(); } // Save files .h - saveFileBlock(path, cluster); + saveFileBlock(path, cluster,standalone); } - public void saveFileBlock(String path, SysCAMSTCluster c) { + public void saveFileBlock(String path, SysCAMSTCluster c, Boolean standalone) { String headerTDF, headerDE, codeTDF, codeDE; LinkedList<SysCAMSTBlockTDF> tdf = c.getBlockTDF(); LinkedList<SysCAMSTBlockDE> de = c.getBlockDE(); + FileWriter fw; for (SysCAMSTBlockTDF t : tdf) { try { System.err.println(path + GENERATED_PATH2 + t.getName() + "_tdf.h"); - FileWriter fw = new FileWriter(path + GENERATED_PATH2 + "/" + t.getName() + "_tdf.h"); - headerTDF = HeaderRodrigo.getPrimitiveHeaderTDF(t); + System.err.println(path + t.getName() + "_tdf.h");//DG + + if(standalone==true){ + //System.out.println("@@@@@TDF Soclib version standalone"); + fw = new FileWriter(path + t.getName() + "_tdf.h");} + else + fw = new FileWriter(path + GENERATED_PATH2 + "/" + t.getName() + "_tdf.h"); + + headerTDF = HeaderSoclib.getPrimitiveHeaderTDF(t); fw.write(headerTDF); - codeTDF = PrimitiveCodeRodrigo.getPrimitiveCodeTDF(t); + + codeTDF = PrimitiveCodeSoclib.getPrimitiveCodeTDF(t); + // if(standalone==false) + // codeTDF = codeTDF + CR + "};" + CR2 + "#endif"+CR;//DG fw.write(codeTDF); + fw.close(); + } catch (Exception ex) { ex.printStackTrace(); } @@ -135,12 +157,21 @@ public class TopCellGeneratorRodrigo { for (SysCAMSTBlockDE t : de) { try { System.err.println(path + GENERATED_PATH2 + t.getName() + "_tdf.h"); - FileWriter fw = new FileWriter(path + GENERATED_PATH2 + "/" + t.getName() + "_tdf.h"); - headerDE = HeaderRodrigo.getPrimitiveHeaderDE(t); + + if(standalone==true){ + //System.out.println("@@@@@DE Soclib version standalone"); + fw = new FileWriter(path + t.getName() + "_tdf.h");} + else + fw = new FileWriter(path + GENERATED_PATH2 + "/" + t.getName() + "_tdf.h"); + headerDE = HeaderSoclib.getPrimitiveHeaderDE(t); fw.write(headerDE); - codeDE = PrimitiveCodeRodrigo.getPrimitiveCodeDE(t); + + codeDE = PrimitiveCodeSoclib.getPrimitiveCodeDE(t); + //if(standalone==false) + // codeDE = codeDE + CR + "};" + CR2 + "#endif" +CR; fw.write(codeDE); fw.close(); + } catch (Exception ex) { ex.printStackTrace(); } diff --git a/src/main/java/tmltranslator/tomappingsystemc2/DiploSimulatorCodeGenerator.java b/src/main/java/tmltranslator/tomappingsystemc2/DiploSimulatorCodeGenerator.java index 9e0732bf046a6f7fdf6f5ea9309592552c8ec769..11109e4240c92673f903e1ef04ca89eb18cc8884 100644 --- a/src/main/java/tmltranslator/tomappingsystemc2/DiploSimulatorCodeGenerator.java +++ b/src/main/java/tmltranslator/tomappingsystemc2/DiploSimulatorCodeGenerator.java @@ -178,7 +178,7 @@ public class DiploSimulatorCodeGenerator implements IDiploSimulatorCodeGenerator header += "#include <AliasConstraint.h>\n#include <EqConstraint.h>\n#include <LogConstraint.h>\n#include <PropLabConstraint.h>\n"; header += "#include <PropRelConstraint.h>\n#include <SeqConstraint.h>\n#include <SignalConstraint.h>\n#include <TimeMMConstraint.h>\n"; header += "#include <TimeTConstraint.h>\n"; - header += "#include <CPU.h>\n#include <SingleCoreCPU.h>\n#include <RRScheduler.h>\n#include <RRPrioScheduler.h>\n#include <PrioScheduler.h>\n#include <Bus.h>\n"; + header += "#include <CPU.h>\n#include <SingleCoreCPU.h>\n#include <MultiCoreCPU.h>\n#include <RRScheduler.h>\n#include <RRPrioScheduler.h>\n#include <PrioScheduler.h>\n#include <Bus.h>\n"; header += "#include <Bridge.h>\n#include <Memory.h>\n#include <TMLbrbwChannel.h>\n#include <TMLnbrnbwChannel.h>\n"; header += "#include <TMLbrnbwChannel.h>\n#include <TMLEventBChannel.h>\n#include <TMLEventFChannel.h>\n#include <TMLEventFBChannel.h>\n"; header += "#include <TMLTransaction.h>\n#include <TMLCommand.h>\n#include <TMLTask.h>\n"; @@ -216,18 +216,32 @@ public class DiploSimulatorCodeGenerator implements IDiploSimulatorCodeGenerator } //TraceManager.addDev("cores " + exNode.nbOfCores); + - for (int cores = 0; cores < exNode.nbOfCores; cores++) { + /*for (int cores = 0; cores < exNode.nbOfCores; cores++) { final String cpuInstName = namesGen.cpuInstanceName(exNode, cores); declaration += "CPU* " + cpuInstName + " = new SingleCoreCPU(" + exNode.getID() + ", \"" + namesGen.cpuName(exNode, cores) + "\", " + schedulerInstName + ", "; declaration += exNode.clockRatio + ", " + exNode.execiTime + ", " + exNode.execcTime + ", " + exNode.pipelineSize + ", " + exNode.taskSwitchingTime + ", " + exNode.branchingPredictionPenalty + ", " + exNode.goIdleTime + ", " + exNode.maxConsecutiveIdleCycles + ", " + exNode.byteDataSize + ")" + SCCR; if (cores != 0) { declaration += cpuInstName + "->setScheduler(" + schedulerInstName + ",false)" + SCCR; - } - + }*/ + final String cpuInstName = namesGen.cpuInstanceName(exNode, exNode.nbOfCores); + if (exNode.nbOfCores == 1) { + declaration += "CPU* " + exNode.getName() + "_" + exNode.nbOfCores + " = new SingleCoreCPU(" + exNode.getID() + ", \"" + exNode.getName() + "_" + exNode.nbOfCores + "\", " + + exNode.getName() + "_scheduler" + ", "; + + declaration += exNode.clockRatio + ", " + exNode.execiTime + ", " + exNode.execcTime + ", " + exNode.pipelineSize + ", " + + exNode.taskSwitchingTime + ", " + exNode.branchingPredictionPenalty + ", " + exNode.goIdleTime + ", " + exNode.maxConsecutiveIdleCycles + ", " + exNode.byteDataSize + ")" + SCCR; + } else { + declaration += "CPU* " + exNode.getName() + "_" + exNode.nbOfCores + " = new MultiCoreCPU(" + exNode.getID() + ", \"" + exNode.getName() + "_" + exNode.nbOfCores + "\", " + exNode.getName() + "_scheduler" + ", "; + + declaration += exNode.clockRatio + ", " + exNode.execiTime + ", " + exNode.execcTime + ", " + exNode.pipelineSize + ", " + exNode.taskSwitchingTime + ", " + exNode.branchingPredictionPenalty + ", " + exNode.goIdleTime + ", " + exNode.maxConsecutiveIdleCycles + ", " + exNode.byteDataSize +", " + exNode.nbOfCores + ")" + SCCR; + } + + declaration += "addCPU(" + cpuInstName + ")" + SCCR; - } + //} } else if (node instanceof HwA) { final HwA hwaNode = (HwA) node; final String schedulerInstName = namesGen.rrSchedulerInstanceName(hwaNode); @@ -320,18 +334,18 @@ public class DiploSimulatorCodeGenerator implements IDiploSimulatorCodeGenerator noOfCores = 1; } - for (int cores = 0; cores < noOfCores; cores++) { + //for (int cores = 0; cores < noOfCores; cores++) { final String nodeInstanceName; if (node instanceof HwCPU || node instanceof HwA) { - nodeInstanceName = namesGen.executionNodeInstanceName((HwExecutionNode) node, cores); + nodeInstanceName = namesGen.executionNodeInstanceName((HwExecutionNode) node, noOfCores); } else { nodeInstanceName = namesGen.bridgeInstanceName((HwBridge) node); } - final String busMasterInstName = namesGen.busMasterInstanceName(node, cores, link.bus); + final String busMasterInstName = namesGen.busMasterInstanceName(node, 0, link.bus); - declaration += "BusMaster* " + busMasterInstName + " = new BusMaster(\"" + namesGen.busMasterName(node, cores, link.bus) + "\", " + link.getPriority() + ", " + link.bus.pipelineSize + ", array(" + link.bus.pipelineSize; + declaration += "BusMaster* " + busMasterInstName + " = new BusMaster(\"" + namesGen.busMasterName(node, 0, link.bus) + "\", " + link.getPriority() + ", " + link.bus.pipelineSize + ", array(" + link.bus.pipelineSize; for (int i = 0; i < link.bus.pipelineSize; i++) { declaration += ", (SchedulableCommDevice*) " + namesGen.schedComDeviceInstanceName(link.bus, i); @@ -340,7 +354,7 @@ public class DiploSimulatorCodeGenerator implements IDiploSimulatorCodeGenerator declaration += "))" + SCCR; declaration += nodeInstanceName + "->addBusMaster(" + busMasterInstName + ")" + SCCR; - } + //} } } } @@ -473,10 +487,12 @@ public class DiploSimulatorCodeGenerator implements IDiploSimulatorCodeGenerator if (link.hwnode instanceof HwCPU) { //|| (link.hwnode instanceof HwA)){ final HwCPU cpu = (HwCPU) link.hwnode; - for (int cores = 0; cores < cpu.nbOfCores; cores++) { + /*for (int cores = 0; cores < cpu.nbOfCores; cores++) { devices += ", (WorkloadSource*) " + namesGen.workloadSourceInstanceName(cpu, cores, bus); numDevices++; - } + }*/ + devices += ", (WorkloadSource*) " + namesGen.workloadSourceInstanceName(cpu, 0, bus); + numDevices ++; } else { devices += ", (WorkloadSource*) " + namesGen.workloadSourceInstanceName(link.hwnode, 0, bus); numDevices++; @@ -524,10 +540,10 @@ public class DiploSimulatorCodeGenerator implements IDiploSimulatorCodeGenerator final HwCPU hwCpu = (HwCPU) node; declaration += hwCpu.nbOfCores; - for (int cores = 0; cores < hwCpu.nbOfCores; cores++) { + /*for (int cores = 0; cores < hwCpu.nbOfCores; cores++) { declaration += "," + namesGen.cpuInstanceName(hwCpu, cores); - } - + }*/ + declaration += "," + namesGen.cpuInstanceName(hwCpu, hwCpu.nbOfCores); // declaration+= "),1" + CR; } else if (node instanceof HwA) { final HwA hwAcc = (HwA) node; diff --git a/src/main/java/tmltranslator/tomappingsystemc2/TML2MappingSystemC.java b/src/main/java/tmltranslator/tomappingsystemc2/TML2MappingSystemC.java index b91a3940a8eabc23fa826b53a34c8c9a42a72a2a..86dc71144bd2070a385fa27f13e5f4410d68b703 100644 --- a/src/main/java/tmltranslator/tomappingsystemc2/TML2MappingSystemC.java +++ b/src/main/java/tmltranslator/tomappingsystemc2/TML2MappingSystemC.java @@ -163,7 +163,7 @@ public class TML2MappingSystemC implements IDiploSimulatorCodeGenerator { header += "#include <AliasConstraint.h>\n#include <EqConstraint.h>\n#include <LogConstraint.h>\n#include <PropLabConstraint.h>\n"; header += "#include <PropRelConstraint.h>\n#include <SeqConstraint.h>\n#include <SignalConstraint.h>\n#include <TimeMMConstraint.h>\n"; header += "#include <TimeTConstraint.h>\n"; - header += "#include <CPU.h>\n#include <SingleCoreCPU.h>\n#include <RRScheduler.h>\n#include <RRPrioScheduler.h>\n#include <PrioScheduler.h>\n#include <Bus.h>\n"; + header += "#include <CPU.h>\n#include <SingleCoreCPU.h>\n#include <MultiCoreCPU.h>\n#include <RRScheduler.h>\n#include <RRPrioScheduler.h>\n#include <PrioScheduler.h>\n#include <Bus.h>\n"; header += "#include <Bridge.h>\n#include <Memory.h>\n#include <TMLbrbwChannel.h>\n#include <TMLnbrnbwChannel.h>\n"; header += "#include <TMLbrnbwChannel.h>\n#include <TMLEventBChannel.h>\n#include <TMLEventFChannel.h>\n#include <TMLEventFBChannel.h>\n"; header += "#include <TMLTransaction.h>\n#include <TMLCommand.h>\n#include <TMLTask.h>\n"; @@ -195,16 +195,20 @@ public class TML2MappingSystemC implements IDiploSimulatorCodeGenerator { //declaration += "RRScheduler* " + exNode.getName() + "_scheduler = new RRScheduler(\"" + exNode.getName() + "_RRSched\", 0, 5, " + (int) Math.ceil(((float)exNode.execiTime)*(1+((float)exNode.branchingPredictionPenalty)/100)) + " ) " + SCCR; declaration += "RRScheduler* " + exNode.getName() + "_scheduler = new RRScheduler(\"" + exNode.getName() + "_RRSched\", 0, " + (tmlmapping.getTMLArchitecture().getMasterClockFrequency() * exNode.sliceTime) + ", " + (int) Math.ceil((float) (exNode.clockRatio * Math.max(exNode.execiTime, exNode.execcTime) * (exNode.branchingPredictionPenalty * exNode.pipelineSize + 100 - exNode.branchingPredictionPenalty)) / 100) + " ) " + SCCR; //TraceManager.addDev("cores " + exNode.nbOfCores); - for (int cores = 0; cores < exNode.nbOfCores; cores++) { - //for(int cores=0; cores<1; cores++){ - //if (tmlmapping.isAUsedHwNode(node)) { - declaration += "CPU* " + exNode.getName() + cores + " = new SingleCoreCPU(" + exNode.getID() + ", \"" + exNode.getName() + "_" + cores + "\", " + exNode.getName() + "_scheduler" + ", "; - + if (exNode.nbOfCores == 1) { + declaration += "CPU* " + exNode.getName() + exNode.nbOfCores + " = new SingleCoreCPU(" + exNode.getID() + ", \"" + exNode.getName() + "_" + exNode.nbOfCores + "\", " + + exNode.getName() + "_scheduler" + ", "; + + declaration += exNode.clockRatio + ", " + exNode.execiTime + ", " + exNode.execcTime + ", " + exNode.pipelineSize + ", " + + exNode.taskSwitchingTime + ", " + exNode.branchingPredictionPenalty + ", " + exNode.goIdleTime + ", " + exNode.maxConsecutiveIdleCycles + ", " + exNode.byteDataSize + ")" + SCCR; + } else { + declaration += "CPU* " + exNode.getName() + exNode.nbOfCores + " = new MultiCoreCPU(" + exNode.getID() + ", \"" + exNode.getName() + "_" + exNode.nbOfCores + "\", " + exNode.getName() + "_scheduler" + ", "; + declaration += exNode.clockRatio + ", " + exNode.execiTime + ", " + exNode.execcTime + ", " + exNode.pipelineSize + ", " + exNode.taskSwitchingTime + ", " + exNode.branchingPredictionPenalty + ", " + exNode.goIdleTime + ", " + exNode.maxConsecutiveIdleCycles + ", " + exNode.byteDataSize + ")" + SCCR; - if (cores != 0) - declaration += node.getName() + cores + "->setScheduler(" + exNode.getName() + "_scheduler,false)" + SCCR; - declaration += "addCPU(" + node.getName() + cores + ")" + SCCR; - } + } + + declaration += "addCPU(" + node.getName() + exNode.nbOfCores + ")" + SCCR; + } if (node instanceof HwA) { HwA hwaNode = (HwA) node; @@ -278,16 +282,16 @@ public class TML2MappingSystemC implements IDiploSimulatorCodeGenerator { if (node instanceof HwCPU) noOfCores = ((HwCPU) node).nbOfCores; else noOfCores = 1; //noOfCores=2; - for (int cores = 0; cores < noOfCores; cores++) { + //for (int cores = 0; cores < noOfCores; cores++) { String nodeName = node.getName(); - if ((node instanceof HwCPU) || (node instanceof HwA)) - nodeName += cores; + if (node instanceof HwCPU) + nodeName += ((HwCPU)node).nbOfCores; declaration += "BusMaster* " + nodeName + "_" + link.bus.getName() + "_Master = new BusMaster(\"" + nodeName + "_" + link.bus.getName() + "_Master\", " + link.getPriority() + ", " + link.bus.pipelineSize + ", array(" + link.bus.pipelineSize; for (int i = 0; i < link.bus.pipelineSize; i++) declaration += ", (SchedulableCommDevice*)" + link.bus.getName() + "_" + i; declaration += "))" + SCCR; declaration += nodeName + "->addBusMaster(" + nodeName + "_" + link.bus.getName() + "_Master)" + SCCR; - } + //} } } } diff --git a/src/main/java/ui/MainGUI.java b/src/main/java/ui/MainGUI.java index fef7fd3ded0e238801f124269521b56e32c6657d..9c3a94f69759f1d6e6f9bf692e2ae09c700bdbc0 100644 --- a/src/main/java/ui/MainGUI.java +++ b/src/main/java/ui/MainGUI.java @@ -712,10 +712,6 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Per return helpManager; } - public void setHelpManager(HelpManager hm) { - helpManager = hm; - } - public void showIntegratedHelp() { if (helpManager != null) { openHelpFrame(helpManager); diff --git a/src/main/java/ui/SysCAMSPanelTranslator.java b/src/main/java/ui/SysCAMSPanelTranslator.java index c590afb21c4b313d4d822e5d689fc5487a6e0397..3699b5b21468223b636cefc71dbf801e83ea1a8d 100644 --- a/src/main/java/ui/SysCAMSPanelTranslator.java +++ b/src/main/java/ui/SysCAMSPanelTranslator.java @@ -114,6 +114,7 @@ public class SysCAMSPanelTranslator { syscamsComponents.add(syscamsPortDE); } syscamsMap.put(blockGPIO2VCI, syscamsBlockGPIO2VCI); + //System.out.println("@@@ GPIO block put in map @@@"); syscamsComponents.add(syscamsBlockGPIO2VCI); } else if (dp instanceof SysCAMSBlockDE) { SysCAMSBlockDE blockDE = (SysCAMSBlockDE) dp; @@ -128,7 +129,7 @@ public class SysCAMSPanelTranslator { // String typeTemplate = blockDE.getTypeTemplate(); // DefaultListModel<String> listTypedef = blockDE.getListTypedef(); - SysCAMSTBlockDE syscamsBlockDE = new SysCAMSTBlockDE(blockDEName, "", "", null, "", "", null, null); + SysCAMSTBlockDE syscamsBlockDE = new SysCAMSTBlockDE(blockDEName, "", "", null, "", "", "", null, null); List<SysCAMSPortDE> portsDE = blockDE.getAllInternalPortsDE(); for (int i = 0; i < portsDE.size(); i++) { @@ -149,8 +150,10 @@ public class SysCAMSPanelTranslator { syscamsMap.put(portDE, syscamsPortDE); syscamsBlockDE.addPortDE(syscamsPortDE); syscamsComponents.add(syscamsPortDE); - } + } + syscamsMap.put(blockDE, syscamsBlockDE); + // System.out.println("@@@ DE block put in map @@@"); syscamsComponents.add(syscamsBlockDE); } else if (dp instanceof SysCAMSCompositeComponent) { SysCAMSCompositeComponent cluster = (SysCAMSCompositeComponent) dp; @@ -173,12 +176,14 @@ public class SysCAMSPanelTranslator { timeBlock = "us"; } String processCode = blockTDF.getProcessCode(); + String constructorCode = blockTDF.getConstructorCode(); DefaultListModel<String> listStruct = blockTDF.getListStruct(); String nameTemplate = blockTDF.getNameTemplate(); String typeTemplate = blockTDF.getTypeTemplate(); + String valueTemplate = blockTDF.getValueTemplate(); DefaultListModel<String> listTypedef = blockTDF.getListTypedef(); - SysCAMSTBlockTDF syscamsBlockTDF = new SysCAMSTBlockTDF(blockTDFName, periodBlock, timeBlock, processCode, listStruct, nameTemplate, typeTemplate, listTypedef, syscamsCluster); + SysCAMSTBlockTDF syscamsBlockTDF = new SysCAMSTBlockTDF(blockTDFName, periodBlock, timeBlock, processCode, constructorCode, listStruct, nameTemplate, typeTemplate, valueTemplate, listTypedef, syscamsCluster); List<SysCAMSPortTDF> portsTDF = blockTDF.getAllInternalPortsTDF(); for (int j = 0; j < portsTDF.size(); j++) { @@ -227,6 +232,7 @@ public class SysCAMSPanelTranslator { syscamsComponents.add(syscamsPortConverter); } syscamsMap.put(blockTDF, syscamsBlockTDF); + //System.out.println("@@@ TDF block put in map @@@"); syscamsCluster.addBlockTDF(syscamsBlockTDF); syscamsComponents.add(syscamsBlockTDF); } @@ -241,9 +247,10 @@ public class SysCAMSPanelTranslator { DefaultListModel<String> listStruct = blockDE.getListStruct(); String nameTemplate = blockDE.getNameTemplate(); String typeTemplate = blockDE.getTypeTemplate(); + String valueTemplate = blockDE.getValueTemplate(); DefaultListModel<String> listTypedef = blockDE.getListTypedef(); - SysCAMSTBlockDE syscamsBlockDE = new SysCAMSTBlockDE(blockDEName, nameFn, code, listStruct, nameTemplate, typeTemplate, listTypedef, syscamsCluster); + SysCAMSTBlockDE syscamsBlockDE = new SysCAMSTBlockDE(blockDEName, nameFn, code, listStruct, nameTemplate, typeTemplate, valueTemplate, listTypedef, syscamsCluster); List<SysCAMSPortDE> portsDE = blockDE.getAllInternalPortsDE(); for (int j = 0; j < portsDE.size(); j++) { diff --git a/src/main/java/ui/TGConnector.java b/src/main/java/ui/TGConnector.java old mode 100644 new mode 100755 diff --git a/src/main/java/ui/syscams/SysCAMSBlockDE.java b/src/main/java/ui/syscams/SysCAMSBlockDE.java index 257a643d49d4d124cc9fbab96b916fe0844ff821..5e60736cda31ce0f87326faa1e4a13a4c4a4c973 100644 --- a/src/main/java/ui/syscams/SysCAMSBlockDE.java +++ b/src/main/java/ui/syscams/SysCAMSBlockDE.java @@ -67,6 +67,7 @@ public class SysCAMSBlockDE extends TGCScalableWithInternalComponent implements private DefaultListModel<String> listStruct; private String nameTemplate; private String typeTemplate; + private String valueTemplate; private DefaultListModel<String> listTypedef; private int maxFontSize = 14; @@ -114,6 +115,7 @@ public class SysCAMSBlockDE extends TGCScalableWithInternalComponent implements setListStruct(new DefaultListModel<String>()); setNameTemplate(""); setTypeTemplate(""); + setValueTemplate(""); setListTypedef(new DefaultListModel<String>()); myImageIcon = IconManager.imgic1202; @@ -305,6 +307,7 @@ public class SysCAMSBlockDE extends TGCScalableWithInternalComponent implements sb.append("\" listStruct=\"" + splitParameters(getListStruct())); sb.append("\" nameTemplate=\"" + getNameTemplate()); sb.append("\" typeTemplate=\"" + getTypeTemplate()); + sb.append("\" valueTemplate=\"" + getValueTemplate()); sb.append("\" listTypedef=\"" + splitParameters(getListTypedef())); sb.append("\" />\n"); sb.append("</extraparam>\n"); @@ -430,7 +433,7 @@ public class SysCAMSBlockDE extends TGCScalableWithInternalComponent implements Node n1, n2; Element elt; - String code, nameFn, listStruct, nameTemplate, typeTemplate, listTypedef; + String code, nameFn, listStruct, nameTemplate, typeTemplate, valueTemplate, listTypedef; for(int i=0; i<nl.getLength(); i++) { n1 = nl.item(i); @@ -448,6 +451,7 @@ public class SysCAMSBlockDE extends TGCScalableWithInternalComponent implements listStruct = elt.getAttribute("listStruct"); nameTemplate = elt.getAttribute("nameTemplate"); typeTemplate = elt.getAttribute("typeTemplate"); + valueTemplate = elt.getAttribute("valueTemplate"); listTypedef = elt.getAttribute("listTypedef"); // setPeriod(period); // setTime(time); @@ -464,6 +468,7 @@ public class SysCAMSBlockDE extends TGCScalableWithInternalComponent implements setListStruct(lista); setNameTemplate(nameTemplate); setTypeTemplate(typeTemplate); + setValueTemplate(valueTemplate); String[] splitb = listTypedef.split("\\|"); DefaultListModel<String> listb = new DefaultListModel<String>(); for (String s : splitb) { @@ -574,6 +579,14 @@ public class SysCAMSBlockDE extends TGCScalableWithInternalComponent implements public void setTypeTemplate(String _typeTemplate) { typeTemplate = _typeTemplate; } + + public String getValueTemplate() { + return valueTemplate; + } + + public void setValueTemplate(String _valueTemplate) { + valueTemplate = _valueTemplate; + } public DefaultListModel<String> getListTypedef() { return listTypedef; @@ -582,4 +595,4 @@ public class SysCAMSBlockDE extends TGCScalableWithInternalComponent implements public void setListTypedef(DefaultListModel<String> _listTypedef) { listTypedef = _listTypedef; } -} \ No newline at end of file +} diff --git a/src/main/java/ui/syscams/SysCAMSBlockTDF.java b/src/main/java/ui/syscams/SysCAMSBlockTDF.java index 65ca8ee7a047e18f41c5663ed3246520ec71a25f..9076e8e147225dff390fc44945565b9e97254346 100644 --- a/src/main/java/ui/syscams/SysCAMSBlockTDF.java +++ b/src/main/java/ui/syscams/SysCAMSBlockTDF.java @@ -62,9 +62,11 @@ public class SysCAMSBlockTDF extends TGCScalableWithInternalComponent implements private double period; private String time; private String processCode; + private String constructorCode; private DefaultListModel<String> listStruct; private String nameTemplate; private String typeTemplate; + private String valueTemplate; private DefaultListModel<String> listTypedef; private int maxFontSize = 14; @@ -109,9 +111,11 @@ public class SysCAMSBlockTDF extends TGCScalableWithInternalComponent implements setPeriod(-1); setTime(""); setProcessCode("void processing() {\n\n}"); + setConstructorCode(""); setListStruct(new DefaultListModel<String>()); setNameTemplate(""); setTypeTemplate(""); + setValueTemplate(""); setListTypedef(new DefaultListModel<String>()); myImageIcon = IconManager.imgic1202; @@ -316,9 +320,11 @@ public class SysCAMSBlockTDF extends TGCScalableWithInternalComponent implements sb.append("<Attribute period=\"" + getPeriod()); sb.append("\" time=\"" + getTime()); sb.append("\" processCode=\"" + encode(getProcessCode())); + sb.append("\" constructorCode=\"" + encode(getConstructorCode())); sb.append("\" listStruct=\"" + splitParameters(getListStruct())); sb.append("\" nameTemplate=\"" + getNameTemplate()); sb.append("\" typeTemplate=\"" + getTypeTemplate()); + sb.append("\" valueTemplate=\"" + getValueTemplate()); sb.append("\" listTypedef=\"" + splitParameters(getListTypedef())); sb.append("\" />\n"); sb.append("</extraparam>\n"); @@ -448,7 +454,7 @@ public class SysCAMSBlockTDF extends TGCScalableWithInternalComponent implements Element elt; double period; - String time, processCode, listStruct, nameTemplate, typeTemplate, listTypedef; + String time, processCode, constructorCode, listStruct, nameTemplate, typeTemplate, valueTemplate, listTypedef; for(int i=0; i<nl.getLength(); i++) { n1 = nl.item(i); @@ -462,14 +468,18 @@ public class SysCAMSBlockTDF extends TGCScalableWithInternalComponent implements period = Double.valueOf(elt.getAttribute("period")).doubleValue(); time = elt.getAttribute("time"); processCode = elt.getAttribute("processCode"); + constructorCode = elt.getAttribute("constructorCode"); listStruct = elt.getAttribute("listStruct"); nameTemplate = elt.getAttribute("nameTemplate"); typeTemplate = elt.getAttribute("typeTemplate"); + valueTemplate = elt.getAttribute("valueTemplate"); listTypedef = elt.getAttribute("listTypedef"); setPeriod(period); setTime(time); processCode = decode(processCode).toString(); setProcessCode(processCode); + constructorCode = decode(constructorCode).toString(); + setConstructorCode(constructorCode); String[] splita = listStruct.split("\\|"); DefaultListModel<String> lista = new DefaultListModel<String>(); for (String s : splita) { @@ -480,6 +490,7 @@ public class SysCAMSBlockTDF extends TGCScalableWithInternalComponent implements setListStruct(lista); setNameTemplate(nameTemplate); setTypeTemplate(typeTemplate); + setValueTemplate(valueTemplate); String[] splitb = listTypedef.split("\\|"); DefaultListModel<String> listb = new DefaultListModel<String>(); for (String s : splitb) { @@ -591,6 +602,14 @@ public class SysCAMSBlockTDF extends TGCScalableWithInternalComponent implements public void setProcessCode(String _processCode) { processCode = _processCode; } + + public String getConstructorCode() { + return constructorCode; + } + + public void setConstructorCode(String _constructorCode) { + constructorCode = _constructorCode; + } public DefaultListModel<String> getListStruct() { return listStruct; @@ -607,7 +626,7 @@ public class SysCAMSBlockTDF extends TGCScalableWithInternalComponent implements public void setNameTemplate(String _nameTemplate) { nameTemplate = _nameTemplate; } - + public String getTypeTemplate() { return typeTemplate; } @@ -615,6 +634,14 @@ public class SysCAMSBlockTDF extends TGCScalableWithInternalComponent implements public void setTypeTemplate(String _typeTemplate) { typeTemplate = _typeTemplate; } + + public String getValueTemplate() { + return valueTemplate; + } + + public void setValueTemplate(String _valueTemplate) { + valueTemplate = _valueTemplate; + } public DefaultListModel<String> getListTypedef() { return listTypedef; diff --git a/src/main/java/ui/tmldd/TMLArchiBUSNode.java b/src/main/java/ui/tmldd/TMLArchiBUSNode.java index 61b4eb4e1628a6d09f40f44657212a531d7a0b7c..63f7fa95863e4be78df2c8be9dbc8ea266c95099 100755 --- a/src/main/java/ui/tmldd/TMLArchiBUSNode.java +++ b/src/main/java/ui/tmldd/TMLArchiBUSNode.java @@ -42,6 +42,7 @@ package ui.tmldd; import myutil.GraphicLib; +import myutil.TraceManager; import org.w3c.dom.Element; import org.w3c.dom.Node; import org.w3c.dom.NodeList; @@ -222,6 +223,8 @@ public class TMLArchiBUSNode extends TMLArchiCommunicationNode implements Swallo GraphicLib.centerOnParent(dialog, 500, 450); dialog.setVisible( true ); // blocked until dialog has been closed + TraceManager.addDev("Bus 1"); + if (!dialog.isRegularClose()) { return false; } diff --git a/src/main/java/ui/tmldd/TMLArchiCPUNode.java b/src/main/java/ui/tmldd/TMLArchiCPUNode.java index 6c1c1ba8aa670f04294c5d07255179e95b45a347..48729f628ca235f445fea9fec4bcde812457b7cb 100755 --- a/src/main/java/ui/tmldd/TMLArchiCPUNode.java +++ b/src/main/java/ui/tmldd/TMLArchiCPUNode.java @@ -39,7 +39,9 @@ package ui.tmldd; + import myutil.GraphicLib; +import myutil.TraceManager; import org.w3c.dom.Element; import org.w3c.dom.Node; import org.w3c.dom.NodeList; @@ -195,14 +197,18 @@ public class TMLArchiCPUNode extends TMLArchiNode implements SwallowTGComponent, JDialogCPUNode dialog = new JDialogCPUNode(getTDiagramPanel().getMainGUI(), frame, "Setting CPU attributes", this, MECType, transactions); dialog.setSize(500, 450); GraphicLib.centerOnParent(dialog, 500, 450); - // dialog.show(); // blocked until dialog has been closed - dialog.setVisible(true); + dialog.setVisible(true); // blocked until dialog has been closed + MECType = dialog.getMECType(); + //TraceManager.addDev("CPU core 1"); + if (!dialog.isRegularClose()) { return false; } + //TraceManager.addDev("CPU core 2"); + if (dialog.getNodeName().length() != 0) { tmpName = dialog.getNodeName(); tmpName = tmpName.trim(); @@ -213,6 +219,7 @@ public class TMLArchiCPUNode extends TMLArchiNode implements SwallowTGComponent, name = tmpName; } } + // TraceManager.addDev("CPU core 3"); schedulingPolicy = dialog.getSchedulingPolicy(); if (schedulingPolicy == HwCPU.BASIC_ROUND_ROBIN) { @@ -238,18 +245,21 @@ public class TMLArchiCPUNode extends TMLArchiNode implements SwallowTGComponent, } } + //TraceManager.addDev("CPU core 4"); + if (dialog.getNbOfCores().length() != 0) { try { tmp = nbOfCores; nbOfCores = Integer.decode(dialog.getNbOfCores()).intValue(); + TraceManager.addDev("Nb of cores=" + nbOfCores); if (nbOfCores <= 0) { nbOfCores = tmp; error = true; - errors += "Data size "; + errors += "Nb of cores "; } } catch (Exception e) { error = true; - errors += "Data size "; + errors += "nb of cores "; } } @@ -495,6 +505,8 @@ public class TMLArchiCPUNode extends TMLArchiNode implements SwallowTGComponent, // try { + //TraceManager.addDev("Extra param of CPU node " + this.getValue()); + NodeList nli; Node n1, n2; Element elt; @@ -525,10 +537,15 @@ public class TMLArchiCPUNode extends TMLArchiNode implements SwallowTGComponent, } if (elt.getTagName().equals("attributes")) { + //TraceManager.addDev("LOADING attributes"); + + try { // the "try" statement is for retro compatibility nbOfCores = Integer.decode(elt.getAttribute("nbOfCores")).intValue(); + //TraceManager.addDev("Setting cores to:" + nbOfCores); } catch (Exception e) { + //TraceManager.addDev("Coud not load number of cores"); } byteDataSize = Integer.decode(elt.getAttribute("byteDataSize")).intValue(); schedulingPolicy = Integer.decode(elt.getAttribute("schedulingPolicy")).intValue(); diff --git a/src/main/java/ui/util/DefaultText.java b/src/main/java/ui/util/DefaultText.java index fad51f872775e573ca516f63b258bad1f9612b43..2716e96a110e922a41e2b8903ca68f47d464305c 100755 --- a/src/main/java/ui/util/DefaultText.java +++ b/src/main/java/ui/util/DefaultText.java @@ -50,8 +50,8 @@ package ui.util; */ public class DefaultText { - public static String BUILD = "12999"; - public static String DATE = "2019/04/04 03:02:15 CET"; + public static String BUILD = "13004"; + public static String DATE = "2019/04/09 03:06:23 CET"; public static StringBuffer sbAbout = makeAbout(); diff --git a/src/main/java/ui/window/JDialogCPUNode.java b/src/main/java/ui/window/JDialogCPUNode.java index c107353143d6f690b049851c8bb4784c6e73dd83..83c4ef59dcd125698b0ef3913666c5be0627ab91 100644 --- a/src/main/java/ui/window/JDialogCPUNode.java +++ b/src/main/java/ui/window/JDialogCPUNode.java @@ -577,6 +577,7 @@ public class JDialogCPUNode extends JDialogBase implements ActionListener { } public void closeDialog() { + //TraceManager.addDev("Save and close"); regularClose = true; MECType = ArchUnitMEC.Types.get( MECTypeCB.getSelectedIndex() ); dispose(); @@ -586,6 +587,8 @@ public class JDialogCPUNode extends JDialogBase implements ActionListener { } public void cancelDialog() { + + //TraceManager.addDev("Cancel dialog"); dispose(); if ((cpuHelp != null) && cpuHelp.isVisible()) { cpuHelp.setVisible(false); @@ -593,6 +596,8 @@ public class JDialogCPUNode extends JDialogBase implements ActionListener { } public boolean isRegularClose() { + + TraceManager.addDev("regularclose=" + regularClose); return regularClose; } diff --git a/src/main/java/ui/window/JDialogSelectSysCAMSComponent.java b/src/main/java/ui/window/JDialogSelectSysCAMSComponent.java index ac3c8ab3b30744310a7044834f06b045b56e521b..92443e49dc7106d60c103a708bb4fcbd4fd3a163 100644 --- a/src/main/java/ui/window/JDialogSelectSysCAMSComponent.java +++ b/src/main/java/ui/window/JDialogSelectSysCAMSComponent.java @@ -81,7 +81,7 @@ public class JDialogSelectSysCAMSComponent extends JDialogBase implements Action private JButton allIgnored; protected JCheckBox optimize; - /* Creates new form */ + /** Creates new form */ public JDialogSelectSysCAMSComponent(Frame f, Vector<TGComponent> _back, List<TGComponent> componentList, String title) { super(f, title, true); @@ -132,7 +132,7 @@ public class JDialogSelectSysCAMSComponent extends JDialogBase implements Action for(int i=0; i<list.size(); i++) { tgc = list.get(i); - // + // if (tgc instanceof SysCAMSBlockTDF) { v.addElement(tgc); } @@ -164,7 +164,7 @@ public class JDialogSelectSysCAMSComponent extends JDialogBase implements Action if (((tgc instanceof SysCAMSBlockTDF) || (tgc instanceof SysCAMSBlockDE)) && (!added.contains(tgc)) && (!notSource.contains(tgc))){ added.addElement( tgc ) ; - // + // } } } diff --git a/src/main/java/ui/window/JDialogSysCAMSBlockDE.java b/src/main/java/ui/window/JDialogSysCAMSBlockDE.java index 6096eb29035e5b2ca4cd28d8ee7428f9356ef071..516e328e0ab4bb4c446e5cf7e5d9f7c539c64850 100644 --- a/src/main/java/ui/window/JDialogSysCAMSBlockDE.java +++ b/src/main/java/ui/window/JDialogSysCAMSBlockDE.java @@ -75,6 +75,7 @@ public class JDialogSysCAMSBlockDE extends JDialog implements ActionListener, Li private DefaultListModel<String> structListModel; private boolean structBool = false; private JTextField nameTemplateTextField; + private JTextField valueTemplateTextField; private String listTypeTemplateString[]; private JComboBox<String> typeTemplateComboBoxString; private JTextField nameTypedefTextField; @@ -394,15 +395,35 @@ public class JDialogSysCAMSBlockDE extends JDialog implements ActionListener, Li new Insets(5, 10, 5, 10), 0, 0); templateGridBag.setConstraints(nameTemplateTextField, templateConstraint); templatePanel.add(nameTemplateTextField); + + //CHANGES + JLabel egalTemplateLabel = new JLabel("="); + templateConstraint = new GridBagConstraints(1, 1, 1, 1, 1.0, 1.0, GridBagConstraints.CENTER, GridBagConstraints.HORIZONTAL, + new Insets(5, 10, 5, 10), 0, 0); + templateGridBag.setConstraints(egalTemplateLabel, templateConstraint); + templatePanel.add(egalTemplateLabel); + + JLabel valueTemplateLabel = new JLabel("value"); + templateConstraint = new GridBagConstraints(2, 0, 1, 1, 1.0, 1.0, GridBagConstraints.CENTER, GridBagConstraints.HORIZONTAL, + new Insets(5, 10, 5, 10), 0, 0); + templateGridBag.setConstraints(valueTemplateLabel, templateConstraint); + templatePanel.add(valueTemplateLabel); + + valueTemplateTextField = new JTextField(block.getValueTemplate()); + templateConstraint = new GridBagConstraints(2, 1, 1, 1, 1.0, 1.0, GridBagConstraints.CENTER, GridBagConstraints.HORIZONTAL, + new Insets(5, 10, 5, 10), 0, 0); + templateGridBag.setConstraints(valueTemplateTextField, templateConstraint); + templatePanel.add(valueTemplateTextField); + //CHANGES JLabel pointsTemplateLabel = new JLabel(":"); - templateConstraint = new GridBagConstraints(1, 1, 1, 1, 1.0, 1.0, GridBagConstraints.CENTER, GridBagConstraints.HORIZONTAL, + templateConstraint = new GridBagConstraints(3, 1, 1, 1, 1.0, 1.0, GridBagConstraints.CENTER, GridBagConstraints.HORIZONTAL, new Insets(5, 10, 5, 10), 0, 0); templateGridBag.setConstraints(pointsTemplateLabel, templateConstraint); templatePanel.add(pointsTemplateLabel); JLabel typeTemplateLabel = new JLabel("type"); - templateConstraint = new GridBagConstraints(2, 0, 1, 1, 1.0, 1.0, GridBagConstraints.CENTER, GridBagConstraints.HORIZONTAL, + templateConstraint = new GridBagConstraints(4, 0, 1, 1, 1.0, 1.0, GridBagConstraints.CENTER, GridBagConstraints.HORIZONTAL, new Insets(5, 10, 5, 10), 0, 0); templateGridBag.setConstraints(typeTemplateLabel, templateConstraint); templatePanel.add(typeTemplateLabel); @@ -414,7 +435,7 @@ public class JDialogSysCAMSBlockDE extends JDialog implements ActionListener, Li typeTemplateComboBoxString.setSelectedIndex(0); } typeTemplateComboBoxString.addActionListener(this); - templateConstraint = new GridBagConstraints(2, 1, 1, 1, 1.0, 1.0, GridBagConstraints.CENTER, GridBagConstraints.HORIZONTAL, + templateConstraint = new GridBagConstraints(4, 1, 1, 1, 1.0, 1.0, GridBagConstraints.CENTER, GridBagConstraints.HORIZONTAL, new Insets(5, 10, 5, 10), 0, 0); templateGridBag.setConstraints(typeTemplateComboBoxString, templateConstraint); templatePanel.add(typeTemplateComboBoxString); @@ -1005,8 +1026,8 @@ public class JDialogSysCAMSBlockDE extends JDialog implements ActionListener, Li block.setListStruct(structListModel); block.setNameTemplate(nameTemplateTextField.getText()); block.setTypeTemplate((String) typeTemplateComboBoxString.getSelectedItem()); + block.setValueTemplate(valueTemplateTextField.getText()); block.setListTypedef(typedefListModel); - block.setNameFn(nameFnTextField.getText()); block.setCode(codeTextArea.getText()); } @@ -1111,4 +1132,4 @@ public class JDialogSysCAMSBlockDE extends JDialog implements ActionListener, Li } } } -} \ No newline at end of file +} diff --git a/src/main/java/ui/window/JDialogSysCAMSBlockTDF.java b/src/main/java/ui/window/JDialogSysCAMSBlockTDF.java index 1a05043233513cbe84c1a4aa608859044baf3ef6..6073e921f05c96170da504af6bb03267dcefb5b7 100644 --- a/src/main/java/ui/window/JDialogSysCAMSBlockTDF.java +++ b/src/main/java/ui/window/JDialogSysCAMSBlockTDF.java @@ -74,6 +74,7 @@ public class JDialogSysCAMSBlockTDF extends JDialog implements ActionListener, L private DefaultListModel<String> structListModel; private boolean structBool = false; private JTextField nameTemplateTextField; + private JTextField valueTemplateTextField; private String listTypeTemplateString[]; private JComboBox<String> typeTemplateComboBoxString; private JTextField nameTypedefTextField; @@ -89,6 +90,7 @@ public class JDialogSysCAMSBlockTDF extends JDialog implements ActionListener, L private JTextArea processCodeTextArea; private String finalString; + private JTextArea constructorCodeTextArea; private SysCAMSBlockTDF block; @@ -190,9 +192,11 @@ public class JDialogSysCAMSBlockTDF extends JDialog implements ActionListener, L JPanel attributesMainPanel = new JPanel(); JPanel parametersMainPanel = new JPanel(); JPanel processMainPanel = new JPanel(); + JPanel contructorMainPanel = new JPanel(); tabbedPane.add("Attributes", attributesMainPanel); tabbedPane.add("Parameters", parametersMainPanel); tabbedPane.add("Process Code", processMainPanel); + tabbedPane.add("Contructor Code", contructorMainPanel); mainPanel.add(tabbedPane, BorderLayout.NORTH); @@ -387,15 +391,35 @@ public class JDialogSysCAMSBlockTDF extends JDialog implements ActionListener, L new Insets(5, 10, 5, 10), 0, 0); templateGridBag.setConstraints(nameTemplateTextField, templateConstraint); templatePanel.add(nameTemplateTextField); + + //CHANGES + JLabel egalTemplateLabel = new JLabel("="); + templateConstraint = new GridBagConstraints(1, 1, 1, 1, 1.0, 1.0, GridBagConstraints.CENTER, GridBagConstraints.HORIZONTAL, + new Insets(5, 10, 5, 10), 0, 0); + templateGridBag.setConstraints(egalTemplateLabel, templateConstraint); + templatePanel.add(egalTemplateLabel); + + JLabel valueTemplateLabel = new JLabel("value"); + templateConstraint = new GridBagConstraints(2, 0, 1, 1, 1.0, 1.0, GridBagConstraints.CENTER, GridBagConstraints.HORIZONTAL, + new Insets(5, 10, 5, 10), 0, 0); + templateGridBag.setConstraints(valueTemplateLabel, templateConstraint); + templatePanel.add(valueTemplateLabel); + + valueTemplateTextField = new JTextField(block.getValueTemplate()); + templateConstraint = new GridBagConstraints(2, 1, 1, 1, 1.0, 1.0, GridBagConstraints.CENTER, GridBagConstraints.HORIZONTAL, + new Insets(5, 10, 5, 10), 0, 0); + templateGridBag.setConstraints(valueTemplateTextField, templateConstraint); + templatePanel.add(valueTemplateTextField); + //CHANGES JLabel pointsTemplateLabel = new JLabel(":"); - templateConstraint = new GridBagConstraints(1, 1, 1, 1, 1.0, 1.0, GridBagConstraints.CENTER, GridBagConstraints.HORIZONTAL, + templateConstraint = new GridBagConstraints(3, 1, 1, 1, 1.0, 1.0, GridBagConstraints.CENTER, GridBagConstraints.HORIZONTAL, new Insets(5, 10, 5, 10), 0, 0); templateGridBag.setConstraints(pointsTemplateLabel, templateConstraint); templatePanel.add(pointsTemplateLabel); JLabel typeTemplateLabel = new JLabel("type"); - templateConstraint = new GridBagConstraints(2, 0, 1, 1, 1.0, 1.0, GridBagConstraints.CENTER, GridBagConstraints.HORIZONTAL, + templateConstraint = new GridBagConstraints(4, 0, 1, 1, 1.0, 1.0, GridBagConstraints.CENTER, GridBagConstraints.HORIZONTAL, new Insets(5, 10, 5, 10), 0, 0); templateGridBag.setConstraints(typeTemplateLabel, templateConstraint); templatePanel.add(typeTemplateLabel); @@ -407,7 +431,7 @@ public class JDialogSysCAMSBlockTDF extends JDialog implements ActionListener, L typeTemplateComboBoxString.setSelectedIndex(0); } typeTemplateComboBoxString.addActionListener(this); - templateConstraint = new GridBagConstraints(2, 1, 1, 1, 1.0, 1.0, GridBagConstraints.CENTER, GridBagConstraints.HORIZONTAL, + templateConstraint = new GridBagConstraints(4, 1, 1, 1, 1.0, 1.0, GridBagConstraints.CENTER, GridBagConstraints.HORIZONTAL, new Insets(5, 10, 5, 10), 0, 0); templateGridBag.setConstraints(typeTemplateComboBoxString, templateConstraint); templatePanel.add(typeTemplateComboBoxString); @@ -608,7 +632,39 @@ public class JDialogSysCAMSBlockTDF extends JDialog implements ActionListener, L codeBox.add(codeBoxPanel); processMainPanel.add(codeBox, BorderLayout.PAGE_START); - + + // --- ContructorCode --- // + contructorMainPanel.setLayout(new BorderLayout()); + + Box codeBox2 = Box.createVerticalBox(); + codeBox2.setBorder(BorderFactory.createTitledBorder("Contructor code of TDF block")); + + JPanel codeBoxPanel2 = new JPanel(new BorderLayout()); + + //StringBuffer stringbuf2 = encode(block.getConstructorCode()); + //String beginString2 = stringbuf2.toString(); + //finalString = beginString2.replaceAll("\t}", "}"); + finalString = block.getConstructorCode(); + + constructorCodeTextArea = new JTextArea(finalString); + constructorCodeTextArea.setSize(100, 100); + constructorCodeTextArea.setTabSize(2); + + constructorCodeTextArea.setFont(new Font("Arial", Font.PLAIN, 16)); + constructorCodeTextArea.setLineWrap(true); + constructorCodeTextArea.setWrapStyleWord(true); + + JScrollPane constructorScrollPane = new JScrollPane(constructorCodeTextArea); + constructorScrollPane.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_ALWAYS); + constructorScrollPane.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_ALWAYS); + constructorScrollPane.setPreferredSize(new Dimension(200, 300)); + constructorScrollPane.setBorder(new EmptyBorder(15, 10, 15, 10)); + + codeBoxPanel2.add(constructorScrollPane, BorderLayout.SOUTH); + + codeBox2.add(codeBoxPanel2); + contructorMainPanel.add(codeBox2, BorderLayout.PAGE_START); + // --- Button --- // JPanel downPanel = new JPanel(new FlowLayout()); @@ -954,9 +1010,11 @@ public class JDialogSysCAMSBlockTDF extends JDialog implements ActionListener, L } block.setProcessCode(processCodeTextArea.getText()); + block.setConstructorCode(constructorCodeTextArea.getText()); block.setListStruct(structListModel); block.setNameTemplate(nameTemplateTextField.getText()); block.setTypeTemplate((String) typeTemplateComboBoxString.getSelectedItem()); + block.setValueTemplate(valueTemplateTextField.getText()); block.setListTypedef(typedefListModel); this.dispose(); diff --git a/src/main/java/ui/window/JDialogSysCAMSExecutableCodeGeneration.java b/src/main/java/ui/window/JDialogSysCAMSExecutableCodeGeneration.java index c5c80dd0739270ae2bfee31a50ececaca37d6352..82f4e5f816819cb97363a340fea506283a260212 100644 --- a/src/main/java/ui/window/JDialogSysCAMSExecutableCodeGeneration.java +++ b/src/main/java/ui/window/JDialogSysCAMSExecutableCodeGeneration.java @@ -109,7 +109,8 @@ public class JDialogSysCAMSExecutableCodeGeneration extends javax.swing.JFrame i private static int mode; - + Boolean standalone; //are there any GPIO blocks? + //components protected JTextArea jta; protected JButton start; @@ -508,7 +509,8 @@ public class JDialogSysCAMSExecutableCodeGeneration extends javax.swing.JFrame i // String cmd; // String list;//, data; hasError = false; - + Boolean has_GPIO = false; + try { if (jp1.getSelectedIndex() == 0) { Vector<SysCAMSComponentTaskDiagramPanel> syscamsDiagramPanels = mgui.getListSysCAMSPanel(); @@ -520,13 +522,9 @@ public class JDialogSysCAMSExecutableCodeGeneration extends javax.swing.JFrame i } else { jta.append("\nPerforming Validation for \""+(syscalsspec.getCluster()).getClusterName()+"\".\n"); LinkedList<SysCAMSTConnector> connectors = syscalsspec.getAllConnectorsCluster4Matrix(); - System.out.printf("Connectors4matrix for 1 cluster = %d.\n", connectors.size()); LinkedList<SysCAMSTBlockTDF> tdfBlocks = syscalsspec.getAllBlockTDF(); - System.out.printf("Blocks for 1 cluster = %d.\n", tdfBlocks.size()); LinkedList<SysCAMSTConnector> connectorsTdfDe = syscalsspec.getAllConnectorsTdfDe(); - System.out.printf("ConnectorsTdfDe for 1 cluster = %d.\n", connectorsTdfDe.size()); - LinkedList<SysCAMSTConnector> allConnectors = syscalsspec.getAllConnectorsCluster4Soclib(); - System.out.printf("All Connectors for 1 cluster = %d.\n", allConnectors.size()); + LinkedList<SysCAMSTConnector> allConnectors = syscalsspec.getAllConnectors(); LinkedList<SysCAMSTBlockDE> deBlocks = syscalsspec.getAllBlockDE(); LinkedList<SysCAMSTBlockGPIO2VCI> gpioBlocks = syscalsspec.getAllBlockGPIO2VCI(); //Validate that all ports are connected @@ -539,8 +537,15 @@ public class JDialogSysCAMSExecutableCodeGeneration extends javax.swing.JFrame i nbPorts += deBlock.getPortDE().size(); } for(SysCAMSTBlockGPIO2VCI gpioBlock : gpioBlocks) { + has_GPIO=true;//DG + //System.out.println("@@@@ I got here @@@"); nbPorts += gpioBlock.getPortDE().size(); } + if(has_GPIO==true) + standalone=false; + else + standalone=true; + if(nbPorts != (allConnectors.size()*2)) { jta.append("Error: There are unconnected ports.\n"); throw new InterruptedException(); @@ -577,53 +582,140 @@ public class JDialogSysCAMSExecutableCodeGeneration extends javax.swing.JFrame i //Validate Block parameters (rate, Tp, Tm, Delay) and propagate timesteps to all blocks //try { propagateTimestep(connectorsTdfDe, tdfBlocks); - - //TODO-DELETE THIS, after debugging: - for(SysCAMSTBlockTDF tdfBlock : tdfBlocks) { - System.out.println("params of Block: " +tdfBlock.getName()); - System.out.println("Tm: " + tdfBlock.getPeriod()); - for(SysCAMSTPortTDF portTdf : tdfBlock.getPortTDF()) { - System.out.println("Port: " + portTdf.getName()); - System.out.println("Tp: " + portTdf.getPeriod()); - System.out.println("Rate: " + portTdf.getRate()); - System.out.println("Delay: " + portTdf.getDelay()); - } - - for(SysCAMSTPortConverter portConverter : tdfBlock.getPortConverter()) { - System.out.println("Port: " + portConverter.getName()); - System.out.println("Tp: " + portConverter.getPeriod()); - System.out.println("Rate: " + portConverter.getRate()); - System.out.println("Delay: " + portConverter.getDelay()); + if(tdfBlocks.size() == 1) { + if(connectors.size() > 0) { //Case when self-loops exist. + for(int i = 0; i < connectors.size(); i++) { + if( (((SysCAMSTPortTDF) connectors.get(i).get_p1().getComponent()).getDelay() + ((SysCAMSTPortTDF) connectors.get(i).get_p2().getComponent()).getDelay()) < ((SysCAMSTPortTDF) connectors.get(i).get_p1().getComponent()).getRate() ) { + jta.append("Static schedule can not be computed due to missing delays in loops.\n"); + jta.append("The following delays are suggested:\n"); + jta.append("In Port: \"" + ((SysCAMSTPortTDF) connectors.get(i).get_p1().getComponent()).getName() + "\". Insert delay of " + ((SysCAMSTPortTDF) connectors.get(i).get_p1().getComponent()).getRate() + "\n"); + } + + } + if(allConnectors.size() > 0) { //Case when connections to DE exist. + boolean recompute = false; + boolean suggest_delays = false; + double[] time_prev = {0.0, 0.0}; //array to store "in" ([0]) and "out" ([1]) previous times + do{ + try { + for(SysCAMSTBlockTDF tdfBlock : tdfBlocks){ + tdfBlock.syncTDFBlockDEBlock(time_prev); + } + recompute = false; + + } catch (SysCAMSValidateException se) { + recompute = true; + suggest_delays = true; + //System.out.println("Causality exception: " + se.getMessage()); + } + } while (recompute); + if(suggest_delays){ + jta.append("The following delays are suggested to solve synchronization issues between DE and TDF modules:\n"); + for(SysCAMSTBlockTDF tdfBlock : tdfBlocks){ + for(SysCAMSTPortConverter portConverter : tdfBlock.getPortConverter()) { + if(portConverter.getRecompute()){ + jta.append("In Block: \"" + tdfBlock.getName() + "\". Port: \"" + portConverter.getName() + "\". Insert delay of " + portConverter.getDelay() + "\n"); + } + } + } + } + } + } else if(allConnectors.size() > 0) { //Case when connections to DE exist - no self-loops + boolean recompute = false; + boolean suggest_delays = false; + double[] time_prev = {0.0, 0.0}; //array to store "in" ([0]) and "out" ([1]) previous times + do{ + try { + for(SysCAMSTBlockTDF tdfBlock : tdfBlocks){ + tdfBlock.syncTDFBlockDEBlock(time_prev); + } + recompute = false; + + } catch (SysCAMSValidateException se) { + recompute = true; + suggest_delays = true; + //System.out.println("Causality exception: " + se.getMessage()); + } + } while (recompute); + if(suggest_delays){ + jta.append("The following delays are suggested to solve synchronization issues between DE and TDF modules:\n"); + for(SysCAMSTBlockTDF tdfBlock : tdfBlocks){ + for(SysCAMSTPortConverter portConverter : tdfBlock.getPortConverter()) { + if(portConverter.getRecompute()){ + jta.append("In Block: \"" + tdfBlock.getName() + "\". Port: \"" + portConverter.getName() + "\". Insert delay of " + portConverter.getDelay() + "\n"); + } + } + } + } } - } - - //TODO: verify trivial case when only 1 block and no connectors. - if(connectors.size() > 0) { - boolean recompute = false; + } else if(connectors.size() > 0) { //Case for more than 1 TDF block. + boolean[] recompute = {false, false}; //[0]-for sync issues [1]-for loop delays boolean suggest_delays = false; + boolean suggest_delays_loops = false; + SysCAMSTPortTDF tdfPort1; + SysCAMSTPortTDF tdfPort2; RealVector buffer = new ArrayRealVector(connectors.size()); RealVectorFormat printFormat = new RealVectorFormat(); RealMatrix topologyMatrix = buildTopologyMatrix(connectors, tdfBlocks, buffer); - System.out.println("Buffer after topMatrix is: " + printFormat.format(buffer) ); - //try { RealVector execRate = solveTopologyMatrix(topologyMatrix, tdfBlocks); - //TODO: to recompute missing delays in loops: modify buffer with the suggested delay, and loop. do { recompute = computeSchedule(execRate, topologyMatrix, buffer, tdfBlocks, connectors); - if(recompute) + if(recompute[0]) suggest_delays = true; - } while (recompute); - if(suggest_delays){ + if(recompute[1]) { + RealVector bufferLoopDelays = new ArrayRealVector(connectors.size()); + bufferLoopDelays = rebuildBuffer(connectors, tdfBlocks, bufferLoopDelays); + buffer = bufferLoopDelays.copy(); + suggest_delays_loops = true; + } + } while (recompute[0] || recompute[1]); + + if(suggest_delays_loops) { + jta.append("Static schedule can not be computed due to missing delays in loops.\n"); + jta.append("The following delays are suggested:\n"); + for(SysCAMSTBlockTDF tdfBlock : tdfBlocks){ + for(SysCAMSTPortTDF tdfPort : tdfBlock.getPortTDF()) { + if(tdfPort.getRecompute()){ + jta.append("In Block: \"" + tdfBlock.getName() + "\". Port: \"" + tdfPort.getName() + "\". Insert delay of " + tdfPort.getDelay() + "\n"); + } + } + for(int j = 0; j < connectors.size(); j++) { + tdfPort1 = ((SysCAMSTPortTDF) connectors.get(j).get_p1().getComponent()); + tdfPort2 = ((SysCAMSTPortTDF) connectors.get(j).get_p2().getComponent()); + if( tdfPort1.getBlockTDF().getName().equals(tdfBlock.getName()) && tdfPort2.getBlockTDF().getName().equals(tdfBlock.getName()) ) { + if( (tdfPort1.getDelay() + tdfPort2.getDelay()) < tdfPort1.getRate() ) { + jta.append("In Block: \"" + tdfBlock.getName() + "\". Port: \"" + tdfPort1.getName() + "\". Insert delay of " + tdfPort1.getRate() + "\n"); + } + } + } + } + } else { + for(SysCAMSTBlockTDF tdfBlock : tdfBlocks){ + for(int j = 0; j < connectors.size(); j++) { + tdfPort1 = ((SysCAMSTPortTDF) connectors.get(j).get_p1().getComponent()); + tdfPort2 = ((SysCAMSTPortTDF) connectors.get(j).get_p2().getComponent()); + if( tdfPort1.getBlockTDF().getName().equals(tdfBlock.getName()) && tdfPort2.getBlockTDF().getName().equals(tdfBlock.getName()) ) { + if( (tdfPort1.getDelay() + tdfPort2.getDelay()) < tdfPort1.getRate() ) { + jta.append("Static schedule can not be computed due to missing delays in loops.\n"); + jta.append("The following delays are suggested:\n"); + jta.append("In Block: \"" + tdfBlock.getName() + "\". Port: \"" + tdfPort1.getName() + "\". Insert delay of " + tdfPort1.getRate() + "\n"); + } + } + } + } + } + + if(suggest_delays) { jta.append("The following delays are suggested to solve synchronization issues between DE and TDF modules:\n"); for(SysCAMSTBlockTDF tdfBlock : tdfBlocks){ for(SysCAMSTPortConverter portConverter : tdfBlock.getPortConverter()) { - if(portConverter.getRecompute()){ + if(portConverter.getRecompute()) { jta.append("In Block: \"" + tdfBlock.getName() + "\". Port: \"" + portConverter.getName() + "\". Insert delay of " + portConverter.getDelay() + "\n"); } } } } - } + } jta.append("Validation for \""+(syscalsspec.getCluster()).getClusterName()+"\" completed.\n"); } catch (InterruptedException ie) { System.err.println("Interrupted"); @@ -631,7 +723,6 @@ public class JDialogSysCAMSExecutableCodeGeneration extends javax.swing.JFrame i mode = STOPPED; setButtons(); hasError = true; - //return; } catch (Exception e) { e.printStackTrace(); mode = STOPPED; @@ -675,9 +766,9 @@ public class JDialogSysCAMSExecutableCodeGeneration extends javax.swing.JFrame i System.err.println("Saving SysCAMS code in files\n"); pathCode = code2.getText(); - System.err.println("SYSCAMS TOPCELL : " + syscalsspec.getCluster().getClusterName() + "saved in " + code2.getText()); - topCellGenerator.saveFile(pathCode); - topCellGeneratorCluster.saveFile(pathCode); + System.err.println("SYSCAMS TOPCELL : " + syscalsspec.getCluster().getClusterName() + " saved in " + code2.getText()); + topCellGenerator.saveFile(pathCode, standalone); + topCellGeneratorCluster.saveFile(pathCode, standalone); jta.append("Code saved\n"); } catch (Exception e) { @@ -909,7 +1000,7 @@ public class JDialogSysCAMSExecutableCodeGeneration extends javax.swing.JFrame i } } } - jta.append("Error: At least one Module or Port Timestep should be entered in at least one TDF block of this cluster.\n"); + jta.append("Error: At least one Module Timestep or Port Timestep should be entered in at least one TDF block of this cluster.\n"); throw new InterruptedException(); } @@ -941,7 +1032,7 @@ public class JDialogSysCAMSExecutableCodeGeneration extends javax.swing.JFrame i if(tp > 0) { //validate timestep consistency (rate*tp == tm) if(rate*tp != tm){ - jta.append("Error: In block \""+tdfBlock.getName()+ "\" Timestep Tm is inconsistent with timestep Tp of port \"" + tdfPort.getName()+"\".\n"); + jta.append("Error while propagating Timesteps: In block \""+tdfBlock.getName()+ "\" Timestep Tm is inconsistent with Rate or timestep Tp of port \"" + tdfPort.getName()+"\".\n"); return false; } } else { @@ -962,8 +1053,8 @@ public class JDialogSysCAMSExecutableCodeGeneration extends javax.swing.JFrame i } else { //validate timestep consitency between 2 ports. if(p2_tdfPort.getPeriod() != tp) { - jta.append("Error: In block \""+tdfBlock.getName()+"\" Timestep Tp of port \"" +tdfPort.getName() - + "\" is inconsistent with timestep Tp of port \"" + p2_tdfPort.getName()+"\" from block \""+p2_tdfPort.getBlockTDF().getName()+"\".\n"); + jta.append("Error while propagating Timesteps: In block \""+tdfBlock.getName()+"\" Rate or Timestep Tp of port \"" +tdfPort.getName() + + "\" is inconsistent with Rate or timestep Tp of port \"" + p2_tdfPort.getName()+"\" from block \""+p2_tdfPort.getBlockTDF().getName()+"\".\n"); return false; } //if connected block was not visited yet, then propagate timestep @@ -982,8 +1073,8 @@ public class JDialogSysCAMSExecutableCodeGeneration extends javax.swing.JFrame i } else { //validate timestep consitency between 2 ports. if(p1_tdfPort.getPeriod() != tp) { - jta.append("Error: In block \""+tdfBlock.getName()+"\" Timestep Tp of port \"" +tdfPort.getName() - + "\" is inconsistent with timestep Tp of port \"" + p1_tdfPort.getName()+"\" from block \""+p1_tdfPort.getBlockTDF().getName()+"\".\n"); + jta.append("Error while propagating Timesteps: In block \""+tdfBlock.getName()+"\" Rate or Timestep Tp of port \"" +tdfPort.getName() + + "\" is inconsistent with Rate or timestep Tp of port \"" + p1_tdfPort.getName()+"\" from block \""+p1_tdfPort.getBlockTDF().getName()+"\".\n"); return false; } //if connected block was not visited yet, then propagate timestep @@ -1004,7 +1095,7 @@ public class JDialogSysCAMSExecutableCodeGeneration extends javax.swing.JFrame i if(tp > 0) { //validate timestep consistency (rate*tp == tm) if(rate*tp != tm){ - jta.append("Error: In block \""+tdfBlock.getName()+ "\" Timestep Tm is inconsistent with timestep Tp of port \"" + converterPort.getName()+"\".\n"); + jta.append("Error while propagating Timesteps: In block \""+tdfBlock.getName()+ "\" Timestep Tm is inconsistent with Rate or timestep Tp of port \"" + converterPort.getName()+"\".\n"); return false; } } else { @@ -1029,7 +1120,7 @@ public class JDialogSysCAMSExecutableCodeGeneration extends javax.swing.JFrame i int rate = tdfPort.getRate(); if(tm > 0) { if(rate*tp != tm) { - jta.append("Error: In block \""+tdfBlock.getName()+ "\" Timestep Tm is inconsistent with timestep Tp of port \"" + tdfPort.getName()+"\".\n"); + jta.append("Error while propagating Timesteps: In block \""+tdfBlock.getName()+ "\" Timestep Tm is inconsistent with Rate or timestep Tp of port \"" + tdfPort.getName()+"\".\n"); return false; } } else { @@ -1046,7 +1137,7 @@ public class JDialogSysCAMSExecutableCodeGeneration extends javax.swing.JFrame i int rate = converterPort.getRate(); if(tm > 0) { if(rate*tp != tm) { - jta.append("Error: In block \""+tdfBlock.getName()+ "\" Timestep Tm is inconsistent with timestep Tp of port \"" + converterPort.getName()+"\".\n"); + jta.append("Error while propagating Timesteps: In block \""+tdfBlock.getName()+ "\" Timestep Tm is inconsistent with Rate or timestep Tp of port \"" + converterPort.getName()+"\".\n"); return false; } } else { @@ -1061,14 +1152,21 @@ public class JDialogSysCAMSExecutableCodeGeneration extends javax.swing.JFrame i double [][] tArray = new double[connectors.size()][blocks.size()]; for(int i = 0; i < connectors.size(); i++) { for(int j = 0; j < blocks.size(); j++) { - if( ((SysCAMSTPortTDF) connectors.get(i).get_p1().getComponent()).getBlockTDF().getName().equals(blocks.get(j).getName()) ) { - System.out.println("Inserting in : "+ i + " " + j + " From port: "+ ((SysCAMSTPortTDF) connectors.get(i).get_p1().getComponent()).getName() +" Rate: " + ((SysCAMSTPortTDF) connectors.get(i).get_p1().getComponent()).getRate() ); + if( ((SysCAMSTPortTDF) connectors.get(i).get_p1().getComponent()).getBlockTDF().getName().equals(blocks.get(j).getName()) && + ((SysCAMSTPortTDF) connectors.get(i).get_p2().getComponent()).getBlockTDF().getName().equals(blocks.get(j).getName()) ) { + tArray[i][j] = ((SysCAMSTPortTDF) connectors.get(i).get_p1().getComponent()).getRate() - ((SysCAMSTPortTDF) connectors.get(i).get_p2().getComponent()).getRate() ; + if(((SysCAMSTPortTDF) connectors.get(i).get_p1().getComponent()).getDelay() > 0) { + buffer.addToEntry(i, ((SysCAMSTPortTDF) connectors.get(i).get_p1().getComponent()).getDelay() ); + } + if(((SysCAMSTPortTDF) connectors.get(i).get_p2().getComponent()).getDelay() > 0) { + buffer.addToEntry(i, ((SysCAMSTPortTDF) connectors.get(i).get_p2().getComponent()).getDelay() ); + } + } else if( ((SysCAMSTPortTDF) connectors.get(i).get_p1().getComponent()).getBlockTDF().getName().equals(blocks.get(j).getName()) ) { tArray[i][j] = ((SysCAMSTPortTDF) connectors.get(i).get_p1().getComponent()).getRate(); if(((SysCAMSTPortTDF) connectors.get(i).get_p1().getComponent()).getDelay() > 0) { buffer.addToEntry(i, ((SysCAMSTPortTDF) connectors.get(i).get_p1().getComponent()).getDelay() ); } } else if( ((SysCAMSTPortTDF) connectors.get(i).get_p2().getComponent()).getBlockTDF().getName().equals(blocks.get(j).getName()) ) { - System.out.println("Inserting in : "+ i + " " + j + " From port: "+ ((SysCAMSTPortTDF) connectors.get(i).get_p2().getComponent()).getName() +" Rate: " + -((SysCAMSTPortTDF) connectors.get(i).get_p2().getComponent()).getRate() ); tArray[i][j] = -((SysCAMSTPortTDF) connectors.get(i).get_p2().getComponent()).getRate(); if(((SysCAMSTPortTDF) connectors.get(i).get_p2().getComponent()).getDelay() > 0) { buffer.addToEntry(i, ((SysCAMSTPortTDF) connectors.get(i).get_p2().getComponent()).getDelay() ); @@ -1076,14 +1174,27 @@ public class JDialogSysCAMSExecutableCodeGeneration extends javax.swing.JFrame i } } } - - //double[][] tArray = { { 2, -1, 0 }, { 0, 2, -4 }, { -1, 0, 1 } }; - //double[][] tArray = { { 2, 3, 5 }, { -4, 2, 3} }; - //double[][] tArray = { { 3, -2, 0, 0 }, { 0, 4, 0, -3 }, { 0, 1, -3, 0 }, { -1, 0, 2, 0 }, { -2, 0, 0, 1 } }; - //double[][] tArray = { { 3, -2 } }; RealMatrix tMatrix = new Array2DRowRealMatrix(tArray); return tMatrix; } + + public RealVector rebuildBuffer(LinkedList<SysCAMSTConnector> connectors, LinkedList<SysCAMSTBlockTDF> blocks, RealVector buffer) { + for(int i = 0; i < connectors.size(); i++) { + for(int j = 0; j < blocks.size(); j++) { + if( ((SysCAMSTPortTDF) connectors.get(i).get_p1().getComponent()).getBlockTDF().getName().equals(blocks.get(j).getName()) ) { + if(((SysCAMSTPortTDF) connectors.get(i).get_p1().getComponent()).getDelay() > 0) { + buffer.addToEntry(i, ((SysCAMSTPortTDF) connectors.get(i).get_p1().getComponent()).getDelay() ); + } + } else if( ((SysCAMSTPortTDF) connectors.get(i).get_p2().getComponent()).getBlockTDF().getName().equals(blocks.get(j).getName()) ) { + if(((SysCAMSTPortTDF) connectors.get(i).get_p2().getComponent()).getDelay() > 0) { + buffer.addToEntry(i, ((SysCAMSTPortTDF) connectors.get(i).get_p2().getComponent()).getDelay() ); + } + } + } + } + + return buffer; + } public RealVector solveTopologyMatrix(RealMatrix matrixA, LinkedList<SysCAMSTBlockTDF> blocks) throws InterruptedException { double dropThreshold = 1e-7; @@ -1094,55 +1205,44 @@ public class JDialogSysCAMSExecutableCodeGeneration extends javax.swing.JFrame i int rank = qr.getRank(dropThreshold); if(rank != blocks.size()-1){ jta.append("Error: Port sample rates are inconsistent. Topology matrix can not be solved.\n"); - System.err.println("Port sample rates are inconsistent. Topology matrix can not be solved. Rank: " +rank+" != #blocks-1"); throw new InterruptedException(); } - System.out.println("Checking kernel columns ..."); RealMatrix zMatrix = matrixA.multiply(qMatrix); - for (int c = rank; c < matrixA.getColumnDimension(); c++) { - System.out.printf("The product of A with column %d of Q has sup " - + "norm %f.\n", - c, zMatrix.getColumnMatrix(c).getNorm()); - //TODO: verify if norm is not zero, throw error that kernel could not be found. - } - RealMatrix kernelMatrix = qMatrix.getSubMatrix( 0, qMatrix.getRowDimension()-1, rank, qMatrix.getColumnDimension()-1 ); double[] resultArray = new double[kernelMatrix.getRowDimension()]; double result_tmp = 0.0; int v_lcm = 1; BigFraction[] resultFractionArray = new BigFraction[kernelMatrix.getRowDimension()]; for (int i = 0; i < kernelMatrix.getRowDimension(); i++) { - System.out.printf("The kernelMatrix is %f .\n", kernelMatrix.getEntry(i, 0) ); resultArray[i] = kernelMatrix.getEntry(i, 0) / kernelMatrix.getEntry(kernelMatrix.getRowDimension()-1, 0); result_tmp = kernelMatrix.getEntry(i, 0) / kernelMatrix.getEntry(kernelMatrix.getRowDimension()-1, 0); resultFractionArray[i] = new BigFraction(result_tmp, 2147483647); - System.out.println("The resultArray is: "+ resultArray[i] + ", result_tmp: " + result_tmp); - System.out.println("The resultFractionArray is: "+ resultFractionArray[i].toString() + " with num: " + resultFractionArray[i].getNumeratorAsInt() + " and denom: "+ resultFractionArray[i].getDenominatorAsInt() - + " and given as a double: " + resultFractionArray[i].doubleValue()); v_lcm = ArithmeticUtils.lcm(resultFractionArray[i].getDenominatorAsInt() , v_lcm); - System.out.println("The lcm is: "+ v_lcm ); } int[] tmpResult = new int[kernelMatrix.getRowDimension()]; double[] finalResult = new double[kernelMatrix.getRowDimension()]; for (int i = 0; i < kernelMatrix.getRowDimension(); i++) { tmpResult[i] = (resultFractionArray[i].multiply(v_lcm)).intValue(); finalResult[i] = (double)tmpResult[i]; - System.out.println("The finalResult is: "+ finalResult[i] + " - " + blocks.get(i).getName() ); } RealVector xVector = new ArrayRealVector(finalResult); return xVector; } - public boolean computeSchedule(RealVector q, RealMatrix gamma, RealVector buffer, LinkedList<SysCAMSTBlockTDF> tdfBlocks, LinkedList<SysCAMSTConnector> connectors) throws InterruptedException { + public boolean[] computeSchedule(RealVector q, RealMatrix gamma, RealVector buffer, LinkedList<SysCAMSTBlockTDF> tdfBlocks, LinkedList<SysCAMSTConnector> connectors) throws InterruptedException { RealVector q1 = new ArrayRealVector(q.getDimension()); RealVector nu = new ArrayRealVector(q.getDimension()); RealVector tmpBuffer = new ArrayRealVector(gamma.getRowDimension());; RealVectorFormat printFormat = new RealVectorFormat(); + String last_schedule = "Current scheduled modules list is: "; boolean deadlock = false; - boolean recompute = false; + boolean[] recompute = {false, false}; //[0]-for sync issues [1]-for loop delays SysCAMSTBlockTDF tdfBlock; - LinkedList<SysCAMSTPortConverter> portConvertersTmp; + SysCAMSTPortTDF tdfPort; + SysCAMSTPortTDF tdfPort1; + SysCAMSTPortTDF tdfPort2; double[] time_prev = {0.0, 0.0}; //array to store "in" ([0]) and "out" ([1]) previous times + //Reset the number of times all blocks have been executed for(int i = 0; i < tdfBlocks.size(); i++) { tdfBlocks.get(i).setN(0); @@ -1155,18 +1255,14 @@ public class JDialogSysCAMSExecutableCodeGeneration extends javax.swing.JFrame i tdfBlock = tdfBlocks.get(i); //check if block is runnable: If it has not run q times //and it won't cause a buffer size to go negative. - System.out.println("q1 is: " + printFormat.format(q1) ); - System.out.println("q is: " + printFormat.format(q) ); if(q1.getEntry(i) != q.getEntry(i)) { nu.setEntry(i, 1); tmpBuffer = buffer.add(gamma.operate(nu)); - System.out.println("tmpBuffer is: " + printFormat.format(tmpBuffer) ); if(tmpBuffer.getMinValue() >= 0) { deadlock = false; q1 = q1.add(nu); buffer = tmpBuffer.copy(); - System.out.println("Schedule " + tdfBlock.getName() ); - System.out.println("Buffer is: " + printFormat.format(buffer) ); + last_schedule += tdfBlock.getName() + " - "; //Validate sync bewtween TDF/DE tdfBlock.syncTDFBlockDEBlock(time_prev); } @@ -1175,23 +1271,24 @@ public class JDialogSysCAMSExecutableCodeGeneration extends javax.swing.JFrame i } } } catch (SysCAMSValidateException se) { - recompute = true; - System.out.println("Causality exception: " + se.getMessage()); + recompute[0] = true; + //System.out.println("Causality exception: " + se.getMessage()); } if (deadlock){ - System.out.println("Static schedule can not be computed due to missing delays in loops" ); - jta.append("Error: Static schedule can not be computed due to missing delays in loops\n" ); + //System.out.println(last_schedule); int minIndex = tmpBuffer.getMinIndex(); - //TODO: for the suggested delay, I need to first detect loops within the graph(DFS?), then recompute recursively with the suggested delay until it can be solved. - /*jta.append("Following delay is suggested:\n" ); - int currentDelay = ((SysCAMSTPortTDF) connectors.get(minIndex).get_p2().getComponent()).getDelay(); - jta.append(currentDelay-(int)tmpBuffer.getMinValue() +" in port \"" - +((SysCAMSTPortTDF) connectors.get(minIndex).get_p2().getComponent()).getName() - +"\" from block \""+ ((SysCAMSTPortTDF) connectors.get(minIndex).get_p2().getComponent()).getBlockTDF().getName()+"\"\n"); - */ - throw new InterruptedException(); - } else { - System.out.println("Schedule complete-STOP" ); + int currentDelay = 0; + int suggestedDelay; + for(int i = 0; i < tmpBuffer.getDimension(); i++) { + if (tmpBuffer.getEntry(i) < 0) { + tdfPort = (SysCAMSTPortTDF) connectors.get(i).get_p2().getComponent(); + currentDelay = tdfPort.getDelay(); + suggestedDelay = tdfPort.getDelay() - (int)tmpBuffer.getEntry(i); + tdfPort.setDelay(suggestedDelay); + tdfPort.setRecompute(true); + } + } + recompute[1] = true; } return recompute; } diff --git a/src/main/java/ui/window/JDialogSysCAMSPortDE.java b/src/main/java/ui/window/JDialogSysCAMSPortDE.java index 2605b466eaa45ea49d3a6b2d2b4f32c69884fcf6..aeb730be449fcfd7a01f671fd30f5243036f40bf 100644 --- a/src/main/java/ui/window/JDialogSysCAMSPortDE.java +++ b/src/main/java/ui/window/JDialogSysCAMSPortDE.java @@ -215,6 +215,7 @@ public class JDialogSysCAMSPortDE extends JDialog implements ActionListener { listArrayTypeString.add("int"); listArrayTypeString.add("bool"); listArrayTypeString.add("double"); + listArrayTypeString.add("sc_uint<32>"); if (port.getFather() != null) { if (port.getFather() instanceof SysCAMSBlockDE) { if (!((SysCAMSBlockDE) port.getFather()).getListTypedef().isEmpty()) { @@ -291,14 +292,17 @@ public class JDialogSysCAMSPortDE extends JDialog implements ActionListener { gridBag.setConstraints(sensitivePanel, constraints); boxPanel.add(sensitivePanel); - listSensitiveString = new String[2]; - listSensitiveString[0] = "positive"; - listSensitiveString[1] = "negative"; + listSensitiveString = new String[3]; + listSensitiveString[0] = ""; + listSensitiveString[1] = "positive"; + listSensitiveString[2] = "negative"; sensitiveComboBoxString = new JComboBox<String>(listSensitiveString); - if (port.getSensitiveMethod().equals("") || port.getSensitiveMethod().equals("positive")) { + if (port.getSensitiveMethod().equals("")) { sensitiveComboBoxString.setSelectedIndex(0); + } else if (port.getSensitiveMethod().equals("positive")) { + sensitiveComboBoxString.setSelectedIndex(1); } else if (port.getSensitiveMethod().equals("negative")) { - sensitiveComboBoxString.setSelectedIndex(1); + sensitiveComboBoxString.setSelectedIndex(2); } sensitiveComboBoxString.setActionCommand("Sensitive_method"); sensitiveComboBoxString.setEnabled(port.getSensitive()); @@ -413,4 +417,4 @@ public class JDialogSysCAMSPortDE extends JDialog implements ActionListener { this.dispose(); } } -} \ No newline at end of file +} diff --git a/src/main/java/ui/window/JFrameHWNodeHelp.java b/src/main/java/ui/window/JFrameHWNodeHelp.java index 07862fa1155ec794c46e0da7244e696a7b7e9927..c95188449b5c98031cc4c0538b79da43b6522ca7 100644 --- a/src/main/java/ui/window/JFrameHWNodeHelp.java +++ b/src/main/java/ui/window/JFrameHWNodeHelp.java @@ -51,7 +51,7 @@ public class JFrameHWNodeHelp extends JFrame implements ActionListener{ HelpManager hm = new HelpManager(); if(hm.loadEntries()) { - mgui.setHelpManager(hm); + //mgui.setHelpManager(hm); } helpBut.addActionListener(this);