Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
mbe-tools
TTool
Commits
6e49e6ff
Commit
6e49e6ff
authored
Nov 16, 2017
by
Fabien Tessier
Browse files
Config nc generation for .ttool project
parent
e302c5ca
Changes
5
Hide whitespace changes
Inline
Side-by-side
src/main/java/common/SpecConfigTTool.java
View file @
6e49e6ff
...
...
@@ -56,6 +56,8 @@ public class SpecConfigTTool {
public
static
String
VCDPath
=
""
;
public
static
String
ExternalCommand1
=
""
;
public
static
String
NCDirectory
=
""
;
private
static
String
ProjectSystemCCodeDirectory
=
"/c++_code/"
;
private
static
String
ProjectCCodeDirectory
=
"/c_code/"
;
...
...
@@ -69,6 +71,7 @@ public class SpecConfigTTool {
private
static
String
ProjectTGraphDirectory
=
"/graphs"
;
private
static
String
ProjectUPPAALCodeDirectory
=
"/uppaal/"
;
private
static
String
ProjectVCDDirectory
=
"/c++_code/"
;
private
static
String
ProjectNCDirectory
=
"/nc/"
;
public
static
int
lastPanel
=
-
1
;
public
static
int
lastTab
=
-
1
;
...
...
@@ -107,6 +110,8 @@ public class SpecConfigTTool {
VCDPath
=
ConfigurationTTool
.
VCDPath
;
ExternalCommand1
=
ConfigurationTTool
.
ExternalCommand1
;
NCDirectory
=
ConfigurationTTool
.
NCDirectory
;
}
public
static
void
setDirConfig
(
File
dir
)
{
...
...
@@ -122,6 +127,7 @@ public class SpecConfigTTool {
TGraphPath
=
dir
.
getAbsolutePath
()
+
ProjectTGraphDirectory
;
UPPAALCodeDirectory
=
dir
.
getAbsolutePath
()
+
ProjectUPPAALCodeDirectory
;
VCDPath
=
dir
.
getAbsolutePath
()
+
ProjectVCDDirectory
;
NCDirectory
=
dir
.
getAbsolutePath
()
+
ProjectNCDirectory
;
SystemCCodeCompileCommand
=
ConfigurationTTool
.
SystemCCodeCompileCommand
.
replace
(
ConfigurationTTool
.
SystemCCodeDirectory
,
SystemCCodeDirectory
);
SystemCCodeExecuteCommand
=
ConfigurationTTool
.
SystemCCodeExecuteCommand
.
replace
(
ConfigurationTTool
.
SystemCCodeDirectory
,
SystemCCodeDirectory
);
...
...
src/main/java/myutil/FileUtils.java
View file @
6e49e6ff
...
...
@@ -172,7 +172,8 @@ public class FileUtils extends org.apache.commons.io.FileUtils{
return
false
;
if
(!
s
.
equals
(
ConfigurationTTool
.
ProVerifCodeDirectory
))
{
File
readme
=
new
File
(
ConfigurationTTool
.
ProVerifCodeDirectory
+
"README"
);
FileUtils
.
copyFileToDirectory
(
readme
,
f
,
false
);
if
(
readme
.
exists
())
FileUtils
.
copyFileToDirectory
(
readme
,
f
,
false
);
}
return
true
;
}
...
...
@@ -189,7 +190,8 @@ public class FileUtils extends org.apache.commons.io.FileUtils{
return
false
;
if
(!
s
.
equals
(
ConfigurationTTool
.
TMLCodeDirectory
))
{
File
readme
=
new
File
(
ConfigurationTTool
.
TMLCodeDirectory
+
"README_TML"
);
FileUtils
.
copyFileToDirectory
(
readme
,
f
,
false
);
if
(
readme
.
exists
())
FileUtils
.
copyFileToDirectory
(
readme
,
f
,
false
);
}
return
true
;
}
...
...
@@ -206,7 +208,8 @@ public class FileUtils extends org.apache.commons.io.FileUtils{
return
false
;
if
(!
s
.
equals
(
ConfigurationTTool
.
CCodeDirectory
))
{
File
readme
=
new
File
(
ConfigurationTTool
.
CCodeDirectory
+
"README"
);
FileUtils
.
copyFileToDirectory
(
readme
,
f
,
false
);
if
(
readme
.
exists
())
FileUtils
.
copyFileToDirectory
(
readme
,
f
,
false
);
}
return
true
;
}
...
...
@@ -223,7 +226,8 @@ public class FileUtils extends org.apache.commons.io.FileUtils{
return
false
;
if
(!
s
.
equals
(
ConfigurationTTool
.
UPPAALCodeDirectory
))
{
File
readme
=
new
File
(
ConfigurationTTool
.
UPPAALCodeDirectory
+
"README"
);
FileUtils
.
copyFileToDirectory
(
readme
,
f
,
false
);
if
(
readme
.
exists
())
FileUtils
.
copyFileToDirectory
(
readme
,
f
,
false
);
}
return
true
;
}
...
...
src/main/java/ui/GTURTLEModeling.java
View file @
6e49e6ff
...
...
@@ -8924,15 +8924,20 @@ public class GTURTLEModeling {
}
else
{
// Generate XML file
try
{
if
(
SpecConfigTTool
.
NCDirectory
!=
null
)
{
File
dir
=
new
File
(
SpecConfigTTool
.
NCDirectory
);
if
(!
dir
.
exists
())
dir
.
mkdirs
();
}
String
fileName
=
"network.xml"
;
if
(
Config
uration
TTool
.
NCDirectory
!=
null
)
{
fileName
=
Config
uration
TTool
.
NCDirectory
+
fileName
;
if
(
Spec
ConfigTTool
.
NCDirectory
!=
null
)
{
fileName
=
Spec
ConfigTTool
.
NCDirectory
+
fileName
;
}
TraceManager
.
addDev
(
"Saving in network structure in file: "
+
fileName
);
FileUtils
.
saveFile
(
fileName
,
ncs
.
toISAENetworkXML
());
fileName
=
"traffics.xml"
;
if
(
Config
uration
TTool
.
NCDirectory
!=
null
)
{
fileName
=
Config
uration
TTool
.
NCDirectory
+
fileName
;
if
(
Spec
ConfigTTool
.
NCDirectory
!=
null
)
{
fileName
=
Spec
ConfigTTool
.
NCDirectory
+
fileName
;
}
TraceManager
.
addDev
(
"Saving in traffics in file: "
+
fileName
);
FileUtils
.
saveFile
(
fileName
,
ncs
.
toISAETrafficsXML
());
...
...
ttool/launch_configurations/config.xml
View file @
6e49e6ff
...
...
@@ -59,7 +59,7 @@
<AVATARExecutableSoclibCodeExecuteCommand
data=
"make -C ../MPSoC/ runsoclib"
/>
<AVATARExecutableSoclibCodeTraceCommand
data=
"make -C ../MPSoC/ runsoclib-trace"
/>
<AVATARExecutableSoclibTraceFile
data=
"../Prog/soclib/soclib/platform/topcells/caba-vgmn-mutekh_kernel_tutorial/trace"
/>
<NCDirectory
data=
"../nc/"
/>
<ExternalCommand1Host
data=
"localhost"
/>
<ExternalCommand1
data=
"gtkwave ../simulators/c++2/vcddump.vcd"
/>
...
...
ttool/runtime/config.xml
View file @
6e49e6ff
...
...
@@ -57,7 +57,7 @@
<AVATARExecutableSoclibCodeExecuteCommand
data=
"make -C ../MPSoC/ runsoclib"
/>
<AVATARExecutableSoclibCodeTraceCommand
data=
"make -C ../MPSoC/ runsoclib-trace"
/>
<AVATARExecutableSoclibTraceFile
data=
"../Prog/soclib/soclib/platform/topcells/caba-vgmn-mutekh_kernel_tutorial/trace"
/>
<NCDirectory
data=
"../nc/"
/>
<ExternalCommand1Host
data=
"localhost"
/>
<ExternalCommand1
data=
"gtkwave ../simulators/c++2/vcddump.vcd"
/>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment