Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
TTool
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
mbe-tools
TTool
Commits
96cd9c7e
Commit
96cd9c7e
authored
7 years ago
by
Daniela Genius
Browse files
Options
Downloads
Patches
Plain Diff
modification channel mappings
parent
6641fa16
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/ddtranslatorSoclib/toSoclib/TasksAndMainGenerator.java
+12
-5
12 additions, 5 deletions
src/ddtranslatorSoclib/toSoclib/TasksAndMainGenerator.java
src/ddtranslatorSoclib/toTopCell/Deployinfo.java
+14
-5
14 additions, 5 deletions
src/ddtranslatorSoclib/toTopCell/Deployinfo.java
with
26 additions
and
10 deletions
src/ddtranslatorSoclib/toSoclib/TasksAndMainGenerator.java
+
12
−
5
View file @
96cd9c7e
...
@@ -199,12 +199,13 @@ public class TasksAndMainGenerator {
...
@@ -199,12 +199,13 @@ public class TasksAndMainGenerator {
//for(AvatarRelation ar: avspec.getRelations()) {
//for(AvatarRelation ar: avspec.getRelations()) {
for
(
AvatarRAM
ram
:
TopCellGenerator
.
avatardd
.
getAllRAM
())
{
for
(
AvatarRAM
ram
:
TopCellGenerator
.
avatardd
.
getAllRAM
())
{
//for(AvatarChannel ar: avspec.getChannels()) {
//for(AvatarChannel ar: avspec.getChannels()) {
for
(
AvatarChannel
channel:
ram
.
getChannels
()){
//for(AvatarChannel channel: ram.getChannels()){
for
(
AvatarRelation
ar:
avspec
.
getRelations
())
{
//DG 15.05.2017
mainFile
.
appendToBeforeMainCode
(
"#define CHANNEL"
+
d
+
" __attribute__((section(\"section_channel"
+
d
+
"\")))"
+
CR
);
mainFile
.
appendToBeforeMainCode
(
"#define CHANNEL"
+
d
+
" __attribute__((section(\"section_channel"
+
d
+
"\")))"
+
CR
);
mainFile
.
appendToBeforeMainCode
(
"#define LOCK"
+
d
+
" __attribute__((section(\"section_lock"
+
d
+
"\")))"
+
CR
);
//one lock per channel
mainFile
.
appendToBeforeMainCode
(
"#define LOCK"
+
d
+
" __attribute__((section(\"section_lock"
+
d
+
"\")))"
+
CR
);
//one lock per channel
d
++;
d
++;
}
}
mainFile
.
appendToBeforeMainCode
(
"#define base(arg) arg"
+
CR2
);
mainFile
.
appendToBeforeMainCode
(
"#define base(arg) arg"
+
CR2
);
...
@@ -215,6 +216,9 @@ public class TasksAndMainGenerator {
...
@@ -215,6 +216,9 @@ public class TasksAndMainGenerator {
mainFile
.
appendToMainCode
(
"pthread_attr_t *attr_t = malloc(sizeof(pthread_attr_t));"
+
CR
);
mainFile
.
appendToMainCode
(
"pthread_attr_t *attr_t = malloc(sizeof(pthread_attr_t));"
+
CR
);
mainFile
.
appendToMainCode
(
"pthread_attr_init(attr_t);"
+
CR
);
mainFile
.
appendToMainCode
(
"pthread_attr_init(attr_t);"
+
CR
);
mainFile
.
appendToMainCode
(
"pthread_mutex_init(&__mainMutex, NULL);"
+
CR2
);
mainFile
.
appendToMainCode
(
"pthread_mutex_init(&__mainMutex, NULL);"
+
CR2
);
}
}
}
}
public
void
makeSynchronousChannels
()
{
public
void
makeSynchronousChannels
()
{
...
@@ -226,7 +230,9 @@ public class TasksAndMainGenerator {
...
@@ -226,7 +230,9 @@ public class TasksAndMainGenerator {
for
(
AvatarRelation
ar:
avspec
.
getRelations
())
{
for
(
AvatarRelation
ar:
avspec
.
getRelations
())
{
if
(!
ar
.
isAsynchronous
())
{
if
(!
ar
.
isAsynchronous
())
{
ar
.
setId
(
j
);
j
++;
//ar.setId(j);
ar
.
setId
(
i
);
//DG 15.05.2017
j
++;
for
(
i
=
0
;
i
<
ar
.
nbOfSignals
()
;
i
++)
{
for
(
i
=
0
;
i
<
ar
.
nbOfSignals
()
;
i
++)
{
mainFile
.
appendToHCode
(
"extern syncchannel __"
+
getChannelName
(
ar
,
i
)
+
";"
+
CR
);
mainFile
.
appendToHCode
(
"extern syncchannel __"
+
getChannelName
(
ar
,
i
)
+
";"
+
CR
);
...
@@ -273,9 +279,10 @@ public class TasksAndMainGenerator {
...
@@ -273,9 +279,10 @@ public class TasksAndMainGenerator {
mainFile
.
appendToBeforeMainCode
(
"uint8_t "
+
getChannelName
(
ar
,
i
)
+
"_data[32] CHANNEL"
+
ar
.
getId
()+
";"
+
CR
);
mainFile
.
appendToBeforeMainCode
(
"uint8_t "
+
getChannelName
(
ar
,
i
)
+
"_data[32] CHANNEL"
+
ar
.
getId
()+
";"
+
CR
);
mainFile
.
appendToBeforeMainCode
(
"struct mwmr_s "
+
getChannelName
(
ar
,
i
)
+
" CHANNEL"
+
ar
.
getId
()+
";"
+
CR2
);
mainFile
.
appendToBeforeMainCode
(
"struct mwmr_s "
+
getChannelName
(
ar
,
i
)
+
" CHANNEL"
+
ar
.
getId
()+
";"
+
CR2
);
}
}
}
}
}
}
}
}
public
void
makeAsynchronousChannels
()
{
public
void
makeAsynchronousChannels
()
{
...
...
This diff is collapsed.
Click to expand it.
src/ddtranslatorSoclib/toTopCell/Deployinfo.java
+
14
−
5
View file @
96cd9c7e
...
@@ -73,12 +73,16 @@
...
@@ -73,12 +73,16 @@
package
ddtranslatorSoclib.toTopCell
;
package
ddtranslatorSoclib.toTopCell
;
import
ddtranslatorSoclib.*
;
import
ddtranslatorSoclib.*
;
import
java.util.*
;
import
java.util.*
;
import
avatartranslator.AvatarRelation
;
import
avatartranslator.AvatarSpecification
;
public
class
Deployinfo
{
public
class
Deployinfo
{
private
final
static
String
CR
=
"\n"
;
private
final
static
String
CR
=
"\n"
;
private
final
static
String
CR2
=
"\n\n"
;
private
final
static
String
CR2
=
"\n\n"
;
public
static
AvatarSpecification
avspec
;
//DG 15.05.2017
/* for the moment, this is specific to PowerPC */
/* for the moment, this is specific to PowerPC */
public
static
String
getDeployInfo
()
{
public
static
String
getDeployInfo
()
{
...
@@ -173,8 +177,12 @@ deployinfo = deployinfo + "#define DEPLOY_RAM" + ram.getNo_ram() + "_ADDR 0x" +
...
@@ -173,8 +177,12 @@ deployinfo = deployinfo + "#define DEPLOY_RAM" + ram.getNo_ram() + "_ADDR 0x" +
deployinfo_map
+=
"#define MAP_A\\"
+
CR
;
deployinfo_map
+=
"#define MAP_A\\"
+
CR
;
for
(
AvatarRAM
ram
:
TopCellGenerator
.
avatardd
.
getAllRAM
())
{
for
(
AvatarRAM
ram
:
TopCellGenerator
.
avatardd
.
getAllRAM
())
{
if
(!(
ram
.
getChannels
().
isEmpty
())){
//if (!(ram.getChannels().isEmpty())){
for
(
AvatarChannel
channel
:
ram
.
getChannels
())
{
// for (AvatarChannel channel : ram.getChannels()) {
//DG 15.05.2017
for
(
AvatarRelation
relation
:
avspec
.
getRelations
())
{
//if (!(ram.getRelations().isEmpty())){
deployinfo_map
=
deployinfo_map
+
"\n .channel"
+
i
+
" : { \\"
+
CR
;
deployinfo_map
=
deployinfo_map
+
"\n .channel"
+
i
+
" : { \\"
+
CR
;
deployinfo_map
=
deployinfo_map
+
"*(section_channel"
+
i
+
")\\"
+
CR
;
deployinfo_map
=
deployinfo_map
+
"*(section_channel"
+
i
+
")\\"
+
CR
;
...
@@ -183,7 +191,9 @@ deployinfo = deployinfo + "#define DEPLOY_RAM" + ram.getNo_ram() + "_ADDR 0x" +
...
@@ -183,7 +191,9 @@ deployinfo = deployinfo + "#define DEPLOY_RAM" + ram.getNo_ram() + "_ADDR 0x" +
}
}
i
=
0
;
i
=
0
;
for
(
AvatarChannel
channel
:
ram
.
getChannels
())
{
// for (AvatarChannel channel : ram.getChannels()) {
for
(
AvatarRelation
relation
:
avspec
.
getRelations
())
{
//DG 15.05.2017
deployinfo_map
=
deployinfo_map
+
"\n .lock"
+
i
+
" : { \\"
+
CR
;
deployinfo_map
=
deployinfo_map
+
"\n .lock"
+
i
+
" : { \\"
+
CR
;
deployinfo_map
=
deployinfo_map
+
"*(section_lock"
+
i
+
")\\"
+
CR
;
deployinfo_map
=
deployinfo_map
+
"*(section_lock"
+
i
+
")\\"
+
CR
;
// if(use_vcilocks) deployinfo_map=deployinfo_map+ "} > vci_locks\\"+ CR;
// if(use_vcilocks) deployinfo_map=deployinfo_map+ "} > vci_locks\\"+ CR;
...
@@ -191,8 +201,7 @@ deployinfo = deployinfo + "#define DEPLOY_RAM" + ram.getNo_ram() + "_ADDR 0x" +
...
@@ -191,8 +201,7 @@ deployinfo = deployinfo + "#define DEPLOY_RAM" + ram.getNo_ram() + "_ADDR 0x" +
i
++;
i
++;
}
}
}
}
}
return
deployinfo_map
;
return
deployinfo_map
;
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment