Skip to content
Snippets Groups Projects
Commit 98588d89 authored by Ludovic Apvrille's avatar Ludovic Apvrille
Browse files

HashCode on TML specifications

parent 58ff5f53
No related branches found
No related tags found
No related merge requests found
......@@ -98,7 +98,7 @@ documentation:
$(JAVADOC) $(CLASSPATH) $(TTOOL_SRC) -d $(TTOOL_DOC_HTML) $(TTOOL_SRC)/*.java $(TTOOL_SRC)/*/*.java $(TTOOL_SRC)/*/*/*.java $(TTOOL_SRC)/fr/inria/oasis/vercors/cttool/model/*.java
release: jttooljar launcher tiftranslator tmltranslator remotesimulator ttooljar_std stdrelease
echo release done
@echo release done
########## RELEASE
stdrelease:
......@@ -117,19 +117,21 @@ stdrelease:
cd $(TTOOL_MODELING); cp $(RELEASE_STD_FILES_LIB) $(TTOOL_TARGET)/lib
cp $(TTOOL_DOC)/README_lib $(TTOOL_TARGET)/lib
# simulators
mkdir -p $(TTOOL_TARGET)/simulators/version1/src_simulator
mkdir -p $(TTOOL_TARGET)/simulators/version1/lib
cp $(TTOOL_SIMULATORS)/systemc1/Makefile $(TTOOL_TARGET)/simulators/version1
cp $(TTOOL_SIMULATORS)/systemc1/Makefile.defs $(TTOOL_TARGET)/simulators/version1
cp $(TTOOL_SIMULATORS)/systemc1/src_simulator/*.cpp $(TTOOL_TARGET)/simulators/version1/src_simulator
cp $(TTOOL_SIMULATORS)/systemc1/src_simulator/*.h $(TTOOL_TARGET)/simulators/version1/src_simulator
mkdir -p $(TTOOL_TARGET)/simulators/version2/src_simulator
mkdir -p $(TTOOL_TARGET)/simulators/version2/lib
cp $(TTOOL_SIMULATORS)/c++2/Makefile $(TTOOL_TARGET)/simulators/version2
cp $(TTOOL_SIMULATORS)/c++2/Makefile.defs $(TTOOL_TARGET)/simulators/version2
cp $(TTOOL_SIMULATORS)/c++2/schedstyle.css $(TTOOL_TARGET)/simulators/version2
cp $(TTOOL_SIMULATORS)/c++2/src_simulator/*.cpp $(TTOOL_TARGET)/simulators/version2/src_simulator
cp $(TTOOL_SIMULATORS)/c++2/src_simulator/*.h $(TTOOL_TARGET)/simulators/version2/src_simulator
mkdir -p $(TTOOL_TARGET)/simulators/systemc1/src_simulator
mkdir -p $(TTOOL_TARGET)/simulators/systemc1/lib
cp $(TTOOL_SIMULATORS)/systemc1/lib/README $(TTOOL_TARGET)/simulators/systemc1/lib/
cp $(TTOOL_SIMULATORS)/systemc1/Makefile $(TTOOL_TARGET)/simulators/systemc1
cp $(TTOOL_SIMULATORS)/systemc1/Makefile.defs $(TTOOL_TARGET)/simulators/systemc1
cp $(TTOOL_SIMULATORS)/systemc1/src_simulator/*.cpp $(TTOOL_TARGET)/simulators/systemc1/src_simulator
cp $(TTOOL_SIMULATORS)/systemc1/src_simulator/*.h $(TTOOL_TARGET)/simulators/systemc1/src_simulator
mkdir -p $(TTOOL_TARGET)/simulators/c++2/src_simulator
mkdir -p $(TTOOL_TARGET)/simulators/c++2/lib
cp $(TTOOL_SIMULATORS)/c++2/lib/README $(TTOOL_TARGET)/simulators/c++2/lib/
cp $(TTOOL_SIMULATORS)/c++2/Makefile $(TTOOL_TARGET)/simulators/c++2
cp $(TTOOL_SIMULATORS)/c++2/Makefile.defs $(TTOOL_TARGET)/simulators/c++2
cp $(TTOOL_SIMULATORS)/c++2/schedstyle.css $(TTOOL_TARGET)/simulators/c++2
cp $(TTOOL_SIMULATORS)/c++2/src_simulator/*.cpp $(TTOOL_TARGET)/simulators/c++2/src_simulator
cp $(TTOOL_SIMULATORS)/c++2/src_simulator/*.h $(TTOOL_TARGET)/simulators/c++2/src_simulator
# Licenses
cd $(TTOOL_DOC); cp $(RELEASE_STD_FILES_LICENSES) $(TTOOL_TARGET)
# Main readme
......
......@@ -54,6 +54,9 @@ public class TMLArchitecture {
private int masterClockFrequency = 200; // in MHz
private int hashCode;
private boolean hashCodeComputed = false;
public TMLArchitecture() {
init();
......@@ -64,6 +67,21 @@ public class TMLArchitecture {
hwlinks = new ArrayList<HwLink>();
}
private void computeHashCode() {
TMLArchiTextSpecification architxt = new TMLArchiTextSpecification("spec.tarchi");
String s = architxt.toTextFormat(this);
hashCode = s.hashCode();
System.out.println("TARCHI hashcode = " + hashCode);
}
public int getHashCode() {
if (!hashCodeComputed) {
computeHashCode();
hashCodeComputed = true;
}
return hashCode;
}
public void setMasterClockFrequency(int value) {
masterClockFrequency = value;
}
......
......@@ -58,6 +58,9 @@ public class TMLMapping {
private ArrayList<TMLElement> mappedcommelts;
private boolean optimized = false;
private int hashCode;
private boolean hashCodeComputed = false;
public TMLMapping(TMLModeling _tmlm, TMLArchitecture _tmla) {
tmlm = _tmlm;
......@@ -89,6 +92,21 @@ public class TMLMapping {
return tmla;
}
private void computeHashCode() {
hashCode = tmlm.getHashCode() + tmla.getHashCode();
TMLMappingTextSpecification tmaptxt = new TMLMappingTextSpecification("spec.tmap");
hashCode += tmaptxt.toString().hashCode();
System.out.println("TMAP hashcode = " + hashCode);
}
public int getHashCode() {
if (!hashCodeComputed) {
computeHashCode();
hashCodeComputed = true;
}
return hashCode;
}
public ArrayList<HwExecutionNode> getNodes(){
return onnodes;
}
......
......@@ -72,6 +72,8 @@ public class TMLMappingTextSpecification {
private String taskparameters[] = {"PRIORITY"};
private int hashCode;
public TMLMappingTextSpecification(String _title) {
title = _title;
......
......@@ -36,7 +36,7 @@ The fact that you are presently reading this means that you have had
knowledge of the CeCILL license and that you accept its terms.
/**
* Class TMLTask
* Class TMLModeling
* Creation: 21/11/2005
* @version 1.0 21/11/2005
* @author Ludovic APVRILLE
......@@ -60,6 +60,9 @@ public class TMLModeling {
private boolean optimized = false;
private String[] ops = {">", "<", "+", "-", "*", "/", "[", "]", "(", ")", ":", "=", "==", ","};
private int hashCode;
private boolean hashCodeComputed = false;
public TMLModeling() {
init();
......@@ -114,6 +117,21 @@ public class TMLModeling {
}
return null;
}
private void computeHashCode() {
TMLTextSpecification tmltxt = new TMLTextSpecification("spec.tml");
String s = tmltxt.toTextFormat(this);
hashCode = s.hashCode();
System.out.println("TML hashcode = " + hashCode);
}
public int getHashCode() {
if (!hashCodeComputed) {
computeHashCode();
hashCodeComputed = true;
}
return hashCode;
}
public String toString() {
String s = tasksToString();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment