Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
TASTE
dmt
Commits
4e17a4b0
Commit
4e17a4b0
authored
Sep 24, 2018
by
Tiago Jorge
Browse files
Add first implementation of dispatcher.
parent
96d107fb
Changes
1
Hide whitespace changes
Inline
Side-by-side
dmt/B_mappers/synchronousTool.py
View file @
4e17a4b0
...
@@ -691,7 +691,22 @@ class SynchronousToolGlueGeneratorGeneric(Generic[TSource, TDestin]):
...
@@ -691,7 +691,22 @@ class SynchronousToolGlueGeneratorGeneric(Generic[TSource, TDestin]):
else
:
else
:
self
.
C_SourceFile
.
write
(
'void *p'
+
self
.
CleanNameAsToolWants
(
param
.
_id
)
+
', size_t *pSize_'
+
self
.
CleanNameAsToolWants
(
param
.
_id
))
self
.
C_SourceFile
.
write
(
'void *p'
+
self
.
CleanNameAsToolWants
(
param
.
_id
)
+
', size_t *pSize_'
+
self
.
CleanNameAsToolWants
(
param
.
_id
))
self
.
C_SourceFile
.
write
(
")
\n
{
\n
"
)
self
.
C_SourceFile
.
write
(
")
\n
{
\n
"
)
self
.
C_SourceFile
.
write
(
' return 0;
\n
'
);
self
.
C_SourceFile
.
write
(
' /*
\n
'
)
self
.
C_SourceFile
.
write
(
' Delegate to one or the other side (SW or HW) depending on whether the value of a global variable storing the current
\n
'
)
self
.
C_SourceFile
.
write
(
' configuration equals one of those defined for the target function in new IV field.
\n
'
)
self
.
C_SourceFile
.
write
(
' */
\n
'
)
self
.
C_SourceFile
.
write
(
' extern const char *p_szGlobalState;
\n
'
)
self
.
C_SourceFile
.
write
(
' if(!strcmp(p_szGlobalState, "%s")){
\n
'
%
(
sp
.
_fpgaConfigurations
))
self
.
C_SourceFile
.
write
(
' // delegate to HW
\n
'
)
self
.
C_SourceFile
.
write
(
' printf("delegate to HW
\\
n");
\n
'
)
self
.
C_SourceFile
.
write
(
' //called_compute_something_Brave_Fpga(pinp, size_inp, poutp, pSize_outp);
\n
'
)
self
.
C_SourceFile
.
write
(
' // delegated to HW, return 0
\n
'
)
self
.
C_SourceFile
.
write
(
' return 0;
\n
'
)
self
.
C_SourceFile
.
write
(
' }else{
\n
'
)
self
.
C_SourceFile
.
write
(
' printf("delegate to SW
\\
n");
\n
'
)
self
.
C_SourceFile
.
write
(
' // delegate to SW, return 1
\n
'
)
self
.
C_SourceFile
.
write
(
' return 1;
\n
'
)
self
.
C_SourceFile
.
write
(
' }
\n
'
)
self
.
C_SourceFile
.
write
(
"}
\n\n
"
)
self
.
C_SourceFile
.
write
(
"}
\n\n
"
)
self
.
ADA_HeaderFile
.
write
(
self
.
ADA_HeaderFile
.
write
(
...
...
Write
Preview
Supports
Markdown
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