Skip to content
Snippets Groups Projects

New lip6

Closed Daniela Genius requested to merge new-lip6 into master
1 file
+ 0
9
Compare changes
  • Side-by-side
  • Inline
@@ -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;
Loading