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
e8956223
Commit
e8956223
authored
Oct 08, 2018
by
Tiago Jorge
Browse files
Update dispatcher to support multiple FPGA configurations.
parent
0343d4c4
Changes
1
Show whitespace changes
Inline
Side-by-side
dmt/B_mappers/synchronousTool.py
View file @
e8956223
...
...
@@ -696,17 +696,22 @@ class SynchronousToolGlueGeneratorGeneric(Generic[TSource, TDestin]):
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
(
' char *fConfig;
\n
'
)
self
.
C_SourceFile
.
write
(
' char fConfigList[30] = "%s";
\n
'
%
(
sp
.
_fpgaConfigurations
))
self
.
C_SourceFile
.
write
(
' fConfig = strtok(fConfigList, "_");
\n
'
)
self
.
C_SourceFile
.
write
(
' while( fConfig != NULL ) {
\n
'
)
self
.
C_SourceFile
.
write
(
' if(!strcmp(p_szGlobalState, fConfig)){
\n
'
)
self
.
C_SourceFile
.
write
(
' // delegate to HW
\n
'
)
self
.
C_SourceFile
.
write
(
' printf("[###### Dispatcher ######] Delegating to HW ... (to be implemented)
\\
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
(
' }
\n
'
)
self
.
C_SourceFile
.
write
(
' fConfig = strtok(NULL, "_");
\n
'
)
self
.
C_SourceFile
.
write
(
' }
\n
'
)
self
.
C_SourceFile
.
write
(
' printf("[###### Dispatcher ######] Delegating 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
.
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