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
8a3e83c1
Commit
8a3e83c1
authored
Oct 12, 2020
by
Thanassis Tsiodras
Committed by
Thanassis Tsiodras
Nov 17, 2020
Browse files
Appease more warnings about prototypes.
parent
88d81a96
Changes
1
Hide whitespace changes
Inline
Side-by-side
dmt/B_mappers/synchronousTool.py
View file @
8a3e83c1
...
...
@@ -615,19 +615,19 @@ class SynchronousToolGlueGeneratorGeneric(Generic[TSource, TDestin]):
if
genFpgaDevDrv
:
# Execute() returns if interaction with FPGA HW is successful, that is, if HW writes and reads are successful (0) or not (-1)
self
.
C_HeaderFile
.
write
(
"int Execute_%s%s();
\n
"
%
(
self
.
CleanNameAsADAWants
(
sp
.
_id
+
"_"
+
subProgramImplementation
),
fpgaSuffix
))
self
.
C_HeaderFile
.
write
(
"int Execute_%s%s(
void
);
\n
"
%
(
self
.
CleanNameAsADAWants
(
sp
.
_id
+
"_"
+
subProgramImplementation
),
fpgaSuffix
))
else
:
self
.
C_HeaderFile
.
write
(
"void Execute_%s();
\n
"
%
self
.
CleanNameAsADAWants
(
sp
.
_id
+
"_"
+
subProgramImplementation
))
self
.
C_HeaderFile
.
write
(
"void Execute_%s(
void
);
\n
"
%
self
.
CleanNameAsADAWants
(
sp
.
_id
+
"_"
+
subProgramImplementation
))
if
maybeFVname
!=
""
:
if
not
(
genFpgaDevDrv
and
maybeFVname
in
fpga_seen
and
fpga_seen
[
maybeFVname
]
is
'with_init_already'
):
self
.
C_HeaderFile
.
write
(
"void init_%s%s();
\n
"
%
(
self
.
CleanNameAsADAWants
(
maybeFVname
),
fpgaSuffix
))
self
.
C_HeaderFile
.
write
(
"void init_%s%s(
void
);
\n
"
%
(
self
.
CleanNameAsADAWants
(
maybeFVname
),
fpgaSuffix
))
if
genFpgaDevDrv
:
# Return to dispatcher if HW delegation via Execute() is successful (0) or not (-1).
self
.
C_HeaderFile
.
write
(
"int %s_%s%s("
%
(
self
.
CleanNameAsADAWants
(
maybeFVname
),
self
.
CleanNameAsADAWants
(
sp
.
_id
),
fpgaSuffix
))
else
:
self
.
C_HeaderFile
.
write
(
"void %s_%s%s("
%
(
self
.
CleanNameAsADAWants
(
maybeFVname
),
self
.
CleanNameAsADAWants
(
sp
.
_id
),
fpgaSuffix
))
else
:
# pragma: no cover
self
.
C_HeaderFile
.
write
(
"void %s_init%s();
\n
"
%
(
self
.
CleanNameAsADAWants
(
sp
.
_id
),
fpgaSuffix
))
# pragma: no cover
self
.
C_HeaderFile
.
write
(
"void %s_init%s(
void
);
\n
"
%
(
self
.
CleanNameAsADAWants
(
sp
.
_id
),
fpgaSuffix
))
# pragma: no cover
self
.
C_HeaderFile
.
write
(
"void %s%s("
%
(
self
.
CleanNameAsADAWants
(
sp
.
_id
),
fpgaSuffix
))
# pragma: no cover
for
param
in
sp
.
_params
:
if
param
.
_id
!=
sp
.
_params
[
0
].
_id
:
...
...
@@ -668,9 +668,9 @@ class SynchronousToolGlueGeneratorGeneric(Generic[TSource, TDestin]):
if
maybeFVname
!=
""
:
if
not
(
genFpgaDevDrv
and
maybeFVname
in
fpga_seen
and
fpga_seen
[
maybeFVname
]
is
'with_init_already'
):
self
.
C_SourceFile
.
write
(
"void init_%s%s()
\n
"
%
(
self
.
CleanNameAsADAWants
(
maybeFVname
),
fpgaSuffix
))
self
.
C_SourceFile
.
write
(
"void init_%s%s(
void
)
\n
"
%
(
self
.
CleanNameAsADAWants
(
maybeFVname
),
fpgaSuffix
))
else
:
# pragma: no cover
self
.
C_SourceFile
.
write
(
"void %s_init()
\n
"
%
self
.
CleanNameAsADAWants
(
sp
.
_id
))
# pragma: no cover
self
.
C_SourceFile
.
write
(
"void %s_init(
void
)
\n
"
%
self
.
CleanNameAsADAWants
(
sp
.
_id
))
# pragma: no cover
if
not
(
genFpgaDevDrv
and
maybeFVname
in
fpga_seen
and
fpga_seen
[
maybeFVname
]
is
'with_init_already'
):
self
.
C_SourceFile
.
write
(
"{
\n
"
)
self
.
InitializeBlock
(
modelingLanguage
,
asnFile
,
sp
,
subProgramImplementation
,
maybeFVname
)
...
...
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