Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • mbe-tools/TTool
1 result
Show changes
Commits on Source (55)
Showing
with 16826 additions and 1733 deletions
13163
\ No newline at end of file
13182
\ No newline at end of file
......@@ -38,7 +38,7 @@
\sloppy
\begin{center}
\Large Telecom ParisTech \\
\Large Telecom Paris \\
\Large COMELEC Department \\
\vspace{20 pt}
\underline{\Huge Development Infrastructure for TTool}
......@@ -55,7 +55,7 @@
\textbf{Name} & Dominique BLOUIN & Ludovic APVRILLE &
\multirow{2}{*}{Ludovic APVRILLE} \\
\hhline{--~~}
\textbf{Contact} & dominique.blouin@telecom-paristech.fr & \multirow{2}{*}{Arthur VUAGNIAUX} & \\
\textbf{Contact} & dominique.blouin@telecom-paris.fr & \multirow{2}{*}{Arthur VUAGNIAUX} & \\
\hhline{--~~}
\textbf{Date} & \today & Matteo BERTOLINO & \\
\hline
......@@ -146,9 +146,9 @@ as well as the testing, building and installation procedures.
\subsection{Gitlab Server}
TTool sources are hosted on the Gitlab server of \textbf{Telecom ParisTech} under the
TTool sources are hosted on the Gitlab server of \textbf{Telecom Paris} under the
group \textbf{\textit{mbe}\textit{-tools}} and project \textbf{\textit{TTool}}. The Gitlab project
can be accessed via \url{https://gitlab.telecom-paristech.fr/users/sign_in}.
can be accessed via \url{https://gitlab.telecom-paris.fr/users/sign_in}.
Login must be performed using Shibboleth as shown in
figure~\ref{fig:image1}, using the credentials from your institution if it is a
member of the Federation Education Recherche (\url{https://services.renater.fr/federation/participants/idp}). Otherwise, please ask us for an account.
......@@ -163,7 +163,7 @@ member of the Federation Education Recherche (\url{https://services.renater.fr/f
\subsection{Basic Sources Management}
The address to access the sources is \url{https://gitlab.telecom-paristech.fr/mbe-tools/TTool}.
The address to access the sources is \url{https://gitlab.telecom-paris.fr/mbe-tools/TTool}.
For the time being and until further notice, we will keep using a centralized development process, like it was the case for Subversion. In this process, each developer first obtains a clone of the master remote repository. For this, go to the directory where the sources are to be downloaded and issue the following command: \\
......@@ -188,13 +188,13 @@ More information on the use of Git can be found here: \\
By default, Git will ask credentials for each operation. In order to avoid this,
it is possible to upload a public SSH key at: \\
\url{https://gitlab.telecom-paristech.fr/profile/keys}.
\url{https://gitlab.telecom-paris.fr/profile/keys}.
\subsection{Bug Tracking}
The Gitlab server provides an issues tracking system to record bugs, evolutions
or support demands from users and developers. Issues can be seen at: \\
\url{https://gitlab.telecom-paristech.fr/mbe-tools/TTool/issues} \\
\url{https://gitlab.telecom-paris.fr/mbe-tools/TTool/issues} \\
It is suggested to create an issue for every modification that is made to the
code, providing with the issue detailed information on the problem including
......@@ -1240,7 +1240,7 @@ The current version of IzPack used by TTool is 5.1.3.
\subsection{Sources}
The sources of the installer are located in the TTool-Private Gitlab project at \url{https://gitlab.telecom-paristech.fr/mbe-tools/TTool-Private/tree/master/installer}.
The sources of the installer are located in the TTool-Private Gitlab project at \url{https://gitlab.telecom-paris.fr/mbe-tools/TTool-Private/tree/master/installer}.
\subsection{Configuration File}
......
SRCS = generated_src/main.c generated_src/MeasurementDisplayer2.c generated_src/MeasurementDisplayer1.c generated_src/MeasurementGenerator.c
\ No newline at end of file
SRCS = generated_src/main.c generated_src/AlarmActuator.c generated_src/PressureSensor.c generated_src/PressureController.c generated_src/AlarmManager.c generated_src/MainController.c generated_src/Timer__alarmTimer__AlarmManager.c
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
......@@ -37,8 +37,6 @@
*/
package tmltranslator;
import tmltranslator.modelcompiler.ArchUnitMEC;
......@@ -48,16 +46,17 @@ import tmltranslator.modelcompiler.CpuMEC;
/**
* Class HwCPU
* Creation: 05/09/2007
* @version 1.0 05/09/2007
*
* @author Ludovic APVRILLE
* @version 1.0 05/09/2007
*/
public class HwCPU extends HwExecutionNode {
public class HwCPU extends HwExecutionNode {
public static final int BASIC_ROUND_ROBIN = 0;
public static final int ROUND_ROBIN_PRIORITY_BASED = 1;
public static final int ENCRYPTION_NONE= 0;
public static final int ENCRYPTION_SW= 1;
public static final int ENCRYPTION_HW= 2;
public static final int ENCRYPTION_NONE = 0;
public static final int ENCRYPTION_SW = 1;
public static final int ENCRYPTION_HW = 2;
public static final int DEFAULT_NB_OF_CORES = 1;
public static final int DEFAULT_BYTE_DATA_SIZE = 4;
public static final int DEFAULT_PIPELINE_SIZE = 5;
......@@ -70,7 +69,7 @@ public class HwCPU extends HwExecutionNode {
public static final int DEFAULT_SLICE_TIME = 10000; // in microseconds
public static final ArchUnitMEC DEFAULT_MODEL_EXTENSION_CONSTRUCT = new CpuMEC();
public int encryption = 0;
public int encryption = 0;
public int nbOfCores = DEFAULT_NB_OF_CORES; // Should be equal or greater than 1
public int byteDataSize = DEFAULT_BYTE_DATA_SIZE; // Should be greater than 0
public int pipelineSize = DEFAULT_PIPELINE_SIZE; // Should be greater than 0
......@@ -89,21 +88,37 @@ public class HwCPU extends HwExecutionNode {
}
public String getType() {
switch(schedulingPolicy) {
case ROUND_ROBIN_PRIORITY_BASED:
return "CPURRPB";
case BASIC_ROUND_ROBIN:
default:
return "CPURR";
switch (schedulingPolicy) {
case ROUND_ROBIN_PRIORITY_BASED:
return "CPURRPB";
case BASIC_ROUND_ROBIN:
default:
return "CPURR";
}
}
public HwCPU clone() {
HwCPU cpu = new HwCPU(name);
cpu.encryption = encryption;
cpu.nbOfCores = nbOfCores;
cpu.byteDataSize = byteDataSize;
cpu.pipelineSize = pipelineSize;
cpu.goIdleTime = goIdleTime;
cpu.maxConsecutiveIdleCycles = maxConsecutiveIdleCycles;
cpu.taskSwitchingTime = taskSwitchingTime;
cpu.branchingPredictionPenalty = branchingPredictionPenalty;
cpu.cacheMiss = cacheMiss;
cpu.schedulingPolicy = schedulingPolicy;
cpu.sliceTime = sliceTime;
cpu.MEC = MEC;
return cpu;
}
public String toXML() {
String s = "<CPU name=\"" + name + "\" clockRatio=\"" + clockRatio + "\" byteDataSize=\"" + byteDataSize + "\" execiTime=\"" + execiTime + "\" execcTime=\"" + execcTime + "\" pipelineSize=\"";
s += pipelineSize + "\" goIdleTime=\"" + goIdleTime + "\" maxConsecutiveIdleCycles=\"" + maxConsecutiveIdleCycles + "\" taskSwitchingTime=\"" + taskSwitchingTime + "\" cacheMiss=\"" +cacheMiss + "\" schedulingPolicy=\"" + schedulingPolicy + "\" sliceTime=\"" + sliceTime + "\" MEC=\"" + MEC.typeToString() +"\" />\n";
return s;
String s = "<CPU name=\"" + name + "\" clockRatio=\"" + clockRatio + "\" byteDataSize=\"" + byteDataSize + "\" execiTime=\"" + execiTime + "\" execcTime=\"" + execcTime + "\" pipelineSize=\"";
s += pipelineSize + "\" goIdleTime=\"" + goIdleTime + "\" maxConsecutiveIdleCycles=\"" + maxConsecutiveIdleCycles + "\" taskSwitchingTime=\"" + taskSwitchingTime + "\" cacheMiss=\"" + cacheMiss + "\" schedulingPolicy=\"" + schedulingPolicy + "\" sliceTime=\"" + sliceTime + "\" MEC=\"" + MEC.typeToString() + "\" />\n";
return s;
}
}
......@@ -77,4 +77,8 @@ public abstract class HwNode extends DIPLOElement {
public abstract String toXML();
public void setName(String _name) {
name = _name;
}
}
......@@ -57,14 +57,14 @@ public class TMLChannel extends TMLCommunicationElement {
public static final int BRBW = 0;
public static final int BRNBW = 1;
public static final int NBRNBW = 2;
public int confStatus;
public boolean checkConf;
public boolean checkAuth;
private int size; // width of the channel i.e. nb of bytes of each sample
private int type;
private int max; // Maximum number of samples
public TMLCPrimitivePort port;
public TMLCPrimitivePort port2;
//public TMLCPrimitivePort port2;
public ArrayList<TMLCPrimitivePort> ports;
// Used on for 1 -> 1 channel
......
......@@ -78,6 +78,7 @@ public class TMLElement extends DIPLOElement {
name = _prefix + name;
}
/* When a TMLCP object is instantiated the name and reference object might not be known */
public void setName( String _name ) {
if( _name != "" ) {
......
......@@ -581,16 +581,33 @@ public class TMLMapping<E> {
}
public int getNbOfMemoriesOfChannel(TMLChannel _ch) {
int n = 0;
int cpt = 0;
for (TMLElement elt : mappedcommelts) {
if (elt == _ch) {
HwCommunicationNode node = oncommnodes.get(cpt);
if (node instanceof HwMemory) {
cpt++;
n++;
}
}
cpt++;
}
return cpt;
return n;
}
public String getStringOfMemoriesOfChannel(TMLChannel _ch) {
String ret = "";
int cpt = 0;
for (TMLElement elt : mappedcommelts) {
if (elt == _ch) {
HwCommunicationNode node = oncommnodes.get(cpt);
if (node instanceof HwMemory) {
ret += node.getName() + " ; ";
}
}
cpt ++;
}
return ret;
}
public TMLElement getCommunicationElementByName(String _name) {
......@@ -1831,4 +1848,18 @@ public class TMLMapping<E> {
}
return cpt;
}
public void remap(HwExecutionNode src, HwExecutionNode dst) {
int cpt = 0;
for(int i=0; i<onnodes.size(); i++) {
HwExecutionNode node = onnodes.get(i);
if (node == src) {
TMLTask task = mappedtasks.get(i);
onnodes.remove(i);
mappedtasks.remove(i);
addTaskToHwExecutionNode(task, dst);
return;
}
}
}
}
......@@ -74,7 +74,7 @@ public class TMLModeling<E> {
private List<TMLEvent> events;
private List<String[]> pragmas;
private TMLElement correspondance[];
private TMLElement correspondance[]; // Link to graphical components
// Security
public List<String> securityPatterns;
......
......@@ -792,7 +792,8 @@ public class TMLSyntaxChecking {
int n = mapping.getNbOfMemoriesOfChannel(ch);
if (n > 1) {
// Too many memories
addError(null, null, TOO_MANY_MEMORIES + ": " + ch.getName(), TMLError.ERROR_STRUCTURE);
String s = mapping.getStringOfMemoriesOfChannel(ch);
addError(null, null, TOO_MANY_MEMORIES + ": " + ch.getName() + " mapped in " + s, TMLError.ERROR_STRUCTURE);
}
}
}
......
......@@ -123,8 +123,8 @@ public class MappedSystemCTask {
long sizeh = new File(path + reference + DOTH).length();
long sizecpp = new File(path + reference + DOTCPP).length();
TraceManager.addDev("Computing length of " + path + reference + DOTH + ": " + sizeh);
TraceManager.addDev("Computing length of " + path + reference + DOTCPP + ": " + sizeh);
//TraceManager.addDev("Computing length of " + path + reference + DOTH + ": " + sizeh);
//TraceManager.addDev("Computing length of " + path + reference + DOTCPP + ": " + sizeh);
if (sizeh == getHCode().length()) {
......
......@@ -237,6 +237,7 @@ public class TMAP2Network<E> {
//newList.add(node);
HwBus bus = new HwBus(node.getName() + "__bus");
bus.arbitration = HwBus.PRIORITY_BASED;
HwMemory mem = new HwMemory(node.getName() + "__mem");
newList.add(bus);
newList.add(mem);
......
......@@ -144,13 +144,15 @@ public class TaskNetworkInterface extends TMLTask {
state.setAction("loopExit = 2");
addElement(loop, state);
TMLExecI execI = new TMLExecI("ExecI", referenceObject);
execI.setAction("1");
addElement(state, execI);
//TMLExecI execI = new TMLExecI("ExecI", referenceObject);
//execI.setAction("1");
//addElement(state, execI);
TMLSequence mainSequence = new TMLSequence("mainSequence", referenceObject);
addElement(execI, mainSequence);
//addElement(execI, mainSequence);
addElement(state, mainSequence);
for(i=0; i<nbOfVCs; i++) {
TMLChoice testOnLoopExit = null;
......
......@@ -830,6 +830,16 @@ public class TranslatedRouter<E> {
tmlmap.addCommToHwCommNode(newChannel, mem);
}
HwBus bus = tmlmap.getTMLArchitecture().getHwBusByName(myHwExecutionNode.getName() + "__bus");
if (bus != null) {
//tmlmap.addCommToHwCommNode(newChannel, bus);
/*if (mem != null) {
HwLink link = new HwLink(myHwExecutionNode.getName() + "__linkFromMemOri");
tmlmap.getTMLArchitecture().addHwLink(link);
link.setNodes(bus, mem);
}*/
}
// Must now modify the source app
TMLAttribute pktlen = new TMLAttribute("pktlen", "pktlen", new TMLType(TMLType.NATURAL), "0");
t.addAttributeIfApplicable(pktlen);
......@@ -946,6 +956,16 @@ public class TranslatedRouter<E> {
tmlmap.addCommToHwCommNode(newChannel, mem);
}
HwBus bus = tmlmap.getTMLArchitecture().getHwBusByName(myHwExecutionNode.getName() + "__bus");
if (bus != null) {
tmlmap.addCommToHwCommNode(newChannel, bus);
/*if (mem != null) {
HwLink link = new HwLink(myHwExecutionNode.getName() + "__linkFromMemDest");
tmlmap.getTMLArchitecture().addHwLink(link);
link.setNodes(bus, mem);
}*/
}
// Must now modify the source app
TMLAttribute pktlen = new TMLAttribute("pktlen", "pktlen", new TMLType(TMLType.NATURAL), "0");
t.addAttributeIfApplicable(pktlen);
......@@ -1002,7 +1022,36 @@ public class TranslatedRouter<E> {
public void postProcessing() {
TraceManager.addDev("Post processing of " + myHwExecutionNode.getName());
TMLArchitecture arch = tmlmap.getTMLArchitecture();
// Split multicores in mono cores
if (myHwExecutionNode instanceof HwCPU) {
HwCPU myCPU = (HwCPU)myHwExecutionNode;
// add Mono-core CPUs
int cpt = 0;
while(myCPU.nbOfCores > 1) {
TraceManager.addDev("Removing core from " + myCPU.getName());
HwCPU newCPU = myCPU.clone();
newCPU.nbOfCores = 1;
myCPU.nbOfCores = myCPU.nbOfCores - 1;
newCPU.setName(myCPU.getName() + "__" + cpt);
HwBus bus = arch.getHwBusByName(myCPU.getName() + "__bus");
if (bus != null) {
arch.addHwNode(newCPU);
TraceManager.addDev("Bus found for " + myCPU.getName());
HwLink link = new HwLink(myCPU.getName() + "__link" + cpt);
arch.addHwLink(link);
link.setNodes(bus, newCPU);
cpt ++;
tmlmap.remap(myCPU, newCPU);
TraceManager.addDev("Remap done " + myCPU.getName());
}
}
}
}
......
......@@ -5507,7 +5507,7 @@ public class GTURTLEModeling {
prepareErrors();
int selectedTab = 0;
int selectedTab = -1;
int selectedSubTab = -1;
try {
......
......@@ -8582,6 +8582,13 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Per
}
public TDiagramPanel selectTab(Point p) {
if (p.x < 0) {
return null;
}
if (p.y < 0){
return null;
}
if (mainTabbedPane.getTabCount() > 0 ) {
mainTabbedPane.setSelectedIndex(p.x);
TURTLEPanel tp = tabs.elementAt(p.x);
......
......@@ -251,7 +251,7 @@ public class TURTLEPanelPopupListener extends MouseAdapter /* popup menus onto t
GraphicLib.sortJTabbedPane(tp.tabbedPane, tp.panels, 1, tp.tabbedPane.getTabCount());
mgui.changeMade(null, -1);
} else if (ac.equals("New Use Case Diagram")) {
mgui.createUniqueUseCaseDiagram(tp, "Use Case Diagram");
mgui.createUniqueUseCaseDiagram(tp, "UseCaseDiagram");
mgui.changeMade(null, -1);
} else if (item == newsd) {
mgui.createUniqueSequenceDiagram(tp, "MyScenario");
......@@ -263,37 +263,37 @@ public class TURTLEPanelPopupListener extends MouseAdapter /* popup menus onto t
mgui.createSequenceDiagramFromUCD(tp, "ScenarioFromUCD", (UseCaseDiagramPanel) (mgui.getCurrentTDiagramPanel()));
mgui.changeMade(null, -1);
} else if (ac.equals("New Requirement Diagram")) {
mgui.createRequirementDiagram(tp, "Requirement Diagram");
mgui.createRequirementDiagram(tp, "RequirementDiagram");
mgui.changeMade(null, -1);
} else if (ac.equals("New Attack Tree Diagram")) {
mgui.createAttackTreeDiagram(tp, "Attack Tree");
mgui.createAttackTreeDiagram(tp, "AttackTree");
mgui.changeMade(null, -1);
} else if (e.getSource() == newftd) {
mgui.createFaultTreeDiagram(tp, "Fault Tree");
mgui.createFaultTreeDiagram(tp, "FaultTree");
mgui.changeMade(null, -1);
} else if (ac.equals("New Event-Based Requirement Description Diagram")) {
mgui.createEBRDD(tp, "EBRDD");
mgui.changeMade(null, -1);
} else if (ac.equals("New ProActive State Machine Diagram")) {
mgui.createProActiveSMD(tp, "ProActive SMD");
mgui.createProActiveSMD(tp, "ProActiveSMD");
mgui.changeMade(null, -1);
} else if (e.getSource() == newavatarrd) {
mgui.createAvatarRD(tp, "AVATAR RD");
mgui.createAvatarRD(tp, "AVATARRD");
mgui.changeMade(null, -1);
} else if (e.getSource() == newavatarpd) {
mgui.createAvatarPD(tp, "AVATAR PD");
mgui.createAvatarPD(tp, "AVATARPD");
mgui.changeMade(null, -1);
} else if (e.getSource() == newavatarcd) {
mgui.createUniqueAvatarCD(tp, "Context Diagram");
mgui.createUniqueAvatarCD(tp, "ContextDiagram");
mgui.changeMade(null, -1);
} else if (e.getSource() == newavatarad) {
mgui.createUniqueAvatarAD(tp, "Activity Diagram");
mgui.createUniqueAvatarAD(tp, "ActivityDiagram");
mgui.changeMade(null, -1);
} else if (e.getSource() == newavatarmad) {
mgui.createAvatarMAD(tp, "Modeling Assumptions Diagram");
mgui.createAvatarMAD(tp, "ModelingAssumptionsDiagram");
mgui.changeMade(null, -1);
} else if (e.getSource() == newsyscams) {
mgui.createSysCAMS(tp, "SystemC-AMS Component Diagram");
mgui.createSysCAMS(tp, "SystemC-AMS_ComponentDiagram");
mgui.changeMade(null, -1);
} else if (e.getSource() == neweln) {
mgui.createELN(tp, "ELN Diagram");
......
......@@ -181,19 +181,19 @@ public class JFrameSimulationSDPanel extends JFrame implements ActionListener {
public void setFileReference(String _fileReference) {
if (sdpanel != null) {
TraceManager.addDev("Resetting file");
//TraceManager.addDev("Setting file:" + _fileReference);
sdpanel.setFileReference(_fileReference);
} else {
TraceManager.addDev("Null SD Panel");
//TraceManager.addDev("Null SD Panel");
}
}
public void setFileReference(BufferedReader inputStream) {
if (sdpanel != null) {
TraceManager.addDev("Setting input stream");
//TraceManager.addDev("Setting input stream");
sdpanel.setFileReference(inputStream);
} else {
TraceManager.addDev("Null SD Panel");
//TraceManager.addDev("Null SD Panel");
}
}
......