Adding files
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
# Copyright lowRISC contributors.
|
||||
# Licensed under the Apache License, Version 2.0, see LICENSE for details.
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
#
|
||||
# Generate a baremetal application
|
||||
|
||||
# Name of the program $(PROGRAM).c will be added as a source file
|
||||
|
||||
PROGRAM = elderly_fall
|
||||
PROGRAM_DIR := $(shell dirname $(realpath $(lastword $(MAKEFILE_LIST))))
|
||||
# Any extra source files to include in the build. Use the upper case .S
|
||||
# extension for assembly files
|
||||
EXTRA_SRCS :=
|
||||
|
||||
include ${PROGRAM_DIR}/../../common/common.mk
|
||||
@@ -0,0 +1,51 @@
|
||||
#include "simple_system_common.h"
|
||||
#include "fully_connected_opt.h"
|
||||
#include "ibex_mlp_params.h"
|
||||
#include "mlp_weights.h"
|
||||
#include "ibex_inputs.h"
|
||||
|
||||
#define IN_DIM 120
|
||||
#define HIDDEN_DIM1 20
|
||||
#define OUT_DIM 4
|
||||
#define SAMPLES 1
|
||||
|
||||
int outs[SAMPLES][OUT_DIM >> 2];
|
||||
|
||||
void elderly_fall() {
|
||||
|
||||
int inp[IN_DIM >> 2];
|
||||
int y1[HIDDEN_DIM1 >> 2];
|
||||
int out[OUT_DIM >> 2];
|
||||
|
||||
for (int iter = 0; iter < SAMPLES; iter ++){
|
||||
for(int i = 0; i < IN_DIM >> 2; i++) inp[i] = input[iter][i];
|
||||
|
||||
pcount_enable(1);
|
||||
|
||||
mlp_layer_2bits(inp, y1, IN_DIM >> 2, HIDDEN_DIM1 >> 2, W1, B1, SB1, MV1, SV1);
|
||||
mlp_layer_2bits(y1, out, HIDDEN_DIM1 >> 2, OUT_DIM >> 2, W2, B2, SB2, MV2, SV2);
|
||||
|
||||
pcount_enable(0);
|
||||
|
||||
puts("Output Layer Values:\n");
|
||||
for(int i = 0; i < OUT_DIM >> 2; i++) {
|
||||
puthex((out[i] & 0xFF000000) >> 24);
|
||||
puts(" ");
|
||||
puthex((out[i] & 0xFF0000) >> 16);
|
||||
puts(" ");
|
||||
puthex((out[i] & 0xFF00) >> 8);
|
||||
puts(" ");
|
||||
puthex(out[i] & 0xFF);
|
||||
puts("\n");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
int main(void) {
|
||||
|
||||
pcount_enable(0);
|
||||
|
||||
elderly_fall();
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
#ifndef MLP_INPUTS_H
|
||||
#define MLP_INPUTS_H
|
||||
|
||||
static const int input[1][30] = {
|
||||
{1908200253, 691092868, 1481730920, 1061043560, 2089758003, 761487468, 607070483, 4245894991, 1823178522, 763293266, 1062675346, 338649697, 372838669, 252447763, 1767913100, 2229306461, 1187890378, 1986881919, 2744213868, 1767863942, 1685485199, 2930253292, 2876817118, 3901532637, 2574810729, 1920040840, 2578359212, 3010626681, 2288931612, 3976200192}
|
||||
};
|
||||
|
||||
#endif /* IBEX_MLP_INPUTS_H */
|
||||
@@ -0,0 +1,18 @@
|
||||
#ifndef IBEX_MLP_PARAMS_H
|
||||
#define IBEX_MLP_PARAMS_H
|
||||
|
||||
#define MV1 2139062143
|
||||
#define MV2 1920103026
|
||||
|
||||
#define SV1 1352745601
|
||||
#define SV2 1217471041
|
||||
|
||||
static const int SB1[5] = {
|
||||
135274499, 134225987, 8195, 3, 134217795
|
||||
};
|
||||
|
||||
static const int SB2[1] = {
|
||||
1048579
|
||||
};
|
||||
|
||||
#endif /* IBEX_MLP_PARAMS_H */
|
||||
@@ -0,0 +1,25 @@
|
||||
#ifndef MLP_WEIGHTS_H
|
||||
#define MLP_WEIGHTS_H
|
||||
|
||||
static const int W1[5][30] = {
|
||||
{12828752, 271931136, 469876931, 3423621907, 3560898865, 68382740, 1140850688, 3477508, 66109447, 290968645, 68207875, 1087427584, 321913041, 3284209412, 71319744, 262356, 1157828676, 268440000, 3478963269, 63194109, 3234083596, 62914560, 51393584, 3472900116, 809512991, 3275046196, 273691415, 68158556, 120904960, 3221225472},
|
||||
{218181639, 80530636, 3222211776, 211, 12849932, 3221225797, 202117428, 13369548, 470565695, 1396913152, 3225698124, 1118480, 1125332240, 80547904, 319049029, 1073749185, 231800880, 823155761, 67378188, 3489861652, 1280250897, 130072855, 336531712, 3221696540, 253168657, 789520, 4231295283, 1104216512, 385943488, 218103808},
|
||||
{872481728, 115648, 13632516, 1338007551, 873778485, 4097840195, 16847936, 3489677504, 3222012740, 13959196, 32506931, 3221225713, 4109385792, 819786499, 352572688, 62915632, 3558015936, 50594608, 806093056, 3757378560, 3319054529, 1950609472, 3238805264, 1204863216, 29426752, 1074595015, 347204, 321994945, 58470420, 201326592},
|
||||
{805765376, 15472, 3284627504, 17618688, 1275153729, 3284190293, 339480880, 7406785, 1148453180, 328448, 352141325, 205540660, 2101608452, 1343028548, 24120624, 1088160780, 88866816, 1141198129, 1006948301, 1346113728, 12780353, 1343160524, 805520577, 117783820, 3423948052, 1090519040, 285290693, 805372016, 525074432, 822083584},
|
||||
{24316928, 1279263936, 1090794241, 3225766927, 856502284, 268435484, 810339333, 63701040, 1879314624, 3490508800, 4030727180, 4228169748, 289419313, 3560816640, 231754752, 79917375, 218116416, 1292637184, 67190784, 3936068, 319557644, 14418705, 51576883, 3276800049, 3222274865, 80546932, 2132017153, 209570828, 1006715184, 1124073472}
|
||||
};
|
||||
|
||||
static const int W2[1][5] = {
|
||||
{4029694064, 275828736, 12336, 49200, 15732736}
|
||||
};
|
||||
|
||||
static const int B1[5] = {
|
||||
1198743370, 1219189158, 268919229, 3168196459, 1512008264
|
||||
};
|
||||
|
||||
static const int B2[1] = {
|
||||
2370961408
|
||||
};
|
||||
|
||||
|
||||
#endif /* MLP_WEIGHTS_H */
|
||||
@@ -0,0 +1,15 @@
|
||||
# Copyright lowRISC contributors.
|
||||
# Licensed under the Apache License, Version 2.0, see LICENSE for details.
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
#
|
||||
# Generate a baremetal application
|
||||
|
||||
# Name of the program $(PROGRAM).c will be added as a source file
|
||||
|
||||
PROGRAM = elderly_fall
|
||||
PROGRAM_DIR := $(shell dirname $(realpath $(lastword $(MAKEFILE_LIST))))
|
||||
# Any extra source files to include in the build. Use the upper case .S
|
||||
# extension for assembly files
|
||||
EXTRA_SRCS :=
|
||||
|
||||
include ${PROGRAM_DIR}/../../common/common.mk
|
||||
@@ -0,0 +1,45 @@
|
||||
#include "simple_system_common.h"
|
||||
#include "fully_connected.h"
|
||||
#include "ibex_mlp_params.h"
|
||||
#include "mlp_weights.h"
|
||||
#include "ibex_inputs.h"
|
||||
|
||||
#define IN_DIM 117
|
||||
#define HIDDEN_DIM1 20
|
||||
#define OUT_DIM 2
|
||||
#define SAMPLES 1
|
||||
|
||||
int outs[SAMPLES][OUT_DIM];
|
||||
|
||||
void elderly_fall() {
|
||||
|
||||
int inp[IN_DIM];
|
||||
int y1[HIDDEN_DIM1];
|
||||
int out[OUT_DIM];
|
||||
|
||||
for (int iter = 0; iter < SAMPLES; iter ++){
|
||||
for(int i = 0; i < IN_DIM; i++) inp[i] = input[iter][i];
|
||||
|
||||
pcount_enable(1);
|
||||
|
||||
mlp_layer(inp, y1, IN_DIM, HIDDEN_DIM1, W1, B1, SB1, MV1, SV1);
|
||||
mlp_layer(y1, out, HIDDEN_DIM1, OUT_DIM, W2, B2, SB2, MV2, SV2);
|
||||
|
||||
pcount_enable(0);
|
||||
|
||||
puts("Output Layer Values:\n");
|
||||
for(int i = 0; i < OUT_DIM; i++) {
|
||||
puthex(out[i]);
|
||||
puts("\n");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
int main(void) {
|
||||
|
||||
pcount_enable(0);
|
||||
|
||||
elderly_fall();
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
#ifndef MLP_INPUTS_H
|
||||
#define MLP_INPUTS_H
|
||||
|
||||
static const int input[1][117] = {
|
||||
{113, 188, 211, 61, 41, 49, 61, 132, 88, 81, 107, 104, 63, 62, 61, 104, 124, 143, 45, 51, 45, 99, 96, 108, 36, 47, 41, 19, 253, 19, 55, 79, 108, 171, 127, 26, 45, 126, 238, 82, 63, 87, 35, 146, 20, 47, 98, 97, 22, 57, 17, 13, 15, 12, 12, 19, 105, 96, 54, 140, 132, 224, 132, 93, 70, 205, 196, 202, 118, 109, 105, 127, 163, 145, 97, 108, 105, 95, 118, 134, 100, 118, 118, 143, 174, 168, 29, 236, 171, 120, 190, 222, 232, 140, 169, 221, 153, 120, 126, 105, 114, 113, 127, 136, 153, 174, 163, 172, 179, 114, 132, 121, 136, 110, 83, 28, 237}
|
||||
};
|
||||
|
||||
#endif /* IBEX_MLP_INPUTS_H */
|
||||
@@ -0,0 +1,13 @@
|
||||
#ifndef IBEX_MLP_PARAMS_H
|
||||
#define IBEX_MLP_PARAMS_H
|
||||
|
||||
#define MV1 127
|
||||
#define MV2 114
|
||||
|
||||
#define SV1 10
|
||||
#define SV2 9
|
||||
|
||||
#define SB1 0
|
||||
#define SB2 0
|
||||
|
||||
#endif /* IBEX_MLP_PARAMS_H */
|
||||
@@ -0,0 +1,41 @@
|
||||
#ifndef MLP_WEIGHTS_H
|
||||
#define MLP_WEIGHTS_H
|
||||
|
||||
static const int W1[20][117] = {
|
||||
{0, -1, -1, 1, 0, 0, 1, 0, 0, 0, -1, -1, -1, 0, 1, 0, -1, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, -1, -1, 0, 0, 1, -1, 1, 0, 0, -1, 0, 1, -1, -1, 0, 0, 0, 0, -1, -1, -1, 0, 0, 0, 1, 1, -1, 0, 0, 0, -1, 1, 0, 0, 1, 0, 0, 0, -1, -1, 1, -1, 1, 0, -1, 1, -1, -1, -1, 0, 0, 0, -1, 0, 0, 0, 0, 0, 0, -1, 0, 1, 0, 0, 1, 0, 0, -1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, -1, 0, -1},
|
||||
{0, 0, 0, 1, 1, -1, 1, 0, 1, 0, 0, 0, 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0, -1, 0, 0, 0, 0, 1, -1, -1, 1, 0, 1, 0, 0, 0, 0, 1, -1, 0, 0, -1, 0, -1, 0, 1, 0, 0, -1, -1, 0, 0, 0, -1, -1, 1, 0, 1, 0, 0, 0, 0, -1, -1, 1, 0, -1, 0, -1, 0, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, -1, -1, 1, -1, 1, 0, 0, -1, -1, -1, -1, -1, 0, 0, 0, 0},
|
||||
{1, -1, 0, 0, 0, 0, 0, 0, 1, 0, -1, 1, 0, 1, 0, -1, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 1, 0, 0, 1, 0, 0, 0, 0, -1, 1, -1, 1, 0, 1, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, -1, 0, -1, 0, 0, 0, 0, 0, -1, 1, -1, -1, 0, -1, -1, 0, 0, 1, 0, 0, -1, 1, 0, 1, 0, 0, -1, 0, 0, 1, 0, 1, 0, 0, 0, 1, 1, 0, -1}
|
||||
};
|
||||
|
||||
static const int W2[2][20] = {
|
||||
{-1, 0, 1, 1, 0, 1, -1, 0, 0, 0, 0, 0, 0, 0, -1, 0, 0, -1, 0, 0},
|
||||
{-1, -1, 0, -1, 1, -1, 1, 0, 0, 0, -1, -1, 0, 0, 0, -1, 0, -1, 1, 0}
|
||||
};
|
||||
|
||||
static const int B1[20] = {
|
||||
142, 230, 190, 74, 144, -85, 178, -180, 16, 7, 194, -67, -68, -42, -41, 107, 180, 31, 106, 144
|
||||
};
|
||||
|
||||
static const int B2[2] = {
|
||||
-115, 164
|
||||
};
|
||||
|
||||
|
||||
#endif /* MLP_WEIGHTS_H */
|
||||
Reference in New Issue
Block a user