CMSIS-DSP: New testing framework
(For our internal use. In short term, we won't give support about it).
CMSIS-DSP: Update to cmake build for the testing framework
CMSIS-NN:Implementation of arm_fully_connected_s8
Use API and quantization compatible with TF Lite.
diff --git a/CMSIS/DSP/Testing/testmain.cpp b/CMSIS/DSP/Testing/testmain.cpp
new file mode 100644
index 0000000..eb5014a
--- /dev/null
+++ b/CMSIS/DSP/Testing/testmain.cpp
@@ -0,0 +1,72 @@
+#include <cstdlib>
+#include <cstdio>
+#include <iostream>
+#include "TestDesc.h"
+#include "Semihosting.h"
+#include "FPGA.h"
+#include "IORunner.h"
+#include "ArrayMemory.h"
+#include <stdlib.h>
+using namespace std;
+
+#define MEMSIZE 64000
+
+// Dummy (will be generated by python scripts)
+// char* array describing the tests and the input patterns.
+// Reference patterns are ignored in this case.
+#include "TestDrive.h"
+#include "Patterns.h"
+
+
+int testmain()
+{
+ char *memoryBuf=NULL;
+
+ memoryBuf = (char*)malloc(MEMSIZE);
+ if (memoryBuf !=NULL)
+ {
+ try
+ {
+ // Choice of a memory manager.
+ // Here we choose the Array one (only implemented one)
+ Client::ArrayMemory memory(memoryBuf,MEMSIZE);
+
+ // There is also possibility of using "FPGA" io
+ //Client::Semihosting io("../TestDesc.txt","../Patterns","../Output","../Parameters");
+ Client::FPGA io(testDesc,patterns);
+
+
+ // Pattern Manager making the link between IO and Memory
+ Client::PatternMgr mgr(&io,&memory);
+
+
+ // A Runner to run the test.
+ // An IO runner is driven by some IO
+ // In future one may have a client/server runner driven
+ // by a server running on a host.
+ Client::IORunner runner(&io,&mgr,Testing::kTestAndDump);
+
+
+ // Root object containing all the tests
+ Root d(1);
+
+ // Runner applied to the tree of tests
+ d.accept(&runner);
+
+ }
+ catch(...)
+ {
+ printf("Exception\n");
+ }
+
+
+ free(memoryBuf);
+ }
+ else
+ {
+ printf("NOT ENOUGH MEMORY\n");
+ }
+
+ /* code */
+ return 0;
+}