Commit d51f046e authored by Tiago Jorge's avatar Tiago Jorge
Browse files

Update to generated header file: now pointing to global Fpga Status variables.

parent 4696f244
......@@ -2607,17 +2607,31 @@ def BraveSynthesisAndHeaderFileGen(bNoBitfile):
if bNoBitfile == False:
maxBitfileSize = 1526250 # 12210000 bits / 8
bitFileOffset = 0;
btfileSize = 0;
savedDir = os.getcwd()
isFirst = True
bitFilesHeader = open("auto-src/bravebitfiles.h", "w")
bitFilesHeader.write('''
struct config_bitfile {
char *config;
char *function;
char *global_status_var;
int offset;
int size;
};
''');
for braveMakefile in os.popen("find . -path *VHDL-DESIGN/design/Makefile*"):
os.chdir(os.path.dirname(braveMakefile))
os.chdir('../..')
fBlockName = os.path.basename(os.getcwd())[4:]
os.chdir('../../' + fBlockName)
bitFilesHeader.write('''
extern char globalFpgaStatus_%s[20];''' % (fBlockName));
os.chdir(savedDir)
bitFilesHeader.write('''
''');
bitFilesHeader.write('''
struct config_bitfile bitfiles[] = {''');
for braveMakefile in os.popen("find . -path *VHDL-DESIGN/design/Makefile*"):
os.chdir(os.path.dirname(braveMakefile))
......@@ -2639,11 +2653,11 @@ struct config_bitfile bitfiles[] = {''');
for config in configs:
if isFirst:
bitFilesHeader.write('''
"%s", "%s", %s, %s''' % (config, fBlockName, bitFileOffset, btfileSize))
"%s", globalFpgaStatus_%s, %s, %s''' % (config, fBlockName, bitFileOffset, btfileSize))
isFirst = False
else:
bitFilesHeader.write(''',
"%s", "%s", %s, %s''' % (config, fBlockName, bitFileOffset, btfileSize))
"%s", globalFpgaStatus_%s, %s, %s''' % (config, fBlockName, bitFileOffset, btfileSize))
bitFileOffset = bitFileOffset + maxBitfileSize
os.chdir(savedDir)
bitFilesHeader.write('''
......
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