diff --git a/src/main/java/syscamstranslator/SysCAMSTBlockDE.java b/src/main/java/syscamstranslator/SysCAMSTBlockDE.java
index ea5bc822604116ba9bd47e4b1d19e211cc1dfd12..9bcb3fe91ba7ed78cd13369a0c9ad4c05d7d843c 100644
--- a/src/main/java/syscamstranslator/SysCAMSTBlockDE.java
+++ b/src/main/java/syscamstranslator/SysCAMSTBlockDE.java
@@ -52,6 +52,7 @@ import javax.swing.DefaultListModel;
 
 public class SysCAMSTBlockDE extends SysCAMSTComponent {
 	private String name;
+    	private String clockName;
 //	private int period;
 //	private String time;
 	private String nameFn;
@@ -66,8 +67,9 @@ public class SysCAMSTBlockDE extends SysCAMSTComponent {
 	
 	private LinkedList<SysCAMSTPortDE> portDE;
 	
-	public SysCAMSTBlockDE(String _name, String _nameFn, String _code, DefaultListModel<String> _listStruct, String _nameTemplate, String _typeTemplate, String _valueTemplate, DefaultListModel<String> _listTypedef, SysCAMSTCluster _cluster) {
+	public SysCAMSTBlockDE(String _name, String _clockName, String _nameFn, String _code, DefaultListModel<String> _listStruct, String _nameTemplate, String _typeTemplate, String _valueTemplate, DefaultListModel<String> _listTypedef, SysCAMSTCluster _cluster) {
 		name = _name;
+		clockName = _clockName;
 //		period = _period;
 //		time = _time;
 		nameFn = _nameFn;
@@ -93,6 +95,11 @@ public class SysCAMSTBlockDE extends SysCAMSTComponent {
 		return name;
 	}
 
+	public String getClockName() {
+		return clockName;
+	}
+
+    
 	public String getNameFn() {
 		return nameFn;
 	}
diff --git a/src/main/java/syscamstranslator/SysCAMSTClock.java b/src/main/java/syscamstranslator/SysCAMSTClock.java
index 369705e19b1ed03d88736804d3f9f209b56e0e07..3144723f9daf0ef8907240aa3744d8abf4cd2319 100644
--- a/src/main/java/syscamstranslator/SysCAMSTClock.java
+++ b/src/main/java/syscamstranslator/SysCAMSTClock.java
@@ -48,19 +48,21 @@ import javax.swing.DefaultListModel;
 
 public class SysCAMSTClock extends SysCAMSTComponent{
     private String name;
-    private String frequency;
+    private double frequency;
     private String unit;
-    private String dutyCycle;
-    private String startTime;
-    private String posFirst;
+    private double dutyCycle;
+    private double startTime;
+    private String unitStartTime;
+    private boolean posFirst;
 	
-    public SysCAMSTClock(String _name, String _frequency,  String _unit, String _dutyCycle, String _startTime, String _posFirst) {
+    public SysCAMSTClock(String _name, double _frequency,  String _unit, double _dutyCycle, double _startTime, String _unitStartTime, boolean _posFirst) {
      
     	name = _name;
 	frequency	= _frequency;
 	unit	= _unit;
 	dutyCycle	= _dutyCycle;
 	startTime	= _startTime;
+	unitStartTime	= _unitStartTime;
 	posFirst	= _posFirst; 
     }
 
@@ -69,7 +71,7 @@ public class SysCAMSTClock extends SysCAMSTComponent{
 		return name;
 	}
 
-    	public String getFrequency() {
+    	public double getFrequency() {
 		return frequency;
 	}
 
@@ -77,16 +79,20 @@ public class SysCAMSTClock extends SysCAMSTComponent{
 		return unit;
 	}
 
-        public String getDutyCycle() {
+	public String getUnitStartTime() {
+		return unitStartTime;
+	}
+    
+        public double getDutyCycle() {
 		return dutyCycle;
 	}
 
-    public String getStartTime() {
+    public double getStartTime() {
 		return startTime;
 	}
     
     
-    	public String getPosFirst() {
+    	public boolean getPosFirst() {
 		return posFirst;
 	}
 
@@ -95,7 +101,7 @@ public class SysCAMSTClock extends SysCAMSTComponent{
 		name = _name;
 	}
  
-    	public void setFrequency(String _frequency) {
+    	public void setFrequency(double _frequency) {
 		 frequency = _frequency;
 	}
 
@@ -103,17 +109,21 @@ public class SysCAMSTClock extends SysCAMSTComponent{
 		unit = _unit;
 	}
 
-        public void setDutyCycle(String _dutyCycle) {
+       public void setUnitStartTime(String _unitStartTime) {
+		unitStartTime = _unitStartTime;
+	}
+
+        public void setDutyCycle(double _dutyCycle) {
 		dutyCycle = _dutyCycle;
 	}
 
 
-        public void setStartTime(String _startTime) {
+        public void setStartTime(double _startTime) {
 	       startTime = _startTime;
 	}
     
     
-    	public void setPosFirst(String _posFirst) {
+    public void setPosFirst(boolean _posFirst) {
 		posFirst = _posFirst;
 	}
       
diff --git a/src/main/java/syscamstranslator/SysCAMSTCluster.java b/src/main/java/syscamstranslator/SysCAMSTCluster.java
index 17b8059778c918b3b4ec2e8c3b92869f70639d08..6f9f7593e53cfd7dc31e901c4fbcbd5c1b80e88e 100644
--- a/src/main/java/syscamstranslator/SysCAMSTCluster.java
+++ b/src/main/java/syscamstranslator/SysCAMSTCluster.java
@@ -81,13 +81,13 @@ public class SysCAMSTCluster extends SysCAMSTComponent {
 	public void addBlockDE(SysCAMSTBlockDE _blockDE){
 		blockDE.add(_blockDE);
 	}
+
+    	public void addClock(SysCAMSTClock _clock){
+		clock.add(_clock);
+	}
     
 	public LinkedList<SysCAMSTClock> getClock(){
 		return clock;
 	}
 
-	public void addBlockDE(SysCAMSTClock _clock){
-		clock.add(_clock);
-	}
-    
 }
diff --git a/src/main/java/syscamstranslator/SysCAMSTPortConverter.java b/src/main/java/syscamstranslator/SysCAMSTPortConverter.java
index 98a45a4148ee7243d01f7628da5ca4823cb0d501..1997ea6b746ca362e685bae5b80c984e19c91ca7 100644
--- a/src/main/java/syscamstranslator/SysCAMSTPortConverter.java
+++ b/src/main/java/syscamstranslator/SysCAMSTPortConverter.java
@@ -54,18 +54,20 @@ public class SysCAMSTPortConverter extends SysCAMSTComponent {
 	private int rate;
 	private int delay;
 	private int origin;
+    	private int nbits;
 	private String ConvType;
     private boolean recompute;
 	
 	private SysCAMSTBlockTDF blockTDF;
 	
-	public SysCAMSTPortConverter(String _name, double _period, String _time, int _rate, int _delay, int _origin, String _ConvType, SysCAMSTBlockTDF _blockTDF) {
+	public SysCAMSTPortConverter(String _name, double _period, String _time, int _rate, int _delay, int _origin, int _nbits, String _ConvType, SysCAMSTBlockTDF _blockTDF) {
 		name = _name;
 		period = _period;
 		time = _time;
 		rate = _rate;
 		delay = _delay;
 		origin = _origin;
+		nbits = _nbits;
 		ConvType = _ConvType;
 		blockTDF = _blockTDF;
         recompute = false;
@@ -90,6 +92,11 @@ public class SysCAMSTPortConverter extends SysCAMSTComponent {
 	public int getRate() {
 		return rate;
 	}
+
+	public int getNbits() {
+		return nbits;
+	}
+    
     
     public void setRate(int _rate) {
 		rate = _rate;
@@ -119,6 +126,10 @@ public class SysCAMSTPortConverter extends SysCAMSTComponent {
 		return ConvType;
 	}
 
+    public void setConvType(String _ConvType) {
+	ConvType = _ConvType;
+	}
+
 	public SysCAMSTBlockTDF getBlockTDF() {
 		return blockTDF;
 	}
diff --git a/src/main/java/syscamstranslator/SysCAMSTPortDE.java b/src/main/java/syscamstranslator/SysCAMSTPortDE.java
index 961db9e4e08a851feb59bb8e1ac5cc10ec3eba2e..22633316eac89fdb83942997db4e49794fab0d43 100644
--- a/src/main/java/syscamstranslator/SysCAMSTPortDE.java
+++ b/src/main/java/syscamstranslator/SysCAMSTPortDE.java
@@ -56,6 +56,7 @@ public class SysCAMSTPortDE extends SysCAMSTComponent {
 //	private int rate;
 //	private int delay;
 	private int origin;
+         private int nbits;
 	private String DEType;
 	private boolean sensitive;
 	private String sensitiveMethod;
@@ -65,52 +66,56 @@ public class SysCAMSTPortDE extends SysCAMSTComponent {
 	private ELNTCluster cluster;
 	private ELNTModule module;
 	
-	public SysCAMSTPortDE(String _name, int _origin, String _DEType, boolean _sensitive, String _sensitiveMethod, SysCAMSTBlockDE _blockDE) {
+	public SysCAMSTPortDE(String _name, int _origin, int _nbits, String _DEType, boolean _sensitive, String _sensitiveMethod, SysCAMSTBlockDE _blockDE) {
 		name = _name;
 //		period = _period;
 //		time = _time;
 //		rate = _rate;
 //		delay = _delay;
 		origin = _origin;
+		nbits= _nbits;
 		DEType = _DEType;
 		sensitive = _sensitive;
 		sensitiveMethod = _sensitiveMethod;
 		blockDE = _blockDE;
 	}
 	
-	public SysCAMSTPortDE(String _name, int _origin, String _DEType, boolean _sensitive, String _sensitiveMethod, SysCAMSTBlockGPIO2VCI _blockGPIO2VCI) {
+	public SysCAMSTPortDE(String _name, int _origin, int _nbits, String _DEType, boolean _sensitive, String _sensitiveMethod, SysCAMSTBlockGPIO2VCI _blockGPIO2VCI) {
 		name = _name;
 //		period = _period;
 //		time = _time;
 //		rate = _rate;
 //		delay = _delay;
-		origin = _origin;
+		origin = _origin; 
+		nbits= _nbits;
 		DEType = _DEType;
 		sensitive = _sensitive;
 		sensitiveMethod = _sensitiveMethod;
 		blockGPIO2VCI = _blockGPIO2VCI;
 	}
 	
-	public SysCAMSTPortDE(String _name, int _origin, String _DEType, boolean _sensitive, String _sensitiveMethod, ELNTCluster _cluster) {
+	public SysCAMSTPortDE(String _name, int _origin, int _nbits, String _DEType, boolean _sensitive, String _sensitiveMethod, ELNTCluster _cluster) {
 		name = _name;
 //		period = _period;
 //		time = _time;
 //		rate = _rate;
 //		delay = _delay;ELNTCluster
 		origin = _origin;
+		nbits= _nbits;
 		DEType = _DEType;
 		sensitive = _sensitive;
 		sensitiveMethod = _sensitiveMethod;
 		cluster = _cluster;
 	}
 
-	public SysCAMSTPortDE(String _name, int _origin, String _DEType, boolean _sensitive, String _sensitiveMethod, ELNTModule _module) {
+	public SysCAMSTPortDE(String _name, int _origin, int _nbits, String _DEType, boolean _sensitive, String _sensitiveMethod, ELNTModule _module) {
 		name = _name;
 //		period = _period;
 //		time = _time;
 //		rate = _rate;
 //		delay = _delay;ELNTCluster
 		origin = _origin;
+		nbits= _nbits;
 		DEType = _DEType;
 		sensitive = _sensitive;
 		sensitiveMethod = _sensitiveMethod;
@@ -141,10 +146,18 @@ public class SysCAMSTPortDE extends SysCAMSTComponent {
 		return origin;
 	}
 
+    	public int getNbits() {
+		return nbits;
+	}
+
 	public String getDEType() {
 		return DEType;
 	}
 
+ public void setDEType(String _DEType) {
+	DEType = _DEType;
+	}
+    
 	public boolean getSensitive() {
 		return sensitive;
 	}
@@ -168,4 +181,4 @@ public class SysCAMSTPortDE extends SysCAMSTComponent {
 	public ELNTModule getModule() {
 		return module;
 	}
-}
\ No newline at end of file
+}
diff --git a/src/main/java/syscamstranslator/toSysCAMS/ClusterCode.java b/src/main/java/syscamstranslator/toSysCAMS/ClusterCode.java
index 9eee38a252b01ca8c7f48d9e8666377fe80c5677..25b63678b3295fc6e6b38cbbdfaf4d975fb963df 100644
--- a/src/main/java/syscamstranslator/toSysCAMS/ClusterCode.java
+++ b/src/main/java/syscamstranslator/toSysCAMS/ClusterCode.java
@@ -73,6 +73,8 @@ public class ClusterCode {
 		if (cluster != null) {
 			LinkedList<SysCAMSTBlockTDF> tdf = cluster.getBlockTDF();
 			LinkedList<SysCAMSTBlockDE> de = cluster.getBlockDE();
+			LinkedList<SysCAMSTClock> clock = cluster.getClock();
+			
 
 			corpsCluster = "// Simulation entry point." + CR + "int sc_main(int argc, char *argv[]) {" + CR2 
 					+ "\tusing namespace sc_core;" + CR + "\tusing namespace sca_util;" + CR2;
@@ -83,54 +85,63 @@ public class ClusterCode {
 				if ((c.get_p1().getComponent() instanceof SysCAMSTPortTDF && c.get_p2().getComponent() instanceof SysCAMSTPortTDF) 
 						|| (c.get_p1().getComponent() instanceof SysCAMSTPortTDF && c.get_p2().getComponent() instanceof SysCAMSTPortTDF)) {
 					if (c.getName().equals("")) {
-						corpsCluster = corpsCluster + "\tsca_tdf::sca_signal<" + ((SysCAMSTPortTDF) c.get_p1().getComponent()).getTDFType() + "> " 
+						corpsCluster = corpsCluster + "\tsca_tdf::sca_signal<" + ((SysCAMSTPortTDF) c.get_p1().getComponent()).getTDFType() + " > " 
 								+ "sig_" + nb_con + ";" + CR;
 						names.add("sig_" + nb_con);
 						nb_con++;
 					} else {
-						corpsCluster = corpsCluster + "\tsca_tdf::sca_signal<" + ((SysCAMSTPortTDF) c.get_p1().getComponent()).getTDFType() + "> " 
+						corpsCluster = corpsCluster + "\tsca_tdf::sca_signal<" + ((SysCAMSTPortTDF) c.get_p1().getComponent()).getTDFType() + " > " 
 								+ c.getName() + ";" + CR;
 						names.add(c.getName());
 					}
 				} else if ((c.get_p1().getComponent() instanceof SysCAMSTPortConverter && c.get_p2().getComponent() instanceof SysCAMSTPortDE)) {
 					if (c.getName().equals("")) {
-						corpsCluster = corpsCluster + "\tsca_tdf::sca_signal<" + ((SysCAMSTPortConverter) c.get_p1().getComponent()).getConvType() + "> " 
+						corpsCluster = corpsCluster + "\tsca_tdf::sca_signal<" + ((SysCAMSTPortConverter) c.get_p1().getComponent()).getConvType() + " > " 
 								+ "sig_" + nb_con + ";" + CR;
 						names.add("sig_" + nb_con);
 						nb_con++;
 					} else {
-						corpsCluster = corpsCluster + "\tsca_tdf::sca_signal<" + ((SysCAMSTPortConverter) c.get_p1().getComponent()).getConvType() + "> " 
+						corpsCluster = corpsCluster + "\tsca_tdf::sca_signal<" + ((SysCAMSTPortConverter) c.get_p1().getComponent()).getConvType() + " > " 
 								+ c.getName() + ";" + CR;
 						names.add(c.getName());
 					}
 				} else if ((c.get_p2().getComponent() instanceof SysCAMSTPortConverter && c.get_p1().getComponent() instanceof SysCAMSTPortDE)) {
 					if (c.getName().equals("")) {
-						corpsCluster = corpsCluster + "\tsca_tdf::sca_signal<" + ((SysCAMSTPortConverter) c.get_p2().getComponent()).getConvType() + "> " 
+						corpsCluster = corpsCluster + "\tsca_tdf::sca_signal<" + ((SysCAMSTPortConverter) c.get_p2().getComponent()).getConvType() + " > " 
 								+ "sig_" + nb_con + ";" + CR;
 						names.add("sig_" + nb_con);
 						nb_con++;
 					} else {
-						corpsCluster = corpsCluster + "\tsca_tdf::sca_signal<" + ((SysCAMSTPortConverter) c.get_p2().getComponent()).getConvType() + "> " 
+						corpsCluster = corpsCluster + "\tsca_tdf::sca_signal<" + ((SysCAMSTPortConverter) c.get_p2().getComponent()).getConvType() + " > " 
 								+ c.getName() + ";" + CR;
 						names.add(c.getName());
 					}
 				} else if ((c.get_p1().getComponent() instanceof SysCAMSTPortDE && c.get_p2().getComponent() instanceof SysCAMSTPortDE) 
 						|| (c.get_p2().getComponent() instanceof SysCAMSTPortDE && c.get_p1	().getComponent() instanceof SysCAMSTPortDE)) {
 					if (c.getName().equals("")) {
-						corpsCluster = corpsCluster + "\tsc_core::sc_signal<" + ((SysCAMSTPortDE) c.get_p1().getComponent()).getDEType() + "> " 
+						corpsCluster = corpsCluster + "\tsc_core::sc_signal<" + ((SysCAMSTPortDE) c.get_p1().getComponent()).getDEType() + " > " 
 								+ "sig_" + nb_con + ";" + CR;
 						names.add("sig_" + nb_con);
 						nb_con++;
 					} else {
-						corpsCluster = corpsCluster + "\tsc_core::sc_signal<" + ((SysCAMSTPortDE) c.get_p1().getComponent()).getDEType() + "> " 
+						corpsCluster = corpsCluster + "\tsc_core::sc_signal<" + ((SysCAMSTPortDE) c.get_p1().getComponent()).getDEType() + " > " 
 								+ c.getName() + ";" + CR;
 						names.add(c.getName());
 					}
 				}
 			}
 
-			corpsCluster = corpsCluster + CR + "\t// Instantiate headers files as well as bind their ports to the signal." + CR;
 
+			corpsCluster = corpsCluster + CR + "\t// Instantiate clocks." + CR;
+			
+			for (SysCAMSTClock t : clock) {
+			       
+			    corpsCluster = corpsCluster + "\t  sc_clock " + t.getName() + " (\"" + t.getName() + "\"," + t.getFrequency()+","+ t.getUnit()+","+ t.getDutyCycle()+","+ t.getStartTime()+","+ t.getUnit()+","+ t.getPosFirst()+");" + CR;
+			}
+					
+			corpsCluster = corpsCluster + CR + "\t// Instantiate headers files as well as bind their ports to the signal." + CR;
+			
+			
 			for (SysCAMSTBlockTDF t : tdf) {
 				corpsCluster = corpsCluster + "\t" + t.getName() + " " + t.getName() + "_" + nb_block + "(\"" + t.getName() + "_" + nb_block + "\");" + CR;
 
@@ -202,6 +213,9 @@ public class ClusterCode {
 				nb_block++;
 			}
 
+
+			
+
 			corpsCluster = corpsCluster + "\t// Configure signal tracing." + CR 
 					+ "\tsca_trace_file* tfp = sca_create_tabular_trace_file(\"" + cluster.getClusterName() + "_tb\");" + CR;
 
diff --git a/src/main/java/syscamstranslator/toSysCAMS/Header.java b/src/main/java/syscamstranslator/toSysCAMS/Header.java
index c5a14792643758157ea7f9e114eeb9566bc7144f..382661ce99d5efb0749bcd71f3272ee7910fe480 100644
--- a/src/main/java/syscamstranslator/toSysCAMS/Header.java
+++ b/src/main/java/syscamstranslator/toSysCAMS/Header.java
@@ -91,17 +91,25 @@ public class Header {
 	
 	public static String getClusterHeader(SysCAMSTCluster cluster) {
 		 if (cluster != null) {
-			 LinkedList<SysCAMSTBlockTDF> blocks = cluster.getBlockTDF();
-			 
-			 headerCluster = "#include <systemc-ams>" + CR;
+		      headerCluster = "#include <systemc-ams>" + CR;
+		      LinkedList<SysCAMSTBlockTDF> blocks = cluster.getBlockTDF();			 			
 			 
 			 for (SysCAMSTBlockTDF b : blocks) {
-				 headerCluster = headerCluster + "#include \"" + b.getName() + ".h\"" + CR;
+			     headerCluster = headerCluster + "#include \"generated_H/" + b.getName() + ".h\"" + CR;//modification DG
+			 }
+
+			 //ajoute DG
+	 LinkedList<SysCAMSTBlockDE> blocksDE = cluster.getBlockDE();
+			 					 
+			 for (SysCAMSTBlockDE b : blocksDE) {
+			     headerCluster = headerCluster + "#include \"generated_H/" + b.getName() + ".h\"" + CR;//DG
 			 }
+			 
 			 headerCluster = headerCluster + CR;
 		 } else {
 			 headerCluster = "";
 		 }
+		
 		 return headerCluster;
-	} 
+	}
 }
diff --git a/src/main/java/syscamstranslator/toSysCAMS/MakefileCode.java b/src/main/java/syscamstranslator/toSysCAMS/MakefileCode.java
index 6080c5e4dd30844b5e12be61e623727f1f168627..e9ca713066f640ce01c3d618c6dd39e4358fd0c0 100644
--- a/src/main/java/syscamstranslator/toSysCAMS/MakefileCode.java
+++ b/src/main/java/syscamstranslator/toSysCAMS/MakefileCode.java
@@ -54,6 +54,8 @@ import syscamstranslator.*;
  * 
  * @version 1.0 02/06/2018
  * @author Irina Kit Yan LEE
+ * @version 1.1 10/07/2019
+ * @author Daniela GENIUS
  */
 
 public class MakefileCode {
@@ -93,11 +95,11 @@ public class MakefileCode {
 						+ clusters.get(i).getClusterName() + "_tb.cpp";
 
 				for (SysCAMSTBlockTDF t : tdf) {
-					corpsMakefile = corpsMakefile + " " + t.getName() + ".h";
+					corpsMakefile = corpsMakefile+ " generated_H/" + t.getName() + ".h";
 				}
 
 				for (SysCAMSTBlockDE t : de) {
-					corpsMakefile = corpsMakefile + " " + t.getName() + ".h";
+					corpsMakefile = corpsMakefile + " generated_H/" + t.getName() + ".h";
 				}
 				corpsMakefile = corpsMakefile + CR
 						+ "\t$(CXX) $(CXXFLAGS) $(LDFLAGS) -o $@ $< -lsystemc-ams -lsystemc | c++filt" + CR2;
@@ -110,4 +112,4 @@ public class MakefileCode {
 		}
 		return corpsMakefile;
 	}
-}
\ 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 7bb2dc6ebefaa6cbb2480b21a17bfc721d5d555e..64b646d1724f4a674d5e501926608704f95f6d90 100644
--- a/src/main/java/syscamstranslator/toSysCAMS/TopCellGenerator.java
+++ b/src/main/java/syscamstranslator/toSysCAMS/TopCellGenerator.java
@@ -56,6 +56,8 @@ import java.util.LinkedList;
  * Creation: 14/05/2018
  * @version 1.0 14/05/2018
  * @author Irina Kit Yan LEE
+ * @version 1.1 12/07/2018
+ * @author Irina Kit Yan LEE, Daniela GENIUS
 */
 
 public class TopCellGenerator {
@@ -105,13 +107,9 @@ public class TopCellGenerator {
 		try {
 			// Save file .cpp
 			System.err.println(path + GENERATED_PATH1 + cluster.getClusterName() + ".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{
+			System.err.println(path + cluster.getClusterName() + ".cpp");			
 			    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);
@@ -132,18 +130,13 @@ public class TopCellGenerator {
 		for (SysCAMSTBlockTDF t : tdf) {
 			try {
 				System.err.println(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
+				System.err.println(path + t.getName() + ".h"); 						
 			    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();
 			
@@ -154,18 +147,13 @@ public class TopCellGenerator {
 		for (SysCAMSTBlockDE t : de) {
 			try {
 				System.err.println(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
+				System.err.println(path + t.getName() + ".h");
+							
 				    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();
 			
diff --git a/src/main/java/syscamstranslator/toSysCAMSCluster/ClusterCode.java b/src/main/java/syscamstranslator/toSysCAMSCluster/ClusterCode.java
index d45c3e4a1731850f1b5c122c847975a60f7af262..8477757c5d8aed9909cf75b58da1aad183552d5f 100644
--- a/src/main/java/syscamstranslator/toSysCAMSCluster/ClusterCode.java
+++ b/src/main/java/syscamstranslator/toSysCAMSCluster/ClusterCode.java
@@ -74,7 +74,18 @@ public class ClusterCode {
 			
             corpsCluster = "template <typename vci_param>" + CR +
                           "class " +cluster.getClusterName()+ " : public sc_core::sc_module { "+ CR;
-                          
+
+
+
+
+			for (SysCAMSTClock t : clock) {
+			    System.out.println("Cluster clock");
+			    corpsCluster = corpsCluster + "\t  sc_clock " + t.getName() + " (\"" + t.getName() + "\"," + t.getFrequency()+","+ t.getUnit()+","+ t.getDutyCycle()+","+ t.getStartTime()+","+ t.getUnit()+","+ t.getPosFirst()+");" + CR;
+			}
+			//ToDo 9.7.2019: add lines for reading (several) clock ports and sensitivity lists
+
+
+	    
             for (SysCAMSTBlockTDF t : tdf) {
                 if (!t.getListTypedef().isEmpty()) {
                     for (int i = 0; i < t.getListTypedef().getSize(); i++) {
@@ -301,7 +312,7 @@ public class ClusterCode {
 				corpsCluster = corpsCluster + CR;
 				nb_block++;
 			}
-            
+			
             corpsCluster = corpsCluster + "\t}" + CR2;
 			
 			corpsCluster = corpsCluster + "\t// Configure signal tracing." + CR;
diff --git a/src/main/java/syscamstranslator/toSysCAMSCluster/PrimitiveCodeCluster.java b/src/main/java/syscamstranslator/toSysCAMSCluster/PrimitiveCodeCluster.java
index e8a1b1e4f94ccc50f2f4a17d0a3f66e276a209d4..6c5508653e828077bbe710d25167b9054b14ac7f 100644
--- a/src/main/java/syscamstranslator/toSysCAMSCluster/PrimitiveCodeCluster.java
+++ b/src/main/java/syscamstranslator/toSysCAMSCluster/PrimitiveCodeCluster.java
@@ -38,11 +38,6 @@
  * knowledge of the CeCILL license and that you accept its terms.
  */
 
-/* this class produces the lines containing essentially the initial #includes; we include all potential components event if they are not used in the deployment diagram*/
-
-/* authors: v1.0 Raja GATGOUT 2014
-            v2.0 Daniela GENIUS, Julien HENON 2015 */
-
 package syscamstranslator.toSysCAMSCluster;
 
 import java.util.LinkedList;
@@ -55,6 +50,8 @@ import syscamstranslator.*;
  * Creation: 14/05/2018
  * @version 1.0 14/05/2018
  * @author Irina Kit Yan LEE
+ * @version 1.1 12/07/2019
+ * @author Irina Kit Yan LEE, Daniela GENIUS
  */
 
 public class PrimitiveCodeCluster {
@@ -130,10 +127,11 @@ public class PrimitiveCodeCluster {
 					if ((i > 0)) {
 						corpsPrimitiveTDF = corpsPrimitiveTDF + "\t\t, " + identifier + "(" + value + ")" + CR;
 					} 
-                    if (i == tdf.getListStruct().getSize()-1) {
-                        corpsPrimitiveTDF = corpsPrimitiveTDF + "\t\t{}" + CR;
-                    }
+					// if (i == tdf.getListStruct().getSize()-1) {
+					// corpsPrimitiveTDF = corpsPrimitiveTDF + "\t\t{}" + CR;
+					//  }//deleted DG
 				}
+				corpsPrimitiveTDF = corpsPrimitiveTDF + "\t\t{}" + CR;//moved DG
 				corpsPrimitiveTDF = corpsPrimitiveTDF + "\t};" + CR2;
 			}
 
@@ -440,9 +438,9 @@ public class PrimitiveCodeCluster {
 					if ((i > 0)) {
 						corpsPrimitiveDE = corpsPrimitiveDE + "\t\t, " + identifier + "(" + value + ")" + CR;
 					} 
-                    if (i == de.getListStruct().getSize()-1) {
-                        corpsPrimitiveDE = corpsPrimitiveDE + "\t\t{}" + CR;
-                    }
+					if (i == de.getListStruct().getSize()-1) {
+					    corpsPrimitiveDE = corpsPrimitiveDE + "\t\t{}" + CR;
+					}
 				}
 				corpsPrimitiveDE = corpsPrimitiveDE + "\t};" + CR2;
 			}
@@ -533,6 +531,10 @@ public class PrimitiveCodeCluster {
 			}
 			
 			corpsPrimitiveDE = corpsPrimitiveDE + "private:" + CR;
+
+			if(de.getClockName()!=""){
+			    corpsPrimitiveDE = corpsPrimitiveDE +"sc_in<bool> "+de.getClockName()+";"+CR;
+			}
 			
 			if (de.getListStruct().getSize() != 0) {
 				String identifier, type, constant;
diff --git a/src/main/java/syscamstranslator/toSysCAMSCluster/TopCellGeneratorCluster.java b/src/main/java/syscamstranslator/toSysCAMSCluster/TopCellGeneratorCluster.java
index b19109685986197382b2547516727067d684d040..132a4a05bf23b18c87bf8181f8de87bcba758577 100644
--- a/src/main/java/syscamstranslator/toSysCAMSCluster/TopCellGeneratorCluster.java
+++ b/src/main/java/syscamstranslator/toSysCAMSCluster/TopCellGeneratorCluster.java
@@ -38,11 +38,7 @@
   knowledge of the CeCILL license and that you accept its terms.
 */
 
-/* Generator of the top cell for simulation with SoCLib virtual component 
-   library */
-
-/* authors: v1.0 Raja GATGOUT 2014
-            v2.0 Daniela GENIUS, Julien HENON 2015 */
+/* Generator of the top cell for simulation with SystemC-AMS */
 
 package syscamstranslator.toSysCAMSCluster;
 
@@ -57,7 +53,9 @@ import java.util.LinkedList;
  * @version 1.0 14/05/2018
  * @author Irina Kit Yan LEE
  * @version 1.1 30/07/2018
- * @author Rodrigo CORTES PORTO
+ * @author Irina Kit Yan LEE, Rodrigo CORTES PORTO
+ * @version 1.2 12/07/2019
+ * @author Irina Kit Yan LEE, Rodrigo CORTES PORTO, Daniela GENIUS
 */
 
 public class TopCellGeneratorCluster {
@@ -76,25 +74,7 @@ public class TopCellGeneratorCluster {
 	public String generateTopCell(SysCAMSTCluster c, LinkedList<SysCAMSTConnector> connectors) {
 		if (c == null) {
 			System.out.println("***Warning: require at least one cluster***");
-		}
-		/*if (TopCellGeneratorCluster.syscams.getNbBlockTDF() == 0) {
-			System.out.println("***Warning: require at least one TDF block***");
-		}
-		if (TopCellGeneratorCluster.syscams.getNbPortTDF() == 0) {
-			System.out.println("***Warning: require at least one TDF port***");
-		}
-		if (TopCellGeneratorCluster.syscams.getNbBlockDE() == 0) {
-			System.out.println("***Warning: require at least one DE block***");
-		}
-		if (TopCellGeneratorCluster.syscams.getNbPortDE() == 0) {
-			System.out.println("***Warning: require at least one DE port***");
-		}
-		if (TopCellGeneratorCluster.syscams.getNbPortConverter() == 0) {
-			System.out.println("***Warning: require at least one converter port***");
-		}
-		if (TopCellGeneratorCluster.syscams.getNbConnectorCluster() == 0) {
-			System.out.println("***Warning: require at least one connector***");
-		}*/
+		}       	
 		String top = HeaderCluster.getClusterHeader(c) + ClusterCode.getClusterCode(c, connectors);
 		return (top);
 	}
@@ -108,13 +88,8 @@ public class TopCellGeneratorCluster {
 		try {
 			// Save file .cpp
 			System.err.println(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");
+			System.err.println(path + cluster.getClusterName() + "_tdf.h");		
+			fw = new FileWriter(path + GENERATED_PATH1 + "/" + cluster.getClusterName() + "_tdf.h");
 		
 			top = generateTopCell(cluster, connectors);
 			fw.write(top);
@@ -137,13 +112,7 @@ public class TopCellGeneratorCluster {
 		for (SysCAMSTBlockTDF t : tdf) {
 			try {
 				System.err.println(path + GENERATED_PATH2 + t.getName() + "_tdf.h");
-				System.err.println(path + t.getName() + "_tdf.h");
-				if(standalone==true){
-				
-				    fw = new FileWriter(path + "/" + t.getName() + "_tdf.h");
-				}
-				
-				else
+				System.err.println(path + t.getName() + "_tdf.h");			
 				    fw = new FileWriter(path + GENERATED_PATH2 + "/" + t.getName() + "_tdf.h");
 				headerTDF = HeaderCluster.getPrimitiveHeaderTDF(t);
 				fw.write(headerTDF);
@@ -158,15 +127,9 @@ public class TopCellGeneratorCluster {
 		}
 		for (SysCAMSTBlockDE t : de) {
 			try {
-				System.err.println(path + GENERATED_PATH2 + t.getName() + "_tdf.h");	System.err.println(path + GENERATED_PATH2 + t.getName() + "_tdf.h");
+				System.err.println(path + GENERATED_PATH2 + t.getName() + "_tdf.h");	System.err.println(path + GENERATED_PATH2 + t.getName() + "_tdf.h");		       	
 			
- 	
-				if(standalone==true)
-				    {
-				
-					fw = new FileWriter(path +"/" + t.getName() + "_tdf.h");}
-				else
-				    fw = new FileWriter(path + GENERATED_PATH2 + "/" + t.getName() + "_tdf.h");
+				fw = new FileWriter(path + GENERATED_PATH2 + "/" + t.getName() + "_tdf.h");
 				
 				headerDE = HeaderCluster.getPrimitiveHeaderDE(t);
 				fw.write(headerDE);
diff --git a/src/main/java/syscamstranslator/toSysCAMSSoclib/ClusterCodeSoclib.java b/src/main/java/syscamstranslator/toSysCAMSSoclib/ClusterCodeSoclib.java
index e4ad7d96fc5cd45f8e0b1a671ee774c0b63f2b95..8bd4b9d752e8fffe80d82361380cf93bf4ef1875 100644
--- a/src/main/java/syscamstranslator/toSysCAMSSoclib/ClusterCodeSoclib.java
+++ b/src/main/java/syscamstranslator/toSysCAMSSoclib/ClusterCodeSoclib.java
@@ -71,6 +71,8 @@ public class ClusterCodeSoclib {
 		if (cluster != null) {
 			LinkedList<SysCAMSTBlockTDF> tdf = cluster.getBlockTDF();
 			LinkedList<SysCAMSTBlockDE> de = cluster.getBlockDE();
+
+			LinkedList<SysCAMSTClock> clock = cluster.getClock();
 			
 			System.out.println("Number of AMS connectors: " + connectors.size());
                         
@@ -85,15 +87,15 @@ public class ClusterCodeSoclib {
                 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() + "> " 
+                        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() + "> " 
+                        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() + "> " 
+                        corpsCluster = corpsCluster + "\tsc_core::sc_signal<" + ((SysCAMSTPortDE) connectors.get(i).get_p1().getComponent()).getDEType() + " > " 
                         + "sig_" + nb_con + ";" + CR;
                         //nb_con++;
                     }
@@ -101,6 +103,16 @@ public class ClusterCodeSoclib {
 			}
 
 			corpsCluster = corpsCluster + CR + "\t// Instantiate cluster's modules." + CR;
+
+
+
+			for (SysCAMSTClock t : clock) {
+			    corpsCluster = corpsCluster + "\t  sc_clock " + t.getName() + " (\"" + t.getName() + "\"," + t.getFrequency()+","+ t.getUnit()+","+ t.getDutyCycle()+","+ t.getStartTime()+","+ t.getUnit()+","+ t.getPosFirst()+");" + CR;
+			}
+			//ToDo 9.7.2019: add lines for reading (several) clock ports and sensitivity lists
+
+
+			
             for (SysCAMSTBlockTDF t : tdf) {
                 corpsCluster = corpsCluster + "\t" + t.getName() + " " +
                   t.getName() + "_" + nb_block + ";" + CR;
diff --git a/src/main/java/syscamstranslator/toSysCAMSSoclib/PrimitiveCodeSoclib.java b/src/main/java/syscamstranslator/toSysCAMSSoclib/PrimitiveCodeSoclib.java
index 55a4d75a0e6667b650a87a97499114ad73b23476..15bbfda6c5c51ed9d2a820fc273f661d98ec25b1 100644
--- a/src/main/java/syscamstranslator/toSysCAMSSoclib/PrimitiveCodeSoclib.java
+++ b/src/main/java/syscamstranslator/toSysCAMSSoclib/PrimitiveCodeSoclib.java
@@ -38,11 +38,6 @@
  * knowledge of the CeCILL license and that you accept its terms.
  */
 
-/* this class produces the lines containing essentially the initial #includes; we include all potential components event if they are not used in the deployment diagram*/
-
-/* authors: v1.0 Raja GATGOUT 2014
-            v2.0 Daniela GENIUS, Julien HENON 2015 */
-
 package syscamstranslator.toSysCAMSSoclib;
 
 import java.util.LinkedList;
@@ -55,6 +50,8 @@ import syscamstranslator.*;
  * Creation: 14/05/2018
  * @version 1.0 14/05/2018
  * @author Irina Kit Yan LEE
+ * @version 1.0 12/07/2019
+ * @author Irina Kit Yan LEE, Daniela GENIUS
  */
 
 public class PrimitiveCodeSoclib {
@@ -131,29 +128,33 @@ public class PrimitiveCodeSoclib {
 						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;
+					    //	corpsPrimitiveTDF = corpsPrimitiveTDF + "\t\t, " + identifier + "(" + value + ")" + CR + "\t\t{}" + CR;
+				corpsPrimitiveTDF = corpsPrimitiveTDF + "\t\t, " + identifier + "(" + value + ")" + CR;	    
 					} else {
-						corpsPrimitiveTDF = corpsPrimitiveTDF + "\t\t{}" + CR;
+					    //	corpsPrimitiveTDF = corpsPrimitiveTDF + "\t\t{}" + CR;
 					}
 				}
+				corpsPrimitiveTDF = corpsPrimitiveTDF + "\t\t{}" + CR;//moved DG
 				corpsPrimitiveTDF = corpsPrimitiveTDF + "\t};" + CR2;
 			}
 
 			if (!tdfports.isEmpty()) {
 				for (SysCAMSTPortTDF t : tdfports) {
 					if (t.getOrigin() == 0) {
-						corpsPrimitiveTDF = corpsPrimitiveTDF + "\tsca_tdf::sca_in< " + t.getTDFType() + " > " + t.getName() + ";" + CR;
+						corpsPrimitiveTDF = corpsPrimitiveTDF + "\tsca_tdf::sca_in < " + t.getTDFType() + " > " + t.getName() + ";" + CR;
 					} else if (t.getOrigin() == 1) {
-						corpsPrimitiveTDF = corpsPrimitiveTDF + "\tsca_tdf::sca_out< " + t.getTDFType() + " > " + t.getName() + ";" + CR;
+						corpsPrimitiveTDF = corpsPrimitiveTDF + "\tsca_tdf::sca_out < " + t.getTDFType() + " > " + t.getName() + ";" + CR;
 					}
 				}
 			}
 			if (!convports.isEmpty()) {
 				for (SysCAMSTPortConverter conv : convports) {
 					if (conv.getOrigin() == 0) {
-						corpsPrimitiveTDF = corpsPrimitiveTDF + "\tsca_tdf::sca_de::sca_in< " + conv.getConvType() + " > " + conv.getName() + ";" + CR;
+					    //	corpsPrimitiveTDF = corpsPrimitiveTDF + "\tsca_tdf::sca_de::sca_in < " + conv.getConvType() + " > " + conv.getName() + ";" + CR;
+					   corpsPrimitiveTDF = corpsPrimitiveTDF + "\tsca_tdf::sca_de::sca_in <" + conv.getConvType()+"<" + conv.getNbits()+"> > " + conv.getName() + ";" + CR;	System.out.println("@@@@@@@@@2SoclibConv"+conv.getConvType()+conv.getNbits());	
 					} else if (conv.getOrigin() == 1) {
-						corpsPrimitiveTDF = corpsPrimitiveTDF + "\tsca_tdf::sca_de::sca_out< " + conv.getConvType() + " > " + conv.getName() + ";" + CR;
+					    //	corpsPrimitiveTDF = corpsPrimitiveTDF + "\tsca_tdf::sca_de::sca_out < " + conv.getConvType() + " > " + conv.getName() + ";" + CR;
+					        corpsPrimitiveTDF = corpsPrimitiveTDF + "\tsca_tdf::sca_de::sca_out <" + conv.getConvType()+"<" + conv.getNbits()+"> > "+ conv.getName() + ";" + CR;	System.out.println("@@@@@@@@@2SoclibConv"+conv.getConvType()+conv.getNbits());
 					}
 				}
 			}
@@ -441,21 +442,23 @@ public class PrimitiveCodeSoclib {
 					if ((i > 0) && (i < de.getListStruct().getSize()-1)) {
 						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 && i != 0) {
+					//	corpsPrimitiveDE = corpsPrimitiveDE + "\t\t, " + identifier + "(" + value + ")" + CR + "\t\t{}" + CR;
+				corpsPrimitiveDE = corpsPrimitiveDE + "\t\t, " + identifier + "(" + value + ")"  + CR;		
+				//	} else {
+				//	corpsPrimitiveDE = corpsPrimitiveDE + "\t\t{}" + CR;
+				//	}
 				}
+				corpsPrimitiveDE = corpsPrimitiveDE + "\t\t{}" + CR;
 				corpsPrimitiveDE = corpsPrimitiveDE + "\t};" + CR2;
 			}
 
 			if (!deports.isEmpty()) {
 				for (SysCAMSTPortDE t : deports) {
 					if (t.getOrigin() == 0) {
-						corpsPrimitiveDE = corpsPrimitiveDE + "\tsca_core::sca_in<" + t.getDEType() + "> " + t.getName() + ";" + CR;
+						corpsPrimitiveDE = corpsPrimitiveDE + "\tsca_core::sca_in <" + t.getDEType() + " > " + t.getName() + ";" + CR;
 					} else if (t.getOrigin() == 1) {
-						corpsPrimitiveDE = corpsPrimitiveDE + "\tsca_core::sca_out<" + t.getDEType() + "> " + t.getName() + ";" + CR;
+						corpsPrimitiveDE = corpsPrimitiveDE + "\tsca_core::sca_out <" + t.getDEType() + " > " + t.getName() + ";" + CR;
 					}
 				}
 			}
@@ -534,6 +537,10 @@ public class PrimitiveCodeSoclib {
 			}
 			
 			corpsPrimitiveDE = corpsPrimitiveDE + "private:" + CR;
+
+			if(de.getClockName()!=""){
+			    corpsPrimitiveDE = corpsPrimitiveDE +"sc_in<bool> "+de.getClockName()+";"+CR;
+			}
 			
 			if (de.getListStruct().getSize() != 0) {
 				String identifier, type, constant;
diff --git a/src/main/java/syscamstranslator/toSysCAMSSoclib/TopCellGeneratorSoclib.java b/src/main/java/syscamstranslator/toSysCAMSSoclib/TopCellGeneratorSoclib.java
index 9a10b13afe7fbd637fb09a253b71fd93a5dfc7be..e5cbb6b2a94b097a48972f20a5651c9335d7f9de 100644
--- a/src/main/java/syscamstranslator/toSysCAMSSoclib/TopCellGeneratorSoclib.java
+++ b/src/main/java/syscamstranslator/toSysCAMSSoclib/TopCellGeneratorSoclib.java
@@ -47,8 +47,6 @@
 package syscamstranslator.toSysCAMSSoclib;
 
 import syscamstranslator.*;
-import syscamstranslator.toSysCAMS.TopCellGenerator;
-
 import java.io.*;
 import java.util.LinkedList;
 
@@ -58,6 +56,8 @@ import java.util.LinkedList;
  * Creation: 14/05/2018
  * @version 1.0 14/05/2018
  * @author Irina Kit Yan LEE
+ * @version 1.1 12/07/2019
+ * @author Irina Kit Yan LEE, Daniela Genius
 */
 
 public class TopCellGeneratorSoclib {
@@ -77,22 +77,22 @@ public class TopCellGeneratorSoclib {
 		if (c == null) {
 			System.out.println("***Warning: require at least one cluster***");
 		}
-		if (TopCellGenerator.syscams.getNbBlockTDF() == 0) {
+		if (TopCellGeneratorSoclib.syscams.getNbBlockTDF() == 0) {
 			System.out.println("***Warning: require at least one TDF block***");
 		}
-		if (TopCellGenerator.syscams.getNbPortTDF() == 0) {
+		if (TopCellGeneratorSoclib.syscams.getNbPortTDF() == 0) {
 			System.out.println("***Warning: require at least one TDF port***");
 		}
-		if (TopCellGenerator.syscams.getNbBlockDE() == 0) {
+		if (TopCellGeneratorSoclib.syscams.getNbBlockDE() == 0) {
 			System.out.println("***Warning: require at least one DE block***");
 		}
-		if (TopCellGenerator.syscams.getNbPortDE() == 0) {
+		if (TopCellGeneratorSoclib.syscams.getNbPortDE() == 0) {
 			System.out.println("***Warning: require at least one DE port***");
 		}
-		if (TopCellGenerator.syscams.getNbPortConverter() == 0) {
+		if (TopCellGeneratorSoclib.syscams.getNbPortConverter() == 0) {
 			System.out.println("***Warning: require at least one converter port***");
 		}
-		if (TopCellGenerator.syscams.getNbConnectorCluster() == 0) {
+		if (TopCellGeneratorSoclib.syscams.getNbConnectorCluster() == 0) {
 			System.out.println("***Warning: require at least one connector***");
 		}
 		String top = HeaderSoclib.getClusterHeader(c) + ClusterCodeSoclib.getClusterCode(c, connectors);
@@ -100,19 +100,15 @@ public class TopCellGeneratorSoclib {
 	}
 
     public void saveFile(String path, Boolean standalone) {
-		SysCAMSTCluster cluster = TopCellGenerator.syscams.getCluster();
-		LinkedList<SysCAMSTConnector> connectors = TopCellGenerator.syscams.getAllConnectorCluster();
+		SysCAMSTCluster cluster = TopCellGeneratorSoclib.syscams.getCluster();
+		LinkedList<SysCAMSTConnector> connectors = TopCellGeneratorSoclib.syscams.getAllConnectorCluster();
 		FileWriter fw;
 		String top;
 
 		try {
 			// Save file .cpp
 			System.err.println(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
+			System.err.println(path + cluster.getClusterName() + "_tdf.h");				
 			    fw = new FileWriter(path + GENERATED_PATH1 + "/" + cluster.getClusterName() + "_tdf.h");
 			top = generateTopCell(cluster, connectors);
 			fw.write(top);
@@ -134,20 +130,13 @@ public class TopCellGeneratorSoclib {
 		for (SysCAMSTBlockTDF t : tdf) {
 			try {
 				System.err.println(path + GENERATED_PATH2 + t.getName() + "_tdf.h");
-				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
+				System.err.println(path + t.getName() + "_tdf.h");						
 				    fw = new FileWriter(path + GENERATED_PATH2 + "/" + t.getName() + "_tdf.h");
 				    
 				headerTDF = HeaderSoclib.getPrimitiveHeaderTDF(t);
 				fw.write(headerTDF);
 			
-				codeTDF = PrimitiveCodeSoclib.getPrimitiveCodeTDF(t);
-				//	if(standalone==false)
-				//   codeTDF = codeTDF + CR + "};" + CR2 + "#endif"+CR;//DG				
+				codeTDF = PrimitiveCodeSoclib.getPrimitiveCodeTDF(t);					
 				fw.write(codeTDF);
 			
 				fw.close();
@@ -158,19 +147,12 @@ public class TopCellGeneratorSoclib {
 		}
 		for (SysCAMSTBlockDE t : de) {
 			try {
-				System.err.println(path + GENERATED_PATH2 + t.getName() + "_tdf.h");
-			
-				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"); 
+				System.err.println(path + GENERATED_PATH2 + t.getName() + "_tdf.h");			
+				fw = new FileWriter(path + GENERATED_PATH2 + "/" + t.getName() + "_tdf.h"); 
 				headerDE = HeaderSoclib.getPrimitiveHeaderDE(t);
 				fw.write(headerDE);
 			
-				codeDE = PrimitiveCodeSoclib.getPrimitiveCodeDE(t);
-				//if(standalone==false)
-				//   codeDE = codeDE + CR + "};" + CR2 + "#endif" +CR;
+				codeDE = PrimitiveCodeSoclib.getPrimitiveCodeDE(t);			
 				fw.write(codeDE);
 				fw.close();