Commit 387c1860 authored by Tiago Jorge's avatar Tiago Jorge
Browse files

Update Bambu call to support C blocks as well.

parent d51f046e
......@@ -2677,17 +2677,35 @@ def CallBambuForBrave(bNoBitfile):
shutil.rmtree(bambuDir)
os.makedirs(bambuDir)
os.chdir(bambuDir)
# C files that Bambu might need
dataC = '../../../' + fBlockName + '/' + fBlockName + '/' + ifName + '_data.c'
ifNameC = '../../../' + fBlockName + '/' + fBlockName + '/' + ifName + '.c'
fBlockNameC = '../../../' + fBlockName + '/' + fBlockName + '.c'
bambu_cmd = ['bambu']
bambu_cmd.append('--compiler=I386_CLANG4')
bambu_cmd.append('-O3')
bambu_cmd.append('--experimental-setup=BAMBU-BALANCED')
bambu_cmd.append('--no-iob')
bambu_cmd.append('-O2')
bambu_cmd.append('-funroll-loops')
bambu_cmd.append('-fno-inline')
bambu_cmd.append('--speculative-sdc-scheduling')
#bambu_cmd.append('--device-name=nx1h35S')
bambu_cmd.append('../' + os.path.basename(bambuFile)[:-1])
bambu_cmd.append('-I../../../auto-src/')
bambu_cmd.append('-I../../../' + fBlockName + '/' + fBlockName + '/')
bambu_cmd.append('-I../../../GlueAndBuild/glue' + fBlockName + '/')
bambu_cmd.append('-DSTATIC=""')
bambu_cmd.append('../../../' + fBlockName + '/' + fBlockName + '/' + ifName + '.c')
if os.path.isfile(dataC):
bambu_cmd.append(dataC)
# C bridge needs this
if os.path.isfile(fBlockNameC):
bambu_cmd.append(fBlockNameC)
# whereas Simulink bridge needs this
elif os.path.isfile(ifNameC):
bambu_cmd.append(ifNameC)
# and maybe this one as well
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')
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment