-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #718 from FPGA-MAFIA/mini_core_accel
add and refactor function to mafia_accel.h library
- Loading branch information
Showing
3 changed files
with
73 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#include "mini_core_accel_defines.h" | ||
#include "mafia_accel.h" | ||
|
||
// ./build.py -dut mini_core_accel -test perceptron -app -hw -sim -clean | ||
|
||
int main() { | ||
|
||
int8_t data = 0x60; | ||
int8_t weight = 0xfb; | ||
int8_t bias = 0x8; | ||
|
||
int32_t output; | ||
|
||
output = perceptron8_8(data, weight, bias, 5); | ||
|
||
// used for debug purposes | ||
WRITE_REG(CR_DEBUG_0, output); // the result is d 0xfffffe28 | ||
|
||
|
||
|
||
return 0; | ||
} |