CMSIS-DSP: Corrected script for html generation
diff --git a/CMSIS/DSP/Source/CommonTables/arm_const_structs_f16.c b/CMSIS/DSP/Source/CommonTables/arm_const_structs_f16.c
index 18c276f..fa4a420 100755
--- a/CMSIS/DSP/Source/CommonTables/arm_const_structs_f16.c
+++ b/CMSIS/DSP/Source/CommonTables/arm_const_structs_f16.c
@@ -57,55 +57,55 @@
#if !defined(__CC_ARM)
-#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) || (defined(ARM_TABLE_TWIDDLECOEF_F16_16) && defined(ARM_TABLE_BITREVIDX_FXT_16))
+#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) || (defined(ARM_TABLE_TWIDDLECOEF_F16_16) && defined(ARM_TABLE_BITREVIDX_FLT_16))
const arm_cfft_instance_f16 arm_cfft_sR_f16_len16 = {
16, twiddleCoefF16_16, armBitRevIndexTable_fixed_16, ARMBITREVINDEXTABLE_FIXED_16_TABLE_LENGTH
};
#endif
-#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) || (defined(ARM_TABLE_TWIDDLECOEF_F16_32) && defined(ARM_TABLE_BITREVIDX_FXT_32))
+#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) || (defined(ARM_TABLE_TWIDDLECOEF_F16_32) && defined(ARM_TABLE_BITREVIDX_FLT_32))
const arm_cfft_instance_f16 arm_cfft_sR_f16_len32 = {
32, twiddleCoefF16_32, armBitRevIndexTable_fixed_32, ARMBITREVINDEXTABLE_FIXED_32_TABLE_LENGTH
};
#endif
-#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) || (defined(ARM_TABLE_TWIDDLECOEF_F16_64) && defined(ARM_TABLE_BITREVIDX_FXT_64))
+#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) || (defined(ARM_TABLE_TWIDDLECOEF_F16_64) && defined(ARM_TABLE_BITREVIDX_FLT_64))
const arm_cfft_instance_f16 arm_cfft_sR_f16_len64 = {
64, twiddleCoefF16_64, armBitRevIndexTable_fixed_64, ARMBITREVINDEXTABLE_FIXED_64_TABLE_LENGTH
};
#endif
-#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) || (defined(ARM_TABLE_TWIDDLECOEF_F16_128) && defined(ARM_TABLE_BITREVIDX_FXT_128))
+#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) || (defined(ARM_TABLE_TWIDDLECOEF_F16_128) && defined(ARM_TABLE_BITREVIDX_FLT_128))
const arm_cfft_instance_f16 arm_cfft_sR_f16_len128 = {
128, twiddleCoefF16_128, armBitRevIndexTable_fixed_128, ARMBITREVINDEXTABLE_FIXED_128_TABLE_LENGTH
};
#endif
-#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) || (defined(ARM_TABLE_TWIDDLECOEF_F16_256) && defined(ARM_TABLE_BITREVIDX_FXT_256))
+#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) || (defined(ARM_TABLE_TWIDDLECOEF_F16_256) && defined(ARM_TABLE_BITREVIDX_FLT_256))
const arm_cfft_instance_f16 arm_cfft_sR_f16_len256 = {
256, twiddleCoefF16_256, armBitRevIndexTable_fixed_256, ARMBITREVINDEXTABLE_FIXED_256_TABLE_LENGTH
};
#endif
-#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) || (defined(ARM_TABLE_TWIDDLECOEF_F16_512) && defined(ARM_TABLE_BITREVIDX_FXT_512))
+#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) || (defined(ARM_TABLE_TWIDDLECOEF_F16_512) && defined(ARM_TABLE_BITREVIDX_FLT_512))
const arm_cfft_instance_f16 arm_cfft_sR_f16_len512 = {
512, twiddleCoefF16_512, armBitRevIndexTable_fixed_512, ARMBITREVINDEXTABLE_FIXED_512_TABLE_LENGTH
};
#endif
-#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) || (defined(ARM_TABLE_TWIDDLECOEF_F16_1024) && defined(ARM_TABLE_BITREVIDX_FXT_1024))
+#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) || (defined(ARM_TABLE_TWIDDLECOEF_F16_1024) && defined(ARM_TABLE_BITREVIDX_FLT_1024))
const arm_cfft_instance_f16 arm_cfft_sR_f16_len1024 = {
1024, twiddleCoefF16_1024, armBitRevIndexTable_fixed_1024, ARMBITREVINDEXTABLE_FIXED_1024_TABLE_LENGTH
};
#endif
-#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) || (defined(ARM_TABLE_TWIDDLECOEF_F16_2048) && defined(ARM_TABLE_BITREVIDX_FXT_2048))
+#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) || (defined(ARM_TABLE_TWIDDLECOEF_F16_2048) && defined(ARM_TABLE_BITREVIDX_FLT_2048))
const arm_cfft_instance_f16 arm_cfft_sR_f16_len2048 = {
2048, twiddleCoefF16_2048, armBitRevIndexTable_fixed_2048, ARMBITREVINDEXTABLE_FIXED_2048_TABLE_LENGTH
};
#endif
-#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) || (defined(ARM_TABLE_TWIDDLECOEF_F16_4096) && defined(ARM_TABLE_BITREVIDX_FXT_4096))
+#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) || (defined(ARM_TABLE_TWIDDLECOEF_F16_4096) && defined(ARM_TABLE_BITREVIDX_FLT_4096))
const arm_cfft_instance_f16 arm_cfft_sR_f16_len4096 = {
4096, twiddleCoefF16_4096, armBitRevIndexTable_fixed_4096, ARMBITREVINDEXTABLE_FIXED_4096_TABLE_LENGTH
};
diff --git a/CMSIS/DSP/Source/fft.cmake b/CMSIS/DSP/Source/fft.cmake
index 9615dd4..c1f9d8c 100644
--- a/CMSIS/DSP/Source/fft.cmake
+++ b/CMSIS/DSP/Source/fft.cmake
@@ -94,46 +94,55 @@
if (CONFIGTABLE AND CFFT_F16_16)
target_compile_definitions(${PROJECT} PUBLIC ARM_TABLE_TWIDDLECOEF_F16_16)
+ target_compile_definitions(${PROJECT} PUBLIC ARM_TABLE_BITREVIDX_FLT_16)
target_compile_definitions(${PROJECT} PUBLIC ARM_TABLE_BITREVIDX_FXT_16)
endif()
if (CONFIGTABLE AND CFFT_F16_32)
target_compile_definitions(${PROJECT} PUBLIC ARM_TABLE_TWIDDLECOEF_F16_32)
+ target_compile_definitions(${PROJECT} PUBLIC ARM_TABLE_BITREVIDX_FLT_32)
target_compile_definitions(${PROJECT} PUBLIC ARM_TABLE_BITREVIDX_FXT_32)
endif()
if (CONFIGTABLE AND CFFT_F16_64)
target_compile_definitions(${PROJECT} PUBLIC ARM_TABLE_TWIDDLECOEF_F16_64)
+ target_compile_definitions(${PROJECT} PUBLIC ARM_TABLE_BITREVIDX_FLT_64)
target_compile_definitions(${PROJECT} PUBLIC ARM_TABLE_BITREVIDX_FXT_64)
endif()
if (CONFIGTABLE AND CFFT_F16_128)
target_compile_definitions(${PROJECT} PUBLIC ARM_TABLE_TWIDDLECOEF_F16_128)
+ target_compile_definitions(${PROJECT} PUBLIC ARM_TABLE_BITREVIDX_FLT_128)
target_compile_definitions(${PROJECT} PUBLIC ARM_TABLE_BITREVIDX_FXT_128)
endif()
if (CONFIGTABLE AND CFFT_F16_256)
target_compile_definitions(${PROJECT} PUBLIC ARM_TABLE_TWIDDLECOEF_F16_256)
+ target_compile_definitions(${PROJECT} PUBLIC ARM_TABLE_BITREVIDX_FLT_256)
target_compile_definitions(${PROJECT} PUBLIC ARM_TABLE_BITREVIDX_FXT_256)
endif()
if (CONFIGTABLE AND CFFT_F16_512)
target_compile_definitions(${PROJECT} PUBLIC ARM_TABLE_TWIDDLECOEF_F16_512)
+ target_compile_definitions(${PROJECT} PUBLIC ARM_TABLE_BITREVIDX_FLT_512)
target_compile_definitions(${PROJECT} PUBLIC ARM_TABLE_BITREVIDX_FXT_512)
endif()
if (CONFIGTABLE AND CFFT_F16_1024)
target_compile_definitions(${PROJECT} PUBLIC ARM_TABLE_TWIDDLECOEF_F16_1024)
+ target_compile_definitions(${PROJECT} PUBLIC ARM_TABLE_BITREVIDX_FLT_1024)
target_compile_definitions(${PROJECT} PUBLIC ARM_TABLE_BITREVIDX_FXT_1024)
endif()
if (CONFIGTABLE AND CFFT_F16_2048)
target_compile_definitions(${PROJECT} PUBLIC ARM_TABLE_TWIDDLECOEF_F16_2048)
+ target_compile_definitions(${PROJECT} PUBLIC ARM_TABLE_BITREVIDX_FLT_2048)
target_compile_definitions(${PROJECT} PUBLIC ARM_TABLE_BITREVIDX_FXT_2048)
endif()
if (CONFIGTABLE AND CFFT_F16_4096)
target_compile_definitions(${PROJECT} PUBLIC ARM_TABLE_TWIDDLECOEF_F16_4096)
+ target_compile_definitions(${PROJECT} PUBLIC ARM_TABLE_BITREVIDX_FLT_4096)
target_compile_definitions(${PROJECT} PUBLIC ARM_TABLE_BITREVIDX_FXT_4096)
endif()
@@ -409,48 +418,56 @@
if (CONFIGTABLE AND RFFT_FAST_F16_32)
target_compile_definitions(${PROJECT} PUBLIC ARM_TABLE_TWIDDLECOEF_F16_16)
+ target_compile_definitions(${PROJECT} PUBLIC ARM_TABLE_BITREVIDX_FLT_16)
target_compile_definitions(${PROJECT} PUBLIC ARM_TABLE_BITREVIDX_FXT_16)
target_compile_definitions(${PROJECT} PUBLIC ARM_TABLE_TWIDDLECOEF_RFFT_F16_32)
endif()
if (CONFIGTABLE AND RFFT_FAST_F16_64)
target_compile_definitions(${PROJECT} PUBLIC ARM_TABLE_TWIDDLECOEF_F16_32)
+ target_compile_definitions(${PROJECT} PUBLIC ARM_TABLE_BITREVIDX_FLT_32)
target_compile_definitions(${PROJECT} PUBLIC ARM_TABLE_BITREVIDX_FXT_32)
target_compile_definitions(${PROJECT} PUBLIC ARM_TABLE_TWIDDLECOEF_RFFT_F16_64)
endif()
if (CONFIGTABLE AND RFFT_FAST_F16_128)
target_compile_definitions(${PROJECT} PUBLIC ARM_TABLE_TWIDDLECOEF_F16_64)
+ target_compile_definitions(${PROJECT} PUBLIC ARM_TABLE_BITREVIDX_FLT_64)
target_compile_definitions(${PROJECT} PUBLIC ARM_TABLE_BITREVIDX_FXT_64)
target_compile_definitions(${PROJECT} PUBLIC ARM_TABLE_TWIDDLECOEF_RFFT_F16_128)
endif()
if (CONFIGTABLE AND RFFT_FAST_F16_256)
target_compile_definitions(${PROJECT} PUBLIC ARM_TABLE_TWIDDLECOEF_F16_128)
+ target_compile_definitions(${PROJECT} PUBLIC ARM_TABLE_BITREVIDX_FLT_128)
target_compile_definitions(${PROJECT} PUBLIC ARM_TABLE_BITREVIDX_FXT_128)
target_compile_definitions(${PROJECT} PUBLIC ARM_TABLE_TWIDDLECOEF_RFFT_F16_256)
endif()
if (CONFIGTABLE AND RFFT_FAST_F16_512)
target_compile_definitions(${PROJECT} PUBLIC ARM_TABLE_TWIDDLECOEF_F16_256)
+ target_compile_definitions(${PROJECT} PUBLIC ARM_TABLE_BITREVIDX_FLT_256)
target_compile_definitions(${PROJECT} PUBLIC ARM_TABLE_BITREVIDX_FXT_256)
target_compile_definitions(${PROJECT} PUBLIC ARM_TABLE_TWIDDLECOEF_RFFT_F16_512)
endif()
if (CONFIGTABLE AND RFFT_FAST_F16_1024)
target_compile_definitions(${PROJECT} PUBLIC ARM_TABLE_TWIDDLECOEF_F16_512)
+ target_compile_definitions(${PROJECT} PUBLIC ARM_TABLE_BITREVIDX_FLT_512)
target_compile_definitions(${PROJECT} PUBLIC ARM_TABLE_BITREVIDX_FXT_512)
target_compile_definitions(${PROJECT} PUBLIC ARM_TABLE_TWIDDLECOEF_RFFT_F16_1024)
endif()
if (CONFIGTABLE AND RFFT_FAST_F16_2048)
target_compile_definitions(${PROJECT} PUBLIC ARM_TABLE_TWIDDLECOEF_F16_1024)
+ target_compile_definitions(${PROJECT} PUBLIC ARM_TABLE_BITREVIDX_FLT_1024)
target_compile_definitions(${PROJECT} PUBLIC ARM_TABLE_BITREVIDX_FXT_1024)
target_compile_definitions(${PROJECT} PUBLIC ARM_TABLE_TWIDDLECOEF_RFFT_F16_2048)
endif()
if (CONFIGTABLE AND RFFT_FAST_F16_4096)
target_compile_definitions(${PROJECT} PUBLIC ARM_TABLE_TWIDDLECOEF_F16_2048)
+ target_compile_definitions(${PROJECT} PUBLIC ARM_TABLE_BITREVIDX_FLT_2048)
target_compile_definitions(${PROJECT} PUBLIC ARM_TABLE_BITREVIDX_FXT_2048)
target_compile_definitions(${PROJECT} PUBLIC ARM_TABLE_TWIDDLECOEF_RFFT_F16_4096)
endif()
diff --git a/CMSIS/DSP/Testing/Source/Benchmarks/TransformF16.cpp b/CMSIS/DSP/Testing/Source/Benchmarks/TransformF16.cpp
index 41209d3..653a567 100755
--- a/CMSIS/DSP/Testing/Source/Benchmarks/TransformF16.cpp
+++ b/CMSIS/DSP/Testing/Source/Benchmarks/TransformF16.cpp
@@ -45,6 +45,7 @@
break;
case TEST_RFFT_F16_2:
+ {
// Factor 2 for irfft
samples.reload(TransformF16::INPUTR_F16_ID,mgr,2*this->nbSamples);
output.create(2*this->nbSamples,TransformF16::OUT_F16_ID,mgr);
@@ -56,7 +57,9 @@
memcpy(this->pTmp,this->pSrc,sizeof(float16_t)*this->nbSamples);
+
arm_rfft_fast_init_f16(&this->rfftFastInstance, this->nbSamples);
+ }
break;
case TEST_CFFT_RADIX4_F16_3:
diff --git a/CMSIS/DSP/Testing/TestScripts/doc/Format.py b/CMSIS/DSP/Testing/TestScripts/doc/Format.py
index 0f272a2..9c76a93 100755
--- a/CMSIS/DSP/Testing/TestScripts/doc/Format.py
+++ b/CMSIS/DSP/Testing/TestScripts/doc/Format.py
@@ -108,9 +108,10 @@
}
html, body {
- background-color: #f3f2ee;
- font-family: "PT Serif", 'Times New Roman', Times, serif;
- color: #1f0909;
+ background-color: #E5ECEB;
+ font-family: "Lato";
+ font-style: normal; font-variant: normal;
+ color: #002B49;
line-height: 1.5em;
}
@@ -121,6 +122,15 @@
}
+.NA {
+ color: #999999;
+}
+
+.testname {
+ color: #0091BD;
+ font-size: 1.125em;
+}
+
h1,
h2,
h3,
@@ -181,10 +191,10 @@
background-color: transparent;
}
thead {
- background-color: #dadada;
+ background-color: #979ea3;
}
tr:nth-child(even) {
- background: #e8e7e7;
+ background: #d7dadc;
}
ul, #myUL {
@@ -232,7 +242,7 @@
.firstcore {
border-left-color: black;
border-left-style: solid;
- border-left-width: 1px;
+ border-left-width: 2px;
}
@@ -592,17 +602,20 @@
row = params + values
for elem in row:
+ txt=str(elem)
+ if txt == 'NA':
+ txt = "<span class=\"NA\">" + txt + "</span>"
if i < nbParams:
self._output.write("<td class=\"param\">")
- self._output.write(str(elem))
+ self._output.write(txt)
self._output.write("</td>\n")
elif i == nbParams and nbParams != 0:
self._output.write("<td class=\"firstcore\">")
- self._output.write(str(elem))
+ self._output.write(txt)
self._output.write("</td>\n")
else:
self._output.write("<td class=\"core\">")
- self._output.write(str(elem))
+ self._output.write(txt)
self._output.write("</td>\n")
i = i + 1
self._output.write("</tr>\n")
@@ -612,7 +625,10 @@
def visitSection(self,section):
self._id = self._id + 1
self._sectionID = self._sectionID + 1
- self._output.write("<h%d id=\"section%d\">%s</h%d>\n" % (self._id,self._sectionID,section.name,self._id))
+ name = section.name
+ if section.isTest:
+ name = "<span class=\"testname\">" + name + "</span>"
+ self._output.write("<h%d id=\"section%d\">%s</h%d>\n" % (self._id,self._sectionID,name,self._id))
def leaveSection(self,section):
self._id = self._id - 1
@@ -622,6 +638,7 @@
<html>
<head>
<meta charset='UTF-8'><meta name='viewport' content='width=device-width initial-scale=1'>
+<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Lato">
<title>Benchmarks</title>%s</head><body>\n""" % styleSheet)
if self._regMode and not self._ratioMode:
self._output.write("<h1>ECPS Benchmark Regressions</h1>\n")
diff --git a/CMSIS/DSP/Testing/TestScripts/doc/Structure.py b/CMSIS/DSP/Testing/TestScripts/doc/Structure.py
index 6abd76a..b16f91b 100755
--- a/CMSIS/DSP/Testing/TestScripts/doc/Structure.py
+++ b/CMSIS/DSP/Testing/TestScripts/doc/Structure.py
@@ -60,11 +60,19 @@
def __init__(self,name):
super(Section, self).__init__(name)
self._content = []
+ self._testname=False
def addContent(self,content):
self._content.append(content)
@property
+ def isTest(self):
+ return(self._testname)
+
+ def setTest(self):
+ self._testname = True
+
+ @property
def hasContent(self):
return(len(self._content) > 0 or any([x.hasContent for x in self.sections]))
diff --git a/CMSIS/DSP/Testing/bench.txt b/CMSIS/DSP/Testing/bench.txt
index 24e8e10..6fd49bb 100755
--- a/CMSIS/DSP/Testing/bench.txt
+++ b/CMSIS/DSP/Testing/bench.txt
@@ -1607,7 +1607,7 @@
Params RFFT_PARAM_ID = {
NB = [64,128,256]
IFFT = [0,1]
- REV = [0,1]
+ REV = [1]
}
Params DCT_PARAM_ID = {
diff --git a/CMSIS/DSP/Testing/extractDb.py b/CMSIS/DSP/Testing/extractDb.py
index d6179c1..73b79a8 100755
--- a/CMSIS/DSP/Testing/extractDb.py
+++ b/CMSIS/DSP/Testing/extractDb.py
@@ -471,14 +471,21 @@
vals =np.array([list(x) for x in list(result)])
return(keepCols,vals)
-
+def formatFloat(s):
+ result=[]
+ for t in s:
+ if type(t) is float:
+ result.append(("%.3f" % t))
+ else:
+ result.append(t)
+ return(result)
PARAMS=["NB","NumTaps", "NBA", "NBB", "Factor", "NumStages","VECDIM","NBR","NBC","NBI","IFFT", "BITREV"]
def regressionTableFor(byname,name,section,ref,toSort,indexCols,field):
data=ref.pivot_table(index=indexCols, columns=byname,
- values=[field], aggfunc='first')
-
+ values=[field], aggfunc='first',fill_value="NA")
+
data=data.sort_values(toSort)
cores = [c[1] for c in list(data.columns)]
@@ -499,14 +506,14 @@
row=list(row[0]) + row[1:]
if field=="MAXREGCOEF":
newrow = row
- newrow[len(columns):] = [("%.3f" % x) for x in row[len(columns):]]
+ newrow[len(columns):] = formatFloat(row[len(columns):])
row=newrow
dataTable.addRow(row)
bars['data'].append(row)
return(bars)
else:
if field=="MAXREGCOEF":
- dataForFunc=[("%.3f" % x) for x in dataForFunc]
+ dataForFunc=formatFloat(dataForFunc)
dataTable.addRow(dataForFunc)
return(list(zip(cores,dataForFunc)))
@@ -599,6 +606,7 @@
for name in testNames:
if args.r:
testSection = Section(name)
+ testSection.setTest()
typeSection.addSection(testSection)
maxCyclesSection = Section("Max cycles")
@@ -638,13 +646,14 @@
else:
data=ref.pivot_table(index=indexCols, columns=byname,
- values=valList, aggfunc='first')
+ values=valList, aggfunc='first',fill_value="NA")
data=data.sort_values(toSort)
#print(list(data.columns))
testSection = Section(name)
+ testSection.setTest()
typeSection.addSection(testSection)
dataForFunc=data.loc[name]
@@ -837,6 +846,8 @@
return(result)
+
+
def addRatioTable(cols,params,data,section,testNames,byd):
ref=pd.DataFrame(data,columns=cols)
toSort=["name"] + params
@@ -847,6 +858,7 @@
#print(testNames)
for name in testNames:
testSection = Section(name)
+ testSection.setTest()
section.addSection(testSection)
ratioSection = Section("Ratios")