Skip to content
Snippets Groups Projects
Commit deaa9979 authored by Irina LEE's avatar Irina LEE
Browse files

fixed part 1 not done (syscams)

parent 2d034708
No related branches found
No related tags found
1 merge request!72Syscams
/* Copyright or (C) or Copr. GET / ENST, Telecom-Paris, Ludovic Apvrille
*
* ludovic.apvrille AT enst.fr
*
* This software is a computer program whose purpose is to allow the
* edition of TURTLE analysis, design and deployment diagrams, to
* allow the generation of RT-LOTOS or Java code from this diagram,
* and at last to allow the analysis of formal validation traces
* obtained from external tools, e.g. RTL from LAAS-CNRS and CADP
* from INRIA Rhone-Alpes.
*
* This software is governed by the CeCILL license under French law and
* abiding by the rules of distribution of free software. You can use,
* modify and/ or redistribute the software under the terms of the CeCILL
* license as circulated by CEA, CNRS and INRIA at the following URL
* "http://www.cecill.info".
*
* As a counterpart to the access to the source code and rights to copy,
* modify and redistribute granted by the license, users are provided only
* with a limited warranty and the software's author, the holder of the
* economic rights, and the successive licensors have only limited
* liability.
*
* In this respect, the user's attention is drawn to the risks associated
* with loading, using, modifying and/or developing or reproducing the
* software by the user in light of its specific status of free software,
* that may mean that it is complicated to manipulate, and that also
* therefore means that it is reserved for developers and experienced
* professionals having in-depth computer knowledge. Users are therefore
* encouraged to load and test the software's suitability as regards their
* requirements in conditions enabling the security of their systems and/or
* data to be ensured and, more generally, to use and operate it in the
* same conditions as regards security.
*
* The fact that you are presently reading this means that you have had
* knowledge of the CeCILL license and that you accept its terms.
*/
package syscamstranslator;
import java.util.LinkedList;
/**
* Class SysCAMSTBlockGPIO2VCI
* Parameters of a SystemC-AMS block GPIO2VCI
* Creation: 13/07/2018
* @version 1.0 13/07/2018
* @author Irina Kit Yan LEE
*/
public class SysCAMSTBlockGPIO2VCI extends SysCAMSTComponent {
private LinkedList<SysCAMSTPortDE> portDE;
public SysCAMSTBlockGPIO2VCI() {
portDE = new LinkedList<SysCAMSTPortDE>();
}
public LinkedList<SysCAMSTPortDE> getPortDE(){
return portDE;
}
public void addPortDE(SysCAMSTPortDE de){
portDE.add(de);
}
}
\ No newline at end of file
......@@ -59,6 +59,7 @@ public class SysCAMSTPortDE extends SysCAMSTComponent {
private String sensitiveMethod;
private SysCAMSTBlockDE blockDE;
private SysCAMSTBlockGPIO2VCI blockGPIO2VCI;
public SysCAMSTPortDE(String _name, int _origin, String _DEType, boolean _sensitive, String _sensitiveMethod, SysCAMSTBlockDE _blockDE) {
name = _name;
......@@ -72,6 +73,19 @@ public class SysCAMSTPortDE extends SysCAMSTComponent {
sensitiveMethod = _sensitiveMethod;
blockDE = _blockDE;
}
public SysCAMSTPortDE(String _name, int _origin, String _DEType, boolean _sensitive, String _sensitiveMethod, SysCAMSTBlockGPIO2VCI _blockGPIO2VCI) {
name = _name;
// period = _period;
// time = _time;
// rate = _rate;
// delay = _delay;
origin = _origin;
DEType = _DEType;
sensitive = _sensitive;
sensitiveMethod = _sensitiveMethod;
blockGPIO2VCI = _blockGPIO2VCI;
}
public String getName() {
return name;
......@@ -109,7 +123,11 @@ public class SysCAMSTPortDE extends SysCAMSTComponent {
return sensitiveMethod;
}
public SysCAMSTBlockDE getBlockTDF() {
public SysCAMSTBlockDE getBlockDE() {
return blockDE;
}
public SysCAMSTBlockGPIO2VCI getBlockGPIO2VCI() {
return blockGPIO2VCI;
}
}
\ No newline at end of file
......@@ -92,7 +92,30 @@ public class SysCAMSPanelTranslator {
}
for (TGComponent dp : list) {
if (dp instanceof SysCAMSBlockDE) {
if (dp instanceof SysCAMSBlockGPIO2VCI) {
SysCAMSBlockGPIO2VCI blockGPIO2VCI = (SysCAMSBlockGPIO2VCI) dp;
SysCAMSTBlockGPIO2VCI syscamsBlockGPIO2VCI = new SysCAMSTBlockGPIO2VCI();
List<SysCAMSPortDE> portsDE = blockGPIO2VCI.getAllInternalPortsDE();
for (int i = 0; i < portsDE.size(); i++) {
SysCAMSPortDE portDE = portsDE.get(i);
String portName = portDE.getPortName();
String type = portDE.getDEType();
int origin = portDE.getOrigin();
boolean sensitive = portDE.getSensitive();
String sensitiveMethod = portDE.getSensitiveMethod();
SysCAMSTPortDE syscamsPortDE = new SysCAMSTPortDE(portName, origin, type, sensitive, sensitiveMethod, syscamsBlockGPIO2VCI);
syscamsMap.put(portDE, syscamsPortDE);
syscamsBlockGPIO2VCI.addPortDE(syscamsPortDE);
syscamsComponents.add(syscamsPortDE);
}
syscamsMap.put(blockGPIO2VCI, syscamsBlockGPIO2VCI);
syscamsComponents.add(syscamsBlockGPIO2VCI);
} else if (dp instanceof SysCAMSBlockDE) {
SysCAMSBlockDE blockDE = (SysCAMSBlockDE) dp;
String blockDEName = blockDE.getValue();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment