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
orchestrator
Commits
2188ccef
Commit
2188ccef
authored
Feb 24, 2019
by
Tiago Jorge
Browse files
Check Bambu return status and provide file '<IF>_data.c' possibly generated by Embedded Coder.
parent
dabad7ae
Changes
1
Hide whitespace changes
Inline
Side-by-side
orchestrator/taste-orchestrator.py
View file @
2188ccef
...
...
@@ -2641,7 +2641,6 @@ struct config_bitfile bitfiles[] = {''');
def
CallBambuForBrave
(
bNoBitfile
):
if
bNoBitfile
==
False
:
bambuDir
=
'Bambu'
successMsg
=
" "
#TODO define
savedDir
=
os
.
getcwd
()
for
bambuFile
in
os
.
popen
(
"find . -path *GlueAndBuild/glue*_bambu.c"
):
os
.
chdir
(
os
.
path
.
dirname
(
bambuFile
))
...
...
@@ -2650,25 +2649,31 @@ def CallBambuForBrave(bNoBitfile):
if
os
.
path
.
exists
(
bambuDir
):
shutil
.
rmtree
(
bambuDir
)
os
.
makedirs
(
bambuDir
)
os
.
chdir
(
bambuDir
)
bambu_cmd
=
'bambu '
\
'--compiler=I386_CLANG4 '
\
'-O3 '
+
'../'
+
os
.
path
.
basename
(
bambuFile
)[:
-
1
]
+
' '
\
'-I../../../auto-src/ '
\
'-I../../../'
+
fBlockName
+
'/'
+
fBlockName
+
'/ '
\
'-DSTATIC="" '
\
'../../../'
+
fBlockName
+
'/'
+
fBlockName
+
'/'
+
ifName
+
'.c '
\
'--top-fname=bambu_'
+
ifName
+
' '
\
'--generate-interface=INFER '
\
'-v4 '
\
'--do-not-expose-globals '
\
'-wH '
\
'--panda-parameter=none-registered-ptrdefault=1 '
\
'--clock-name=clock_'
+
ifName
+
' --reset-name=reset_'
+
ifName
+
' --start-name=start_'
+
ifName
+
' --done-name=finish_'
+
ifName
with
os
.
popen
(
bambu_cmd
)
as
pipe
:
status
=
pipe
.
read
().
strip
()
if
successMsg
not
in
status
:
panic
(
'Bambu failed in "%s"'
%
os
.
getcwd
())
os
.
chdir
(
bambuDir
)
dataC
=
'../../../'
+
fBlockName
+
'/'
+
fBlockName
+
'/'
+
ifName
+
'_data.c'
bambu_cmd
=
[
'bambu'
]
bambu_cmd
.
append
(
'--compiler=I386_CLANG4'
)
bambu_cmd
.
append
(
'-O3'
)
bambu_cmd
.
append
(
'../'
+
os
.
path
.
basename
(
bambuFile
)[:
-
1
])
bambu_cmd
.
append
(
'-I../../../auto-src/'
)
bambu_cmd
.
append
(
'-I../../../'
+
fBlockName
+
'/'
+
fBlockName
+
'/'
)
bambu_cmd
.
append
(
'-DSTATIC=""'
)
bambu_cmd
.
append
(
'../../../'
+
fBlockName
+
'/'
+
fBlockName
+
'/'
+
ifName
+
'.c'
)
if
os
.
path
.
isfile
(
dataC
):
bambu_cmd
.
append
(
dataC
)
bambu_cmd
.
append
(
'--top-fname=bambu_'
+
ifName
)
bambu_cmd
.
append
(
'--generate-interface=INFER'
)
bambu_cmd
.
append
(
'-v4'
)
bambu_cmd
.
append
(
'--do-not-expose-globals'
)
bambu_cmd
.
append
(
'-wH'
)
bambu_cmd
.
append
(
'--panda-parameter=none-registered-ptrdefault=1'
)
bambu_cmd
.
append
(
'--clock-name=clock_'
+
ifName
)
bambu_cmd
.
append
(
'--reset-name=reset_'
+
ifName
)
bambu_cmd
.
append
(
'--start-name=start_'
+
ifName
)
bambu_cmd
.
append
(
'--done-name=finish_'
+
ifName
)
subprocess
.
check_call
(
bambu_cmd
)
shutil
.
copyfile
(
"bambu_"
+
ifName
+
".vhd"
,
"../TASTE-VHDL-DESIGN/design/bambu_"
+
ifName
+
".vhd"
)
os
.
chdir
(
savedDir
)
os
.
chdir
(
savedDir
)
...
...
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