diff --git a/modeling/SystemC-AMS/echopen-no-gpio.xml b/modeling/SystemC-AMS/echopen-no-gpio.xml
index f64b2a212302674d7417950960e5470a004cc894..f18fa9585e99d3668e5c4e284b5d9859b875f0fb 100644
--- a/modeling/SystemC-AMS/echopen-no-gpio.xml
+++ b/modeling/SystemC-AMS/echopen-no-gpio.xml
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 
-<TURTLEGMODELING version="1.0beta" ANIMATE_INTERACTIVE_SIMULATION="true" ACTIVATE_PENALTIES="true" UPDATE_INFORMATION_DIPLO_SIM="true" ANIMATE_WITH_INFO_DIPLO_SIM="true" OPEN_DIAG_DIPLO_SIM="false">
+<TURTLEGMODELING version="1.0beta" ANIMATE_INTERACTIVE_SIMULATION="true" ACTIVATE_PENALTIES="true" UPDATE_INFORMATION_DIPLO_SIM="true" ANIMATE_WITH_INFO_DIPLO_SIM="true" OPEN_DIAG_DIPLO_SIM="false" LAST_SELECTED_MAIN_TAB="0" LAST_SELECTED_SUB_TAB="0">
 
 <Modeling type="SystemC-AMS" nameTab="SystemC_AMS" >
 <SysCAMSComponentTaskDiagramPanel name="SystemC-AMS Component Diagram" minX="10" maxX="2500" minY="10" maxY="1500" TDF="true" DE="true" zoom="1.0" >
@@ -8,56 +8,56 @@
 <cdparam x="220" y="637" />
 <sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
 <infoparam name="connector" value="mainreg4" />
-<P1  x="345" y="333" id="8" />
-<P2  x="500" y="295" id="182" />
+<P1  x="345" y="333" id="210" />
+<P2  x="500" y="295" id="36" />
 <AutomaticDrawing  data="true" />
 </CONNECTOR>
 <CONNECTOR type="1601" id="2" >
 <cdparam x="223" y="214" />
 <sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
 <infoparam name="connector" value="adcregi" />
-<P1  x="205" y="214" id="56" />
-<P2  x="299" y="278" id="18" />
+<P1  x="205" y="214" id="162" />
+<P2  x="299" y="278" id="200" />
 <AutomaticDrawing  data="true" />
 </CONNECTOR>
 <CONNECTOR type="1601" id="3" >
 <cdparam x="873" y="495" />
 <sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
 <infoparam name="connector" value="mainreg1" />
-<P1  x="720" y="346" id="192" />
-<P2  x="863" y="349" id="105" />
+<P1  x="720" y="346" id="26" />
+<P2  x="863" y="349" id="113" />
 <AutomaticDrawing  data="true" />
 </CONNECTOR>
 <CONNECTOR type="1601" id="4" >
 <cdparam x="295" y="404" />
 <sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
 <infoparam name="connector" value="mainreg2" />
-<P1  x="912" y="427" id="85" />
-<P2  x="861" y="508" id="144" />
+<P1  x="912" y="427" id="133" />
+<P2  x="861" y="508" id="74" />
 <AutomaticDrawing  data="true" />
 </CONNECTOR>
 <CONNECTOR type="1601" id="5" >
 <cdparam x="944" y="196" />
 <sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
 <infoparam name="connector" value="" />
-<P1  x="1001" y="190" id="163" />
-<P2  x="963" y="257" id="115" />
+<P1  x="1001" y="190" id="55" />
+<P2  x="963" y="257" id="103" />
 <AutomaticDrawing  data="true" />
 </CONNECTOR>
 <CONNECTOR type="1601" id="6" >
 <cdparam x="529" y="357" />
 <sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
 <infoparam name="connector" value="" />
-<P1  x="1034" y="427" id="95" />
-<P2  x="984" y="508" id="134" />
+<P1  x="1034" y="427" id="123" />
+<P2  x="984" y="508" id="84" />
 <AutomaticDrawing  data="true" />
 </CONNECTOR>
 <CONNECTOR type="1601" id="7" >
 <cdparam x="454" y="231" />
 <sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
 <infoparam name="connector" value="" />
-<P1  x="539" y="128" id="37" />
-<P2  x="377" y="136" id="66" />
+<P1  x="539" y="128" id="181" />
+<P2  x="377" y="136" id="152" />
 <AutomaticDrawing  data="true" />
 </CONNECTOR>
 <COMPONENT type="1607" id="237" >
@@ -75,39 +75,13 @@
 <TGConnectingPoint num="6" id="235" />
 <TGConnectingPoint num="7" id="236" />
 </COMPONENT>
-<SUBCOMPONENT type="1603" id="36" >
+<SUBCOMPONENT type="5721" id="16" >
 <father id="237" num="0" />
-<cdparam x="135" y="288" />
+<cdparam x="144" y="509" />
 <sizeparam width="200" height="150" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
 <hidden value="false" />
 <cdrectangleparam minX="0" maxX="873" minY="0" maxY="554" />
-<infoparam name="Primitive component - Block DE" value="adcre1" />
-<TGConnectingPoint num="0" id="28" />
-<TGConnectingPoint num="1" id="29" />
-<TGConnectingPoint num="2" id="30" />
-<TGConnectingPoint num="3" id="31" />
-<TGConnectingPoint num="4" id="32" />
-<TGConnectingPoint num="5" id="33" />
-<TGConnectingPoint num="6" id="34" />
-<TGConnectingPoint num="7" id="35" />
-<extraparam>
-<Attribute name_function="" clockName="my_clk" code="void adcre_main() {
-	adcregisteroutput.write(adcregisterinput.read());
-}
-                   SC_CTOR(adcre1) {
-	SC_METHOD (adcre1_main);
-	//sensitive &lt;&lt;clockffp.pos();
-}
-                   " listStruct="" nameTemplate="" typeTemplate="int" valueTemplate="" listTypedef="" />
-</extraparam>
-</SUBCOMPONENT>
-<SUBCOMPONENT type="1605" id="17" >
-<father id="36" num="0" />
-<cdparam x="325" y="323" />
-<sizeparam width="20" height="20" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
-<hidden value="false" />
-<cdrectangleparam minX="-10" maxX="190" minY="-10" maxY="140" />
-<infoparam name="Primitive port - Port DE" value="adcregisteroutput" />
+<infoparam name="TGComponent" value="my_clk" />
 <TGConnectingPoint num="0" id="8" />
 <TGConnectingPoint num="1" id="9" />
 <TGConnectingPoint num="2" id="10" />
@@ -116,161 +90,254 @@
 <TGConnectingPoint num="5" id="13" />
 <TGConnectingPoint num="6" id="14" />
 <TGConnectingPoint num="7" id="15" />
-<TGConnectingPoint num="8" id="16" />
 <extraparam>
-<Prop commName="adcregisteroutput" commType="0" origin="1" type="sc_uint" sensitive="true" sensitive_method="positive" nbits="12" />
+<Attribute name_function="" nameTemplate="" frequency ="0.001" unit="s" dutyCycle="1.0" startTime="1.0" unitStartTime="s" posFirst ="false" />
 </extraparam>
 </SUBCOMPONENT>
-<SUBCOMPONENT type="1605" id="27" >
-<father id="36" num="1" />
-<cdparam x="289" y="278" />
+<SUBCOMPONENT type="5721" id="25" >
+<father id="237" num="1" />
+<cdparam x="394" y="513" />
+<sizeparam width="200" height="150" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
+<hidden value="false" />
+<cdrectangleparam minX="0" maxX="873" minY="0" maxY="554" />
+<infoparam name="TGComponent" value="my_clk1" />
+<TGConnectingPoint num="0" id="17" />
+<TGConnectingPoint num="1" id="18" />
+<TGConnectingPoint num="2" id="19" />
+<TGConnectingPoint num="3" id="20" />
+<TGConnectingPoint num="4" id="21" />
+<TGConnectingPoint num="5" id="22" />
+<TGConnectingPoint num="6" id="23" />
+<TGConnectingPoint num="7" id="24" />
+<extraparam>
+<Attribute name_function="" nameTemplate="" frequency ="0.002" unit="s" dutyCycle="0.5" startTime="0.001" unitStartTime="s" posFirst ="false" />
+</extraparam>
+</SUBCOMPONENT>
+<SUBCOMPONENT type="1603" id="54" >
+<father id="237" num="2" />
+<cdparam x="510" y="261" />
+<sizeparam width="200" height="150" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
+<hidden value="false" />
+<cdrectangleparam minX="0" maxX="873" minY="0" maxY="554" />
+<infoparam name="Primitive component - Block DE" value="abscalc1" />
+<TGConnectingPoint num="0" id="46" />
+<TGConnectingPoint num="1" id="47" />
+<TGConnectingPoint num="2" id="48" />
+<TGConnectingPoint num="3" id="49" />
+<TGConnectingPoint num="4" id="50" />
+<TGConnectingPoint num="5" id="51" />
+<TGConnectingPoint num="6" id="52" />
+<TGConnectingPoint num="7" id="53" />
+<extraparam>
+<Attribute name_function="" clockName="my_clk" clockSensitivityMethod="" code=" sc_dt::sc_int&lt;12&gt; inr;
+sc_dt::sc_int&lt;12&gt;   inr4;
+sc_dt::sc_int&lt;12&gt;   inr3,inr1,inr2;
+sc_dt::sc_int&lt;12&gt;   he1;
+sc_dt::sc_int&lt;1&gt;    q;
+int asdf;
+void abs_calc () {
+	q=inr[11];
+	inr4=(inputfromadc.read());
+	//hel=abs(inr4);
+	inr=inputfromadc.read();
+	if (inr&lt;2048) {
+		inr1=inr;
+	}
+	else {
+		inr3=~(inr) ;
+		inr1=inr3+1;
+	}
+	absoutput.write(inr1);
+}
+                                      " listStruct="" nameTemplate="" typeTemplate="int" valueTemplate="" listTypedef="" />
+</extraparam>
+</SUBCOMPONENT>
+<SUBCOMPONENT type="1605" id="35" >
+<father id="54" num="0" />
+<cdparam x="700" y="336" />
 <sizeparam width="20" height="20" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
 <hidden value="false" />
 <cdrectangleparam minX="-10" maxX="190" minY="-10" maxY="140" />
-<infoparam name="Primitive port - Port DE" value="adcregisterinput" />
-<TGConnectingPoint num="0" id="18" />
-<TGConnectingPoint num="1" id="19" />
-<TGConnectingPoint num="2" id="20" />
-<TGConnectingPoint num="3" id="21" />
-<TGConnectingPoint num="4" id="22" />
-<TGConnectingPoint num="5" id="23" />
-<TGConnectingPoint num="6" id="24" />
-<TGConnectingPoint num="7" id="25" />
-<TGConnectingPoint num="8" id="26" />
+<infoparam name="Primitive port - Port DE" value="absoutput" />
+<TGConnectingPoint num="0" id="26" />
+<TGConnectingPoint num="1" id="27" />
+<TGConnectingPoint num="2" id="28" />
+<TGConnectingPoint num="3" id="29" />
+<TGConnectingPoint num="4" id="30" />
+<TGConnectingPoint num="5" id="31" />
+<TGConnectingPoint num="6" id="32" />
+<TGConnectingPoint num="7" id="33" />
+<TGConnectingPoint num="8" id="34" />
 <extraparam>
-<Prop commName="adcregisterinput" commType="0" origin="0" type="sc_uint" sensitive="true" sensitive_method="positive" nbits="12" />
+<Prop commName="absoutput" commType="0" origin="1" type="sc_dt::sc_int" sensitive="true" sensitive_method="positive" nbits="12" />
 </extraparam>
 </SUBCOMPONENT>
-<SUBCOMPONENT type="1602" id="55" >
-<father id="237" num="1" />
-<cdparam x="549" y="53" />
+<SUBCOMPONENT type="1605" id="45" >
+<father id="54" num="1" />
+<cdparam x="500" y="285" />
+<sizeparam width="20" height="20" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
+<hidden value="false" />
+<cdrectangleparam minX="-10" maxX="190" minY="-10" maxY="140" />
+<infoparam name="Primitive port - Port DE" value="inputfromadc" />
+<TGConnectingPoint num="0" id="36" />
+<TGConnectingPoint num="1" id="37" />
+<TGConnectingPoint num="2" id="38" />
+<TGConnectingPoint num="3" id="39" />
+<TGConnectingPoint num="4" id="40" />
+<TGConnectingPoint num="5" id="41" />
+<TGConnectingPoint num="6" id="42" />
+<TGConnectingPoint num="7" id="43" />
+<TGConnectingPoint num="8" id="44" />
+<extraparam>
+<Prop commName="inputfromadc" commType="0" origin="0" type="sc_dt::sc_int" sensitive="true" sensitive_method="positive" nbits="12" />
+</extraparam>
+</SUBCOMPONENT>
+<SUBCOMPONENT type="1603" id="73" >
+<father id="237" num="3" />
+<cdparam x="842" y="30" />
 <sizeparam width="200" height="150" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
 <hidden value="false" />
 <cdrectangleparam minX="0" maxX="873" minY="0" maxY="554" />
-<infoparam name="Primitive component - Block TDF" value="mySine1" />
-<TGConnectingPoint num="0" id="47" />
-<TGConnectingPoint num="1" id="48" />
-<TGConnectingPoint num="2" id="49" />
-<TGConnectingPoint num="3" id="50" />
-<TGConnectingPoint num="4" id="51" />
-<TGConnectingPoint num="5" id="52" />
-<TGConnectingPoint num="6" id="53" />
-<TGConnectingPoint num="7" id="54" />
+<infoparam name="Primitive component - Block DE" value="samplegenerator" />
+<TGConnectingPoint num="0" id="65" />
+<TGConnectingPoint num="1" id="66" />
+<TGConnectingPoint num="2" id="67" />
+<TGConnectingPoint num="3" id="68" />
+<TGConnectingPoint num="4" id="69" />
+<TGConnectingPoint num="5" id="70" />
+<TGConnectingPoint num="6" id="71" />
+<TGConnectingPoint num="7" id="72" />
 <extraparam>
-<Attribute period="5.0E-4" time="ms" processCode="void processing() {
-	double t = get_time().to_seconds();
-	// actual time                     out1.write(2000.99 * std::sin( 2.0 * M_PI * freqoftheprobe * t ) );
-	//probesample.write(1);
+<Attribute name_function="" clockName="my_clk" clockSensitivityMethod="" code=" sc_dt::sc_int&lt;12&gt; inr;
+void pulse_gen_main(){
+	inr=rand()%4096;
+	outpready.write(1);
+	//genout.write(inr) ;
+	//  expo[j].write((i3));
 }
-                                              " constructorCode="" listStruct="Ts = 1.0 : double|freqoftheprobe = 1000.0 : double" nameTemplate="" typeTemplate="int" valueTemplate="" listTypedef="" />
+                         " listStruct="" nameTemplate="" typeTemplate="int" valueTemplate="" listTypedef="" />
 </extraparam>
 </SUBCOMPONENT>
-<SUBCOMPONENT type="1604" id="46" >
-<father id="55" num="0" />
-<cdparam x="539" y="118" />
+<SUBCOMPONENT type="1605" id="64" >
+<father id="73" num="0" />
+<cdparam x="991" y="170" />
 <sizeparam width="20" height="20" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
 <hidden value="false" />
 <cdrectangleparam minX="-10" maxX="190" minY="-10" maxY="140" />
-<infoparam name="Primitive port - Port TDF" value="out1" />
-<TGConnectingPoint num="0" id="37" />
-<TGConnectingPoint num="1" id="38" />
-<TGConnectingPoint num="2" id="39" />
-<TGConnectingPoint num="3" id="40" />
-<TGConnectingPoint num="4" id="41" />
-<TGConnectingPoint num="5" id="42" />
-<TGConnectingPoint num="6" id="43" />
-<TGConnectingPoint num="7" id="44" />
-<TGConnectingPoint num="8" id="45" />
+<infoparam name="Primitive port - Port DE" value="outpready" />
+<TGConnectingPoint num="0" id="55" />
+<TGConnectingPoint num="1" id="56" />
+<TGConnectingPoint num="2" id="57" />
+<TGConnectingPoint num="3" id="58" />
+<TGConnectingPoint num="4" id="59" />
+<TGConnectingPoint num="5" id="60" />
+<TGConnectingPoint num="6" id="61" />
+<TGConnectingPoint num="7" id="62" />
+<TGConnectingPoint num="8" id="63" />
 <extraparam>
-<Prop commName="out1" commType="0" origin="1" period="5.0E-4" time="ms" rate="-1" delay="-1" type="double" />
+<Prop commName="outpready" commType="0" origin="1" type="bool" sensitive="false" sensitive_method="" nbits="0" />
 </extraparam>
 </SUBCOMPONENT>
-<SUBCOMPONENT type="1602" id="84" >
-<father id="237" num="2" />
-<cdparam x="167" y="54" />
+<SUBCOMPONENT type="1603" id="102" >
+<father id="237" num="4" />
+<cdparam x="808" y="518" />
 <sizeparam width="200" height="150" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
 <hidden value="false" />
 <cdrectangleparam minX="0" maxX="873" minY="0" maxY="554" />
-<infoparam name="Primitive component - Block TDF" value="ADC1" />
-<TGConnectingPoint num="0" id="76" />
-<TGConnectingPoint num="1" id="77" />
-<TGConnectingPoint num="2" id="78" />
-<TGConnectingPoint num="3" id="79" />
-<TGConnectingPoint num="4" id="80" />
-<TGConnectingPoint num="5" id="81" />
-<TGConnectingPoint num="6" id="82" />
-<TGConnectingPoint num="7" id="83" />
+<infoparam name="Primitive component - Block DE" value="spi" />
+<TGConnectingPoint num="0" id="94" />
+<TGConnectingPoint num="1" id="95" />
+<TGConnectingPoint num="2" id="96" />
+<TGConnectingPoint num="3" id="97" />
+<TGConnectingPoint num="4" id="98" />
+<TGConnectingPoint num="5" id="99" />
+<TGConnectingPoint num="6" id="100" />
+<TGConnectingPoint num="7" id="101" />
 <extraparam>
-<Attribute period="5.0E-4" time="ms" processCode=" void processing() {
-	addition=inputfromtheprobe.read()+2047;
-	for (int i= 0;i&lt;4096;i++)  {
-		if (((   inputfromtheprobe.read()+2048) &lt; (i+1))  &amp;&amp; ((inputfromtheprobe.read()+2048) &gt; (i))){
-			outputonepoint.write(i-2048);
-			// outputready.write(1);
-		}
+<Attribute name_function="" clockName="my_clk" clockSensitivityMethod="" code="  //sc_out &lt;sc_int&lt;12&gt; &gt; fpgaoutput[30];
+sc_dt::sc_int&lt;12&gt; inr1[30];
+int counter;
+void spi_main() {
+	//if (enable1.read()==0){
+		//counter=0;
+		//      	}
+	if (compinenable.read()==1 ) {
+		inr1[counter]=comparatorinput;
+		counter=counter+1;
+	}
+	//outputready.write(1);
+	//outputvector.write(insideregister);
+	//count =  0;
+	//}
+                                       if(counter==30){
+	for(int i=0;i&lt;30;i++) {
+		//fpgaoutput[i].write(inr1[i]);
+		//fpgaoutput.write(inr1[i]);
 	}
+	counter=0;
 }
-                 " constructorCode="" listStruct="addition = 0 : int" nameTemplate="" typeTemplate="int" valueTemplate="" listTypedef="" />
+  }
+" listStruct="" nameTemplate="" typeTemplate="int" valueTemplate="" listTypedef="" />
 </extraparam>
 </SUBCOMPONENT>
-<SUBCOMPONENT type="1606" id="65" >
-<father id="84" num="0" />
-<cdparam x="195" y="194" />
+<SUBCOMPONENT type="1605" id="83" >
+<father id="102" num="0" />
+<cdparam x="851" y="508" />
 <sizeparam width="20" height="20" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
 <hidden value="false" />
 <cdrectangleparam minX="-10" maxX="190" minY="-10" maxY="140" />
-<infoparam name="Primitive port - Port Converter" value="outputonepoint" />
-<TGConnectingPoint num="0" id="56" />
-<TGConnectingPoint num="1" id="57" />
-<TGConnectingPoint num="2" id="58" />
-<TGConnectingPoint num="3" id="59" />
-<TGConnectingPoint num="4" id="60" />
-<TGConnectingPoint num="5" id="61" />
-<TGConnectingPoint num="6" id="62" />
-<TGConnectingPoint num="7" id="63" />
-<TGConnectingPoint num="8" id="64" />
+<infoparam name="Primitive port - Port DE" value="comparatorinput" />
+<TGConnectingPoint num="0" id="74" />
+<TGConnectingPoint num="1" id="75" />
+<TGConnectingPoint num="2" id="76" />
+<TGConnectingPoint num="3" id="77" />
+<TGConnectingPoint num="4" id="78" />
+<TGConnectingPoint num="5" id="79" />
+<TGConnectingPoint num="6" id="80" />
+<TGConnectingPoint num="7" id="81" />
+<TGConnectingPoint num="8" id="82" />
 <extraparam>
-<Prop commName="outputonepoint" commType="0" origin="1" period="5.0E-4" time="ms" rate="-1" nbits="12" delay="-1" type="sc_uint" />
+<Prop commName="comparatorinput" commType="0" origin="0" type="sc_dt::sc_int" sensitive="true" sensitive_method="positive" nbits="12" />
 </extraparam>
 </SUBCOMPONENT>
-<SUBCOMPONENT type="1604" id="75" >
-<father id="84" num="1" />
-<cdparam x="357" y="126" />
+<SUBCOMPONENT type="1605" id="93" >
+<father id="102" num="1" />
+<cdparam x="974" y="508" />
 <sizeparam width="20" height="20" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
 <hidden value="false" />
 <cdrectangleparam minX="-10" maxX="190" minY="-10" maxY="140" />
-<infoparam name="Primitive port - Port TDF" value="inputfromtheprobe" />
-<TGConnectingPoint num="0" id="66" />
-<TGConnectingPoint num="1" id="67" />
-<TGConnectingPoint num="2" id="68" />
-<TGConnectingPoint num="3" id="69" />
-<TGConnectingPoint num="4" id="70" />
-<TGConnectingPoint num="5" id="71" />
-<TGConnectingPoint num="6" id="72" />
-<TGConnectingPoint num="7" id="73" />
-<TGConnectingPoint num="8" id="74" />
+<infoparam name="Primitive port - Port DE" value="compinenable" />
+<TGConnectingPoint num="0" id="84" />
+<TGConnectingPoint num="1" id="85" />
+<TGConnectingPoint num="2" id="86" />
+<TGConnectingPoint num="3" id="87" />
+<TGConnectingPoint num="4" id="88" />
+<TGConnectingPoint num="5" id="89" />
+<TGConnectingPoint num="6" id="90" />
+<TGConnectingPoint num="7" id="91" />
+<TGConnectingPoint num="8" id="92" />
 <extraparam>
-<Prop commName="inputfromtheprobe" commType="0" origin="0" period="5.0E-4" time="ms" rate="-1" delay="-1" type="double" />
+<Prop commName="compinenable" commType="0" origin="0" type="bool" sensitive="false" sensitive_method="" nbits="0" />
 </extraparam>
 </SUBCOMPONENT>
-<SUBCOMPONENT type="1603" id="133" >
-<father id="237" num="3" />
+<SUBCOMPONENT type="1603" id="151" >
+<father id="237" num="5" />
 <cdparam x="873" y="267" />
 <sizeparam width="200" height="150" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
 <hidden value="false" />
 <cdrectangleparam minX="0" maxX="873" minY="0" maxY="554" />
 <infoparam name="Primitive component - Block DE" value="comparator1" />
-<TGConnectingPoint num="0" id="125" />
-<TGConnectingPoint num="1" id="126" />
-<TGConnectingPoint num="2" id="127" />
-<TGConnectingPoint num="3" id="128" />
-<TGConnectingPoint num="4" id="129" />
-<TGConnectingPoint num="5" id="130" />
-<TGConnectingPoint num="6" id="131" />
-<TGConnectingPoint num="7" id="132" />
+<TGConnectingPoint num="0" id="143" />
+<TGConnectingPoint num="1" id="144" />
+<TGConnectingPoint num="2" id="145" />
+<TGConnectingPoint num="3" id="146" />
+<TGConnectingPoint num="4" id="147" />
+<TGConnectingPoint num="5" id="148" />
+<TGConnectingPoint num="6" id="149" />
+<TGConnectingPoint num="7" id="150" />
 <extraparam>
-<Attribute name_function="comparator_main" clockName="my_clk" code="  int counter;
-sc_uint&lt;12&gt; inr,inr1;
+<Attribute name_function="comparator_main" clockName="my_clk" clockSensitivityMethod="" code=" int counter;
+sc_dt::sc_int&lt;12&gt; inr,inr1;
 void comparator_main(){
 	if (enable.read()==0){
 		counter=0;
@@ -294,337 +361,266 @@ void comparator_main(){
 		}
 		else {
 			outputmax.write(0);
-			copmienable.write(0);
+			compienable.write(0);
 		}
 	}
 }
-                                           " listStruct="" nameTemplate="" typeTemplate="int" valueTemplate="" listTypedef="" />
+                                                              " listStruct="" nameTemplate="" typeTemplate="int" valueTemplate="" listTypedef="" />
 </extraparam>
 </SUBCOMPONENT>
-<SUBCOMPONENT type="1605" id="94" >
-<father id="133" num="0" />
-<cdparam x="902" y="407" />
+<SUBCOMPONENT type="1605" id="112" >
+<father id="151" num="0" />
+<cdparam x="953" y="257" />
 <sizeparam width="20" height="20" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
 <hidden value="false" />
 <cdrectangleparam minX="-10" maxX="190" minY="-10" maxY="140" />
-<infoparam name="Primitive port - Port DE" value="outputmax" />
-<TGConnectingPoint num="0" id="85" />
-<TGConnectingPoint num="1" id="86" />
-<TGConnectingPoint num="2" id="87" />
-<TGConnectingPoint num="3" id="88" />
-<TGConnectingPoint num="4" id="89" />
-<TGConnectingPoint num="5" id="90" />
-<TGConnectingPoint num="6" id="91" />
-<TGConnectingPoint num="7" id="92" />
-<TGConnectingPoint num="8" id="93" />
+<infoparam name="Primitive port - Port DE" value="enable" />
+<TGConnectingPoint num="0" id="103" />
+<TGConnectingPoint num="1" id="104" />
+<TGConnectingPoint num="2" id="105" />
+<TGConnectingPoint num="3" id="106" />
+<TGConnectingPoint num="4" id="107" />
+<TGConnectingPoint num="5" id="108" />
+<TGConnectingPoint num="6" id="109" />
+<TGConnectingPoint num="7" id="110" />
+<TGConnectingPoint num="8" id="111" />
 <extraparam>
-<Prop commName="outputmax" commType="0" origin="1" type="sc_uint" sensitive="true" sensitive_method="positive" nbits="12" />
+<Prop commName="enable" commType="0" origin="0" type="bool" sensitive="true" sensitive_method="positive" nbits="0" />
 </extraparam>
 </SUBCOMPONENT>
-<SUBCOMPONENT type="1605" id="104" >
-<father id="133" num="1" />
-<cdparam x="1024" y="407" />
+<SUBCOMPONENT type="1605" id="122" >
+<father id="151" num="1" />
+<cdparam x="863" y="339" />
 <sizeparam width="20" height="20" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
 <hidden value="false" />
 <cdrectangleparam minX="-10" maxX="190" minY="-10" maxY="140" />
-<infoparam name="Primitive port - Port DE" value="compienable" />
-<TGConnectingPoint num="0" id="95" />
-<TGConnectingPoint num="1" id="96" />
-<TGConnectingPoint num="2" id="97" />
-<TGConnectingPoint num="3" id="98" />
-<TGConnectingPoint num="4" id="99" />
-<TGConnectingPoint num="5" id="100" />
-<TGConnectingPoint num="6" id="101" />
-<TGConnectingPoint num="7" id="102" />
-<TGConnectingPoint num="8" id="103" />
+<infoparam name="Primitive port - Port DE" value="inputfromabs" />
+<TGConnectingPoint num="0" id="113" />
+<TGConnectingPoint num="1" id="114" />
+<TGConnectingPoint num="2" id="115" />
+<TGConnectingPoint num="3" id="116" />
+<TGConnectingPoint num="4" id="117" />
+<TGConnectingPoint num="5" id="118" />
+<TGConnectingPoint num="6" id="119" />
+<TGConnectingPoint num="7" id="120" />
+<TGConnectingPoint num="8" id="121" />
 <extraparam>
-<Prop commName="compienable" commType="0" origin="1" type="bool" sensitive="true" sensitive_method="positive" nbits="0" />
+<Prop commName="inputfromabs" commType="0" origin="0" type="sc_dt::sc_int" sensitive="false" sensitive_method="" nbits="12" />
 </extraparam>
 </SUBCOMPONENT>
-<SUBCOMPONENT type="1605" id="114" >
-<father id="133" num="2" />
-<cdparam x="863" y="339" />
+<SUBCOMPONENT type="1605" id="132" >
+<father id="151" num="2" />
+<cdparam x="1024" y="407" />
 <sizeparam width="20" height="20" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
 <hidden value="false" />
 <cdrectangleparam minX="-10" maxX="190" minY="-10" maxY="140" />
-<infoparam name="Primitive port - Port DE" value="inputfromabs" />
-<TGConnectingPoint num="0" id="105" />
-<TGConnectingPoint num="1" id="106" />
-<TGConnectingPoint num="2" id="107" />
-<TGConnectingPoint num="3" id="108" />
-<TGConnectingPoint num="4" id="109" />
-<TGConnectingPoint num="5" id="110" />
-<TGConnectingPoint num="6" id="111" />
-<TGConnectingPoint num="7" id="112" />
-<TGConnectingPoint num="8" id="113" />
+<infoparam name="Primitive port - Port DE" value="compienable" />
+<TGConnectingPoint num="0" id="123" />
+<TGConnectingPoint num="1" id="124" />
+<TGConnectingPoint num="2" id="125" />
+<TGConnectingPoint num="3" id="126" />
+<TGConnectingPoint num="4" id="127" />
+<TGConnectingPoint num="5" id="128" />
+<TGConnectingPoint num="6" id="129" />
+<TGConnectingPoint num="7" id="130" />
+<TGConnectingPoint num="8" id="131" />
 <extraparam>
-<Prop commName="inputfromabs" commType="0" origin="0" type="sc_uint" sensitive="false" sensitive_method="" nbits="12" />
+<Prop commName="compienable" commType="0" origin="1" type="bool" sensitive="true" sensitive_method="positive" nbits="0" />
 </extraparam>
 </SUBCOMPONENT>
-<SUBCOMPONENT type="1605" id="124" >
-<father id="133" num="3" />
-<cdparam x="953" y="257" />
+<SUBCOMPONENT type="1605" id="142" >
+<father id="151" num="3" />
+<cdparam x="902" y="407" />
 <sizeparam width="20" height="20" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
 <hidden value="false" />
 <cdrectangleparam minX="-10" maxX="190" minY="-10" maxY="140" />
-<infoparam name="Primitive port - Port DE" value="enable" />
-<TGConnectingPoint num="0" id="115" />
-<TGConnectingPoint num="1" id="116" />
-<TGConnectingPoint num="2" id="117" />
-<TGConnectingPoint num="3" id="118" />
-<TGConnectingPoint num="4" id="119" />
-<TGConnectingPoint num="5" id="120" />
-<TGConnectingPoint num="6" id="121" />
-<TGConnectingPoint num="7" id="122" />
-<TGConnectingPoint num="8" id="123" />
+<infoparam name="Primitive port - Port DE" value="outputmax" />
+<TGConnectingPoint num="0" id="133" />
+<TGConnectingPoint num="1" id="134" />
+<TGConnectingPoint num="2" id="135" />
+<TGConnectingPoint num="3" id="136" />
+<TGConnectingPoint num="4" id="137" />
+<TGConnectingPoint num="5" id="138" />
+<TGConnectingPoint num="6" id="139" />
+<TGConnectingPoint num="7" id="140" />
+<TGConnectingPoint num="8" id="141" />
 <extraparam>
-<Prop commName="enable" commType="0" origin="0" type="bool" sensitive="true" sensitive_method="positive" nbits="0" />
+<Prop commName="outputmax" commType="0" origin="1" type="sc_dt::sc_int" sensitive="true" sensitive_method="positive" nbits="12" />
 </extraparam>
 </SUBCOMPONENT>
-<SUBCOMPONENT type="1603" id="162" >
-<father id="237" num="4" />
-<cdparam x="808" y="518" />
+<SUBCOMPONENT type="1602" id="180" >
+<father id="237" num="6" />
+<cdparam x="167" y="54" />
 <sizeparam width="200" height="150" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
 <hidden value="false" />
 <cdrectangleparam minX="0" maxX="873" minY="0" maxY="554" />
-<infoparam name="Primitive component - Block DE" value="spi" />
-<TGConnectingPoint num="0" id="154" />
-<TGConnectingPoint num="1" id="155" />
-<TGConnectingPoint num="2" id="156" />
-<TGConnectingPoint num="3" id="157" />
-<TGConnectingPoint num="4" id="158" />
-<TGConnectingPoint num="5" id="159" />
-<TGConnectingPoint num="6" id="160" />
-<TGConnectingPoint num="7" id="161" />
+<infoparam name="Primitive component - Block TDF" value="ADC1" />
+<TGConnectingPoint num="0" id="172" />
+<TGConnectingPoint num="1" id="173" />
+<TGConnectingPoint num="2" id="174" />
+<TGConnectingPoint num="3" id="175" />
+<TGConnectingPoint num="4" id="176" />
+<TGConnectingPoint num="5" id="177" />
+<TGConnectingPoint num="6" id="178" />
+<TGConnectingPoint num="7" id="179" />
 <extraparam>
-<Attribute name_function="" clockName="my_clk" code="  //sc_out &lt;sc_uint&lt;12&gt; &gt; fpgaoutput[30];
-sc_uint&lt;12&gt; inr1[30];
-int counter;
-void spi_main() {
-	if (enable1.read()==0){
-		counter=0;
-	}
-	if (compinenable.read()==1 ) {
-		inr1[counter]=comparatorinput;
-		counter=counter+1;
-	}
-	//outputready.write(1);
-	outputvector.write(insideregister);
-	count =  0;
-}
-                    if(counter==30){
-	for(int i=0;i&lt;30;i++) {
-		//DG serialized    //fpgaoutput[i].write(inr1[i]);
-		fpgaoutput.write(inr1[i]);
+<Attribute period="5.0E-4" time="ms" processCode=" void processing() {
+	addition=inputfromtheprobe.read()+2047;
+	for (int i= 0;i&lt;4096;i++)  {
+		if (((   inputfromtheprobe.read()+2048) &lt; (i+1))  &amp;&amp; ((inputfromtheprobe.read()+2048) &gt; (i))){
+			outputonepoint.write(i-2048);
+			// outputready.write(1);
+		}
 	}
-	counter=0;
 }
-                    ///800               }
-" listStruct="" nameTemplate="" typeTemplate="int" valueTemplate="" listTypedef="" />
+                                    " constructorCode="" listStruct="addition = 0 : int" nameTemplate="" typeTemplate="int" valueTemplate="" listTypedef="" />
 </extraparam>
 </SUBCOMPONENT>
-<SUBCOMPONENT type="1605" id="143" >
-<father id="162" num="0" />
-<cdparam x="974" y="508" />
+<SUBCOMPONENT type="1604" id="161" >
+<father id="180" num="0" />
+<cdparam x="357" y="126" />
 <sizeparam width="20" height="20" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
 <hidden value="false" />
 <cdrectangleparam minX="-10" maxX="190" minY="-10" maxY="140" />
-<infoparam name="Primitive port - Port DE" value="compinenable" />
-<TGConnectingPoint num="0" id="134" />
-<TGConnectingPoint num="1" id="135" />
-<TGConnectingPoint num="2" id="136" />
-<TGConnectingPoint num="3" id="137" />
-<TGConnectingPoint num="4" id="138" />
-<TGConnectingPoint num="5" id="139" />
-<TGConnectingPoint num="6" id="140" />
-<TGConnectingPoint num="7" id="141" />
-<TGConnectingPoint num="8" id="142" />
+<infoparam name="Primitive port - Port TDF" value="inputfromtheprobe" />
+<TGConnectingPoint num="0" id="152" />
+<TGConnectingPoint num="1" id="153" />
+<TGConnectingPoint num="2" id="154" />
+<TGConnectingPoint num="3" id="155" />
+<TGConnectingPoint num="4" id="156" />
+<TGConnectingPoint num="5" id="157" />
+<TGConnectingPoint num="6" id="158" />
+<TGConnectingPoint num="7" id="159" />
+<TGConnectingPoint num="8" id="160" />
 <extraparam>
-<Prop commName="compinenable" commType="0" origin="0" type="bool" sensitive="false" sensitive_method="" nbits="0" />
+<Prop commName="inputfromtheprobe" commType="0" origin="0" period="5.0E-4" time="ms" rate="-1" delay="-1" type="double" />
 </extraparam>
 </SUBCOMPONENT>
-<SUBCOMPONENT type="1605" id="153" >
-<father id="162" num="1" />
-<cdparam x="851" y="508" />
+<SUBCOMPONENT type="1606" id="171" >
+<father id="180" num="1" />
+<cdparam x="195" y="194" />
 <sizeparam width="20" height="20" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
 <hidden value="false" />
 <cdrectangleparam minX="-10" maxX="190" minY="-10" maxY="140" />
-<infoparam name="Primitive port - Port DE" value="comparatorinput" />
-<TGConnectingPoint num="0" id="144" />
-<TGConnectingPoint num="1" id="145" />
-<TGConnectingPoint num="2" id="146" />
-<TGConnectingPoint num="3" id="147" />
-<TGConnectingPoint num="4" id="148" />
-<TGConnectingPoint num="5" id="149" />
-<TGConnectingPoint num="6" id="150" />
-<TGConnectingPoint num="7" id="151" />
-<TGConnectingPoint num="8" id="152" />
+<infoparam name="Primitive port - Port Converter" value="outputonepoint" />
+<TGConnectingPoint num="0" id="162" />
+<TGConnectingPoint num="1" id="163" />
+<TGConnectingPoint num="2" id="164" />
+<TGConnectingPoint num="3" id="165" />
+<TGConnectingPoint num="4" id="166" />
+<TGConnectingPoint num="5" id="167" />
+<TGConnectingPoint num="6" id="168" />
+<TGConnectingPoint num="7" id="169" />
+<TGConnectingPoint num="8" id="170" />
 <extraparam>
-<Prop commName="comparatorinput" commType="0" origin="0" type="int" sensitive="true" sensitive_method="positive" nbits="12" />
+<Prop commName="outputonepoint" commType="0" origin="1" period="5.0E-4" time="ms" rate="-1" nbits="12" delay="-1" type="sc_dt::sc_int" />
 </extraparam>
 </SUBCOMPONENT>
-<SUBCOMPONENT type="1603" id="181" >
-<father id="237" num="5" />
-<cdparam x="842" y="30" />
+<SUBCOMPONENT type="1602" id="199" >
+<father id="237" num="7" />
+<cdparam x="549" y="53" />
 <sizeparam width="200" height="150" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
 <hidden value="false" />
 <cdrectangleparam minX="0" maxX="873" minY="0" maxY="554" />
-<infoparam name="Primitive component - Block DE" value="samplegenerator" />
-<TGConnectingPoint num="0" id="173" />
-<TGConnectingPoint num="1" id="174" />
-<TGConnectingPoint num="2" id="175" />
-<TGConnectingPoint num="3" id="176" />
-<TGConnectingPoint num="4" id="177" />
-<TGConnectingPoint num="5" id="178" />
-<TGConnectingPoint num="6" id="179" />
-<TGConnectingPoint num="7" id="180" />
+<infoparam name="Primitive component - Block TDF" value="mySine1" />
+<TGConnectingPoint num="0" id="191" />
+<TGConnectingPoint num="1" id="192" />
+<TGConnectingPoint num="2" id="193" />
+<TGConnectingPoint num="3" id="194" />
+<TGConnectingPoint num="4" id="195" />
+<TGConnectingPoint num="5" id="196" />
+<TGConnectingPoint num="6" id="197" />
+<TGConnectingPoint num="7" id="198" />
 <extraparam>
-<Attribute name_function="" clockName="my_clk" code="  sc_uint&lt;12&gt; inr;
-void pulse_gen_main(){
-	inr=rand()%4096;
-	sc_uint&lt;12&gt; inr;
-	outpready.write(1);
-	genout.write(inr) ;
-	//  expo[j].write((i3));
+<Attribute period="5.0E-4" time="ms" processCode="void processing() {
+	double t = get_time().to_seconds();
+	// actual time                     out1.write(2000.99 * std::sin( 2.0 * M_PI * freqoftheprobe * t ) );
+	//probesample.write(1);
 }
-      " listStruct="inr = 12 : int" nameTemplate="" typeTemplate="int" valueTemplate="" listTypedef="" />
+                                                                 " constructorCode="" listStruct="Ts = 1.0 : double|freqoftheprobe = 1000.0 : double" nameTemplate="" typeTemplate="int" valueTemplate="" listTypedef="" />
 </extraparam>
 </SUBCOMPONENT>
-<SUBCOMPONENT type="1605" id="172" >
-<father id="181" num="0" />
-<cdparam x="991" y="170" />
+<SUBCOMPONENT type="1604" id="190" >
+<father id="199" num="0" />
+<cdparam x="539" y="118" />
 <sizeparam width="20" height="20" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
 <hidden value="false" />
 <cdrectangleparam minX="-10" maxX="190" minY="-10" maxY="140" />
-<infoparam name="Primitive port - Port DE" value="outpready" />
-<TGConnectingPoint num="0" id="163" />
-<TGConnectingPoint num="1" id="164" />
-<TGConnectingPoint num="2" id="165" />
-<TGConnectingPoint num="3" id="166" />
-<TGConnectingPoint num="4" id="167" />
-<TGConnectingPoint num="5" id="168" />
-<TGConnectingPoint num="6" id="169" />
-<TGConnectingPoint num="7" id="170" />
-<TGConnectingPoint num="8" id="171" />
+<infoparam name="Primitive port - Port TDF" value="out1" />
+<TGConnectingPoint num="0" id="181" />
+<TGConnectingPoint num="1" id="182" />
+<TGConnectingPoint num="2" id="183" />
+<TGConnectingPoint num="3" id="184" />
+<TGConnectingPoint num="4" id="185" />
+<TGConnectingPoint num="5" id="186" />
+<TGConnectingPoint num="6" id="187" />
+<TGConnectingPoint num="7" id="188" />
+<TGConnectingPoint num="8" id="189" />
 <extraparam>
-<Prop commName="outpready" commType="0" origin="1" type="bool" sensitive="false" sensitive_method="" nbits="0" />
+<Prop commName="out1" commType="0" origin="1" period="5.0E-4" time="ms" rate="-1" delay="-1" type="double" />
 </extraparam>
 </SUBCOMPONENT>
-<SUBCOMPONENT type="1603" id="210" >
-<father id="237" num="6" />
-<cdparam x="510" y="261" />
+<SUBCOMPONENT type="1603" id="228" >
+<father id="237" num="8" />
+<cdparam x="135" y="288" />
 <sizeparam width="200" height="150" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
 <hidden value="false" />
 <cdrectangleparam minX="0" maxX="873" minY="0" maxY="554" />
-<infoparam name="Primitive component - Block DE" value="abscalc1" />
-<TGConnectingPoint num="0" id="202" />
-<TGConnectingPoint num="1" id="203" />
-<TGConnectingPoint num="2" id="204" />
-<TGConnectingPoint num="3" id="205" />
-<TGConnectingPoint num="4" id="206" />
-<TGConnectingPoint num="5" id="207" />
-<TGConnectingPoint num="6" id="208" />
-<TGConnectingPoint num="7" id="209" />
+<infoparam name="Primitive component - Block DE" value="adcre1" />
+<TGConnectingPoint num="0" id="220" />
+<TGConnectingPoint num="1" id="221" />
+<TGConnectingPoint num="2" id="222" />
+<TGConnectingPoint num="3" id="223" />
+<TGConnectingPoint num="4" id="224" />
+<TGConnectingPoint num="5" id="225" />
+<TGConnectingPoint num="6" id="226" />
+<TGConnectingPoint num="7" id="227" />
 <extraparam>
-<Attribute name_function="" clockName="my_clk" code="           sc_uint&lt;12&gt; inr;
-sc_uint&lt;12&gt;   inr4;
-sc_uint&lt;12&gt;   inr3,inr1,inr2;
-sc_uint&lt;12&gt;   he1;
-sc_uint&lt;1&gt;    q;
-int asdf;
-//------------Code Starts Here-------------------------   // Below function implements actual counter logic   void abs_calc () {
-	q=inr[11];
-	inr4=(inputfromadc.read());
-	//hel=abs(inr4);
-	inr=inputfromadc.read();
-	if (inr&lt;2048) {
-		inr1=inr;
-	}
-	else {
-		inr3=~(inr) ;
-		inr1=inr3+1;
-	}
-	absoutput.write(inr1);
+<Attribute name_function="" clockName="my_clk" clockSensitivityMethod="" code="void adcre_main() {
+	adcregisteroutput.write(adcregisterinput.read());
 }
-                   " listStruct="" nameTemplate="" typeTemplate="int" valueTemplate="" listTypedef="" />
+                                      //sensitive &lt;&lt;clockffp.pos();
+" listStruct="" nameTemplate="" typeTemplate="int" valueTemplate="" listTypedef="" />
 </extraparam>
 </SUBCOMPONENT>
-<SUBCOMPONENT type="1605" id="191" >
-<father id="210" num="0" />
-<cdparam x="500" y="285" />
+<SUBCOMPONENT type="1605" id="209" >
+<father id="228" num="0" />
+<cdparam x="289" y="278" />
 <sizeparam width="20" height="20" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
 <hidden value="false" />
 <cdrectangleparam minX="-10" maxX="190" minY="-10" maxY="140" />
-<infoparam name="Primitive port - Port DE" value="inputfromadc" />
-<TGConnectingPoint num="0" id="182" />
-<TGConnectingPoint num="1" id="183" />
-<TGConnectingPoint num="2" id="184" />
-<TGConnectingPoint num="3" id="185" />
-<TGConnectingPoint num="4" id="186" />
-<TGConnectingPoint num="5" id="187" />
-<TGConnectingPoint num="6" id="188" />
-<TGConnectingPoint num="7" id="189" />
-<TGConnectingPoint num="8" id="190" />
+<infoparam name="Primitive port - Port DE" value="adcregisterinput" />
+<TGConnectingPoint num="0" id="200" />
+<TGConnectingPoint num="1" id="201" />
+<TGConnectingPoint num="2" id="202" />
+<TGConnectingPoint num="3" id="203" />
+<TGConnectingPoint num="4" id="204" />
+<TGConnectingPoint num="5" id="205" />
+<TGConnectingPoint num="6" id="206" />
+<TGConnectingPoint num="7" id="207" />
+<TGConnectingPoint num="8" id="208" />
 <extraparam>
-<Prop commName="inputfromadc" commType="0" origin="0" type="sc_uint" sensitive="true" sensitive_method="positive" nbits="12" />
+<Prop commName="adcregisterinput" commType="0" origin="0" type="sc_dt::sc_int" sensitive="true" sensitive_method="positive" nbits="12" />
 </extraparam>
 </SUBCOMPONENT>
-<SUBCOMPONENT type="1605" id="201" >
-<father id="210" num="1" />
-<cdparam x="700" y="336" />
+<SUBCOMPONENT type="1605" id="219" >
+<father id="228" num="1" />
+<cdparam x="325" y="323" />
 <sizeparam width="20" height="20" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
 <hidden value="false" />
 <cdrectangleparam minX="-10" maxX="190" minY="-10" maxY="140" />
-<infoparam name="Primitive port - Port DE" value="absoutput" />
-<TGConnectingPoint num="0" id="192" />
-<TGConnectingPoint num="1" id="193" />
-<TGConnectingPoint num="2" id="194" />
-<TGConnectingPoint num="3" id="195" />
-<TGConnectingPoint num="4" id="196" />
-<TGConnectingPoint num="5" id="197" />
-<TGConnectingPoint num="6" id="198" />
-<TGConnectingPoint num="7" id="199" />
-<TGConnectingPoint num="8" id="200" />
-<extraparam>
-<Prop commName="absoutput" commType="0" origin="1" type="sc_uint" sensitive="true" sensitive_method="positive" nbits="12" />
-</extraparam>
-</SUBCOMPONENT>
-<SUBCOMPONENT type="5721" id="219" >
-<father id="237" num="7" />
-<cdparam x="394" y="513" />
-<sizeparam width="200" height="150" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
-<hidden value="false" />
-<cdrectangleparam minX="0" maxX="873" minY="0" maxY="554" />
-<infoparam name="TGComponent" value="my_clk" />
-<TGConnectingPoint num="0" id="211" />
-<TGConnectingPoint num="1" id="212" />
-<TGConnectingPoint num="2" id="213" />
-<TGConnectingPoint num="3" id="214" />
-<TGConnectingPoint num="4" id="215" />
-<TGConnectingPoint num="5" id="216" />
-<TGConnectingPoint num="6" id="217" />
-<TGConnectingPoint num="7" id="218" />
-<extraparam>
-<Attribute name_function="" nameTemplate="" frequency ="0.002" unit="ms" dutyCycle="0.5" startTime="0.001" posFirst ="false" />
-</extraparam>
-</SUBCOMPONENT>
-<SUBCOMPONENT type="5721" id="228" >
-<father id="237" num="8" />
-<cdparam x="144" y="509" />
-<sizeparam width="200" height="150" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
-<hidden value="false" />
-<cdrectangleparam minX="0" maxX="873" minY="0" maxY="554" />
-<infoparam name="TGComponent" value="my_clk1" />
-<TGConnectingPoint num="0" id="220" />
-<TGConnectingPoint num="1" id="221" />
-<TGConnectingPoint num="2" id="222" />
-<TGConnectingPoint num="3" id="223" />
-<TGConnectingPoint num="4" id="224" />
-<TGConnectingPoint num="5" id="225" />
-<TGConnectingPoint num="6" id="226" />
-<TGConnectingPoint num="7" id="227" />
+<infoparam name="Primitive port - Port DE" value="adcregisteroutput" />
+<TGConnectingPoint num="0" id="210" />
+<TGConnectingPoint num="1" id="211" />
+<TGConnectingPoint num="2" id="212" />
+<TGConnectingPoint num="3" id="213" />
+<TGConnectingPoint num="4" id="214" />
+<TGConnectingPoint num="5" id="215" />
+<TGConnectingPoint num="6" id="216" />
+<TGConnectingPoint num="7" id="217" />
+<TGConnectingPoint num="8" id="218" />
 <extraparam>
-<Attribute name_function="" nameTemplate="" frequency ="0.001" unit="ms" dutyCycle="1.0" startTime="1.0" posFirst ="false" />
+<Prop commName="adcregisteroutput" commType="0" origin="1" type="sc_dt::sc_int" sensitive="true" sensitive_method="positive" nbits="12" />
 </extraparam>
 </SUBCOMPONENT>
 
diff --git a/src/main/java/syscamstranslator/toSysCAMSCluster/ClusterCode.java b/src/main/java/syscamstranslator/toSysCAMSCluster/ClusterCode.java
index cc1236cc613e15d91da343ea09cf01bed36b6d26..8d49e08ec1785afc5f0dd75fc62765f590ecaa7b 100644
--- a/src/main/java/syscamstranslator/toSysCAMSCluster/ClusterCode.java
+++ b/src/main/java/syscamstranslator/toSysCAMSCluster/ClusterCode.java
@@ -146,9 +146,18 @@ public class ClusterCode {
                                     + "sig_" + nb_con + ";" + CR;
                             names.add("sig_" + nb_con);
                         } else {
+			    if(((SysCAMSTPortConverter) connectors.get(i).get_p1().getComponent()).getNbits()==0){
                             corpsCluster = corpsCluster + "\tsc_core::sc_signal<" + ((SysCAMSTPortConverter) connectors.get(i).get_p1().getComponent()).getConvType() + "> " 
                                     + connectors.get(i).getName() + ";" + CR;
                             names.add(connectors.get(i).getName());
+			    } else {
+
+ corpsCluster = corpsCluster + "\tsc_core::sc_signal<" + ((SysCAMSTPortConverter) connectors.get(i).get_p1().getComponent()).getConvType() + "<"+ ((SysCAMSTPortConverter) connectors.get(i).get_p1().getComponent()).getNbits()+"> " +"> " 
+                                    + connectors.get(i).getName() + ";" + CR;
+                            names.add(connectors.get(i).getName());
+			    
+				
+			    }
                         }
                     } else if ((connectors.get(i).get_p2().getComponent() instanceof SysCAMSTPortConverter && connectors.get(i).get_p1().getComponent() instanceof SysCAMSTPortDE)) {
                         if (connectors.get(i).getName().equals("")) {
@@ -156,10 +165,20 @@ public class ClusterCode {
                                     + "sig_" + nb_con + ";" + CR;
                             names.add("sig_" + nb_con);
                         } else {
+			    if(((SysCAMSTPortConverter) connectors.get(i).get_p1().getComponent()).getNbits()==0){
                             corpsCluster = corpsCluster + "\tsc_core::sc_signal<" + ((SysCAMSTPortConverter) connectors.get(i).get_p2().getComponent()).getConvType() + "> " 
                                     + connectors.get(i).getName() + ";" + CR;
                             names.add(connectors.get(i).getName());
+			}
+			else{
+
+                            corpsCluster = corpsCluster + "\tsc_core::sc_signal<" + ((SysCAMSTPortConverter) connectors.get(i).get_p2().getComponent()).getConvType() + "<"+ ((SysCAMSTPortConverter) connectors.get(i).get_p1().getComponent()).getNbits()+"> " + "> " 
+                                    + connectors.get(i).getName() + ";" + CR;
+                            names.add(connectors.get(i).getName());
+			    
+			}
                         }
+			
                     } else if ((connectors.get(i).get_p1().getComponent() instanceof SysCAMSTPortDE && connectors.get(i).get_p2().getComponent() instanceof SysCAMSTPortDE) 
                             || (connectors.get(i).get_p2().getComponent() instanceof SysCAMSTPortDE && connectors.get(i).get_p1 ().getComponent() instanceof SysCAMSTPortDE)) {
                         if (connectors.get(i).getName().equals("")) {
@@ -167,9 +186,20 @@ public class ClusterCode {
                                     + "sig_" + nb_con + ";" + CR;
                             names.add("sig_" + nb_con);
                         } else {
+	if(((SysCAMSTPortDE) connectors.get(i).get_p2().getComponent()).getNbits()==0 )
+			    {
+			    
                             corpsCluster = corpsCluster + "\tsc_core::sc_signal<" + ((SysCAMSTPortDE) connectors.get(i).get_p1().getComponent()).getDEType() + "> " 
                                     + connectors.get(i).getName() + ";" + CR;
                             names.add(connectors.get(i).getName());
+			    }
+	else {
+			    
+                            corpsCluster = corpsCluster + "\tsc_core::sc_signal<" + ((SysCAMSTPortDE) connectors.get(i).get_p1().getComponent()).getDEType()  + "<"+ ((SysCAMSTPortDE) connectors.get(i).get_p1().getComponent()).getNbits()+"> " + "> " 
+                                    + connectors.get(i).getName() + ";" + CR;
+                            names.add(connectors.get(i).getName());
+			    }
+			    
                         }
                     }
 
diff --git a/src/main/java/syscamstranslator/toSysCAMSCluster/PrimitiveCodeCluster.java b/src/main/java/syscamstranslator/toSysCAMSCluster/PrimitiveCodeCluster.java
index 249df31b36b7a3f4d890851340e00ee18cc9b45f..3e27df51b4c06ca861b67c71eee13e086bd48728 100644
--- a/src/main/java/syscamstranslator/toSysCAMSCluster/PrimitiveCodeCluster.java
+++ b/src/main/java/syscamstranslator/toSysCAMSCluster/PrimitiveCodeCluster.java
@@ -144,7 +144,7 @@ public class PrimitiveCodeCluster {
 					}
 				}
 			}
-			if (!convports.isEmpty()) {
+			/*	if (!convports.isEmpty()) {
 				for (SysCAMSTPortConverter conv : convports) {
 					if (conv.getOrigin() == 0) {
 						corpsPrimitiveTDF = corpsPrimitiveTDF + "\tsca_tdf::sca_de::sca_in< " + conv.getConvType() + " > " + conv.getName() + ";" + CR;
@@ -152,8 +152,35 @@ public class PrimitiveCodeCluster {
 						corpsPrimitiveTDF = corpsPrimitiveTDF + "\tsca_tdf::sca_de::sca_out< " + conv.getConvType() + " > " + conv.getName() + ";" + CR;
 					}
 				}
+				}*/
+
+				if (!convports.isEmpty()) {
+			    // System.out.println("@@@@@ Conv ports non empty");
+				for (SysCAMSTPortConverter conv : convports) {
+
+				    //   if(conv.getConvType() !="sc_uint") {
+				    if(conv.getNbits()==0){
+				if (conv.getOrigin() == 0) {
+					    corpsPrimitiveTDF = corpsPrimitiveTDF + "\tsca_tdf::sca_de::sca_in <" + conv.getConvType()+"> " + conv.getName() + ";" + CR;
+					    
+					} else if (conv.getOrigin() == 1) {
+					    corpsPrimitiveTDF = corpsPrimitiveTDF + "\tsca_tdf::sca_de::sca_out <" + conv.getConvType()+"> "+ conv.getName() + ";" + CR;
+					}
+			}
+
+				else	{
+				    if (conv.getOrigin() == 0) {
+					    corpsPrimitiveTDF = corpsPrimitiveTDF + "\tsca_tdf::sca_de::sca_in <" + conv.getConvType()+"<" + conv.getNbits()+"> > " + conv.getName() + ";" + CR;
+					    
+					} else if (conv.getOrigin() == 1) {
+					    corpsPrimitiveTDF = corpsPrimitiveTDF + "\tsca_tdf::sca_de::sca_out <" + conv.getConvType()+"<" + conv.getNbits()+"> > "+ conv.getName() + ";" + CR;	
+					}
+				}					
+				
+				}
 			}
 
+
 			//corpsPrimitive = corpsPrimitive + CR + "\t// Constructor" + CR + "\tSCA_CTOR(" + tdf.getName() + ")" + CR;
 			corpsPrimitiveTDF = corpsPrimitiveTDF + CR + "\texplicit " + tdf.getName() + "(sc_core::sc_module_name nm";
 
@@ -450,7 +477,7 @@ public class PrimitiveCodeCluster {
 			corpsPrimitiveDE = corpsPrimitiveDE + "\tsc_core::sc_in <bool>"  + de.getClockName() + ";" + CR;
 
 			
-			if (!deports.isEmpty()) {
+			/*	if (!deports.isEmpty()) {
 				for (SysCAMSTPortDE t : deports) {
 					if (t.getOrigin() == 0) {
 						corpsPrimitiveDE = corpsPrimitiveDE + "\tsc_core::sc_in< " + t.getDEType() + " > " + t.getName() + ";" + CR;
@@ -458,7 +485,44 @@ public class PrimitiveCodeCluster {
 						corpsPrimitiveDE = corpsPrimitiveDE + "\tsc_core::sc_out< " + t.getDEType() + " > " + t.getName() + ";" + CR;
 					}
 				}
+			}*/
+
+
+
+	if (!deports.isEmpty()) {
+			    //System.out.println("@@@@@@@@@DE ports non empty");
+				for (SysCAMSTPortDE t : deports) {
+
+
+				    if(t.getNbits()==0)	    
+				    {	if (t.getOrigin() == 0) {
+						corpsPrimitiveDE = corpsPrimitiveDE + "\tsc_core::sc_in <" + t.getDEType() + ">"  + t.getName() + ";" + CR;
+					 
+						//System.out.println("@@@@@@@@@2DE "+t.getDEType()+t.getNbits());		
+					} else if (t.getOrigin() == 1) {
+					    corpsPrimitiveDE = corpsPrimitiveDE + "\tsc_core::sc_out <" + t.getDEType() + "> "+ t.getName() + ";" + CR;
+		 
+					    //System.out.println("@@@@@@@@@2DE "+t.getDEType()+t.getNbits());					
+					}
+				}
+				   else {
+
+if (t.getOrigin() == 0) {
+						corpsPrimitiveDE = corpsPrimitiveDE + "\tsc_core::sc_in <" + t.getDEType() + "<"+t.getNbits()+"> > " + t.getName() + ";" + CR;
+					 
+						//System.out.println("@@@@@@@@@2DE "+t.getDEType()+t.getNbits());		
+					} else if (t.getOrigin() == 1) {
+					    corpsPrimitiveDE = corpsPrimitiveDE + "\tsc_core::sc_out <" + t.getDEType() + "<"+t.getNbits() +"> > "+ t.getName() + ";" + CR;
+		 
+					    //System.out.println("@@@@@@@@@2DE "+t.getDEType()+t.getNbits());					
+					}
+
+				       
+				    }
+					
+				}
 			}
+			
 
 			corpsPrimitiveDE = corpsPrimitiveDE + CR + "\tSC_HAS_PROCESS(" + de.getName() + ");" + CR + 
 			"\texplicit " + de.getName() + "(sc_core::sc_module_name nm";