blob: 8ba69ae767b825f57f28c2d8d72ad6eacea2a8d6 [file] [log] [blame]
#include <cstdio>
#include "sw/device/tests/kelvin/hps-c-port/model/inc/layers.h"
int8_t buffer_000[120 * 160 * 16] __aligned__ __noinit__;
int8_t buffer_001[120 * 160 * 16] __aligned__ __noinit__;
int8_t buffer_002[120 * 160 * 16] __aligned__ __noinit__;
int8_t buffer_003[60 * 80 * 16] __aligned__ __noinit__;
int8_t buffer_004[60 * 80 * 48] __aligned__ __noinit__;
int8_t buffer_005[60 * 80 * 48] __aligned__ __noinit__;
int8_t buffer_006[30 * 40 * 48] __aligned__ __noinit__;
int8_t buffer_007[30 * 40 * 48] __aligned__ __noinit__;
int8_t buffer_008[(15+1/*pad for overwriting*/) * 20 * 48] __aligned__ __noinit__;
int8_t buffer_009[(15+1/*pad for overwriting*/) * 20 * 48] __aligned__ __noinit__;
int8_t buffer_010[(7+1/*pad for overwriting*/) * 10 * 48] __aligned__ __noinit__;
int8_t buffer_011[(7+1/*pad for overwriting*/) * 10 * 48] __aligned__ __noinit__;
int8_t buffer_012[3360] __aligned__ __noinit__;
int8_t buffer_013[32] __aligned__ __noinit__;
int8_t buffer_014[32] __aligned__ __noinit__;
int8_t buffer_015[2] __aligned__ __noinit__;
int8_t buffer_016[2] __aligned__ __noinit__;
void model(const int8_t *input, int8_t *output) {
layer_000_conv_2d(input, buffer_000);
layer_001_conv_2d(buffer_000, buffer_001);
layer_002_conv_2d(buffer_001, buffer_002);
layer_003_max_pool_2d(buffer_002, buffer_003);
layer_004_conv_2d(buffer_003, buffer_004);
layer_005_conv_2d(buffer_004, buffer_005);
layer_006_max_pool_2d(buffer_005, buffer_006);
layer_007_conv_2d(buffer_006, buffer_007);
layer_008_max_pool_2d(buffer_007, buffer_008);
layer_009_conv_2d(buffer_008, buffer_009);
layer_010_max_pool_2d(buffer_009, buffer_010);
layer_011_conv_2d(buffer_010, buffer_011);
layer_012_reshape(buffer_011, buffer_012);
layer_013_fullyconnected(buffer_012, buffer_013);
layer_014_fullyconnected(buffer_013, buffer_014);
layer_015_fullyconnected(buffer_014, buffer_015);
layer_016_logistic(buffer_015, output);
}