diff --git a/.gitignore b/.gitignore index 831ba58..fa8d3f0 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,7 @@ /**/*~ !boot_code/crt0.S /simplified-runtime.xml +*.log +*.wlf +modelsim.ini +transcript diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..c1c527f --- /dev/null +++ b/.gitmodules @@ -0,0 +1,6 @@ +[submodule "hwpe/neureka/pulp-nnx"] + path = hwpe/neureka/pulp-nnx + url = https://github.com/pulp-platform/pulp-nnx +[submodule "hwpe/redmule/redmule-golden-model"] + path = hwpe/redmule/redmule-golden-model + url = https://github.com/yvantor/redmule-golden-model.git diff --git a/astral.yaml b/astral.yaml new file mode 100644 index 0000000..d8acd6c --- /dev/null +++ b/astral.yaml @@ -0,0 +1,19 @@ +astral: + parMatrixMul8: + path: ./astral/parMatrixMul8 + command: make clean all run + parMatrixMul16: + path: ./astral/parMatrixMul16 + command: make clean all run + parMatrixMul32: + path: ./astral/parMatrixMul32 + command: make clean all run + dmr_matmul: + path: ./astral/dmr_matmul + command: make clean all run + redmule: + path: ./astral/redmule + command: make clean all run + neureka: + path: ./astral/neureka + command: make clean all run \ No newline at end of file diff --git a/astral/dmr_matmul b/astral/dmr_matmul new file mode 120000 index 0000000..c6cc223 --- /dev/null +++ b/astral/dmr_matmul @@ -0,0 +1 @@ +../reliability_tests/dmr_matmul \ No newline at end of file diff --git a/astral/ecc_test b/astral/ecc_test new file mode 120000 index 0000000..a80e9ae --- /dev/null +++ b/astral/ecc_test @@ -0,0 +1 @@ +../reliability_tests/ecc_test \ No newline at end of file diff --git a/astral/hello/Makefile b/astral/hello/Makefile new file mode 100644 index 0000000..d145a0f --- /dev/null +++ b/astral/hello/Makefile @@ -0,0 +1,5 @@ +PULP_APP = test +PULP_APP_SRCS = hello.c +PULP_CFLAGS = -O3 + +include $(PULP_SDK_HOME)/install/rules/pulp.mk diff --git a/astral/hello/hello.c b/astral/hello/hello.c new file mode 100644 index 0000000..8741206 --- /dev/null +++ b/astral/hello/hello.c @@ -0,0 +1,24 @@ +/* + * Copyright (C) 2018 ETH Zurich and University of Bologna + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include + +int main() +{ + printf("Hello !\n"); + + return 0; +} diff --git a/astral/icache_fi_conv16 b/astral/icache_fi_conv16 new file mode 120000 index 0000000..c97475b --- /dev/null +++ b/astral/icache_fi_conv16 @@ -0,0 +1 @@ +../reliability_tests/icache_fi_conv16 \ No newline at end of file diff --git a/astral/neureka b/astral/neureka new file mode 120000 index 0000000..98cb979 --- /dev/null +++ b/astral/neureka @@ -0,0 +1 @@ +../hwpe/neureka/ \ No newline at end of file diff --git a/astral/parMatrixMul16/Makefile b/astral/parMatrixMul16/Makefile new file mode 100755 index 0000000..0fade4a --- /dev/null +++ b/astral/parMatrixMul16/Makefile @@ -0,0 +1,8 @@ +PULP_APP = test +PULP_APP_SRCS = matrixMul.c + +PULP_CFLAGS = -O3 + +include $(PULP_SDK_HOME)/install/rules/pulp.mk + +#pulp-bench-reg --name=parMatrixMul16.cycles --module=pulp_rtl_testset --pipeline=$(PIPELINE) --artefact=pulp_rtl_testset --cmd="make run -f Makefile.sdk" --probe-regexp='matrixMul -> success, nr. of errors: 0, execution time: (\d+)' --params="platform($(platformName)),compiler($(OR1K_TOOLCHAIN_TYPE)),nbCores(4),elemSize(16)" --probe-regexp='matrixMulTranspose -> success, nr. of errors: 0, execution time: (\d+)' --params="platform($(platformName)),compiler($(OR1K_TOOLCHAIN_TYPE)),nbCores(4),elemSize(16),transposed" diff --git a/astral/parMatrixMul16/gen_stimuli.py b/astral/parMatrixMul16/gen_stimuli.py new file mode 100755 index 0000000..754a8a9 --- /dev/null +++ b/astral/parMatrixMul16/gen_stimuli.py @@ -0,0 +1,54 @@ +#!/usr/bin/env python + +import sys +import random + + +def write_arr(f, name, arr): + f.write('const short %s[] = {\n' % name) + for v in arr: + f.write('%d,\n' % (v)) + f.write('};\n\n') + return + +################################################################################ +f = open('parMatrixMul16_stimuli.h', 'w') + + +SIZE = 24 +RANGE = int(2**7/SIZE) + +m_a = [] +m_b = [] +m_exp = [] + +for i in range(0,SIZE): + for j in range(0,SIZE): + a = random.randint(-RANGE, RANGE-1) + b = random.randint(-RANGE, RANGE-1) + + m_a.append(a) + m_b.append(b) + +for i in range(0,SIZE): + for j in range(0,SIZE): + r = 0 + + for k in range (0,SIZE): + r = r + m_a[i * SIZE + k] * m_b[k * SIZE + j] + + m_exp.append(r) + + +write_arr(f, 'm_a', m_a) +write_arr(f, 'm_b', m_b) +write_arr(f, 'm_exp', m_exp) + +f.write('#define SIZE %d\n' % SIZE) + + +f.write('__attribute__ ((section(".heapsram"))) short g_mA[SIZE][SIZE];\n') +f.write('__attribute__ ((section(".heapsram"))) short g_mB[SIZE][SIZE];\n') +f.write('__attribute__ ((section(".heapsram"))) short g_mC[SIZE][SIZE];\n') +f.write('__attribute__ ((section(".heapsram"))) short g_mB_tmp[SIZE][SIZE];\n') + diff --git a/astral/parMatrixMul16/matrixMul.c b/astral/parMatrixMul16/matrixMul.c new file mode 100644 index 0000000..5cbe65f --- /dev/null +++ b/astral/parMatrixMul16/matrixMul.c @@ -0,0 +1,177 @@ +/* + * Copyright (C) 2018 ETH Zurich and University of Bologna + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* + * Mantainer: Luca Valente, luca.valente2@unibo.it + */ + +#include "pulp.h" + +#include "parMatrixMul16_stimuli.h" + +void check_matrix_mul(testresult_t *result, void (*start)(), void (*stop)()); +void check_matrix_mul_transpose(testresult_t *result, void (*start)(), void (*stop)()); + +testcase_t testcases[] = { + { .name = "matrixMul", .test = check_matrix_mul }, + { .name = "matrixMulTranspose", .test = check_matrix_mul_transpose }, + {0, 0} +}; + +unsigned int num_cores; + +int main() +{ + if (rt_cluster_id() != 0) + return bench_cluster_forward(0); + + num_cores = get_core_num(); + + if(rt_core_id() < num_cores) { + run_suite(testcases); + } + + synch_barrier(); + + return 0; +} + +void matrix_init(); +unsigned int matrix_check(); + +void check_matrix_mul(testresult_t *result, void (*start)(), void (*stop)()) { + int core_id; + unsigned int i, j, k; + unsigned int chunk; + unsigned int lb, ub; + + core_id = get_core_id(); + + // number of rows each core has to multiply + chunk = SIZE / num_cores; + // lower bound + lb = core_id * chunk; + // upper bound + ub = lb + chunk; + + if(core_id == 0) { + matrix_init(); + } + + if(num_cores != 1) synch_barrier(); + + // start benchmark + start(); + + for(i = lb; i < ub; i++) { + for(j = 0; j < SIZE; j++) { + g_mC[i][j] = 0; + + for(k = 0; k < SIZE; k++) { + g_mC[i][j] += g_mA[i][k] * g_mB[k][j]; + } + } + } + + if(num_cores != 1) synch_barrier(); + + stop(); + + if(core_id == 0) { + result->errors = matrix_check(); + } +} + +void check_matrix_mul_transpose(testresult_t *result, void (*start)(), void (*stop)()) { + int core_id; + unsigned int i, j, k; + unsigned int chunk; + unsigned int lb, ub; + + core_id = get_core_id(); + + // number of rows each core has to multiply + chunk = SIZE / num_cores; + // lower bound + lb = core_id * chunk; + // upper bound + ub = lb + chunk; + + if(core_id == 0) { + matrix_init(); + } + + if(num_cores != 1) synch_barrier(); + + // start benchmark + start(); + + // transpose array before using it + for(i = lb; i < ub; i++) { + for(j = 0; j < SIZE; j++) { + g_mB_tmp[i][j] = g_mB[j][i]; + } + } + + if(num_cores != 1) synch_barrier(); + + for(i = lb; i < ub; i++) { + for(j = 0; j < SIZE; j++) { + g_mC[i][j] = 0; + + for(k = 0; k < SIZE; k++) { + g_mC[i][j] += g_mA[i][k] * g_mB_tmp[j][k]; + } + } + } + + if(num_cores != 1) synch_barrier(); + + stop(); + + if(core_id == 0) { + result->errors = matrix_check(); + } +} + +void matrix_init() { + unsigned int i, j; + + // init, copy to TCDM + for(i = 0; i < SIZE; i++) { + for(j = 0; j < SIZE; j++) { + g_mA[i][j] = m_a[i * SIZE + j]; + g_mB[i][j] = m_b[i * SIZE + j]; + g_mC[i][j] = 0; + } + } +} + +unsigned int matrix_check() { + unsigned int errors = 0; + unsigned int i, j; + // check + for(i = 0; i < SIZE; i++) { + for(j = 0; j < SIZE; j++) { + if(g_mC[i][j] != m_exp[i * SIZE + j]) { + printf("At index %d, %d\n", i, j, 0, 0); + errors++; + } + } + } + + return errors; +} diff --git a/astral/parMatrixMul16/parMatrixMul16_stimuli.h b/astral/parMatrixMul16/parMatrixMul16_stimuli.h new file mode 100644 index 0000000..2797565 --- /dev/null +++ b/astral/parMatrixMul16/parMatrixMul16_stimuli.h @@ -0,0 +1,1742 @@ +const short m_a[] = { +3, +2, +-4, +0, +0, +0, +-5, +-3, +2, +4, +0, +2, +2, +-3, +2, +-1, +-2, +-1, +1, +4, +-3, +-3, +-1, +0, +4, +-2, +-1, +-4, +-1, +4, +1, +3, +-2, +-2, +-2, +-1, +3, +-5, +2, +0, +1, +-1, +-4, +4, +0, +-2, +4, +-5, +3, +-3, +-4, +3, +-2, +2, +-2, +3, +3, +4, +0, +-4, +4, +0, +3, +-5, +1, +0, +0, +2, +-3, +-2, +-3, +4, +-3, +1, +-5, +-5, +2, +-3, +-3, +-2, +-4, +0, +4, +1, +1, +0, +4, +0, +-3, +-3, +-1, +-2, +-5, +4, +-2, +1, +3, +-1, +-1, +-4, +4, +-1, +3, +-3, +2, +2, +3, +1, +2, +1, +2, +4, +-4, +-3, +-2, +-3, +4, +0, +1, +0, +-3, +0, +-2, +-3, +1, +3, +4, +-1, +4, +4, +3, +-4, +-5, +3, +2, +4, +-4, +4, +1, +-2, +2, +-1, +4, +2, +2, +-5, +0, +-2, +-4, +2, +-3, +-1, +4, +0, +4, +4, +1, +4, +4, +-3, +3, +4, +-2, +4, +-4, +2, +-2, +-3, +3, +1, +3, +3, +0, +-4, +1, +-4, +4, +2, +-2, +-5, +-4, +-4, +2, +-1, +-2, +0, +4, +-3, +4, +-5, +3, +-1, +-5, +-4, +-2, +-5, +4, +-2, +3, +-3, +4, +3, +-4, +4, +3, +-3, +4, +-1, +3, +-4, +-5, +1, +-3, +-4, +2, +3, +2, +-2, +4, +3, +2, +-4, +0, +-2, +-5, +-3, +3, +1, +3, +-5, +3, +1, +-5, +1, +-2, +-4, +1, +-5, +4, +1, +0, +0, +-4, +-2, +2, +0, +-3, +-4, +-1, +-5, +-2, +-4, +-2, +3, +4, +-5, +0, +2, +2, +4, +0, +4, +-5, +-3, +-5, +-5, +0, +0, +-4, +3, +1, +1, +-5, +2, +-5, +2, +-4, +3, +4, +-3, +-4, +4, +-2, +-4, +4, +-3, +-5, +-4, +2, +-2, +3, +-2, +1, +4, +1, +4, +-2, +1, +-4, +4, +2, +-1, +1, +1, +-2, +-2, +0, +-5, +2, +4, +-4, +1, +-5, +0, +4, +3, +-4, +1, +-3, +-4, +2, +-3, +-3, +1, +2, +4, +-3, +-2, +3, +-3, +-5, +4, +-5, +-5, +4, +4, +3, +-1, +-3, +-4, +-1, +1, +0, +1, +4, +-1, +0, +1, +-4, +0, +-4, +-3, +0, +-4, +2, +-2, +-2, +-1, +-2, +0, +-5, +-1, +-3, +3, +4, +-4, +4, +4, +0, +-4, +-3, +-3, +4, +0, +2, +3, +-1, +2, +0, +-4, +3, +-1, +-3, +-4, +4, +0, +4, +3, +0, +-3, +-5, +4, +-3, +3, +4, +3, +-1, +3, +-3, +1, +3, +4, +3, +-1, +3, +2, +4, +4, +-2, +-1, +2, +-4, +-4, +-1, +0, +-1, +4, +-4, +4, +2, +0, +0, +1, +-1, +-5, +1, +-5, +2, +-2, +2, +1, +3, +1, +-3, +-4, +-2, +0, +4, +-2, +0, +-1, +-1, +-3, +-2, +4, +3, +4, +2, +3, +4, +-4, +-2, +-1, +-2, +0, +-1, +-1, +-4, +-2, +2, +-5, +4, +-5, +0, +4, +4, +-2, +-4, +1, +-5, +-5, +4, +-3, +0, +-1, +-5, +4, +-4, +0, +4, +4, +-4, +-2, +-4, +1, +-4, +-5, +4, +-5, +-3, +2, +-2, +-1, +-3, +0, +-3, +-2, +4, +-5, +-5, +3, +-5, +-1, +3, +2, +3, +0, +-2, +-3, +-4, +3, +0, +3, +3, +-1, +-4, +0, +3, +-5, +-3, +4, +-3, +2, +-1, +0, +2, +-1, +3, +-1, +-5, +3, +4, +3, +3, +4, +3, +1, +-4, +1, +-2, +4, +-3, +2, +0, +-2, +-5, +-5, +-2, +-2, +0, +4, +0, +-4, +-1, +0, +-5, +-3, +4, +0, +1, +-3, +3, +-2, +-2, +2, +-1, +-1, +-3, +-1, +-2, +-5, +-5, +-1, +-1, +-4, +-4, +}; + +const short m_b[] = { +-2, +3, +2, +-5, +-3, +2, +0, +-5, +1, +-3, +-2, +-3, +-3, +3, +-4, +-2, +-4, +1, +1, +1, +4, +4, +3, +3, +-4, +-3, +-2, +-2, +-3, +-2, +-1, +-5, +-4, +1, +-4, +-3, +3, +-5, +-5, +-4, +-2, +-2, +1, +3, +3, +3, +4, +0, +1, +0, +4, +3, +-3, +3, +-1, +0, +2, +-1, +-1, +0, +0, +3, +-4, +4, +3, +3, +-1, +-4, +-1, +-4, +-2, +-4, +-4, +3, +0, +3, +-4, +2, +0, +0, +-4, +-5, +-4, +4, +0, +-4, +-2, +-4, +3, +4, +-4, +-3, +-2, +0, +-2, +2, +-5, +2, +1, +2, +0, +0, +-2, +-2, +-1, +1, +-1, +3, +3, +-1, +3, +-1, +-2, +1, +-3, +3, +3, +3, +2, +0, +1, +-2, +1, +4, +3, +-2, +-5, +0, +2, +0, +1, +-3, +-1, +3, +-3, +-2, +3, +4, +-2, +-1, +-5, +1, +-1, +2, +-3, +-4, +0, +-1, +0, +2, +3, +4, +-4, +-1, +-1, +2, +-1, +-5, +1, +-3, +0, +-4, +0, +-1, +2, +-5, +-1, +1, +-2, +-5, +-3, +-3, +2, +2, +-4, +2, +-5, +-4, +4, +4, +-1, +1, +2, +-1, +-3, +0, +2, +4, +-3, +-2, +-1, +4, +-5, +4, +0, +-1, +-1, +-4, +-3, +-3, +-1, +-2, +-1, +-2, +-5, +2, +2, +-3, +1, +-1, +-2, +0, +0, +1, +0, +4, +-4, +-4, +-4, +-5, +4, +-4, +4, +-3, +4, +-5, +-2, +3, +-2, +-4, +1, +2, +-5, +-2, +-5, +-3, +2, +-1, +3, +-4, +-4, +4, +-3, +-5, +0, +-3, +2, +2, +3, +-3, +-3, +-2, +-5, +4, +1, +3, +-1, +-4, +3, +1, +-2, +1, +3, +4, +1, +-2, +0, +0, +-3, +-1, +1, +-1, +0, +-5, +-2, +-1, +1, +-2, +4, +-3, +2, +1, +0, +0, +3, +-4, +2, +1, +0, +3, +-5, +-1, +4, +3, +4, +-2, +-1, +-3, +-4, +3, +3, +-4, +4, +-5, +1, +-1, +0, +3, +4, +3, +-3, +-5, +-3, +-2, +-4, +1, +-2, +-3, +-2, +1, +2, +4, +4, +0, +2, +4, +0, +-1, +1, +-4, +-1, +-3, +-2, +-5, +3, +-3, +-1, +0, +-3, +-3, +-4, +3, +3, +-5, +-2, +-1, +3, +1, +1, +1, +3, +1, +1, +-5, +-2, +2, +4, +3, +-3, +-5, +3, +-4, +0, +2, +-4, +-5, +-3, +-3, +-3, +2, +-1, +-3, +1, +-3, +-1, +-5, +2, +1, +1, +-3, +2, +4, +1, +-5, +3, +0, +-5, +-4, +2, +-5, +3, +-1, +0, +2, +-3, +-1, +-2, +-5, +-4, +0, +-5, +-3, +3, +1, +0, +-1, +-4, +1, +-4, +-5, +-1, +3, +3, +-3, +-1, +4, +-1, +-5, +-4, +-1, +0, +1, +1, +4, +-3, +-2, +4, +1, +-4, +-1, +-3, +2, +-2, +4, +2, +-1, +2, +-4, +-3, +4, +-1, +1, +-4, +0, +1, +-4, +4, +-4, +-5, +-5, +-3, +2, +2, +-1, +0, +-2, +-5, +1, +-1, +-5, +2, +-4, +-5, +-3, +1, +-4, +0, +1, +-5, +0, +-2, +1, +-4, +-5, +3, +0, +1, +2, +4, +-1, +-4, +0, +-4, +0, +-5, +3, +-5, +-5, +2, +2, +3, +-3, +4, +4, +2, +3, +-2, +4, +3, +4, +1, +1, +0, +2, +2, +4, +-1, +-5, +-5, +3, +-5, +-2, +-4, +-4, +0, +4, +3, +0, +4, +-3, +4, +0, +-1, +3, +2, +-4, +2, +-1, +-3, +-5, +-3, +3, +-4, +1, +-3, +3, +-4, +0, +3, +-2, +-1, +2, +-4, +2, +4, +0, +2, +-2, +-5, +0, +-1, +-5, +4, +-4, +3, +-1, +4, +1, +4, +0, +-1, +1, +4, +3, +3, +1, +2, +-3, +-2, +-5, +-2, +1, +-5, +-4, +-5, +-2, +}; + +const short m_exp[] = { +-32, +48, +2, +-56, +46, +-52, +39, +-77, +41, +-50, +-50, +-14, +-45, +-31, +3, +-22, +-52, +-31, +-32, +8, +61, +97, +49, +-12, +12, +-25, +-26, +-15, +15, +45, +-29, +-27, +-7, +-23, +30, +-36, +-56, +27, +-59, +35, +6, +44, +72, +23, +17, +86, +-8, +5, +-25, +41, +-30, +-78, +120, +-1, +69, +-20, +24, +-66, +6, +68, +-59, +2, +27, +-21, +-71, +-61, +-49, +21, +-24, +27, +-47, +29, +71, +37, +-9, +-58, +13, +13, +73, +-9, +7, +28, +23, +35, +46, +-8, +86, +-7, +25, +-65, +-18, +43, +58, +22, +44, +-51, +-33, +10, +-18, +-17, +-62, +24, +18, +-68, +23, +25, +23, +-32, +23, +37, +55, +-16, +24, +4, +-16, +9, +77, +44, +48, +-36, +-81, +-100, +-18, +36, +-3, +-72, +-43, +38, +-2, +34, +53, +-42, +-18, +56, +19, +34, +3, +-58, +-16, +-34, +-71, +-12, +12, +-22, +-9, +57, +-46, +-70, +25, +-62, +10, +-5, +68, +-86, +-15, +-19, +-100, +78, +23, +47, +5, +-64, +31, +-16, +-9, +-22, +11, +30, +-74, +31, +50, +38, +-59, +24, +12, +-18, +4, +33, +-24, +-44, +-19, +2, +-47, +48, +-30, +28, +-38, +-29, +20, +52, +-21, +-5, +49, +-41, +-17, +-2, +68, +-2, +122, +-29, +13, +23, +46, +40, +-12, +-58, +59, +2, +15, +-49, +-38, +-15, +46, +-1, +-54, +-73, +10, +-1, +43, +80, +-55, +119, +82, +22, +-12, +-14, +-12, +-3, +36, +27, +-3, +50, +59, +61, +13, +-14, +5, +51, +-54, +-45, +-9, +109, +10, +-28, +1, +0, +-50, +-23, +27, +49, +16, +3, +23, +43, +31, +29, +-27, +-45, +9, +61, +42, +34, +30, +26, +38, +-84, +5, +98, +13, +55, +15, +56, +63, +22, +80, +10, +52, +52, +49, +101, +37, +71, +-20, +-38, +-36, +-72, +-40, +12, +77, +-19, +32, +9, +-15, +85, +-13, +-33, +-8, +-20, +33, +36, +76, +6, +67, +-51, +36, +76, +-48, +30, +42, +-45, +-22, +-9, +65, +-29, +18, +89, +34, +-25, +41, +30, +26, +49, +34, +-6, +-28, +10, +-106, +6, +86, +5, +-3, +-105, +-103, +-45, +-55, +-60, +29, +41, +54, +-29, +36, +-30, +-8, +25, +36, +40, +22, +-35, +-50, +33, +3, +-19, +-30, +3, +-11, +9, +-4, +-18, +39, +92, +-25, +0, +-40, +64, +-18, +58, +-2, +27, +-89, +32, +-2, +56, +79, +-67, +87, +-41, +20, +29, +4, +51, +45, +26, +-54, +8, +-37, +-37, +-39, +-35, +-36, +-23, +-30, +11, +1, +-63, +-21, +5, +13, +35, +-15, +27, +-59, +-10, +29, +4, +-58, +-56, +3, +-10, +27, +0, +29, +-4, +-17, +28, +2, +17, +9, +-27, +53, +-19, +-36, +104, +25, +38, +84, +-29, +42, +-10, +-47, +-36, +1, +10, +43, +-46, +-57, +38, +44, +-9, +26, +-15, +10, +31, +34, +-18, +17, +24, +-3, +5, +11, +4, +23, +5, +-19, +51, +-59, +-29, +62, +-27, +35, +81, +65, +-10, +-1, +-1, +45, +20, +26, +-34, +-7, +35, +-7, +2, +19, +115, +-32, +-40, +-92, +47, +-65, +23, +53, +-31, +22, +20, +45, +91, +64, +29, +49, +30, +74, +-15, +22, +120, +16, +122, +-51, +51, +78, +60, +-53, +40, +-49, +73, +-2, +14, +-17, +-86, +35, +-25, +36, +2, +5, +38, +-9, +16, +-12, +-41, +-24, +-31, +-72, +-68, +-9, +5, +11, +-63, +15, +12, +21, +22, +19, +62, +-28, +122, +12, +28, +-59, +-19, +49, +57, +-12, +29, +-1, +-23, +126, +75, +-29, +-21, +-37, +8, +-70, +-8, +91, +-34, +-10, +31, +78, +44, +59, +23, +66, +42, +38, +6, +19, +10, +1, +57, +38, +71, +-10, +-12, +-7, +-13, +-15, +6, +}; + +#define SIZE 24 +__attribute__ ((section(".heapsram"))) short g_mA[SIZE][SIZE]; +__attribute__ ((section(".heapsram"))) short g_mB[SIZE][SIZE]; +__attribute__ ((section(".heapsram"))) short g_mC[SIZE][SIZE]; +__attribute__ ((section(".heapsram"))) short g_mB_tmp[SIZE][SIZE]; diff --git a/astral/parMatrixMul32/Makefile b/astral/parMatrixMul32/Makefile new file mode 100755 index 0000000..bd55e15 --- /dev/null +++ b/astral/parMatrixMul32/Makefile @@ -0,0 +1,8 @@ +PULP_APP = test +PULP_APP_SRCS = matrixMul.c + +PULP_CFLAGS = -O3 + +include $(PULP_SDK_HOME)/install/rules/pulp.mk + +#pulp-bench-reg --name=parMatrixMul32.cycles --module=pulp_rtl_testset --pipeline=$(PIPELINE) --artefact=pulp_rtl_testset --cmd="make run -f Makefile.sdk" --probe-regexp='matrixMul -> success, nr. of errors: 0, execution time: (\d+)' --params="platform($(platformName)),compiler($(OR1K_TOOLCHAIN_TYPE)),nbCores(4),elemSize(32)" --probe-regexp='matrixMulTranspose -> success, nr. of errors: 0, execution time: (\d+)' --params="platform($(platformName)),compiler($(OR1K_TOOLCHAIN_TYPE)),nbCores(4),elemSize(32),transposed" diff --git a/astral/parMatrixMul32/gen_stimuli.py b/astral/parMatrixMul32/gen_stimuli.py new file mode 100755 index 0000000..32926e9 --- /dev/null +++ b/astral/parMatrixMul32/gen_stimuli.py @@ -0,0 +1,54 @@ +#!/usr/bin/env python + +import sys +import random + + +def write_arr(f, name, arr): + f.write('const int %s[] = {\n' % name) + for v in arr: + f.write('%d,\n' % (v)) + f.write('};\n\n') + return + +################################################################################ +f = open('parMatrixMul32_stimuli.h', 'w') + + +SIZE = 24 +RANGE = int(2**15/SIZE) + +m_a = [] +m_b = [] +m_exp = [] + +for i in range(0,SIZE): + for j in range(0,SIZE): + a = random.randint(-RANGE, RANGE-1) + b = random.randint(-RANGE, RANGE-1) + + m_a.append(a) + m_b.append(b) + +for i in range(0,SIZE): + for j in range(0,SIZE): + r = 0 + + for k in range (0,SIZE): + r = r + m_a[i * SIZE + k] * m_b[k * SIZE + j] + + m_exp.append(r) + + +write_arr(f, 'm_a', m_a) +write_arr(f, 'm_b', m_b) +write_arr(f, 'm_exp', m_exp) + +f.write('#define SIZE %d\n' % SIZE) + + +f.write('__attribute__ ((section(".heapsram"))) int g_mA[SIZE][SIZE];\n') +f.write('__attribute__ ((section(".heapsram"))) int g_mB[SIZE][SIZE];\n') +f.write('__attribute__ ((section(".heapsram"))) int g_mC[SIZE][SIZE];\n') +f.write('__attribute__ ((section(".heapsram"))) int g_mB_tmp[SIZE][SIZE];\n') + diff --git a/astral/parMatrixMul32/matrixMul.c b/astral/parMatrixMul32/matrixMul.c new file mode 100644 index 0000000..990d411 --- /dev/null +++ b/astral/parMatrixMul32/matrixMul.c @@ -0,0 +1,177 @@ +/* + * Copyright (C) 2018 ETH Zurich and University of Bologna + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* + * Mantainer: Luca Valente, luca.valente2@unibo.it + */ + +#include "pulp.h" + +#include "parMatrixMul32_stimuli.h" + +void check_matrix_mul(testresult_t *result, void (*start)(), void (*stop)()); +void check_matrix_mul_transpose(testresult_t *result, void (*start)(), void (*stop)()); + +testcase_t testcases[] = { + { .name = "matrixMul", .test = check_matrix_mul }, + { .name = "matrixMulTranspose", .test = check_matrix_mul_transpose }, + {0, 0} +}; + +unsigned int num_cores; + +int main() +{ + if (rt_cluster_id() != 0) + return bench_cluster_forward(0); + + num_cores = get_core_num(); + + if(rt_core_id() < num_cores) { + run_suite(testcases); + } + + synch_barrier(); + + return 0; +} + +void matrix_init(); +unsigned int matrix_check(); + +void check_matrix_mul(testresult_t *result, void (*start)(), void (*stop)()) { + int core_id; + unsigned int i, j, k; + unsigned int chunk; + unsigned int lb, ub; + + core_id = get_core_id(); + + // number of rows each core has to multiply + chunk = SIZE / num_cores; + // lower bound + lb = core_id * chunk; + // upper bound + ub = lb + chunk; + + if(core_id == 0) { + matrix_init(); + } + + if(num_cores != 1) synch_barrier(); + + // start benchmark + start(); + + for(i = lb; i < ub; i++) { + for(j = 0; j < SIZE; j++) { + g_mC[i][j] = 0; + + for(k = 0; k < SIZE; k++) { + g_mC[i][j] += g_mA[i][k] * g_mB[k][j]; + } + } + } + + if(num_cores != 1) synch_barrier(); + + stop(); + + if(core_id == 0) { + result->errors = matrix_check(); + } +} + +void check_matrix_mul_transpose(testresult_t *result, void (*start)(), void (*stop)()) { + int core_id; + unsigned int i, j, k; + unsigned int chunk; + unsigned int lb, ub; + + core_id = get_core_id(); + + // number of rows each core has to multiply + chunk = SIZE / num_cores; + // lower bound + lb = core_id * chunk; + // upper bound + ub = lb + chunk; + + if(core_id == 0) { + matrix_init(); + } + + if(num_cores != 1) synch_barrier(); + + // start benchmark + start(); + + // transpose array before using it + for(i = lb; i < ub; i++) { + for(j = 0; j < SIZE; j++) { + g_mB_tmp[i][j] = g_mB[j][i]; + } + } + + if(num_cores != 1) synch_barrier(); + + for(i = lb; i < ub; i++) { + for(j = 0; j < SIZE; j++) { + g_mC[i][j] = 0; + + for(k = 0; k < SIZE; k++) { + g_mC[i][j] += g_mA[i][k] * g_mB_tmp[j][k]; + } + } + } + + if(num_cores != 1) synch_barrier(); + + stop(); + + if(core_id == 0) { + result->errors = matrix_check(); + } +} + +void matrix_init() { + unsigned int i, j; + + // init, copy to TCDM + for(i = 0; i < SIZE; i++) { + for(j = 0; j < SIZE; j++) { + g_mA[i][j] = m_a[i * SIZE + j]; + g_mB[i][j] = m_b[i * SIZE + j]; + g_mC[i][j] = 0; + } + } +} + +unsigned int matrix_check() { + unsigned int errors = 0; + unsigned int i, j; + // check + for(i = 0; i < SIZE; i++) { + for(j = 0; j < SIZE; j++) { + if(g_mC[i][j] != m_exp[i * SIZE + j]) { + printf("At index %d, %d\n", i, j, 0, 0); + errors++; + } + } + } + + return errors; +} diff --git a/astral/parMatrixMul32/parMatrixMul32_stimuli.h b/astral/parMatrixMul32/parMatrixMul32_stimuli.h new file mode 100644 index 0000000..d5c1af0 --- /dev/null +++ b/astral/parMatrixMul32/parMatrixMul32_stimuli.h @@ -0,0 +1,1742 @@ +const int m_a[] = { +-1344, +-778, +-350, +1240, +950, +940, +1262, +285, +738, +-37, +257, +704, +87, +-1135, +1175, +960, +984, +611, +-1170, +1243, +-729, +-1235, +-1229, +8, +52, +1156, +-804, +-129, +-112, +-307, +1045, +-954, +-944, +477, +1104, +-600, +-31, +1364, +-950, +-153, +967, +-446, +235, +-197, +763, +-660, +-1289, +116, +-458, +994, +1086, +156, +-549, +102, +-532, +943, +299, +340, +516, +1117, +515, +1335, +708, +-306, +-589, +517, +655, +-279, +-595, +-255, +-1104, +-16, +507, +199, +-297, +-905, +-1084, +982, +20, +-1364, +407, +333, +-798, +-711, +1301, +175, +490, +-165, +-1097, +1251, +1203, +-884, +419, +-1262, +-950, +-1200, +759, +-205, +-1365, +-870, +109, +-1135, +36, +796, +-1233, +-1117, +-826, +241, +588, +-513, +-353, +791, +1071, +-1073, +220, +-1094, +1096, +-723, +280, +-505, +151, +399, +319, +-1120, +-213, +-966, +679, +497, +-290, +-300, +-290, +-599, +243, +-752, +604, +1196, +-715, +-177, +-329, +1337, +596, +1027, +509, +-301, +-1211, +-936, +-281, +446, +-356, +841, +-1123, +-1343, +-140, +-1300, +-828, +-237, +1206, +1274, +-1092, +-922, +913, +1201, +-422, +782, +-230, +633, +-1055, +-1160, +329, +1255, +1038, +770, +123, +934, +670, +-492, +-24, +-779, +-1129, +47, +555, +1214, +-232, +-716, +-322, +-126, +178, +827, +710, +-1057, +-313, +996, +1149, +-532, +570, +1171, +899, +-313, +-790, +1071, +154, +-303, +492, +-918, +-1139, +292, +129, +1347, +-309, +751, +1262, +142, +-1062, +-1305, +250, +657, +238, +-141, +1308, +-37, +-514, +-591, +-611, +852, +-653, +-640, +91, +254, +-1145, +-1263, +-838, +-10, +266, +-444, +1129, +762, +-713, +-326, +-88, +1063, +-442, +-177, +365, +-740, +-1219, +1085, +783, +-725, +-1112, +426, +660, +6, +-440, +513, +687, +1078, +212, +-434, +-953, +1337, +160, +622, +-950, +-943, +288, +-136, +-1103, +-223, +1271, +211, +251, +-271, +-26, +704, +1177, +544, +699, +-885, +-864, +-1280, +877, +-461, +995, +-623, +-121, +-146, +-484, +-225, +-978, +163, +-278, +-502, +-505, +-567, +-771, +1279, +699, +-1337, +544, +1145, +1271, +640, +277, +-164, +458, +-1280, +-602, +-2, +1136, +1203, +-699, +-195, +659, +-472, +1230, +1151, +-97, +-77, +-772, +-381, +-295, +636, +-1341, +-445, +-806, +531, +-1186, +-1313, +-274, +835, +-446, +558, +-1307, +-235, +43, +-254, +-109, +911, +-1189, +559, +-854, +-218, +149, +580, +1158, +-14, +181, +-1120, +-947, +-542, +1142, +631, +-893, +-614, +-257, +-365, +-951, +1, +-762, +268, +382, +-131, +808, +-234, +839, +346, +-733, +1251, +496, +-566, +-751, +581, +-1292, +1068, +-932, +-855, +1336, +-280, +523, +1294, +-1251, +1284, +-1276, +87, +1264, +-274, +-922, +-289, +-458, +-117, +196, +-79, +-707, +1233, +-385, +-620, +-617, +703, +-995, +-374, +660, +145, +821, +1289, +582, +-201, +447, +116, +759, +-615, +834, +268, +-1114, +-1016, +-227, +-589, +-910, +-244, +-660, +764, +219, +1165, +506, +-673, +799, +-1355, +-872, +491, +689, +176, +-285, +1151, +1080, +-319, +286, +833, +217, +-621, +478, +539, +-109, +-1273, +-564, +-240, +504, +518, +256, +-124, +74, +949, +-912, +-1341, +965, +-774, +634, +1009, +1304, +200, +-1041, +-1262, +-865, +-1065, +-635, +-357, +-928, +806, +1148, +-411, +56, +686, +-644, +1241, +-430, +297, +127, +457, +-1313, +741, +861, +220, +-540, +772, +265, +1066, +679, +177, +-734, +29, +-149, +181, +-1042, +-1139, +271, +-326, +-29, +1298, +643, +-890, +-136, +-1015, +-565, +-964, +894, +-312, +698, +159, +-222, +-1322, +578, +945, +1124, +1278, +54, +-389, +1101, +362, +-543, +380, +959, +-399, +-1105, +1308, +338, +-198, +-1111, +-278, +-752, +668, +1156, +-1226, +579, +184, +-1084, +-917, +-498, +-466, +316, +-788, +-718, +468, +367, +-1333, +-1146, +828, +1329, +311, +-1346, +54, +-976, +854, +-658, +-198, +-979, +156, +385, +-659, +1326, +1351, +-1173, +-648, +720, +-40, +313, +729, +-416, +351, +452, +-413, +-4, +-1113, +-612, +-28, +-721, +400, +1072, +-1010, +}; + +const int m_b[] = { +-1316, +319, +963, +-608, +519, +-783, +-676, +181, +172, +203, +-1351, +-935, +-12, +758, +-746, +1226, +127, +-1346, +1251, +-377, +889, +-23, +-417, +-122, +680, +1363, +729, +-907, +-1263, +-431, +363, +1355, +-566, +-517, +-1186, +1318, +-1104, +-1245, +950, +687, +252, +-270, +1081, +-1290, +656, +8, +60, +1171, +915, +-500, +678, +-953, +307, +-35, +-1334, +-888, +598, +1160, +722, +850, +-268, +988, +635, +-340, +252, +1208, +420, +82, +1283, +-319, +-666, +172, +583, +174, +471, +-1063, +452, +-191, +-1188, +116, +-927, +1086, +119, +-245, +-717, +-657, +417, +319, +1133, +1338, +141, +-546, +567, +-1089, +-191, +-1138, +-201, +-1286, +-820, +-1356, +1177, +-317, +191, +67, +164, +-306, +-1015, +1147, +-482, +1229, +-259, +-207, +1309, +847, +-399, +-1005, +-995, +140, +-567, +-1220, +-427, +180, +-571, +997, +-783, +-316, +-1360, +736, +75, +-1251, +-307, +-902, +1181, +1057, +-141, +-1098, +776, +1096, +-923, +914, +1049, +-28, +-742, +-804, +-467, +567, +329, +-309, +-161, +-157, +-430, +-639, +1138, +-165, +292, +-20, +777, +-715, +60, +-1359, +35, +307, +-1092, +271, +548, +822, +-50, +-475, +-103, +784, +537, +152, +-517, +-1097, +117, +-619, +538, +941, +172, +-223, +1161, +-1004, +-1145, +-455, +255, +363, +859, +403, +-861, +-657, +-537, +-1084, +-1042, +541, +1283, +-356, +1298, +-1254, +-303, +203, +104, +1123, +-72, +-171, +-1122, +-533, +440, +275, +613, +-846, +-189, +884, +704, +-570, +-440, +-1157, +-200, +-80, +616, +799, +757, +-264, +-1256, +-690, +152, +184, +-810, +-221, +-821, +-243, +508, +-709, +574, +-693, +315, +-952, +952, +697, +875, +-480, +-691, +422, +-413, +-1199, +441, +-751, +821, +1303, +-410, +416, +566, +-131, +-551, +46, +978, +-228, +1117, +-251, +-537, +874, +-882, +260, +-213, +248, +-1296, +1343, +-626, +-812, +629, +-601, +-378, +-1314, +-889, +774, +-307, +692, +-1125, +-692, +923, +947, +1158, +-939, +1284, +35, +1299, +369, +-8, +43, +768, +524, +137, +659, +285, +-1315, +-457, +871, +-768, +1107, +-695, +488, +-527, +-161, +414, +-526, +-1164, +1059, +-1108, +560, +-622, +898, +-50, +-286, +-170, +513, +952, +433, +237, +584, +-665, +-960, +585, +-434, +1223, +-130, +1035, +430, +202, +1312, +1152, +1059, +-1082, +-1295, +805, +-18, +613, +-94, +557, +548, +1354, +116, +289, +-1358, +-1234, +1237, +451, +820, +-102, +974, +832, +-1019, +914, +-512, +-267, +1329, +-910, +-1341, +862, +-381, +-23, +-658, +40, +-71, +-782, +1240, +-956, +1241, +-291, +-884, +1250, +699, +834, +190, +960, +-1260, +177, +464, +155, +-1105, +768, +424, +621, +740, +-1357, +1186, +-594, +1329, +829, +126, +1101, +1146, +-95, +605, +-673, +1334, +440, +-10, +12, +-745, +20, +19, +-793, +999, +1083, +487, +-657, +-356, +654, +-326, +-250, +-718, +-947, +-235, +558, +974, +-981, +637, +-861, +-768, +1045, +-583, +-910, +128, +734, +896, +-1156, +223, +284, +272, +634, +-473, +363, +359, +-1185, +14, +-33, +-1122, +140, +900, +439, +-944, +-770, +663, +865, +1056, +-238, +86, +-1294, +-44, +-603, +602, +20, +397, +-423, +-703, +-209, +-906, +-1236, +945, +-737, +578, +904, +645, +1225, +-877, +-425, +-493, +-1326, +424, +965, +1300, +-1210, +823, +1345, +626, +-427, +592, +-869, +-1055, +-938, +-427, +1066, +472, +-1055, +48, +-1200, +-349, +313, +-1227, +-228, +783, +839, +187, +1021, +-1355, +1284, +68, +-1321, +-997, +1286, +-887, +772, +-156, +-105, +1329, +1141, +-377, +-881, +-341, +1316, +-391, +-1249, +-205, +53, +-266, +-540, +-289, +-1011, +602, +-1032, +-1097, +-202, +-467, +-1047, +-867, +-340, +-109, +-496, +967, +1147, +108, +384, +-12, +1216, +137, +1318, +151, +219, +-543, +391, +668, +-1348, +-1244, +-810, +-676, +321, +-1258, +1343, +1214, +791, +35, +1219, +1278, +1037, +-1282, +661, +585, +921, +-880, +-989, +-1192, +-207, +273, +-382, +690, +165, +271, +-212, +739, +-343, +-42, +226, +40, +859, +-153, +622, +-1059, +}; + +const int m_exp[] = { +-4942391, +2289133, +-1363225, +1978230, +1580032, +-625813, +-3230128, +2236653, +19494, +3242695, +-1080745, +-34154, +4086860, +-1370876, +3997221, +-1812380, +4705498, +7690207, +-4068140, +3595067, +-1103308, +-939857, +-4249710, +-8650816, +-2013119, +2933624, +235162, +-453807, +-4447391, +3527041, +2046492, +411956, +-994117, +-1411344, +1333704, +-519761, +3026373, +-564969, +3749147, +2447173, +-557628, +1138674, +-1426096, +-4033488, +-1829685, +2815607, +2382958, +1714081, +-1470484, +3379876, +3660759, +-2439960, +-1180478, +-3300785, +-5104533, +-309753, +-1667400, +3258850, +1805449, +2481948, +-944985, +-363123, +4227063, +3022289, +2763211, +5114077, +-1534394, +-2957168, +3401637, +-1195822, +-747480, +-2915318, +-2505013, +-174927, +276733, +2899369, +-6702856, +923396, +-2741169, +4270685, +-1020657, +-2562887, +2074098, +-2382784, +1366504, +691209, +4127820, +400356, +-7415505, +823772, +-3848400, +-158560, +3759990, +2298445, +323394, +873625, +474364, +2617120, +-1382444, +1735284, +-5799715, +1915577, +7016057, +-1212904, +919286, +2949768, +1228832, +572192, +4145710, +-6809520, +-2199597, +677764, +-7169579, +-4904277, +6902014, +231123, +-4797299, +3093608, +989455, +4324476, +3121268, +810907, +-2457323, +2299211, +-1625774, +-141013, +3343022, +-2044657, +4089375, +-291323, +-1950307, +2480885, +2846731, +-2139146, +-2718414, +-1997531, +-2399245, +-4060224, +423228, +-205276, +-1602384, +910872, +-3535114, +6008729, +-559984, +-301205, +-5407307, +2981269, +1079061, +6602535, +-857708, +2756391, +-5304566, +-3769267, +2620777, +-4409088, +502077, +7568647, +-37918, +2315061, +-2540065, +8296540, +-7465282, +1553910, +-4736227, +-2139045, +95614, +342546, +1309722, +1777391, +2981296, +-736899, +-2572111, +-972463, +-2793724, +-2893912, +-1230264, +-871649, +-1439985, +3074445, +3339004, +2423842, +1751086, +4064832, +1550243, +6225792, +-503750, +-2567772, +5671219, +-2054796, +-551487, +-2787790, +-3835027, +-4272806, +2725813, +-2982521, +1803437, +3024675, +-201092, +-1626608, +1548043, +2303810, +3032912, +398283, +1704371, +1860306, +-4101665, +5187913, +4233418, +2054883, +3603470, +1935132, +-17548, +-4362444, +-2806918, +-5651039, +-1853372, +-1707208, +-153048, +-2791834, +402265, +2815962, +3391662, +-4833520, +-1190520, +2302448, +80738, +2089586, +174096, +2837490, +-5514606, +2138871, +336249, +-378675, +5833977, +4367000, +-2445147, +-3652299, +-1794451, +-1471577, +-1263012, +3719274, +-3404819, +5765304, +-4256415, +3558206, +-1884441, +-475244, +3659623, +-2914867, +689238, +-2576754, +7739914, +1823902, +2077002, +-2365242, +2023481, +1663749, +-4973435, +-694558, +1118078, +2260786, +-3256285, +4596746, +-5421599, +594942, +-1730692, +-4626077, +3077882, +-2232009, +2672161, +3135747, +-4602601, +859784, +-3530668, +21600, +-4690786, +2023164, +-496745, +-2728919, +281474, +-108745, +-809613, +1445687, +-5781458, +2097169, +1594266, +-4504019, +2460482, +6259537, +-700848, +413263, +-1212884, +-5695130, +2094147, +-750529, +-1379008, +6029072, +722889, +1719449, +1682336, +-4219755, +1971162, +66575, +-1195119, +141466, +-1083536, +-718558, +-4039954, +-168429, +-2026861, +2025800, +-761083, +-4194692, +2013337, +-1156936, +3823019, +4081732, +-3145845, +-1733615, +-1371947, +-3811245, +-1584663, +-3547009, +-3267886, +8255291, +-3232160, +3404636, +3248369, +3233853, +671601, +-1009897, +1821121, +-3517645, +2005444, +-2768741, +115998, +533867, +4717709, +1315923, +-3510545, +-3539595, +-538461, +4529529, +2792584, +-107486, +-1840413, +-1474849, +1579605, +-4197602, +-34825, +-462678, +1294881, +-1730927, +-2549709, +-1531672, +-271859, +-1181904, +-1680154, +-2321723, +-6641222, +1127764, +893535, +-2804646, +5653509, +2657606, +-1751466, +-4669812, +-827592, +-126901, +-2599752, +-845148, +1390838, +8975481, +-7663778, +3572438, +5920790, +5233883, +-613590, +-881500, +-3974422, +-5523348, +-3243204, +-6405765, +-4376438, +1352634, +-105650, +2650174, +1442151, +5088231, +2974595, +-4501663, +-841006, +-3101819, +-1265401, +-2756903, +2579743, +2045040, +-5328835, +2801176, +-386694, +-3068782, +3147225, +-248211, +-662659, +-1112717, +2733193, +336344, +3107302, +2244003, +4285762, +1998904, +1888720, +-1174981, +-2567532, +-5588952, +-101948, +4004848, +-610048, +793760, +3345423, +716318, +1033698, +4011882, +-965219, +1258434, +1579522, +-4249500, +3233648, +-424838, +2640541, +1020028, +4933599, +-1964947, +3237309, +-1251962, +-437406, +-2749192, +-2943112, +-117113, +778507, +2757711, +3478291, +-661571, +1077087, +-3821174, +2731860, +3035264, +-4424379, +295413, +3873542, +-1272809, +4145370, +-363272, +2240544, +88954, +-2016552, +-862779, +-844808, +3142493, +2019692, +3648148, +3857820, +593190, +1285134, +-4257140, +-1476035, +-1951773, +-2334649, +1355368, +-4390456, +3666652, +562848, +-8226958, +1134896, +1136697, +-2132899, +3300228, +1855661, +6476864, +5097743, +-1373818, +3287769, +1709294, +-2926119, +2463141, +400199, +3051372, +1815531, +1746372, +398117, +2333959, +-708565, +-4241370, +51697, +-1626217, +26865, +2248300, +3357859, +-325912, +194201, +612298, +388227, +256018, +-5630155, +-1085451, +653494, +-1966315, +-273079, +-4296295, +-2813232, +2079672, +2378463, +-3869089, +-438799, +-725265, +3152791, +3461913, +-777750, +47521, +2588203, +1888001, +-4445421, +654349, +811737, +418334, +-1854075, +-5194402, +-1571674, +-622026, +-1091628, +1787463, +3439585, +2923276, +-1997884, +-193963, +-731696, +3686658, +-1311796, +-5219031, +-2906251, +2140229, +-1846978, +2541247, +-3677377, +-3935140, +3605308, +4807232, +-1633864, +344286, +-2051894, +2498349, +-3085, +379207, +-701595, +-1080351, +3161365, +-1606976, +1640595, +3757649, +798095, +-3167055, +-2288739, +2301831, +-3324819, +3219538, +516049, +-3153835, +7342606, +1098913, +-2522436, +376783, +47367, +530901, +-395499, +304200, +}; + +#define SIZE 24 +__attribute__ ((section(".heapsram"))) int g_mA[SIZE][SIZE]; +__attribute__ ((section(".heapsram"))) int g_mB[SIZE][SIZE]; +__attribute__ ((section(".heapsram"))) int g_mC[SIZE][SIZE]; +__attribute__ ((section(".heapsram"))) int g_mB_tmp[SIZE][SIZE]; diff --git a/astral/parMatrixMul8/Makefile b/astral/parMatrixMul8/Makefile new file mode 100755 index 0000000..7c755b8 --- /dev/null +++ b/astral/parMatrixMul8/Makefile @@ -0,0 +1,8 @@ +PULP_APP = test +PULP_APP_SRCS = matrixMul.c + +PULP_CFLAGS = -O3 + +include $(PULP_SDK_HOME)/install/rules/pulp.mk + +#pulp-bench-reg --name=parMatrixMul8.cycles --module=pulp_rtl_testset --pipeline=$(PIPELINE) --artefact=pulp_rtl_testset --cmd="make run -f Makefile.sdk" --probe-regexp='matrixMul -> success, nr. of errors: 0, execution time: (\d+)' --params="platform($(platformName)),compiler($(OR1K_TOOLCHAIN_TYPE)),nbCores(4),elemSize(8)" --probe-regexp='matrixMulTranspose -> success, nr. of errors: 0, execution time: (\d+)' --params="platform($(platformName)),compiler($(OR1K_TOOLCHAIN_TYPE)),nbCores(4),elemSize(8),transposed" diff --git a/astral/parMatrixMul8/gen_stimuli.py b/astral/parMatrixMul8/gen_stimuli.py new file mode 100755 index 0000000..153d5c3 --- /dev/null +++ b/astral/parMatrixMul8/gen_stimuli.py @@ -0,0 +1,54 @@ +#!/usr/bin/env python + +import sys +import random + + +def write_arr(f, name, arr): + f.write('const char %s[] = {\n' % name) + for v in arr: + f.write('%d,\n' % (v)) + f.write('};\n\n') + return + +################################################################################ +f = open('parMatrixMul8_stimuli.h', 'w') + + +SIZE = 24 +RANGE = 4 + +m_a = [] +m_b = [] +m_exp = [] + +for i in range(0,SIZE): + for j in range(0,SIZE): + a = random.randint(-RANGE, RANGE-1) + b = random.randint(-RANGE, RANGE-1) + + m_a.append(a) + m_b.append(b) + +for i in range(0,SIZE): + for j in range(0,SIZE): + r = 0 + + for k in range (0,SIZE): + r = r + m_a[i * SIZE + k] * m_b[k * SIZE + j] + + m_exp.append(r) + + +write_arr(f, 'm_a', m_a) +write_arr(f, 'm_b', m_b) +write_arr(f, 'm_exp', m_exp) + +f.write('#define SIZE %d\n' % SIZE) + + +f.write('__attribute__ ((section(".heapsram"))) char g_mA[SIZE][SIZE];\n') +f.write('__attribute__ ((section(".heapsram"))) char g_mB[SIZE][SIZE];\n') +f.write('__attribute__ ((section(".heapsram"))) char g_mC[SIZE][SIZE];\n') +f.write('__attribute__ ((section(".heapsram"))) char g_mB_tmp[SIZE][SIZE];\n') + diff --git a/astral/parMatrixMul8/matrixMul.c b/astral/parMatrixMul8/matrixMul.c new file mode 100644 index 0000000..357fdf0 --- /dev/null +++ b/astral/parMatrixMul8/matrixMul.c @@ -0,0 +1,177 @@ +/* + * Copyright (C) 2018 ETH Zurich and University of Bologna + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* + * Mantainer: Luca Valente, luca.valente2@unibo.it + */ + +#include "pulp.h" + +#include "parMatrixMul8_stimuli.h" + +void check_matrix_mul(testresult_t *result, void (*start)(), void (*stop)()); +void check_matrix_mul_transpose(testresult_t *result, void (*start)(), void (*stop)()); + +testcase_t testcases[] = { + { .name = "matrixMul", .test = check_matrix_mul }, + { .name = "matrixMulTranspose", .test = check_matrix_mul_transpose }, + {0, 0} +}; + +unsigned int num_cores; + +int main() +{ + if (rt_cluster_id() != 0) + return bench_cluster_forward(0); + + num_cores = get_core_num(); + + if(rt_core_id() < num_cores) { + run_suite(testcases); + } + + synch_barrier(); + + return 0; +} + +void matrix_init(); +unsigned int matrix_check(); + +void check_matrix_mul(testresult_t *result, void (*start)(), void (*stop)()) { + int core_id; + unsigned int i, j, k; + unsigned int chunk; + unsigned int lb, ub; + + core_id = get_core_id(); + + // number of rows each core has to multiply + chunk = SIZE / num_cores; + // lower bound + lb = core_id * chunk; + // upper bound + ub = lb + chunk; + + if(core_id == 0) { + matrix_init(); + } + + if(num_cores != 1) synch_barrier(); + + // start benchmark + start(); + + for(i = lb; i < ub; i++) { + for(j = 0; j < SIZE; j++) { + g_mC[i][j] = 0; + + for(k = 0; k < SIZE; k++) { + g_mC[i][j] += g_mA[i][k] * g_mB[k][j]; + } + } + } + + if(num_cores != 1) synch_barrier(); + + stop(); + + if(core_id == 0) { + result->errors = matrix_check(); + } +} + +void check_matrix_mul_transpose(testresult_t *result, void (*start)(), void (*stop)()) { + int core_id; + unsigned int i, j, k; + unsigned int chunk; + unsigned int lb, ub; + + core_id = get_core_id(); + + // number of rows each core has to multiply + chunk = SIZE / num_cores; + // lower bound + lb = core_id * chunk; + // upper bound + ub = lb + chunk; + + if(core_id == 0) { + matrix_init(); + } + + if(num_cores != 1) synch_barrier(); + + // start benchmark + start(); + + // transpose array before using it + for(i = lb; i < ub; i++) { + for(j = 0; j < SIZE; j++) { + g_mB_tmp[i][j] = g_mB[j][i]; + } + } + + if(num_cores != 1) synch_barrier(); + + for(i = lb; i < ub; i++) { + for(j = 0; j < SIZE; j++) { + g_mC[i][j] = 0; + + for(k = 0; k < SIZE; k++) { + g_mC[i][j] += g_mA[i][k] * g_mB_tmp[j][k]; + } + } + } + + if(num_cores != 1) synch_barrier(); + + stop(); + + if(core_id == 0) { + result->errors = matrix_check(); + } +} + +void matrix_init() { + unsigned int i, j; + + // init, copy to TCDM + for(i = 0; i < SIZE; i++) { + for(j = 0; j < SIZE; j++) { + g_mA[i][j] = m_a[i * SIZE + j]; + g_mB[i][j] = m_b[i * SIZE + j]; + g_mC[i][j] = 0; + } + } +} + +unsigned int matrix_check() { + unsigned int errors = 0; + unsigned int i, j; + // check + for(i = 0; i < SIZE; i++) { + for(j = 0; j < SIZE; j++) { + if(g_mC[i][j] != m_exp[i * SIZE + j]) { + printf("At index %d, %d\n", i, j, 0, 0); + errors++; + } + } + } + + return errors; +} diff --git a/astral/parMatrixMul8/parMatrixMul8_stimuli.h b/astral/parMatrixMul8/parMatrixMul8_stimuli.h new file mode 100644 index 0000000..78d026c --- /dev/null +++ b/astral/parMatrixMul8/parMatrixMul8_stimuli.h @@ -0,0 +1,1742 @@ +const char m_a[] = { +-1, +0, +0, +0, +-4, +-4, +-4, +1, +-1, +-2, +-3, +3, +2, +-4, +1, +-2, +-3, +0, +-3, +-4, +-3, +-1, +-3, +-3, +2, +-2, +2, +3, +0, +2, +0, +-1, +-3, +-2, +-1, +-3, +1, +-1, +-1, +0, +-1, +-2, +-1, +-4, +-2, +-3, +-1, +-2, +1, +1, +2, +-1, +0, +2, +1, +-3, +2, +-3, +0, +0, +0, +2, +-2, +3, +-4, +2, +-2, +-3, +-2, +-3, +3, +-3, +0, +1, +-1, +-1, +1, +-2, +-1, +-4, +-2, +-1, +-4, +-4, +-2, +-1, +-2, +-3, +-4, +-4, +1, +0, +-2, +1, +-1, +1, +2, +-3, +-4, +0, +2, +-3, +-3, +0, +0, +-2, +-3, +-1, +-2, +-1, +-4, +-1, +-4, +-3, +-3, +0, +1, +-3, +-4, +1, +2, +0, +2, +-1, +-4, +-1, +-4, +2, +2, +-1, +3, +0, +0, +-1, +1, +3, +0, +2, +0, +3, +2, +2, +2, +-3, +2, +2, +-4, +0, +-3, +-1, +-1, +-3, +-4, +3, +2, +0, +2, +1, +0, +-2, +-1, +3, +3, +0, +1, +-3, +3, +0, +-3, +2, +-3, +1, +2, +0, +3, +-1, +0, +-2, +-4, +0, +-3, +0, +3, +0, +-1, +-3, +0, +-2, +-4, +-4, +-1, +1, +2, +-4, +1, +-4, +-4, +-3, +-3, +3, +-1, +-2, +-4, +2, +1, +2, +-1, +1, +3, +0, +2, +-4, +-3, +1, +-2, +0, +1, +1, +3, +-2, +-4, +2, +-1, +-1, +1, +2, +-2, +1, +1, +2, +0, +3, +-4, +2, +-1, +-1, +-3, +-3, +-3, +-3, +2, +-3, +1, +0, +3, +-3, +3, +3, +-4, +1, +-4, +1, +2, +-3, +1, +-4, +-1, +-4, +-3, +-2, +2, +3, +0, +-4, +1, +3, +0, +3, +-1, +-4, +3, +-2, +-2, +2, +-4, +-1, +-1, +3, +-2, +-4, +-1, +-1, +2, +-1, +2, +0, +-2, +-4, +0, +2, +-4, +0, +1, +-4, +2, +0, +-1, +-1, +-3, +2, +3, +2, +-2, +1, +-4, +-3, +1, +2, +-1, +-4, +3, +-1, +2, +-2, +-3, +0, +-1, +3, +-4, +-3, +-3, +-3, +0, +0, +3, +1, +-2, +-2, +-4, +2, +2, +0, +3, +-2, +1, +3, +-1, +3, +-4, +-2, +0, +-4, +0, +-1, +-3, +-2, +-4, +-4, +-2, +-4, +-3, +-3, +0, +2, +-4, +1, +0, +-3, +0, +-4, +-4, +3, +3, +-2, +1, +3, +3, +1, +-3, +-4, +-4, +1, +1, +2, +-4, +0, +3, +-1, +3, +1, +-4, +-2, +1, +-1, +3, +3, +-1, +-1, +0, +-2, +2, +-2, +-2, +1, +3, +1, +3, +-1, +2, +-1, +0, +1, +2, +-4, +-3, +1, +-3, +-1, +-4, +-1, +-4, +-4, +-3, +-3, +3, +0, +3, +0, +-2, +3, +-3, +3, +-1, +-1, +2, +-2, +1, +-4, +0, +-3, +3, +0, +-2, +-1, +3, +2, +-2, +3, +-3, +0, +-2, +1, +0, +-1, +1, +3, +-4, +3, +0, +3, +-4, +3, +-1, +-1, +1, +3, +1, +0, +-4, +3, +-3, +-4, +-1, +2, +-3, +-4, +-2, +-3, +2, +3, +-2, +-2, +-4, +-1, +1, +-4, +-2, +2, +-3, +1, +-3, +-2, +2, +3, +-2, +0, +1, +-1, +2, +-2, +1, +-1, +-4, +-3, +-4, +-3, +-3, +-3, +-4, +3, +1, +1, +3, +-4, +0, +-4, +2, +2, +3, +2, +-4, +1, +-1, +-2, +-2, +2, +-2, +2, +-3, +2, +0, +0, +0, +-4, +-2, +-2, +2, +1, +0, +2, +3, +2, +3, +-3, +0, +-3, +-2, +2, +-1, +2, +-3, +1, +0, +1, +3, +-4, +0, +-3, +-1, +1, +-2, +-2, +0, +0, +1, +-3, +-2, +0, +3, +2, +0, +3, +-4, +2, +1, +3, +-2, +-2, +-3, +2, +2, +2, +-1, +3, +2, +-3, +}; + +const char m_b[] = { +3, +-2, +-3, +-4, +-3, +2, +-4, +-1, +-4, +-4, +-1, +-3, +3, +0, +2, +1, +2, +-2, +0, +3, +-4, +-2, +2, +-1, +1, +-4, +-4, +-1, +1, +-3, +-2, +1, +-3, +1, +-2, +2, +1, +-3, +-1, +-4, +1, +-1, +-3, +3, +0, +0, +-2, +0, +-4, +-3, +0, +-3, +0, +3, +-1, +-4, +-2, +2, +-4, +-1, +-3, +1, +-4, +-4, +0, +2, +3, +2, +0, +-3, +-1, +-1, +2, +2, +-2, +-2, +-2, +-4, +3, +-3, +2, +1, +-1, +1, +-3, +-1, +2, +-1, +1, +-1, +0, +-4, +-2, +3, +0, +-4, +-2, +3, +-3, +1, +-1, +-1, +-2, +1, +-2, +-4, +0, +0, +0, +0, +-4, +-3, +3, +-2, +3, +3, +2, +3, +-4, +1, +-2, +-3, +-3, +2, +3, +-4, +-1, +3, +0, +3, +2, +1, +-1, +-1, +-4, +-1, +3, +2, +-1, +3, +0, +3, +0, +1, +-4, +0, +3, +2, +-4, +-2, +-2, +-4, +-3, +-2, +1, +0, +-2, +1, +3, +-2, +-1, +-3, +0, +3, +0, +0, +0, +2, +3, +-4, +-4, +2, +2, +3, +1, +0, +0, +-2, +1, +-2, +-4, +-3, +0, +-2, +2, +3, +2, +3, +3, +1, +1, +1, +3, +1, +3, +2, +-3, +1, +-1, +-2, +-2, +-2, +-1, +2, +2, +0, +-3, +-1, +2, +-4, +-2, +2, +-3, +-2, +-4, +3, +-1, +3, +2, +3, +-1, +-1, +-1, +-2, +-2, +2, +2, +-1, +-3, +-1, +3, +-3, +3, +3, +2, +-3, +2, +-3, +-3, +-2, +3, +-1, +0, +-2, +-1, +-1, +2, +-1, +-2, +1, +-4, +1, +3, +2, +1, +2, +-1, +-1, +-1, +-4, +0, +3, +1, +-2, +0, +2, +-2, +-2, +3, +-1, +-1, +0, +3, +3, +-1, +0, +0, +-4, +1, +-4, +-4, +0, +2, +3, +-3, +-2, +-3, +-3, +-2, +0, +-4, +-1, +0, +-2, +1, +-1, +-4, +1, +2, +0, +-2, +0, +2, +2, +2, +3, +-3, +1, +0, +-2, +2, +3, +-1, +-2, +1, +-3, +-1, +2, +2, +1, +3, +-2, +0, +-2, +-4, +1, +1, +1, +-2, +-1, +2, +0, +1, +-1, +-3, +-1, +1, +-1, +-1, +-3, +-4, +-2, +-2, +-1, +0, +3, +3, +0, +-2, +-2, +-2, +-3, +2, +2, +1, +3, +0, +3, +0, +-1, +-1, +3, +3, +-4, +1, +1, +-2, +-4, +-4, +3, +1, +0, +-1, +-4, +-2, +2, +0, +1, +-1, +0, +-3, +-2, +-1, +1, +-3, +-2, +2, +-4, +-3, +-3, +0, +0, +-3, +-3, +2, +0, +1, +-2, +-3, +-1, +3, +-1, +3, +-3, +-4, +-4, +0, +-4, +-1, +2, +1, +0, +0, +2, +2, +3, +2, +-1, +0, +-3, +-3, +3, +0, +-4, +0, +-2, +-2, +-1, +1, +3, +3, +1, +-3, +1, +-2, +-1, +2, +0, +0, +2, +-1, +-4, +-1, +-3, +0, +2, +-4, +-1, +0, +-2, +-1, +2, +-2, +-2, +3, +3, +0, +3, +1, +0, +2, +3, +2, +-2, +-4, +-1, +3, +3, +-1, +2, +0, +-2, +2, +-4, +-3, +-3, +-3, +-3, +-3, +0, +3, +3, +3, +0, +-3, +-1, +2, +3, +-3, +-3, +-4, +-1, +3, +0, +-4, +-2, +-3, +1, +3, +3, +-2, +2, +-4, +-2, +1, +-3, +-3, +-2, +3, +-3, +0, +-4, +0, +2, +-4, +0, +1, +-1, +3, +3, +3, +1, +3, +-4, +-4, +-1, +-3, +-3, +0, +1, +-1, +-3, +-4, +2, +3, +0, +-4, +-2, +-3, +0, +3, +2, +0, +-2, +-4, +-3, +-3, +-3, +-2, +2, +-4, +-4, +2, +3, +-3, +2, +-2, +-2, +-1, +-2, +-2, +-1, +3, +-4, +-4, +3, +-3, +-3, +-1, +-1, +2, +3, +-3, +-1, +-3, +-4, +}; + +const char m_exp[] = { +27, +-26, +-19, +13, +47, +17, +-5, +14, +88, +66, +2, +14, +6, +-39, +56, +35, +-19, +61, +-13, +4, +46, +1, +70, +27, +-22, +-28, +-13, +-5, +-4, +-6, +-10, +5, +26, +14, +3, +-1, +-3, +0, +10, +43, +4, +32, +-3, +6, +36, +26, +66, +20, +-20, +-10, +21, +-17, +-5, +36, +-9, +11, +10, +17, +-32, +12, +20, +9, +-1, +15, +-42, +-21, +-51, +24, +20, +26, +10, +42, +-4, +2, +-11, +41, +22, +4, +-17, +10, +28, +-10, +2, +10, +25, +32, +18, +43, +-3, +-9, +-9, +-4, +25, +-5, +9, +24, +54, +43, +14, +59, +18, +36, +-7, +30, +50, +-30, +21, +3, +27, +7, +21, +55, +-17, +-2, +9, +17, +31, +8, +12, +29, +43, +-17, +14, +-55, +13, +50, +24, +-13, +-33, +15, +-45, +9, +36, +-9, +-6, +14, +-1, +2, +-27, +-37, +-40, +-14, +2, +-10, +6, +27, +-8, +-13, +-17, +-4, +28, +51, +-5, +-14, +2, +-23, +17, +35, +41, +-3, +-37, +-12, +-49, +-31, +7, +15, +36, +-15, +-21, +6, +2, +36, +-12, +-27, +-34, +9, +44, +8, +57, +20, +-22, +-22, +-11, +-15, +-8, +-15, +-9, +49, +37, +26, +6, +30, +-17, +-43, +-3, +-31, +36, +49, +-15, +8, +51, +-8, +17, +-51, +-16, +-21, +12, +49, +-11, +41, +36, +15, +-5, +-69, +60, +14, +-24, +-21, +23, +3, +41, +41, +-27, +0, +33, +63, +18, +1, +-36, +-20, +18, +7, +-1, +37, +-33, +30, +36, +-29, +38, +57, +-8, +-21, +-26, +15, +-10, +-4, +-17, +-19, +8, +-9, +-13, +0, +10, +-30, +59, +12, +11, +51, +60, +19, +35, +6, +3, +-5, +-19, +-10, +20, +6, +-12, +-5, +5, +11, +33, +-33, +-27, +-2, +-2, +3, +53, +-1, +-15, +-10, +13, +-5, +24, +-17, +10, +8, +-3, +41, +-9, +9, +0, +30, +7, +7, +-10, +-28, +21, +13, +4, +-3, +44, +9, +-49, +-31, +-51, +23, +16, +-13, +-12, +36, +23, +34, +-39, +8, +20, +2, +32, +73, +24, +-16, +0, +-30, +17, +52, +-10, +28, +-43, +-1, +-34, +16, +-4, +39, +31, +5, +5, +3, +36, +48, +5, +28, +12, +57, +25, +-28, +14, +34, +49, +11, +41, +20, +-12, +-18, +-43, +-29, +58, +26, +44, +36, +-100, +-46, +-24, +0, +54, +4, +-2, +21, +5, +-12, +22, +9, +-35, +-5, +-36, +-22, +-10, +-11, +-15, +34, +20, +-33, +17, +39, +-13, +-32, +-36, +-22, +-3, +-38, +-39, +-6, +0, +15, +-6, +-15, +9, +-10, +45, +16, +17, +13, +-8, +15, +11, +-4, +59, +18, +-9, +12, +69, +27, +-30, +16, +7, +30, +41, +-30, +9, +-4, +23, +-5, +8, +3, +-75, +-25, +5, +14, +12, +-21, +-21, +6, +-13, +15, +8, +-6, +30, +24, +41, +-12, +5, +39, +18, +-4, +-60, +19, +-1, +-3, +-7, +16, +-11, +-51, +2, +-10, +-17, +-32, +39, +-35, +-46, +10, +27, +1, +21, +13, +78, +-12, +-2, +-28, +-20, +11, +75, +85, +-18, +21, +-7, +-9, +33, +19, +71, +23, +25, +2, +47, +32, +8, +24, +46, +-22, +23, +18, +-58, +66, +52, +22, +32, +25, +-34, +-26, +-21, +-69, +6, +27, +-28, +-13, +-15, +10, +-20, +-16, +20, +25, +7, +22, +52, +-4, +-8, +-28, +-18, +-6, +-36, +6, +-26, +12, +32, +8, +11, +16, +0, +-18, +-33, +-10, +11, +-40, +-6, +-29, +-34, +-30, +15, +15, +-27, +9, +8, +-43, +0, +-5, +4, +12, +60, +-11, +-4, +-32, +-25, +-38, +-37, +-17, +-1, +20, +37, +43, +7, +-2, +12, +-7, +-7, +-14, +-30, +9, +50, +-18, +-9, +-1, +-9, +6, +16, +-38, +-13, +30, +}; + +#define SIZE 24 +__attribute__ ((section(".heapsram"))) char g_mA[SIZE][SIZE]; +__attribute__ ((section(".heapsram"))) char g_mB[SIZE][SIZE]; +__attribute__ ((section(".heapsram"))) char g_mC[SIZE][SIZE]; +__attribute__ ((section(".heapsram"))) char g_mB_tmp[SIZE][SIZE]; diff --git a/astral/redmule b/astral/redmule new file mode 120000 index 0000000..bd0da93 --- /dev/null +++ b/astral/redmule @@ -0,0 +1 @@ +../hwpe/redmule/ \ No newline at end of file diff --git a/astral/redmule_256iter b/astral/redmule_256iter new file mode 120000 index 0000000..e81b225 --- /dev/null +++ b/astral/redmule_256iter @@ -0,0 +1 @@ +../hwpe/redmule_256iter/ \ No newline at end of file diff --git a/astral/redmule_softclear b/astral/redmule_softclear new file mode 120000 index 0000000..2904f52 --- /dev/null +++ b/astral/redmule_softclear @@ -0,0 +1 @@ +../hwpe/redmule_softclear/ \ No newline at end of file diff --git a/astral/softex b/astral/softex new file mode 120000 index 0000000..e1a6d4b --- /dev/null +++ b/astral/softex @@ -0,0 +1 @@ +../hwpe/softex/ \ No newline at end of file diff --git a/carfield.yaml b/carfield.yaml new file mode 100644 index 0000000..751550e --- /dev/null +++ b/carfield.yaml @@ -0,0 +1,19 @@ +carfield: + parMatrixMul8: + path: ./carfield/parMatrixMul8 + command: make clean all run + parMatrixMul16: + path: ./carfield/parMatrixMul16 + command: make clean all run + parMatrixMul32: + path: ./carfield/parMatrixMul32 + command: make clean all run + dmr_matmul: + path: ./carfield/dmr_matmul + command: make clean all run + redmule: + path: ./carfield/redmule + command: make clean all run + neureka: + path: ./carfield/neureka + command: make clean all run \ No newline at end of file diff --git a/carfield/dmr_matmul/Makefile b/carfield/dmr_matmul/Makefile new file mode 100644 index 0000000..66ed60e --- /dev/null +++ b/carfield/dmr_matmul/Makefile @@ -0,0 +1,12 @@ +PULP_APP = test +PULP_APP_SRCS = dmr_matmul.c + +PULP_CFLAGS = -O3 +PULP_LDFLAGS = -lm + +ifeq ($(fault_inject),1) + export FAULT_INJECTION=1 + export FAULT_INJECTION_SCRIPT=$(CURDIR)/pulp_inject_fault.tcl +endif + +include $(PULP_SDK_HOME)/install/rules/pulp.mk diff --git a/carfield/dmr_matmul/dmr_matmul.c b/carfield/dmr_matmul/dmr_matmul.c new file mode 100644 index 0000000..7e456fb --- /dev/null +++ b/carfield/dmr_matmul/dmr_matmul.c @@ -0,0 +1,100 @@ +/* +* @Author: Michael Rogenmoser +* @Date: 2023-02-17 18:00:21 +* @Last Modified by: Michael Rogenmoser +* @Last Modified time: 2023-02-17 18:15:33 +*/ +#include +#include +#include "matmul.h" + +#define N_ITERS 1 +#define max(x,y) (x > y ? x : y) +#define min(x,y) (x < y ? x : y) + +__attribute__ ((section(".heapsram"))) int A[SIZE][SIZE]; +__attribute__ ((section(".heapsram"))) int B[SIZE][SIZE]; +__attribute__ ((section(".heapsram"))) int C[SIZE][SIZE]; + +void initialize_mat(); + +void initialize_mat() { + int i,j; + + for (i=0;i +#include +#include +#include + +#define SIZE 0x400 +#define NUM_BANKS 16 +#define SCRUBBER_INTERVAL 2 + +int main() { + // Collecting info about the core ID and the running cluster ID + unsigned int core_id = get_core_id(); + unsigned int cluster_id = rt_cluster_id(); + + if (rt_cluster_id() != 0) return bench_cluster_forward(0); + + if (core_id != 0) synch_barrier(); + + unsigned int *test_array = pi_l1_malloc(cluster_id, SIZE); + + // Initializing the memory + for (int i = 0; i < SIZE; i++) { + pulp_write32(&test_array[i], i); + } + + // Initialize the scrubbing interval for all memory banks + for (int i = 0; i < NUM_BANKS; i++) + tcdm_scrubber_set_interval(cluster_id, i, SCRUBBER_INTERVAL); + + // Initialize the error-tracking variables + bool mismatch = 0; + unsigned int error = 0; + for (int i = 0; i < SIZE; i++) { + mismatch = (pulp_read32(&test_array[i]) != i); + if (mismatch) { + error ++; + printf("Expected 0x%x, got 0x%x\n", i, pulp_read32(&test_array[i])); + } + } + + unsigned int mismatch_cnt = 0; + unsigned int fix_cnt = 0; + unsigned int uncorrectable_cnt = 0; + for (int i = 0; i < 16; i++) { + mismatch_cnt += tcdm_scrubber_get_mismatch_count(cluster_id, i); + fix_cnt += tcdm_scrubber_get_fix_count(cluster_id, i); + uncorrectable_cnt += tcdm_scrubber_get_uncorrectable_count(cluster_id, i); + } + + printf("mismatch_cnt: %d, fix_cnt: %d, uncorrectable_cnt: %d\n", mismatch_cnt, fix_cnt, uncorrectable_cnt); + + return (error != 0) && (uncorrectable_cnt == 0); +} diff --git a/carfield/ecc_test/pulp_inject_fault.tcl b/carfield/ecc_test/pulp_inject_fault.tcl new file mode 100644 index 0000000..45cef47 --- /dev/null +++ b/carfield/ecc_test/pulp_inject_fault.tcl @@ -0,0 +1,53 @@ +# Copyright 2023 ETH Zurich and University of Bologna. +# Solderpad Hardware License, Version 0.51, see LICENSE for details. +# SPDX-License-Identifier: SHL-0.51 +# +# Author: Michael Rogenmoser (michaero@iis.ee.ethz.ch) + +transcript quietly +if {! [info exists ::env(VSIM_PATH)]} {error "Define VSIM_PATH"} +set utils_base_path [file join $::env(VSIM_PATH) scripts fault_injection_utils] +set script_base_path [file join $::env(VSIM_PATH) fault_injection_sim scripts] + +set verbosity 2 +set log_injections 1 +# Easy way to generate a variable seed +# set seed [clock seconds] +# Default value +set seed 12345 +set print_statistics 1 + +set inject_start_time 110584000000ps +set inject_stop_time 203880000000ps +set injection_clock "pulp_cluster_tb/cluster_i/clk_i" +set injection_clock_trigger 0 +set fault_period 100 +set rand_initial_injection_phase 0 +# max_num set to 0 means until stop_time +set max_num_fault_inject 0 +set signal_fault_duration 20ns +set register_fault_duration 0ns + +set allow_multi_bit_upset $::env(MULTI_BIT_UPSET) +set use_bitwidth_as_weight 0 +set check_core_output_modification 0 +set check_core_next_state_modification 0 +set reg_to_sig_ratio 1 + +source [file join $utils_base_path pulp_extract_nets.tcl] + +set inject_signals_netlist [] +set inject_register_netlist [] +set output_netlist [] +set next_state_netlist [] +set assertion_disable_list [] + +# for {set idx 0} {$idx < 12} {incr idx} { +# set inject_signals_netlist [list {*}$inject_signals_netlist {*}[get_all_core_nets $idx]] +# set output_netlist [list {*}$output_netlist {*}[get_core_output_nets $idx]] +# } + +set inject_register_netlist [list {*}$inject_register_netlist {*}[get_memory_slice {0 16} {385 449}]] + +source [file join $script_base_path inject_fault.tcl] + diff --git a/carfield/hello/Makefile b/carfield/hello/Makefile new file mode 100644 index 0000000..d145a0f --- /dev/null +++ b/carfield/hello/Makefile @@ -0,0 +1,5 @@ +PULP_APP = test +PULP_APP_SRCS = hello.c +PULP_CFLAGS = -O3 + +include $(PULP_SDK_HOME)/install/rules/pulp.mk diff --git a/carfield/hello/hello.c b/carfield/hello/hello.c new file mode 100644 index 0000000..8741206 --- /dev/null +++ b/carfield/hello/hello.c @@ -0,0 +1,24 @@ +/* + * Copyright (C) 2018 ETH Zurich and University of Bologna + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include + +int main() +{ + printf("Hello !\n"); + + return 0; +} diff --git a/carfield/neureka b/carfield/neureka new file mode 120000 index 0000000..98cb979 --- /dev/null +++ b/carfield/neureka @@ -0,0 +1 @@ +../hwpe/neureka/ \ No newline at end of file diff --git a/carfield/parMatrixMul16/Makefile b/carfield/parMatrixMul16/Makefile new file mode 100755 index 0000000..0fade4a --- /dev/null +++ b/carfield/parMatrixMul16/Makefile @@ -0,0 +1,8 @@ +PULP_APP = test +PULP_APP_SRCS = matrixMul.c + +PULP_CFLAGS = -O3 + +include $(PULP_SDK_HOME)/install/rules/pulp.mk + +#pulp-bench-reg --name=parMatrixMul16.cycles --module=pulp_rtl_testset --pipeline=$(PIPELINE) --artefact=pulp_rtl_testset --cmd="make run -f Makefile.sdk" --probe-regexp='matrixMul -> success, nr. of errors: 0, execution time: (\d+)' --params="platform($(platformName)),compiler($(OR1K_TOOLCHAIN_TYPE)),nbCores(4),elemSize(16)" --probe-regexp='matrixMulTranspose -> success, nr. of errors: 0, execution time: (\d+)' --params="platform($(platformName)),compiler($(OR1K_TOOLCHAIN_TYPE)),nbCores(4),elemSize(16),transposed" diff --git a/carfield/parMatrixMul16/gen_stimuli.py b/carfield/parMatrixMul16/gen_stimuli.py new file mode 100755 index 0000000..754a8a9 --- /dev/null +++ b/carfield/parMatrixMul16/gen_stimuli.py @@ -0,0 +1,54 @@ +#!/usr/bin/env python + +import sys +import random + + +def write_arr(f, name, arr): + f.write('const short %s[] = {\n' % name) + for v in arr: + f.write('%d,\n' % (v)) + f.write('};\n\n') + return + +################################################################################ +f = open('parMatrixMul16_stimuli.h', 'w') + + +SIZE = 24 +RANGE = int(2**7/SIZE) + +m_a = [] +m_b = [] +m_exp = [] + +for i in range(0,SIZE): + for j in range(0,SIZE): + a = random.randint(-RANGE, RANGE-1) + b = random.randint(-RANGE, RANGE-1) + + m_a.append(a) + m_b.append(b) + +for i in range(0,SIZE): + for j in range(0,SIZE): + r = 0 + + for k in range (0,SIZE): + r = r + m_a[i * SIZE + k] * m_b[k * SIZE + j] + + m_exp.append(r) + + +write_arr(f, 'm_a', m_a) +write_arr(f, 'm_b', m_b) +write_arr(f, 'm_exp', m_exp) + +f.write('#define SIZE %d\n' % SIZE) + + +f.write('__attribute__ ((section(".heapsram"))) short g_mA[SIZE][SIZE];\n') +f.write('__attribute__ ((section(".heapsram"))) short g_mB[SIZE][SIZE];\n') +f.write('__attribute__ ((section(".heapsram"))) short g_mC[SIZE][SIZE];\n') +f.write('__attribute__ ((section(".heapsram"))) short g_mB_tmp[SIZE][SIZE];\n') + diff --git a/carfield/parMatrixMul16/matrixMul.c b/carfield/parMatrixMul16/matrixMul.c new file mode 100644 index 0000000..5cbe65f --- /dev/null +++ b/carfield/parMatrixMul16/matrixMul.c @@ -0,0 +1,177 @@ +/* + * Copyright (C) 2018 ETH Zurich and University of Bologna + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* + * Mantainer: Luca Valente, luca.valente2@unibo.it + */ + +#include "pulp.h" + +#include "parMatrixMul16_stimuli.h" + +void check_matrix_mul(testresult_t *result, void (*start)(), void (*stop)()); +void check_matrix_mul_transpose(testresult_t *result, void (*start)(), void (*stop)()); + +testcase_t testcases[] = { + { .name = "matrixMul", .test = check_matrix_mul }, + { .name = "matrixMulTranspose", .test = check_matrix_mul_transpose }, + {0, 0} +}; + +unsigned int num_cores; + +int main() +{ + if (rt_cluster_id() != 0) + return bench_cluster_forward(0); + + num_cores = get_core_num(); + + if(rt_core_id() < num_cores) { + run_suite(testcases); + } + + synch_barrier(); + + return 0; +} + +void matrix_init(); +unsigned int matrix_check(); + +void check_matrix_mul(testresult_t *result, void (*start)(), void (*stop)()) { + int core_id; + unsigned int i, j, k; + unsigned int chunk; + unsigned int lb, ub; + + core_id = get_core_id(); + + // number of rows each core has to multiply + chunk = SIZE / num_cores; + // lower bound + lb = core_id * chunk; + // upper bound + ub = lb + chunk; + + if(core_id == 0) { + matrix_init(); + } + + if(num_cores != 1) synch_barrier(); + + // start benchmark + start(); + + for(i = lb; i < ub; i++) { + for(j = 0; j < SIZE; j++) { + g_mC[i][j] = 0; + + for(k = 0; k < SIZE; k++) { + g_mC[i][j] += g_mA[i][k] * g_mB[k][j]; + } + } + } + + if(num_cores != 1) synch_barrier(); + + stop(); + + if(core_id == 0) { + result->errors = matrix_check(); + } +} + +void check_matrix_mul_transpose(testresult_t *result, void (*start)(), void (*stop)()) { + int core_id; + unsigned int i, j, k; + unsigned int chunk; + unsigned int lb, ub; + + core_id = get_core_id(); + + // number of rows each core has to multiply + chunk = SIZE / num_cores; + // lower bound + lb = core_id * chunk; + // upper bound + ub = lb + chunk; + + if(core_id == 0) { + matrix_init(); + } + + if(num_cores != 1) synch_barrier(); + + // start benchmark + start(); + + // transpose array before using it + for(i = lb; i < ub; i++) { + for(j = 0; j < SIZE; j++) { + g_mB_tmp[i][j] = g_mB[j][i]; + } + } + + if(num_cores != 1) synch_barrier(); + + for(i = lb; i < ub; i++) { + for(j = 0; j < SIZE; j++) { + g_mC[i][j] = 0; + + for(k = 0; k < SIZE; k++) { + g_mC[i][j] += g_mA[i][k] * g_mB_tmp[j][k]; + } + } + } + + if(num_cores != 1) synch_barrier(); + + stop(); + + if(core_id == 0) { + result->errors = matrix_check(); + } +} + +void matrix_init() { + unsigned int i, j; + + // init, copy to TCDM + for(i = 0; i < SIZE; i++) { + for(j = 0; j < SIZE; j++) { + g_mA[i][j] = m_a[i * SIZE + j]; + g_mB[i][j] = m_b[i * SIZE + j]; + g_mC[i][j] = 0; + } + } +} + +unsigned int matrix_check() { + unsigned int errors = 0; + unsigned int i, j; + // check + for(i = 0; i < SIZE; i++) { + for(j = 0; j < SIZE; j++) { + if(g_mC[i][j] != m_exp[i * SIZE + j]) { + printf("At index %d, %d\n", i, j, 0, 0); + errors++; + } + } + } + + return errors; +} diff --git a/carfield/parMatrixMul16/parMatrixMul16_stimuli.h b/carfield/parMatrixMul16/parMatrixMul16_stimuli.h new file mode 100644 index 0000000..2797565 --- /dev/null +++ b/carfield/parMatrixMul16/parMatrixMul16_stimuli.h @@ -0,0 +1,1742 @@ +const short m_a[] = { +3, +2, +-4, +0, +0, +0, +-5, +-3, +2, +4, +0, +2, +2, +-3, +2, +-1, +-2, +-1, +1, +4, +-3, +-3, +-1, +0, +4, +-2, +-1, +-4, +-1, +4, +1, +3, +-2, +-2, +-2, +-1, +3, +-5, +2, +0, +1, +-1, +-4, +4, +0, +-2, +4, +-5, +3, +-3, +-4, +3, +-2, +2, +-2, +3, +3, +4, +0, +-4, +4, +0, +3, +-5, +1, +0, +0, +2, +-3, +-2, +-3, +4, +-3, +1, +-5, +-5, +2, +-3, +-3, +-2, +-4, +0, +4, +1, +1, +0, +4, +0, +-3, +-3, +-1, +-2, +-5, +4, +-2, +1, +3, +-1, +-1, +-4, +4, +-1, +3, +-3, +2, +2, +3, +1, +2, +1, +2, +4, +-4, +-3, +-2, +-3, +4, +0, +1, +0, +-3, +0, +-2, +-3, +1, +3, +4, +-1, +4, +4, +3, +-4, +-5, +3, +2, +4, +-4, +4, +1, +-2, +2, +-1, +4, +2, +2, +-5, +0, +-2, +-4, +2, +-3, +-1, +4, +0, +4, +4, +1, +4, +4, +-3, +3, +4, +-2, +4, +-4, +2, +-2, +-3, +3, +1, +3, +3, +0, +-4, +1, +-4, +4, +2, +-2, +-5, +-4, +-4, +2, +-1, +-2, +0, +4, +-3, +4, +-5, +3, +-1, +-5, +-4, +-2, +-5, +4, +-2, +3, +-3, +4, +3, +-4, +4, +3, +-3, +4, +-1, +3, +-4, +-5, +1, +-3, +-4, +2, +3, +2, +-2, +4, +3, +2, +-4, +0, +-2, +-5, +-3, +3, +1, +3, +-5, +3, +1, +-5, +1, +-2, +-4, +1, +-5, +4, +1, +0, +0, +-4, +-2, +2, +0, +-3, +-4, +-1, +-5, +-2, +-4, +-2, +3, +4, +-5, +0, +2, +2, +4, +0, +4, +-5, +-3, +-5, +-5, +0, +0, +-4, +3, +1, +1, +-5, +2, +-5, +2, +-4, +3, +4, +-3, +-4, +4, +-2, +-4, +4, +-3, +-5, +-4, +2, +-2, +3, +-2, +1, +4, +1, +4, +-2, +1, +-4, +4, +2, +-1, +1, +1, +-2, +-2, +0, +-5, +2, +4, +-4, +1, +-5, +0, +4, +3, +-4, +1, +-3, +-4, +2, +-3, +-3, +1, +2, +4, +-3, +-2, +3, +-3, +-5, +4, +-5, +-5, +4, +4, +3, +-1, +-3, +-4, +-1, +1, +0, +1, +4, +-1, +0, +1, +-4, +0, +-4, +-3, +0, +-4, +2, +-2, +-2, +-1, +-2, +0, +-5, +-1, +-3, +3, +4, +-4, +4, +4, +0, +-4, +-3, +-3, +4, +0, +2, +3, +-1, +2, +0, +-4, +3, +-1, +-3, +-4, +4, +0, +4, +3, +0, +-3, +-5, +4, +-3, +3, +4, +3, +-1, +3, +-3, +1, +3, +4, +3, +-1, +3, +2, +4, +4, +-2, +-1, +2, +-4, +-4, +-1, +0, +-1, +4, +-4, +4, +2, +0, +0, +1, +-1, +-5, +1, +-5, +2, +-2, +2, +1, +3, +1, +-3, +-4, +-2, +0, +4, +-2, +0, +-1, +-1, +-3, +-2, +4, +3, +4, +2, +3, +4, +-4, +-2, +-1, +-2, +0, +-1, +-1, +-4, +-2, +2, +-5, +4, +-5, +0, +4, +4, +-2, +-4, +1, +-5, +-5, +4, +-3, +0, +-1, +-5, +4, +-4, +0, +4, +4, +-4, +-2, +-4, +1, +-4, +-5, +4, +-5, +-3, +2, +-2, +-1, +-3, +0, +-3, +-2, +4, +-5, +-5, +3, +-5, +-1, +3, +2, +3, +0, +-2, +-3, +-4, +3, +0, +3, +3, +-1, +-4, +0, +3, +-5, +-3, +4, +-3, +2, +-1, +0, +2, +-1, +3, +-1, +-5, +3, +4, +3, +3, +4, +3, +1, +-4, +1, +-2, +4, +-3, +2, +0, +-2, +-5, +-5, +-2, +-2, +0, +4, +0, +-4, +-1, +0, +-5, +-3, +4, +0, +1, +-3, +3, +-2, +-2, +2, +-1, +-1, +-3, +-1, +-2, +-5, +-5, +-1, +-1, +-4, +-4, +}; + +const short m_b[] = { +-2, +3, +2, +-5, +-3, +2, +0, +-5, +1, +-3, +-2, +-3, +-3, +3, +-4, +-2, +-4, +1, +1, +1, +4, +4, +3, +3, +-4, +-3, +-2, +-2, +-3, +-2, +-1, +-5, +-4, +1, +-4, +-3, +3, +-5, +-5, +-4, +-2, +-2, +1, +3, +3, +3, +4, +0, +1, +0, +4, +3, +-3, +3, +-1, +0, +2, +-1, +-1, +0, +0, +3, +-4, +4, +3, +3, +-1, +-4, +-1, +-4, +-2, +-4, +-4, +3, +0, +3, +-4, +2, +0, +0, +-4, +-5, +-4, +4, +0, +-4, +-2, +-4, +3, +4, +-4, +-3, +-2, +0, +-2, +2, +-5, +2, +1, +2, +0, +0, +-2, +-2, +-1, +1, +-1, +3, +3, +-1, +3, +-1, +-2, +1, +-3, +3, +3, +3, +2, +0, +1, +-2, +1, +4, +3, +-2, +-5, +0, +2, +0, +1, +-3, +-1, +3, +-3, +-2, +3, +4, +-2, +-1, +-5, +1, +-1, +2, +-3, +-4, +0, +-1, +0, +2, +3, +4, +-4, +-1, +-1, +2, +-1, +-5, +1, +-3, +0, +-4, +0, +-1, +2, +-5, +-1, +1, +-2, +-5, +-3, +-3, +2, +2, +-4, +2, +-5, +-4, +4, +4, +-1, +1, +2, +-1, +-3, +0, +2, +4, +-3, +-2, +-1, +4, +-5, +4, +0, +-1, +-1, +-4, +-3, +-3, +-1, +-2, +-1, +-2, +-5, +2, +2, +-3, +1, +-1, +-2, +0, +0, +1, +0, +4, +-4, +-4, +-4, +-5, +4, +-4, +4, +-3, +4, +-5, +-2, +3, +-2, +-4, +1, +2, +-5, +-2, +-5, +-3, +2, +-1, +3, +-4, +-4, +4, +-3, +-5, +0, +-3, +2, +2, +3, +-3, +-3, +-2, +-5, +4, +1, +3, +-1, +-4, +3, +1, +-2, +1, +3, +4, +1, +-2, +0, +0, +-3, +-1, +1, +-1, +0, +-5, +-2, +-1, +1, +-2, +4, +-3, +2, +1, +0, +0, +3, +-4, +2, +1, +0, +3, +-5, +-1, +4, +3, +4, +-2, +-1, +-3, +-4, +3, +3, +-4, +4, +-5, +1, +-1, +0, +3, +4, +3, +-3, +-5, +-3, +-2, +-4, +1, +-2, +-3, +-2, +1, +2, +4, +4, +0, +2, +4, +0, +-1, +1, +-4, +-1, +-3, +-2, +-5, +3, +-3, +-1, +0, +-3, +-3, +-4, +3, +3, +-5, +-2, +-1, +3, +1, +1, +1, +3, +1, +1, +-5, +-2, +2, +4, +3, +-3, +-5, +3, +-4, +0, +2, +-4, +-5, +-3, +-3, +-3, +2, +-1, +-3, +1, +-3, +-1, +-5, +2, +1, +1, +-3, +2, +4, +1, +-5, +3, +0, +-5, +-4, +2, +-5, +3, +-1, +0, +2, +-3, +-1, +-2, +-5, +-4, +0, +-5, +-3, +3, +1, +0, +-1, +-4, +1, +-4, +-5, +-1, +3, +3, +-3, +-1, +4, +-1, +-5, +-4, +-1, +0, +1, +1, +4, +-3, +-2, +4, +1, +-4, +-1, +-3, +2, +-2, +4, +2, +-1, +2, +-4, +-3, +4, +-1, +1, +-4, +0, +1, +-4, +4, +-4, +-5, +-5, +-3, +2, +2, +-1, +0, +-2, +-5, +1, +-1, +-5, +2, +-4, +-5, +-3, +1, +-4, +0, +1, +-5, +0, +-2, +1, +-4, +-5, +3, +0, +1, +2, +4, +-1, +-4, +0, +-4, +0, +-5, +3, +-5, +-5, +2, +2, +3, +-3, +4, +4, +2, +3, +-2, +4, +3, +4, +1, +1, +0, +2, +2, +4, +-1, +-5, +-5, +3, +-5, +-2, +-4, +-4, +0, +4, +3, +0, +4, +-3, +4, +0, +-1, +3, +2, +-4, +2, +-1, +-3, +-5, +-3, +3, +-4, +1, +-3, +3, +-4, +0, +3, +-2, +-1, +2, +-4, +2, +4, +0, +2, +-2, +-5, +0, +-1, +-5, +4, +-4, +3, +-1, +4, +1, +4, +0, +-1, +1, +4, +3, +3, +1, +2, +-3, +-2, +-5, +-2, +1, +-5, +-4, +-5, +-2, +}; + +const short m_exp[] = { +-32, +48, +2, +-56, +46, +-52, +39, +-77, +41, +-50, +-50, +-14, +-45, +-31, +3, +-22, +-52, +-31, +-32, +8, +61, +97, +49, +-12, +12, +-25, +-26, +-15, +15, +45, +-29, +-27, +-7, +-23, +30, +-36, +-56, +27, +-59, +35, +6, +44, +72, +23, +17, +86, +-8, +5, +-25, +41, +-30, +-78, +120, +-1, +69, +-20, +24, +-66, +6, +68, +-59, +2, +27, +-21, +-71, +-61, +-49, +21, +-24, +27, +-47, +29, +71, +37, +-9, +-58, +13, +13, +73, +-9, +7, +28, +23, +35, +46, +-8, +86, +-7, +25, +-65, +-18, +43, +58, +22, +44, +-51, +-33, +10, +-18, +-17, +-62, +24, +18, +-68, +23, +25, +23, +-32, +23, +37, +55, +-16, +24, +4, +-16, +9, +77, +44, +48, +-36, +-81, +-100, +-18, +36, +-3, +-72, +-43, +38, +-2, +34, +53, +-42, +-18, +56, +19, +34, +3, +-58, +-16, +-34, +-71, +-12, +12, +-22, +-9, +57, +-46, +-70, +25, +-62, +10, +-5, +68, +-86, +-15, +-19, +-100, +78, +23, +47, +5, +-64, +31, +-16, +-9, +-22, +11, +30, +-74, +31, +50, +38, +-59, +24, +12, +-18, +4, +33, +-24, +-44, +-19, +2, +-47, +48, +-30, +28, +-38, +-29, +20, +52, +-21, +-5, +49, +-41, +-17, +-2, +68, +-2, +122, +-29, +13, +23, +46, +40, +-12, +-58, +59, +2, +15, +-49, +-38, +-15, +46, +-1, +-54, +-73, +10, +-1, +43, +80, +-55, +119, +82, +22, +-12, +-14, +-12, +-3, +36, +27, +-3, +50, +59, +61, +13, +-14, +5, +51, +-54, +-45, +-9, +109, +10, +-28, +1, +0, +-50, +-23, +27, +49, +16, +3, +23, +43, +31, +29, +-27, +-45, +9, +61, +42, +34, +30, +26, +38, +-84, +5, +98, +13, +55, +15, +56, +63, +22, +80, +10, +52, +52, +49, +101, +37, +71, +-20, +-38, +-36, +-72, +-40, +12, +77, +-19, +32, +9, +-15, +85, +-13, +-33, +-8, +-20, +33, +36, +76, +6, +67, +-51, +36, +76, +-48, +30, +42, +-45, +-22, +-9, +65, +-29, +18, +89, +34, +-25, +41, +30, +26, +49, +34, +-6, +-28, +10, +-106, +6, +86, +5, +-3, +-105, +-103, +-45, +-55, +-60, +29, +41, +54, +-29, +36, +-30, +-8, +25, +36, +40, +22, +-35, +-50, +33, +3, +-19, +-30, +3, +-11, +9, +-4, +-18, +39, +92, +-25, +0, +-40, +64, +-18, +58, +-2, +27, +-89, +32, +-2, +56, +79, +-67, +87, +-41, +20, +29, +4, +51, +45, +26, +-54, +8, +-37, +-37, +-39, +-35, +-36, +-23, +-30, +11, +1, +-63, +-21, +5, +13, +35, +-15, +27, +-59, +-10, +29, +4, +-58, +-56, +3, +-10, +27, +0, +29, +-4, +-17, +28, +2, +17, +9, +-27, +53, +-19, +-36, +104, +25, +38, +84, +-29, +42, +-10, +-47, +-36, +1, +10, +43, +-46, +-57, +38, +44, +-9, +26, +-15, +10, +31, +34, +-18, +17, +24, +-3, +5, +11, +4, +23, +5, +-19, +51, +-59, +-29, +62, +-27, +35, +81, +65, +-10, +-1, +-1, +45, +20, +26, +-34, +-7, +35, +-7, +2, +19, +115, +-32, +-40, +-92, +47, +-65, +23, +53, +-31, +22, +20, +45, +91, +64, +29, +49, +30, +74, +-15, +22, +120, +16, +122, +-51, +51, +78, +60, +-53, +40, +-49, +73, +-2, +14, +-17, +-86, +35, +-25, +36, +2, +5, +38, +-9, +16, +-12, +-41, +-24, +-31, +-72, +-68, +-9, +5, +11, +-63, +15, +12, +21, +22, +19, +62, +-28, +122, +12, +28, +-59, +-19, +49, +57, +-12, +29, +-1, +-23, +126, +75, +-29, +-21, +-37, +8, +-70, +-8, +91, +-34, +-10, +31, +78, +44, +59, +23, +66, +42, +38, +6, +19, +10, +1, +57, +38, +71, +-10, +-12, +-7, +-13, +-15, +6, +}; + +#define SIZE 24 +__attribute__ ((section(".heapsram"))) short g_mA[SIZE][SIZE]; +__attribute__ ((section(".heapsram"))) short g_mB[SIZE][SIZE]; +__attribute__ ((section(".heapsram"))) short g_mC[SIZE][SIZE]; +__attribute__ ((section(".heapsram"))) short g_mB_tmp[SIZE][SIZE]; diff --git a/carfield/parMatrixMul32/Makefile b/carfield/parMatrixMul32/Makefile new file mode 100755 index 0000000..bd55e15 --- /dev/null +++ b/carfield/parMatrixMul32/Makefile @@ -0,0 +1,8 @@ +PULP_APP = test +PULP_APP_SRCS = matrixMul.c + +PULP_CFLAGS = -O3 + +include $(PULP_SDK_HOME)/install/rules/pulp.mk + +#pulp-bench-reg --name=parMatrixMul32.cycles --module=pulp_rtl_testset --pipeline=$(PIPELINE) --artefact=pulp_rtl_testset --cmd="make run -f Makefile.sdk" --probe-regexp='matrixMul -> success, nr. of errors: 0, execution time: (\d+)' --params="platform($(platformName)),compiler($(OR1K_TOOLCHAIN_TYPE)),nbCores(4),elemSize(32)" --probe-regexp='matrixMulTranspose -> success, nr. of errors: 0, execution time: (\d+)' --params="platform($(platformName)),compiler($(OR1K_TOOLCHAIN_TYPE)),nbCores(4),elemSize(32),transposed" diff --git a/carfield/parMatrixMul32/gen_stimuli.py b/carfield/parMatrixMul32/gen_stimuli.py new file mode 100755 index 0000000..32926e9 --- /dev/null +++ b/carfield/parMatrixMul32/gen_stimuli.py @@ -0,0 +1,54 @@ +#!/usr/bin/env python + +import sys +import random + + +def write_arr(f, name, arr): + f.write('const int %s[] = {\n' % name) + for v in arr: + f.write('%d,\n' % (v)) + f.write('};\n\n') + return + +################################################################################ +f = open('parMatrixMul32_stimuli.h', 'w') + + +SIZE = 24 +RANGE = int(2**15/SIZE) + +m_a = [] +m_b = [] +m_exp = [] + +for i in range(0,SIZE): + for j in range(0,SIZE): + a = random.randint(-RANGE, RANGE-1) + b = random.randint(-RANGE, RANGE-1) + + m_a.append(a) + m_b.append(b) + +for i in range(0,SIZE): + for j in range(0,SIZE): + r = 0 + + for k in range (0,SIZE): + r = r + m_a[i * SIZE + k] * m_b[k * SIZE + j] + + m_exp.append(r) + + +write_arr(f, 'm_a', m_a) +write_arr(f, 'm_b', m_b) +write_arr(f, 'm_exp', m_exp) + +f.write('#define SIZE %d\n' % SIZE) + + +f.write('__attribute__ ((section(".heapsram"))) int g_mA[SIZE][SIZE];\n') +f.write('__attribute__ ((section(".heapsram"))) int g_mB[SIZE][SIZE];\n') +f.write('__attribute__ ((section(".heapsram"))) int g_mC[SIZE][SIZE];\n') +f.write('__attribute__ ((section(".heapsram"))) int g_mB_tmp[SIZE][SIZE];\n') + diff --git a/carfield/parMatrixMul32/matrixMul.c b/carfield/parMatrixMul32/matrixMul.c new file mode 100644 index 0000000..990d411 --- /dev/null +++ b/carfield/parMatrixMul32/matrixMul.c @@ -0,0 +1,177 @@ +/* + * Copyright (C) 2018 ETH Zurich and University of Bologna + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* + * Mantainer: Luca Valente, luca.valente2@unibo.it + */ + +#include "pulp.h" + +#include "parMatrixMul32_stimuli.h" + +void check_matrix_mul(testresult_t *result, void (*start)(), void (*stop)()); +void check_matrix_mul_transpose(testresult_t *result, void (*start)(), void (*stop)()); + +testcase_t testcases[] = { + { .name = "matrixMul", .test = check_matrix_mul }, + { .name = "matrixMulTranspose", .test = check_matrix_mul_transpose }, + {0, 0} +}; + +unsigned int num_cores; + +int main() +{ + if (rt_cluster_id() != 0) + return bench_cluster_forward(0); + + num_cores = get_core_num(); + + if(rt_core_id() < num_cores) { + run_suite(testcases); + } + + synch_barrier(); + + return 0; +} + +void matrix_init(); +unsigned int matrix_check(); + +void check_matrix_mul(testresult_t *result, void (*start)(), void (*stop)()) { + int core_id; + unsigned int i, j, k; + unsigned int chunk; + unsigned int lb, ub; + + core_id = get_core_id(); + + // number of rows each core has to multiply + chunk = SIZE / num_cores; + // lower bound + lb = core_id * chunk; + // upper bound + ub = lb + chunk; + + if(core_id == 0) { + matrix_init(); + } + + if(num_cores != 1) synch_barrier(); + + // start benchmark + start(); + + for(i = lb; i < ub; i++) { + for(j = 0; j < SIZE; j++) { + g_mC[i][j] = 0; + + for(k = 0; k < SIZE; k++) { + g_mC[i][j] += g_mA[i][k] * g_mB[k][j]; + } + } + } + + if(num_cores != 1) synch_barrier(); + + stop(); + + if(core_id == 0) { + result->errors = matrix_check(); + } +} + +void check_matrix_mul_transpose(testresult_t *result, void (*start)(), void (*stop)()) { + int core_id; + unsigned int i, j, k; + unsigned int chunk; + unsigned int lb, ub; + + core_id = get_core_id(); + + // number of rows each core has to multiply + chunk = SIZE / num_cores; + // lower bound + lb = core_id * chunk; + // upper bound + ub = lb + chunk; + + if(core_id == 0) { + matrix_init(); + } + + if(num_cores != 1) synch_barrier(); + + // start benchmark + start(); + + // transpose array before using it + for(i = lb; i < ub; i++) { + for(j = 0; j < SIZE; j++) { + g_mB_tmp[i][j] = g_mB[j][i]; + } + } + + if(num_cores != 1) synch_barrier(); + + for(i = lb; i < ub; i++) { + for(j = 0; j < SIZE; j++) { + g_mC[i][j] = 0; + + for(k = 0; k < SIZE; k++) { + g_mC[i][j] += g_mA[i][k] * g_mB_tmp[j][k]; + } + } + } + + if(num_cores != 1) synch_barrier(); + + stop(); + + if(core_id == 0) { + result->errors = matrix_check(); + } +} + +void matrix_init() { + unsigned int i, j; + + // init, copy to TCDM + for(i = 0; i < SIZE; i++) { + for(j = 0; j < SIZE; j++) { + g_mA[i][j] = m_a[i * SIZE + j]; + g_mB[i][j] = m_b[i * SIZE + j]; + g_mC[i][j] = 0; + } + } +} + +unsigned int matrix_check() { + unsigned int errors = 0; + unsigned int i, j; + // check + for(i = 0; i < SIZE; i++) { + for(j = 0; j < SIZE; j++) { + if(g_mC[i][j] != m_exp[i * SIZE + j]) { + printf("At index %d, %d\n", i, j, 0, 0); + errors++; + } + } + } + + return errors; +} diff --git a/carfield/parMatrixMul32/parMatrixMul32_stimuli.h b/carfield/parMatrixMul32/parMatrixMul32_stimuli.h new file mode 100644 index 0000000..d5c1af0 --- /dev/null +++ b/carfield/parMatrixMul32/parMatrixMul32_stimuli.h @@ -0,0 +1,1742 @@ +const int m_a[] = { +-1344, +-778, +-350, +1240, +950, +940, +1262, +285, +738, +-37, +257, +704, +87, +-1135, +1175, +960, +984, +611, +-1170, +1243, +-729, +-1235, +-1229, +8, +52, +1156, +-804, +-129, +-112, +-307, +1045, +-954, +-944, +477, +1104, +-600, +-31, +1364, +-950, +-153, +967, +-446, +235, +-197, +763, +-660, +-1289, +116, +-458, +994, +1086, +156, +-549, +102, +-532, +943, +299, +340, +516, +1117, +515, +1335, +708, +-306, +-589, +517, +655, +-279, +-595, +-255, +-1104, +-16, +507, +199, +-297, +-905, +-1084, +982, +20, +-1364, +407, +333, +-798, +-711, +1301, +175, +490, +-165, +-1097, +1251, +1203, +-884, +419, +-1262, +-950, +-1200, +759, +-205, +-1365, +-870, +109, +-1135, +36, +796, +-1233, +-1117, +-826, +241, +588, +-513, +-353, +791, +1071, +-1073, +220, +-1094, +1096, +-723, +280, +-505, +151, +399, +319, +-1120, +-213, +-966, +679, +497, +-290, +-300, +-290, +-599, +243, +-752, +604, +1196, +-715, +-177, +-329, +1337, +596, +1027, +509, +-301, +-1211, +-936, +-281, +446, +-356, +841, +-1123, +-1343, +-140, +-1300, +-828, +-237, +1206, +1274, +-1092, +-922, +913, +1201, +-422, +782, +-230, +633, +-1055, +-1160, +329, +1255, +1038, +770, +123, +934, +670, +-492, +-24, +-779, +-1129, +47, +555, +1214, +-232, +-716, +-322, +-126, +178, +827, +710, +-1057, +-313, +996, +1149, +-532, +570, +1171, +899, +-313, +-790, +1071, +154, +-303, +492, +-918, +-1139, +292, +129, +1347, +-309, +751, +1262, +142, +-1062, +-1305, +250, +657, +238, +-141, +1308, +-37, +-514, +-591, +-611, +852, +-653, +-640, +91, +254, +-1145, +-1263, +-838, +-10, +266, +-444, +1129, +762, +-713, +-326, +-88, +1063, +-442, +-177, +365, +-740, +-1219, +1085, +783, +-725, +-1112, +426, +660, +6, +-440, +513, +687, +1078, +212, +-434, +-953, +1337, +160, +622, +-950, +-943, +288, +-136, +-1103, +-223, +1271, +211, +251, +-271, +-26, +704, +1177, +544, +699, +-885, +-864, +-1280, +877, +-461, +995, +-623, +-121, +-146, +-484, +-225, +-978, +163, +-278, +-502, +-505, +-567, +-771, +1279, +699, +-1337, +544, +1145, +1271, +640, +277, +-164, +458, +-1280, +-602, +-2, +1136, +1203, +-699, +-195, +659, +-472, +1230, +1151, +-97, +-77, +-772, +-381, +-295, +636, +-1341, +-445, +-806, +531, +-1186, +-1313, +-274, +835, +-446, +558, +-1307, +-235, +43, +-254, +-109, +911, +-1189, +559, +-854, +-218, +149, +580, +1158, +-14, +181, +-1120, +-947, +-542, +1142, +631, +-893, +-614, +-257, +-365, +-951, +1, +-762, +268, +382, +-131, +808, +-234, +839, +346, +-733, +1251, +496, +-566, +-751, +581, +-1292, +1068, +-932, +-855, +1336, +-280, +523, +1294, +-1251, +1284, +-1276, +87, +1264, +-274, +-922, +-289, +-458, +-117, +196, +-79, +-707, +1233, +-385, +-620, +-617, +703, +-995, +-374, +660, +145, +821, +1289, +582, +-201, +447, +116, +759, +-615, +834, +268, +-1114, +-1016, +-227, +-589, +-910, +-244, +-660, +764, +219, +1165, +506, +-673, +799, +-1355, +-872, +491, +689, +176, +-285, +1151, +1080, +-319, +286, +833, +217, +-621, +478, +539, +-109, +-1273, +-564, +-240, +504, +518, +256, +-124, +74, +949, +-912, +-1341, +965, +-774, +634, +1009, +1304, +200, +-1041, +-1262, +-865, +-1065, +-635, +-357, +-928, +806, +1148, +-411, +56, +686, +-644, +1241, +-430, +297, +127, +457, +-1313, +741, +861, +220, +-540, +772, +265, +1066, +679, +177, +-734, +29, +-149, +181, +-1042, +-1139, +271, +-326, +-29, +1298, +643, +-890, +-136, +-1015, +-565, +-964, +894, +-312, +698, +159, +-222, +-1322, +578, +945, +1124, +1278, +54, +-389, +1101, +362, +-543, +380, +959, +-399, +-1105, +1308, +338, +-198, +-1111, +-278, +-752, +668, +1156, +-1226, +579, +184, +-1084, +-917, +-498, +-466, +316, +-788, +-718, +468, +367, +-1333, +-1146, +828, +1329, +311, +-1346, +54, +-976, +854, +-658, +-198, +-979, +156, +385, +-659, +1326, +1351, +-1173, +-648, +720, +-40, +313, +729, +-416, +351, +452, +-413, +-4, +-1113, +-612, +-28, +-721, +400, +1072, +-1010, +}; + +const int m_b[] = { +-1316, +319, +963, +-608, +519, +-783, +-676, +181, +172, +203, +-1351, +-935, +-12, +758, +-746, +1226, +127, +-1346, +1251, +-377, +889, +-23, +-417, +-122, +680, +1363, +729, +-907, +-1263, +-431, +363, +1355, +-566, +-517, +-1186, +1318, +-1104, +-1245, +950, +687, +252, +-270, +1081, +-1290, +656, +8, +60, +1171, +915, +-500, +678, +-953, +307, +-35, +-1334, +-888, +598, +1160, +722, +850, +-268, +988, +635, +-340, +252, +1208, +420, +82, +1283, +-319, +-666, +172, +583, +174, +471, +-1063, +452, +-191, +-1188, +116, +-927, +1086, +119, +-245, +-717, +-657, +417, +319, +1133, +1338, +141, +-546, +567, +-1089, +-191, +-1138, +-201, +-1286, +-820, +-1356, +1177, +-317, +191, +67, +164, +-306, +-1015, +1147, +-482, +1229, +-259, +-207, +1309, +847, +-399, +-1005, +-995, +140, +-567, +-1220, +-427, +180, +-571, +997, +-783, +-316, +-1360, +736, +75, +-1251, +-307, +-902, +1181, +1057, +-141, +-1098, +776, +1096, +-923, +914, +1049, +-28, +-742, +-804, +-467, +567, +329, +-309, +-161, +-157, +-430, +-639, +1138, +-165, +292, +-20, +777, +-715, +60, +-1359, +35, +307, +-1092, +271, +548, +822, +-50, +-475, +-103, +784, +537, +152, +-517, +-1097, +117, +-619, +538, +941, +172, +-223, +1161, +-1004, +-1145, +-455, +255, +363, +859, +403, +-861, +-657, +-537, +-1084, +-1042, +541, +1283, +-356, +1298, +-1254, +-303, +203, +104, +1123, +-72, +-171, +-1122, +-533, +440, +275, +613, +-846, +-189, +884, +704, +-570, +-440, +-1157, +-200, +-80, +616, +799, +757, +-264, +-1256, +-690, +152, +184, +-810, +-221, +-821, +-243, +508, +-709, +574, +-693, +315, +-952, +952, +697, +875, +-480, +-691, +422, +-413, +-1199, +441, +-751, +821, +1303, +-410, +416, +566, +-131, +-551, +46, +978, +-228, +1117, +-251, +-537, +874, +-882, +260, +-213, +248, +-1296, +1343, +-626, +-812, +629, +-601, +-378, +-1314, +-889, +774, +-307, +692, +-1125, +-692, +923, +947, +1158, +-939, +1284, +35, +1299, +369, +-8, +43, +768, +524, +137, +659, +285, +-1315, +-457, +871, +-768, +1107, +-695, +488, +-527, +-161, +414, +-526, +-1164, +1059, +-1108, +560, +-622, +898, +-50, +-286, +-170, +513, +952, +433, +237, +584, +-665, +-960, +585, +-434, +1223, +-130, +1035, +430, +202, +1312, +1152, +1059, +-1082, +-1295, +805, +-18, +613, +-94, +557, +548, +1354, +116, +289, +-1358, +-1234, +1237, +451, +820, +-102, +974, +832, +-1019, +914, +-512, +-267, +1329, +-910, +-1341, +862, +-381, +-23, +-658, +40, +-71, +-782, +1240, +-956, +1241, +-291, +-884, +1250, +699, +834, +190, +960, +-1260, +177, +464, +155, +-1105, +768, +424, +621, +740, +-1357, +1186, +-594, +1329, +829, +126, +1101, +1146, +-95, +605, +-673, +1334, +440, +-10, +12, +-745, +20, +19, +-793, +999, +1083, +487, +-657, +-356, +654, +-326, +-250, +-718, +-947, +-235, +558, +974, +-981, +637, +-861, +-768, +1045, +-583, +-910, +128, +734, +896, +-1156, +223, +284, +272, +634, +-473, +363, +359, +-1185, +14, +-33, +-1122, +140, +900, +439, +-944, +-770, +663, +865, +1056, +-238, +86, +-1294, +-44, +-603, +602, +20, +397, +-423, +-703, +-209, +-906, +-1236, +945, +-737, +578, +904, +645, +1225, +-877, +-425, +-493, +-1326, +424, +965, +1300, +-1210, +823, +1345, +626, +-427, +592, +-869, +-1055, +-938, +-427, +1066, +472, +-1055, +48, +-1200, +-349, +313, +-1227, +-228, +783, +839, +187, +1021, +-1355, +1284, +68, +-1321, +-997, +1286, +-887, +772, +-156, +-105, +1329, +1141, +-377, +-881, +-341, +1316, +-391, +-1249, +-205, +53, +-266, +-540, +-289, +-1011, +602, +-1032, +-1097, +-202, +-467, +-1047, +-867, +-340, +-109, +-496, +967, +1147, +108, +384, +-12, +1216, +137, +1318, +151, +219, +-543, +391, +668, +-1348, +-1244, +-810, +-676, +321, +-1258, +1343, +1214, +791, +35, +1219, +1278, +1037, +-1282, +661, +585, +921, +-880, +-989, +-1192, +-207, +273, +-382, +690, +165, +271, +-212, +739, +-343, +-42, +226, +40, +859, +-153, +622, +-1059, +}; + +const int m_exp[] = { +-4942391, +2289133, +-1363225, +1978230, +1580032, +-625813, +-3230128, +2236653, +19494, +3242695, +-1080745, +-34154, +4086860, +-1370876, +3997221, +-1812380, +4705498, +7690207, +-4068140, +3595067, +-1103308, +-939857, +-4249710, +-8650816, +-2013119, +2933624, +235162, +-453807, +-4447391, +3527041, +2046492, +411956, +-994117, +-1411344, +1333704, +-519761, +3026373, +-564969, +3749147, +2447173, +-557628, +1138674, +-1426096, +-4033488, +-1829685, +2815607, +2382958, +1714081, +-1470484, +3379876, +3660759, +-2439960, +-1180478, +-3300785, +-5104533, +-309753, +-1667400, +3258850, +1805449, +2481948, +-944985, +-363123, +4227063, +3022289, +2763211, +5114077, +-1534394, +-2957168, +3401637, +-1195822, +-747480, +-2915318, +-2505013, +-174927, +276733, +2899369, +-6702856, +923396, +-2741169, +4270685, +-1020657, +-2562887, +2074098, +-2382784, +1366504, +691209, +4127820, +400356, +-7415505, +823772, +-3848400, +-158560, +3759990, +2298445, +323394, +873625, +474364, +2617120, +-1382444, +1735284, +-5799715, +1915577, +7016057, +-1212904, +919286, +2949768, +1228832, +572192, +4145710, +-6809520, +-2199597, +677764, +-7169579, +-4904277, +6902014, +231123, +-4797299, +3093608, +989455, +4324476, +3121268, +810907, +-2457323, +2299211, +-1625774, +-141013, +3343022, +-2044657, +4089375, +-291323, +-1950307, +2480885, +2846731, +-2139146, +-2718414, +-1997531, +-2399245, +-4060224, +423228, +-205276, +-1602384, +910872, +-3535114, +6008729, +-559984, +-301205, +-5407307, +2981269, +1079061, +6602535, +-857708, +2756391, +-5304566, +-3769267, +2620777, +-4409088, +502077, +7568647, +-37918, +2315061, +-2540065, +8296540, +-7465282, +1553910, +-4736227, +-2139045, +95614, +342546, +1309722, +1777391, +2981296, +-736899, +-2572111, +-972463, +-2793724, +-2893912, +-1230264, +-871649, +-1439985, +3074445, +3339004, +2423842, +1751086, +4064832, +1550243, +6225792, +-503750, +-2567772, +5671219, +-2054796, +-551487, +-2787790, +-3835027, +-4272806, +2725813, +-2982521, +1803437, +3024675, +-201092, +-1626608, +1548043, +2303810, +3032912, +398283, +1704371, +1860306, +-4101665, +5187913, +4233418, +2054883, +3603470, +1935132, +-17548, +-4362444, +-2806918, +-5651039, +-1853372, +-1707208, +-153048, +-2791834, +402265, +2815962, +3391662, +-4833520, +-1190520, +2302448, +80738, +2089586, +174096, +2837490, +-5514606, +2138871, +336249, +-378675, +5833977, +4367000, +-2445147, +-3652299, +-1794451, +-1471577, +-1263012, +3719274, +-3404819, +5765304, +-4256415, +3558206, +-1884441, +-475244, +3659623, +-2914867, +689238, +-2576754, +7739914, +1823902, +2077002, +-2365242, +2023481, +1663749, +-4973435, +-694558, +1118078, +2260786, +-3256285, +4596746, +-5421599, +594942, +-1730692, +-4626077, +3077882, +-2232009, +2672161, +3135747, +-4602601, +859784, +-3530668, +21600, +-4690786, +2023164, +-496745, +-2728919, +281474, +-108745, +-809613, +1445687, +-5781458, +2097169, +1594266, +-4504019, +2460482, +6259537, +-700848, +413263, +-1212884, +-5695130, +2094147, +-750529, +-1379008, +6029072, +722889, +1719449, +1682336, +-4219755, +1971162, +66575, +-1195119, +141466, +-1083536, +-718558, +-4039954, +-168429, +-2026861, +2025800, +-761083, +-4194692, +2013337, +-1156936, +3823019, +4081732, +-3145845, +-1733615, +-1371947, +-3811245, +-1584663, +-3547009, +-3267886, +8255291, +-3232160, +3404636, +3248369, +3233853, +671601, +-1009897, +1821121, +-3517645, +2005444, +-2768741, +115998, +533867, +4717709, +1315923, +-3510545, +-3539595, +-538461, +4529529, +2792584, +-107486, +-1840413, +-1474849, +1579605, +-4197602, +-34825, +-462678, +1294881, +-1730927, +-2549709, +-1531672, +-271859, +-1181904, +-1680154, +-2321723, +-6641222, +1127764, +893535, +-2804646, +5653509, +2657606, +-1751466, +-4669812, +-827592, +-126901, +-2599752, +-845148, +1390838, +8975481, +-7663778, +3572438, +5920790, +5233883, +-613590, +-881500, +-3974422, +-5523348, +-3243204, +-6405765, +-4376438, +1352634, +-105650, +2650174, +1442151, +5088231, +2974595, +-4501663, +-841006, +-3101819, +-1265401, +-2756903, +2579743, +2045040, +-5328835, +2801176, +-386694, +-3068782, +3147225, +-248211, +-662659, +-1112717, +2733193, +336344, +3107302, +2244003, +4285762, +1998904, +1888720, +-1174981, +-2567532, +-5588952, +-101948, +4004848, +-610048, +793760, +3345423, +716318, +1033698, +4011882, +-965219, +1258434, +1579522, +-4249500, +3233648, +-424838, +2640541, +1020028, +4933599, +-1964947, +3237309, +-1251962, +-437406, +-2749192, +-2943112, +-117113, +778507, +2757711, +3478291, +-661571, +1077087, +-3821174, +2731860, +3035264, +-4424379, +295413, +3873542, +-1272809, +4145370, +-363272, +2240544, +88954, +-2016552, +-862779, +-844808, +3142493, +2019692, +3648148, +3857820, +593190, +1285134, +-4257140, +-1476035, +-1951773, +-2334649, +1355368, +-4390456, +3666652, +562848, +-8226958, +1134896, +1136697, +-2132899, +3300228, +1855661, +6476864, +5097743, +-1373818, +3287769, +1709294, +-2926119, +2463141, +400199, +3051372, +1815531, +1746372, +398117, +2333959, +-708565, +-4241370, +51697, +-1626217, +26865, +2248300, +3357859, +-325912, +194201, +612298, +388227, +256018, +-5630155, +-1085451, +653494, +-1966315, +-273079, +-4296295, +-2813232, +2079672, +2378463, +-3869089, +-438799, +-725265, +3152791, +3461913, +-777750, +47521, +2588203, +1888001, +-4445421, +654349, +811737, +418334, +-1854075, +-5194402, +-1571674, +-622026, +-1091628, +1787463, +3439585, +2923276, +-1997884, +-193963, +-731696, +3686658, +-1311796, +-5219031, +-2906251, +2140229, +-1846978, +2541247, +-3677377, +-3935140, +3605308, +4807232, +-1633864, +344286, +-2051894, +2498349, +-3085, +379207, +-701595, +-1080351, +3161365, +-1606976, +1640595, +3757649, +798095, +-3167055, +-2288739, +2301831, +-3324819, +3219538, +516049, +-3153835, +7342606, +1098913, +-2522436, +376783, +47367, +530901, +-395499, +304200, +}; + +#define SIZE 24 +__attribute__ ((section(".heapsram"))) int g_mA[SIZE][SIZE]; +__attribute__ ((section(".heapsram"))) int g_mB[SIZE][SIZE]; +__attribute__ ((section(".heapsram"))) int g_mC[SIZE][SIZE]; +__attribute__ ((section(".heapsram"))) int g_mB_tmp[SIZE][SIZE]; diff --git a/carfield/parMatrixMul8/Makefile b/carfield/parMatrixMul8/Makefile new file mode 100755 index 0000000..7c755b8 --- /dev/null +++ b/carfield/parMatrixMul8/Makefile @@ -0,0 +1,8 @@ +PULP_APP = test +PULP_APP_SRCS = matrixMul.c + +PULP_CFLAGS = -O3 + +include $(PULP_SDK_HOME)/install/rules/pulp.mk + +#pulp-bench-reg --name=parMatrixMul8.cycles --module=pulp_rtl_testset --pipeline=$(PIPELINE) --artefact=pulp_rtl_testset --cmd="make run -f Makefile.sdk" --probe-regexp='matrixMul -> success, nr. of errors: 0, execution time: (\d+)' --params="platform($(platformName)),compiler($(OR1K_TOOLCHAIN_TYPE)),nbCores(4),elemSize(8)" --probe-regexp='matrixMulTranspose -> success, nr. of errors: 0, execution time: (\d+)' --params="platform($(platformName)),compiler($(OR1K_TOOLCHAIN_TYPE)),nbCores(4),elemSize(8),transposed" diff --git a/carfield/parMatrixMul8/gen_stimuli.py b/carfield/parMatrixMul8/gen_stimuli.py new file mode 100755 index 0000000..153d5c3 --- /dev/null +++ b/carfield/parMatrixMul8/gen_stimuli.py @@ -0,0 +1,54 @@ +#!/usr/bin/env python + +import sys +import random + + +def write_arr(f, name, arr): + f.write('const char %s[] = {\n' % name) + for v in arr: + f.write('%d,\n' % (v)) + f.write('};\n\n') + return + +################################################################################ +f = open('parMatrixMul8_stimuli.h', 'w') + + +SIZE = 24 +RANGE = 4 + +m_a = [] +m_b = [] +m_exp = [] + +for i in range(0,SIZE): + for j in range(0,SIZE): + a = random.randint(-RANGE, RANGE-1) + b = random.randint(-RANGE, RANGE-1) + + m_a.append(a) + m_b.append(b) + +for i in range(0,SIZE): + for j in range(0,SIZE): + r = 0 + + for k in range (0,SIZE): + r = r + m_a[i * SIZE + k] * m_b[k * SIZE + j] + + m_exp.append(r) + + +write_arr(f, 'm_a', m_a) +write_arr(f, 'm_b', m_b) +write_arr(f, 'm_exp', m_exp) + +f.write('#define SIZE %d\n' % SIZE) + + +f.write('__attribute__ ((section(".heapsram"))) char g_mA[SIZE][SIZE];\n') +f.write('__attribute__ ((section(".heapsram"))) char g_mB[SIZE][SIZE];\n') +f.write('__attribute__ ((section(".heapsram"))) char g_mC[SIZE][SIZE];\n') +f.write('__attribute__ ((section(".heapsram"))) char g_mB_tmp[SIZE][SIZE];\n') + diff --git a/carfield/parMatrixMul8/matrixMul.c b/carfield/parMatrixMul8/matrixMul.c new file mode 100644 index 0000000..357fdf0 --- /dev/null +++ b/carfield/parMatrixMul8/matrixMul.c @@ -0,0 +1,177 @@ +/* + * Copyright (C) 2018 ETH Zurich and University of Bologna + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* + * Mantainer: Luca Valente, luca.valente2@unibo.it + */ + +#include "pulp.h" + +#include "parMatrixMul8_stimuli.h" + +void check_matrix_mul(testresult_t *result, void (*start)(), void (*stop)()); +void check_matrix_mul_transpose(testresult_t *result, void (*start)(), void (*stop)()); + +testcase_t testcases[] = { + { .name = "matrixMul", .test = check_matrix_mul }, + { .name = "matrixMulTranspose", .test = check_matrix_mul_transpose }, + {0, 0} +}; + +unsigned int num_cores; + +int main() +{ + if (rt_cluster_id() != 0) + return bench_cluster_forward(0); + + num_cores = get_core_num(); + + if(rt_core_id() < num_cores) { + run_suite(testcases); + } + + synch_barrier(); + + return 0; +} + +void matrix_init(); +unsigned int matrix_check(); + +void check_matrix_mul(testresult_t *result, void (*start)(), void (*stop)()) { + int core_id; + unsigned int i, j, k; + unsigned int chunk; + unsigned int lb, ub; + + core_id = get_core_id(); + + // number of rows each core has to multiply + chunk = SIZE / num_cores; + // lower bound + lb = core_id * chunk; + // upper bound + ub = lb + chunk; + + if(core_id == 0) { + matrix_init(); + } + + if(num_cores != 1) synch_barrier(); + + // start benchmark + start(); + + for(i = lb; i < ub; i++) { + for(j = 0; j < SIZE; j++) { + g_mC[i][j] = 0; + + for(k = 0; k < SIZE; k++) { + g_mC[i][j] += g_mA[i][k] * g_mB[k][j]; + } + } + } + + if(num_cores != 1) synch_barrier(); + + stop(); + + if(core_id == 0) { + result->errors = matrix_check(); + } +} + +void check_matrix_mul_transpose(testresult_t *result, void (*start)(), void (*stop)()) { + int core_id; + unsigned int i, j, k; + unsigned int chunk; + unsigned int lb, ub; + + core_id = get_core_id(); + + // number of rows each core has to multiply + chunk = SIZE / num_cores; + // lower bound + lb = core_id * chunk; + // upper bound + ub = lb + chunk; + + if(core_id == 0) { + matrix_init(); + } + + if(num_cores != 1) synch_barrier(); + + // start benchmark + start(); + + // transpose array before using it + for(i = lb; i < ub; i++) { + for(j = 0; j < SIZE; j++) { + g_mB_tmp[i][j] = g_mB[j][i]; + } + } + + if(num_cores != 1) synch_barrier(); + + for(i = lb; i < ub; i++) { + for(j = 0; j < SIZE; j++) { + g_mC[i][j] = 0; + + for(k = 0; k < SIZE; k++) { + g_mC[i][j] += g_mA[i][k] * g_mB_tmp[j][k]; + } + } + } + + if(num_cores != 1) synch_barrier(); + + stop(); + + if(core_id == 0) { + result->errors = matrix_check(); + } +} + +void matrix_init() { + unsigned int i, j; + + // init, copy to TCDM + for(i = 0; i < SIZE; i++) { + for(j = 0; j < SIZE; j++) { + g_mA[i][j] = m_a[i * SIZE + j]; + g_mB[i][j] = m_b[i * SIZE + j]; + g_mC[i][j] = 0; + } + } +} + +unsigned int matrix_check() { + unsigned int errors = 0; + unsigned int i, j; + // check + for(i = 0; i < SIZE; i++) { + for(j = 0; j < SIZE; j++) { + if(g_mC[i][j] != m_exp[i * SIZE + j]) { + printf("At index %d, %d\n", i, j, 0, 0); + errors++; + } + } + } + + return errors; +} diff --git a/carfield/parMatrixMul8/parMatrixMul8_stimuli.h b/carfield/parMatrixMul8/parMatrixMul8_stimuli.h new file mode 100644 index 0000000..78d026c --- /dev/null +++ b/carfield/parMatrixMul8/parMatrixMul8_stimuli.h @@ -0,0 +1,1742 @@ +const char m_a[] = { +-1, +0, +0, +0, +-4, +-4, +-4, +1, +-1, +-2, +-3, +3, +2, +-4, +1, +-2, +-3, +0, +-3, +-4, +-3, +-1, +-3, +-3, +2, +-2, +2, +3, +0, +2, +0, +-1, +-3, +-2, +-1, +-3, +1, +-1, +-1, +0, +-1, +-2, +-1, +-4, +-2, +-3, +-1, +-2, +1, +1, +2, +-1, +0, +2, +1, +-3, +2, +-3, +0, +0, +0, +2, +-2, +3, +-4, +2, +-2, +-3, +-2, +-3, +3, +-3, +0, +1, +-1, +-1, +1, +-2, +-1, +-4, +-2, +-1, +-4, +-4, +-2, +-1, +-2, +-3, +-4, +-4, +1, +0, +-2, +1, +-1, +1, +2, +-3, +-4, +0, +2, +-3, +-3, +0, +0, +-2, +-3, +-1, +-2, +-1, +-4, +-1, +-4, +-3, +-3, +0, +1, +-3, +-4, +1, +2, +0, +2, +-1, +-4, +-1, +-4, +2, +2, +-1, +3, +0, +0, +-1, +1, +3, +0, +2, +0, +3, +2, +2, +2, +-3, +2, +2, +-4, +0, +-3, +-1, +-1, +-3, +-4, +3, +2, +0, +2, +1, +0, +-2, +-1, +3, +3, +0, +1, +-3, +3, +0, +-3, +2, +-3, +1, +2, +0, +3, +-1, +0, +-2, +-4, +0, +-3, +0, +3, +0, +-1, +-3, +0, +-2, +-4, +-4, +-1, +1, +2, +-4, +1, +-4, +-4, +-3, +-3, +3, +-1, +-2, +-4, +2, +1, +2, +-1, +1, +3, +0, +2, +-4, +-3, +1, +-2, +0, +1, +1, +3, +-2, +-4, +2, +-1, +-1, +1, +2, +-2, +1, +1, +2, +0, +3, +-4, +2, +-1, +-1, +-3, +-3, +-3, +-3, +2, +-3, +1, +0, +3, +-3, +3, +3, +-4, +1, +-4, +1, +2, +-3, +1, +-4, +-1, +-4, +-3, +-2, +2, +3, +0, +-4, +1, +3, +0, +3, +-1, +-4, +3, +-2, +-2, +2, +-4, +-1, +-1, +3, +-2, +-4, +-1, +-1, +2, +-1, +2, +0, +-2, +-4, +0, +2, +-4, +0, +1, +-4, +2, +0, +-1, +-1, +-3, +2, +3, +2, +-2, +1, +-4, +-3, +1, +2, +-1, +-4, +3, +-1, +2, +-2, +-3, +0, +-1, +3, +-4, +-3, +-3, +-3, +0, +0, +3, +1, +-2, +-2, +-4, +2, +2, +0, +3, +-2, +1, +3, +-1, +3, +-4, +-2, +0, +-4, +0, +-1, +-3, +-2, +-4, +-4, +-2, +-4, +-3, +-3, +0, +2, +-4, +1, +0, +-3, +0, +-4, +-4, +3, +3, +-2, +1, +3, +3, +1, +-3, +-4, +-4, +1, +1, +2, +-4, +0, +3, +-1, +3, +1, +-4, +-2, +1, +-1, +3, +3, +-1, +-1, +0, +-2, +2, +-2, +-2, +1, +3, +1, +3, +-1, +2, +-1, +0, +1, +2, +-4, +-3, +1, +-3, +-1, +-4, +-1, +-4, +-4, +-3, +-3, +3, +0, +3, +0, +-2, +3, +-3, +3, +-1, +-1, +2, +-2, +1, +-4, +0, +-3, +3, +0, +-2, +-1, +3, +2, +-2, +3, +-3, +0, +-2, +1, +0, +-1, +1, +3, +-4, +3, +0, +3, +-4, +3, +-1, +-1, +1, +3, +1, +0, +-4, +3, +-3, +-4, +-1, +2, +-3, +-4, +-2, +-3, +2, +3, +-2, +-2, +-4, +-1, +1, +-4, +-2, +2, +-3, +1, +-3, +-2, +2, +3, +-2, +0, +1, +-1, +2, +-2, +1, +-1, +-4, +-3, +-4, +-3, +-3, +-3, +-4, +3, +1, +1, +3, +-4, +0, +-4, +2, +2, +3, +2, +-4, +1, +-1, +-2, +-2, +2, +-2, +2, +-3, +2, +0, +0, +0, +-4, +-2, +-2, +2, +1, +0, +2, +3, +2, +3, +-3, +0, +-3, +-2, +2, +-1, +2, +-3, +1, +0, +1, +3, +-4, +0, +-3, +-1, +1, +-2, +-2, +0, +0, +1, +-3, +-2, +0, +3, +2, +0, +3, +-4, +2, +1, +3, +-2, +-2, +-3, +2, +2, +2, +-1, +3, +2, +-3, +}; + +const char m_b[] = { +3, +-2, +-3, +-4, +-3, +2, +-4, +-1, +-4, +-4, +-1, +-3, +3, +0, +2, +1, +2, +-2, +0, +3, +-4, +-2, +2, +-1, +1, +-4, +-4, +-1, +1, +-3, +-2, +1, +-3, +1, +-2, +2, +1, +-3, +-1, +-4, +1, +-1, +-3, +3, +0, +0, +-2, +0, +-4, +-3, +0, +-3, +0, +3, +-1, +-4, +-2, +2, +-4, +-1, +-3, +1, +-4, +-4, +0, +2, +3, +2, +0, +-3, +-1, +-1, +2, +2, +-2, +-2, +-2, +-4, +3, +-3, +2, +1, +-1, +1, +-3, +-1, +2, +-1, +1, +-1, +0, +-4, +-2, +3, +0, +-4, +-2, +3, +-3, +1, +-1, +-1, +-2, +1, +-2, +-4, +0, +0, +0, +0, +-4, +-3, +3, +-2, +3, +3, +2, +3, +-4, +1, +-2, +-3, +-3, +2, +3, +-4, +-1, +3, +0, +3, +2, +1, +-1, +-1, +-4, +-1, +3, +2, +-1, +3, +0, +3, +0, +1, +-4, +0, +3, +2, +-4, +-2, +-2, +-4, +-3, +-2, +1, +0, +-2, +1, +3, +-2, +-1, +-3, +0, +3, +0, +0, +0, +2, +3, +-4, +-4, +2, +2, +3, +1, +0, +0, +-2, +1, +-2, +-4, +-3, +0, +-2, +2, +3, +2, +3, +3, +1, +1, +1, +3, +1, +3, +2, +-3, +1, +-1, +-2, +-2, +-2, +-1, +2, +2, +0, +-3, +-1, +2, +-4, +-2, +2, +-3, +-2, +-4, +3, +-1, +3, +2, +3, +-1, +-1, +-1, +-2, +-2, +2, +2, +-1, +-3, +-1, +3, +-3, +3, +3, +2, +-3, +2, +-3, +-3, +-2, +3, +-1, +0, +-2, +-1, +-1, +2, +-1, +-2, +1, +-4, +1, +3, +2, +1, +2, +-1, +-1, +-1, +-4, +0, +3, +1, +-2, +0, +2, +-2, +-2, +3, +-1, +-1, +0, +3, +3, +-1, +0, +0, +-4, +1, +-4, +-4, +0, +2, +3, +-3, +-2, +-3, +-3, +-2, +0, +-4, +-1, +0, +-2, +1, +-1, +-4, +1, +2, +0, +-2, +0, +2, +2, +2, +3, +-3, +1, +0, +-2, +2, +3, +-1, +-2, +1, +-3, +-1, +2, +2, +1, +3, +-2, +0, +-2, +-4, +1, +1, +1, +-2, +-1, +2, +0, +1, +-1, +-3, +-1, +1, +-1, +-1, +-3, +-4, +-2, +-2, +-1, +0, +3, +3, +0, +-2, +-2, +-2, +-3, +2, +2, +1, +3, +0, +3, +0, +-1, +-1, +3, +3, +-4, +1, +1, +-2, +-4, +-4, +3, +1, +0, +-1, +-4, +-2, +2, +0, +1, +-1, +0, +-3, +-2, +-1, +1, +-3, +-2, +2, +-4, +-3, +-3, +0, +0, +-3, +-3, +2, +0, +1, +-2, +-3, +-1, +3, +-1, +3, +-3, +-4, +-4, +0, +-4, +-1, +2, +1, +0, +0, +2, +2, +3, +2, +-1, +0, +-3, +-3, +3, +0, +-4, +0, +-2, +-2, +-1, +1, +3, +3, +1, +-3, +1, +-2, +-1, +2, +0, +0, +2, +-1, +-4, +-1, +-3, +0, +2, +-4, +-1, +0, +-2, +-1, +2, +-2, +-2, +3, +3, +0, +3, +1, +0, +2, +3, +2, +-2, +-4, +-1, +3, +3, +-1, +2, +0, +-2, +2, +-4, +-3, +-3, +-3, +-3, +-3, +0, +3, +3, +3, +0, +-3, +-1, +2, +3, +-3, +-3, +-4, +-1, +3, +0, +-4, +-2, +-3, +1, +3, +3, +-2, +2, +-4, +-2, +1, +-3, +-3, +-2, +3, +-3, +0, +-4, +0, +2, +-4, +0, +1, +-1, +3, +3, +3, +1, +3, +-4, +-4, +-1, +-3, +-3, +0, +1, +-1, +-3, +-4, +2, +3, +0, +-4, +-2, +-3, +0, +3, +2, +0, +-2, +-4, +-3, +-3, +-3, +-2, +2, +-4, +-4, +2, +3, +-3, +2, +-2, +-2, +-1, +-2, +-2, +-1, +3, +-4, +-4, +3, +-3, +-3, +-1, +-1, +2, +3, +-3, +-1, +-3, +-4, +}; + +const char m_exp[] = { +27, +-26, +-19, +13, +47, +17, +-5, +14, +88, +66, +2, +14, +6, +-39, +56, +35, +-19, +61, +-13, +4, +46, +1, +70, +27, +-22, +-28, +-13, +-5, +-4, +-6, +-10, +5, +26, +14, +3, +-1, +-3, +0, +10, +43, +4, +32, +-3, +6, +36, +26, +66, +20, +-20, +-10, +21, +-17, +-5, +36, +-9, +11, +10, +17, +-32, +12, +20, +9, +-1, +15, +-42, +-21, +-51, +24, +20, +26, +10, +42, +-4, +2, +-11, +41, +22, +4, +-17, +10, +28, +-10, +2, +10, +25, +32, +18, +43, +-3, +-9, +-9, +-4, +25, +-5, +9, +24, +54, +43, +14, +59, +18, +36, +-7, +30, +50, +-30, +21, +3, +27, +7, +21, +55, +-17, +-2, +9, +17, +31, +8, +12, +29, +43, +-17, +14, +-55, +13, +50, +24, +-13, +-33, +15, +-45, +9, +36, +-9, +-6, +14, +-1, +2, +-27, +-37, +-40, +-14, +2, +-10, +6, +27, +-8, +-13, +-17, +-4, +28, +51, +-5, +-14, +2, +-23, +17, +35, +41, +-3, +-37, +-12, +-49, +-31, +7, +15, +36, +-15, +-21, +6, +2, +36, +-12, +-27, +-34, +9, +44, +8, +57, +20, +-22, +-22, +-11, +-15, +-8, +-15, +-9, +49, +37, +26, +6, +30, +-17, +-43, +-3, +-31, +36, +49, +-15, +8, +51, +-8, +17, +-51, +-16, +-21, +12, +49, +-11, +41, +36, +15, +-5, +-69, +60, +14, +-24, +-21, +23, +3, +41, +41, +-27, +0, +33, +63, +18, +1, +-36, +-20, +18, +7, +-1, +37, +-33, +30, +36, +-29, +38, +57, +-8, +-21, +-26, +15, +-10, +-4, +-17, +-19, +8, +-9, +-13, +0, +10, +-30, +59, +12, +11, +51, +60, +19, +35, +6, +3, +-5, +-19, +-10, +20, +6, +-12, +-5, +5, +11, +33, +-33, +-27, +-2, +-2, +3, +53, +-1, +-15, +-10, +13, +-5, +24, +-17, +10, +8, +-3, +41, +-9, +9, +0, +30, +7, +7, +-10, +-28, +21, +13, +4, +-3, +44, +9, +-49, +-31, +-51, +23, +16, +-13, +-12, +36, +23, +34, +-39, +8, +20, +2, +32, +73, +24, +-16, +0, +-30, +17, +52, +-10, +28, +-43, +-1, +-34, +16, +-4, +39, +31, +5, +5, +3, +36, +48, +5, +28, +12, +57, +25, +-28, +14, +34, +49, +11, +41, +20, +-12, +-18, +-43, +-29, +58, +26, +44, +36, +-100, +-46, +-24, +0, +54, +4, +-2, +21, +5, +-12, +22, +9, +-35, +-5, +-36, +-22, +-10, +-11, +-15, +34, +20, +-33, +17, +39, +-13, +-32, +-36, +-22, +-3, +-38, +-39, +-6, +0, +15, +-6, +-15, +9, +-10, +45, +16, +17, +13, +-8, +15, +11, +-4, +59, +18, +-9, +12, +69, +27, +-30, +16, +7, +30, +41, +-30, +9, +-4, +23, +-5, +8, +3, +-75, +-25, +5, +14, +12, +-21, +-21, +6, +-13, +15, +8, +-6, +30, +24, +41, +-12, +5, +39, +18, +-4, +-60, +19, +-1, +-3, +-7, +16, +-11, +-51, +2, +-10, +-17, +-32, +39, +-35, +-46, +10, +27, +1, +21, +13, +78, +-12, +-2, +-28, +-20, +11, +75, +85, +-18, +21, +-7, +-9, +33, +19, +71, +23, +25, +2, +47, +32, +8, +24, +46, +-22, +23, +18, +-58, +66, +52, +22, +32, +25, +-34, +-26, +-21, +-69, +6, +27, +-28, +-13, +-15, +10, +-20, +-16, +20, +25, +7, +22, +52, +-4, +-8, +-28, +-18, +-6, +-36, +6, +-26, +12, +32, +8, +11, +16, +0, +-18, +-33, +-10, +11, +-40, +-6, +-29, +-34, +-30, +15, +15, +-27, +9, +8, +-43, +0, +-5, +4, +12, +60, +-11, +-4, +-32, +-25, +-38, +-37, +-17, +-1, +20, +37, +43, +7, +-2, +12, +-7, +-7, +-14, +-30, +9, +50, +-18, +-9, +-1, +-9, +6, +16, +-38, +-13, +30, +}; + +#define SIZE 24 +__attribute__ ((section(".heapsram"))) char g_mA[SIZE][SIZE]; +__attribute__ ((section(".heapsram"))) char g_mB[SIZE][SIZE]; +__attribute__ ((section(".heapsram"))) char g_mC[SIZE][SIZE]; +__attribute__ ((section(".heapsram"))) char g_mB_tmp[SIZE][SIZE]; diff --git a/carfield/redmule b/carfield/redmule new file mode 120000 index 0000000..bd0da93 --- /dev/null +++ b/carfield/redmule @@ -0,0 +1 @@ +../hwpe/redmule/ \ No newline at end of file diff --git a/fpu_tests.yaml b/fpu_tests.yaml new file mode 100644 index 0000000..963d381 --- /dev/null +++ b/fpu_tests.yaml @@ -0,0 +1,11 @@ +fpu_tests: + fp32: + path: ./fpu_tests/matmul/FP32 + command: make clean all cores=8 platform=rtl fmt_A=FP32 fmt_B=FP32 fmt_OUT=FP32 thr=0.004f check=1 run + fp16: + path: ./fpu_tests/matmul/FP16 + command: make clean all cores=8 platform=rtl fmt_A=FP16 fmt_B=FP16 fmt_OUT=FP16 thr=0.004f check=1 vect=1 run + fp16alt: + path: ./fpu_tests/matmul/FP16ALT + command: make clean all cores=8 platform=rtl fmt_A=FP16ALT fmt_B=FP16ALT fmt_OUT=FP16ALT thr=0.04f check=1 vect=1 run + \ No newline at end of file diff --git a/fpu_tests/matmul/FP16/Makefile b/fpu_tests/matmul/FP16/Makefile new file mode 100644 index 0000000..f9116c0 --- /dev/null +++ b/fpu_tests/matmul/FP16/Makefile @@ -0,0 +1,82 @@ +PULP_APP = test + +PULP_APP_FC_SRCS = main.c +PULP_APP_SRCS = support_func.c matmul.c + +PULP_CFLAGS += -O3 -g3 +PULP_CFLAGS += -mno-memcpy + +ifdef cores +PULP_CFLAGS += -DNUM_CORES=${cores} #-flto -DFABRIC=1 +else +PULP_CFLAGS += -DNUM_CORES=1 +endif + + +ifdef FABRIC +PULP_CFLAGS += -DFABRIC +endif + +ifdef cores +PULP_CFLAGS += -DUSE_INTRINSICS +endif + +ifdef thr +PULP_CFLAGS += -DTHR=${thr} +endif + +PULP_CFLAGS += -fno-tree-vectorize + + +ifdef fmt +PULP_CFLAGS += -D${fmt} -DFIXED + +else +# FP FORMAT +#INPUT DATA TYPE +ifdef fmt_A +PULP_CFLAGS += -DMA${fmt_A} +else +PULP_CFLAGS += -DMAFP32 +endif + +#FILTER DATA TYPE +ifdef fmt_B +PULP_CFLAGS += -DMB${fmt_B} +else +PULP_CFLAGS += -DMBFP32 +endif + +# OUTPUT DATA TYPE + +ifdef fmt_OUT +PULP_CFLAGS += -DOUT${fmt_OUT} +else +PULP_CFLAGS += -DOUTFP32 +endif +endif + +# VECTORIAL FORMAT for half-precision FP +ifdef vec +PULP_CFLAGS += -DVECTORIAL +endif + +# CHECK RESULTS +ifdef check +PULP_CFLAGS += -DCHECK +endif + +ifdef PRINT_RESULTS +PULP_CFLAGS += -DPRINT_RESULTS +endif + +ifdef verbose +PULP_CFLAGS += -DVERBOSE +endif + +# STATISTICS +ifdef stats +PULP_CFLAGS += -DSTATS +endif + +include $(PULP_SDK_HOME)/install/rules/pulp.mk diff --git a/fpu_tests/matmul/FP16/config.h b/fpu_tests/matmul/FP16/config.h new file mode 100644 index 0000000..9505082 --- /dev/null +++ b/fpu_tests/matmul/FP16/config.h @@ -0,0 +1,96 @@ +#ifndef _CONFIG_MATMUL_ +#define _CONFIG_MATMUL_ + +#ifdef FABRIC +#define DATA_LOCATION +#else +#define DATA_LOCATION L1_DATA +#endif + +//Define INPUT data types + +#ifdef FIXED + #ifdef FP16 + typedef signed short v2s __attribute__((vector_size (4))); + typedef float16 MA_TYPE; + typedef float16 MB_TYPE; + typedef float16 OUT_TYPE; + typedef float16 MA_VTYPE __attribute__((vector_size (4))); + typedef float16 MB_VTYPE __attribute__((vector_size (4))); + typedef float16 OUT_VTYPE __attribute__((vector_size (4))); + #undef USE_INTRINSICS + #elif defined(FP16ALT) + typedef signed short v2s __attribute__((vector_size (4))); + typedef float16alt MA_TYPE; + typedef float16alt MB_TYPE; + typedef float16alt OUT_TYPE; + typedef float16alt MA_VTYPE __attribute__((vector_size (4))); + typedef float16alt MB_VTYPE __attribute__((vector_size (4))); + typedef float16alt OUT_VTYPE __attribute__((vector_size (4))); + #undef USE_INTRINSICS + #elif defined(FP32) + typedef float MA_TYPE; + typedef float MB_TYPE; + typedef float OUT_TYPE; + #endif + +#else // MIXED + #ifdef MAFP32 + typedef float MA_TYPE; + #elif MAFP16 + typedef signed short v2s __attribute__((vector_size (4))); + typedef float16 MA_TYPE; + typedef float16 MA_VTYPE __attribute__((vector_size (4))); + #undef USE_INTRINSICS + #elif MAFP16ALT + typedef signed short v2s __attribute__((vector_size (4))); + typedef float16alt MA_TYPE; + typedef float16alt MA_VTYPE __attribute__((vector_size (4))); + #undef USE_INTRINSICS + #endif + + #ifdef MBFP32 + typedef float MB_TYPE; + #elif MBFP16 + typedef signed short v2s __attribute__((vector_size (4))); + typedef float16 MB_TYPE; + typedef float16 MB_VTYPE __attribute__((vector_size (4))); + #undef USE_INTRINSICS + #elif MBFP16ALT + typedef signed short v2s __attribute__((vector_size (4))); + typedef float16alt MB_TYPE; + typedef float16alt MB_VTYPE __attribute__((vector_size (4))); + #undef USE_INTRINSICS + #endif + // Define output data types + #ifdef OUTFP32 + typedef float OUT_TYPE; + #elif OUTFP16 + typedef signed short v2s __attribute__((vector_size (4))); + typedef float16 OUT_TYPE; + typedef float16 OUT_VTYPE __attribute__((vector_size (4))); + #elif OUTFP16ALT + typedef signed short v2s __attribute__((vector_size (4))); + typedef float16alt OUT_TYPE; + typedef float16alt OUT_VTYPE __attribute__((vector_size (4))); + #endif + +#endif + +#ifndef THR + #define THR 0.004f +#endif +#ifdef VECTORIAL + #if defined(MAFP16) && defined (MBFP16ALT) || defined (MAFP16ALT) && defined (MBFP16) + #error "Vecotrization does not work for different data types...!!!" + #endif + + #if defined (MAFP32) || defined (MBFP32) || defined (OUTFP32) + + #error "Vecotrization does not work for FP32 data type...!!!" + #endif +#endif + +void matMul(MA_TYPE * __restrict__ A, MB_TYPE * __restrict__ B, OUT_TYPE * __restrict__ C, int M, int N, int P); + +#endif diff --git a/fpu_tests/matmul/FP16/data.h b/fpu_tests/matmul/FP16/data.h new file mode 100644 index 0000000..5c74f33 --- /dev/null +++ b/fpu_tests/matmul/FP16/data.h @@ -0,0 +1,7 @@ +#define M 8 +#define N 8 +#define P 8 + +PI_L2 MA_TYPE A_mat[] = {-1.4462890625, -0.329345703125, 0.3203125, -1.083984375, 0.25146484375, 0.15234375, -1.6630859375, 0.71728515625, 0.1917724609375, 0.5859375, 2.029296875, -0.1700439453125, 0.2003173828125, -0.1534423828125, 1.2353515625, 0.73681640625, 0.38427734375, -0.6748046875, 0.60791015625, -0.253662109375, 1.62890625, 1.1982421875, -0.134521484375, -0.3447265625, -1.3662109375, 0.039459228515625, 0.1907958984375, -1.96875, -0.18115234375, -0.11669921875, -0.1326904296875, 0.281494140625, 0.70556640625, -0.58837890625, -0.7724609375, 0.07135009765625, -0.1737060546875, 0.486328125, 0.018463134765625, -0.364501953125, 0.478271484375, 0.98828125, 0.6455078125, -0.2303466796875, 0.306640625, 0.22119140625, 0.364013671875, 0.0013647079467773438, -0.43408203125, -0.59375, 0.168701171875, 0.9921875, -0.04827880859375, -0.6396484375, 0.9873046875, -0.09088134765625, -0.61376953125, 1.4345703125, 0.400634765625, 0.259033203125, 0.93115234375, 1.4326171875, -1.08984375, -1.767578125, }; +PI_L2 MB_TYPE B_mat[] = {-0.345703125, 0.41845703125, -1.3466796875, -0.826171875, 1.490234375, -0.86474609375, 1.185546875, -0.12469482421875, -0.51025390625, -0.724609375, -0.057769775390625, -1.701171875, -0.92236328125, -0.422119140625, 0.21533203125, -0.0709228515625, -0.497314453125, -0.81298828125, 1.9052734375, -0.60546875, -1.1884765625, 1.6962890625, -0.306884765625, 0.1558837890625, 0.53759765625, 0.360107421875, 0.128662109375, -1.00390625, -0.8955078125, -0.16064453125, 0.73583984375, -1.662109375, 0.64404296875, 1.5068359375, 0.03680419921875, -0.92431640625, -0.62255859375, -1.263671875, -0.92529296875, 1.1123046875, -1.1728515625, 2.85546875, 1.126953125, -1.2001953125, 1.0205078125, 1.5361328125, 1.1337890625, -1.283203125, 1.568359375, -0.95703125, -0.2474365234375, -1.115234375, -0.416748046875, 1.0478515625, 1.419921875, 1.8359375, -0.41845703125, 0.007236480712890625, -1.646484375, -0.01568603515625, 1.05078125, -0.89013671875, 0.55126953125, -1.8427734375, }; +PI_L2 OUT_TYPE ref[] = {-2.998046875, 1.3935546875, 1.8505859375, 4.07421875, 0.18408203125, -0.357421875, -4.7109375, -2.236328125, 0.471923828125, -3.369140625, 1.869140625, -3.60546875, -2.53515625, 3.203125, 1.4072265625, 1.86328125, -0.650390625, 6.06640625, 2.66015625, -2.0703125, 0.6025390625, 0.97265625, -0.591796875, 1.1796875, -1.0068359375, -1.943359375, 1.37890625, 3.375, -0.19140625, 1.46484375, -3.115234375, 2.65625, -0.0216064453125, 2.482421875, -1.240234375, 0.376220703125, 2.66015625, -0.372802734375, 1.5380859375, -0.396484375, -0.607421875, -0.378662109375, 0.66748046875, -3.19140625, -0.87548828125, 0.6337890625, 0.8974609375, 1.076171875, 3.20703125, -2.375, 0.2509765625, -0.0181121826171875, -2.318359375, 0.94677734375, 0.70751953125, 1.220703125, -2.62890625, 4.99609375, 6.3671875, -3.77734375, -3.46875, 2.01953125, -2.111328125, 0.0625, }; diff --git a/fpu_tests/matmul/FP16/main.c b/fpu_tests/matmul/FP16/main.c new file mode 100644 index 0000000..7d12782 --- /dev/null +++ b/fpu_tests/matmul/FP16/main.c @@ -0,0 +1,122 @@ +// License, Version 0.51 (the "License"); you may not use this file except in +// or agreed to in writing, software, hardware and materials distributed under +// this License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR +// CONDITIONS OF ANY KIND, either express or implied. See the License for the +// specific language governing permissions and limitations under the License. + +#include "config.h" +#include "pulp.h" + +#include +#include +#include /* for CHAR_BIT */ +#include + +#include "data.h" + +#define STACK_SIZE 2048 + +void main_fn(testresult_t *result, void (*start)(), void (*stop)()); + +testcase_t testcases[] = { + { .name = "Matrix Multiplication", .test = main_fn }, + {0, 0} +}; + +DATA_LOCATION MA_TYPE matA[M*N] __attribute__ ((aligned (4))); +DATA_LOCATION MB_TYPE matB[N*P] __attribute__ ((aligned (4))); +DATA_LOCATION OUT_TYPE matC[M*P] __attribute__ ((aligned (4))); + +// End of computation +int done = 0; + +int retval = 0; + +void __attribute__ ((noinline)) matrix_init(MA_TYPE * __restrict__ A, MB_TYPE * __restrict__ B, OUT_TYPE * __restrict__ C) { + for (int i = 0; i < M; i++) + for (int j = 0; j < N; j++){ + A[i*N+j] = A_mat[i*N+j]; + + + } + + for (int i = 0; i < N; i++) + for (int j = 0; j < P; j++){ + B[i*P+j] = B_mat[i*P+j]; + } + for (int i = 0; i < M; i++) + for (int j = 0; j < P; j++) + C[i*P+j] = 0; + +} + +int __attribute ((noinline)) check_result(OUT_TYPE * __restrict__ result) { + #ifndef FABRIC + synch_barrier(); + #endif + + if(get_core_id() == 0) { + float diff; + int err = 0; + + for (int i = 0; i < (M*P); i++) { + diff = fabs(result[i] - ref[i]); + if(diff > THR) { + err++; + #ifdef VERBOSE + + printf("Error at index %d:\t refrence %f\t output %f\t error %.4f\n", i, ref[i], result[i], diff); + #endif + + } + + #ifdef PRINT_RESULTS + + printf("index %d:\t refrence %f\t output %f\t error %f\n", i, ref[i], result[i], diff); + #endif + } + + return err; + + } +} + +void main_fn(testresult_t *result, void (*start)(), void (*stop)()){ + + if (get_core_id() == 0) + matrix_init(matA, matB, matC); + + #ifndef FABRIC + synch_barrier(); + #endif + + #ifdef STATS + start(); + #endif + matMul(matA, matB, matC, M, N, P); + + #ifdef STATS + stop(); + #endif + + #ifdef CHECK + result->errors = check_result(matC); + #endif +}; + +int main() +{ + #ifdef FABRIC + main_fn(); + #else + if (rt_cluster_id() != 0) + return bench_cluster_forward(0); + + int nbErrors = run_suite(testcases); + + synch_barrier(); + #endif + retval = nbErrors; + + return retval; +} diff --git a/fpu_tests/matmul/FP16/matmul.c b/fpu_tests/matmul/FP16/matmul.c new file mode 100644 index 0000000..0a616ca --- /dev/null +++ b/fpu_tests/matmul/FP16/matmul.c @@ -0,0 +1,103 @@ +#include "config.h" +#include "pulp.h" + +#ifdef VECTORIAL + +void __attribute__ ((noinline)) matMul(MA_TYPE * __restrict__ A, MB_TYPE * __restrict__ B, OUT_TYPE * __restrict__ C, int M, int N, int P){ + + OUT_VTYPE temp; + MA_VTYPE Av; + MB_VTYPE Bv0; + MB_VTYPE Bv1; + OUT_VTYPE *Cv; + int blockSize = (M+NUM_CORES-1)/NUM_CORES; + int start = get_core_id()*blockSize; + int end = start + blockSize < M? start + blockSize : M; + + for (int i = start; i < end; i++) { + for (int j=0; j < (P & 0xfffffffe); j+=2) { + + temp = (OUT_VTYPE) {0, 0}; + + // Manual unrolling + for (int k=0; k<(N & 0xfffffffe); k+=2){ + Av = *((MA_VTYPE *) &A[i*N+k]); + Bv0 = *((MB_VTYPE *) &B[k*P+j]); + Bv1 = *((MB_VTYPE *) &B[k*P+j+P]); + temp += (OUT_VTYPE)(__builtin_shuffle(Av, (v2s){0,0})) * Bv0; + temp += (OUT_VTYPE)(__builtin_shuffle(Av, (v2s){1,1})) * Bv1; + } + + if (N & 0x00000001) + { + temp[0] += A[i*N+N-1] * B[(N-1)*P+j]; + temp[1] += A[i*N+N-1] * B[(N-1)*P+j+1]; + } + Cv = (OUT_VTYPE *) &C[i*P+j]; + + *Cv = temp; + } + } + /// Leftover in P + if (P & 0x00000001) + { + for (int i = start; i < end; i++) { + + OUT_TYPE temp1 = 0; + + // Manual unrolling + for (int k=0; k<(N & 0xfffffffe); k+=2){ + temp1 += A[i*N+k] * B[k*P+P-1]; + temp1 += A[i*N+k+1] * B[k*P+P-1+P]; + } + if (N & 0x00000001) + { + temp1 += A[i*N+N-1] * B[(N-1)*P+P-1]; + } + C[i*P+(P-1)]=temp1; + } + } + + #if NUM_CORES > 1 + synch_barrier(); + #endif +} +#else + +void __attribute__ ((noinline)) matMul(MA_TYPE * __restrict__ A, MB_TYPE * __restrict__ B, OUT_TYPE * __restrict__ C, int M, int N, int P) { + + int blockSize = (M+NUM_CORES-1)/NUM_CORES; + int start = get_core_id()*blockSize; + int end = start + blockSize < M? start + blockSize : M; + + for (int i = start; i < end; i++) { + for (int j = 0; j < P; j++) { + OUT_TYPE temp = 0; + + //Manual unrolling + for (int k = 0; k < (N & 0xfffffffe); k+=2) { + temp += (OUT_TYPE)(A[i*N+k] * B[k*P+j]); + temp += (OUT_TYPE)(A[i*N+k+1] * B[k*P+j+P]); + + } + C[i*P+j] = (OUT_TYPE)(temp); + } + } + // Leftover on N + + if (N & 0x00000001) + { + for (int i=start; i 1 + synch_barrier(); + #endif +} +#endif diff --git a/fpu_tests/matmul/FP16/support_func.c b/fpu_tests/matmul/FP16/support_func.c new file mode 100644 index 0000000..6d24d2e --- /dev/null +++ b/fpu_tests/matmul/FP16/support_func.c @@ -0,0 +1,15 @@ +#include "config.h" +#include "pulp.h" +double __extendohfdf2(float16alt value) +{ + float result; + __asm__ __volatile__ ("fcvt.s.ah %0, %1": "=f"(result): "f"(value) :); + return (double) result; +} + +double __extendhfdf2(float16 value) +{ + float result; + __asm__ __volatile__ ("fcvt.s.h %0, %1": "=f"(result): "f"(value) :); + return (double) result; +} diff --git a/fpu_tests/matmul/FP16ALT/Makefile b/fpu_tests/matmul/FP16ALT/Makefile new file mode 100644 index 0000000..f9116c0 --- /dev/null +++ b/fpu_tests/matmul/FP16ALT/Makefile @@ -0,0 +1,82 @@ +PULP_APP = test + +PULP_APP_FC_SRCS = main.c +PULP_APP_SRCS = support_func.c matmul.c + +PULP_CFLAGS += -O3 -g3 +PULP_CFLAGS += -mno-memcpy + +ifdef cores +PULP_CFLAGS += -DNUM_CORES=${cores} #-flto -DFABRIC=1 +else +PULP_CFLAGS += -DNUM_CORES=1 +endif + + +ifdef FABRIC +PULP_CFLAGS += -DFABRIC +endif + +ifdef cores +PULP_CFLAGS += -DUSE_INTRINSICS +endif + +ifdef thr +PULP_CFLAGS += -DTHR=${thr} +endif + +PULP_CFLAGS += -fno-tree-vectorize + + +ifdef fmt +PULP_CFLAGS += -D${fmt} -DFIXED + +else +# FP FORMAT +#INPUT DATA TYPE +ifdef fmt_A +PULP_CFLAGS += -DMA${fmt_A} +else +PULP_CFLAGS += -DMAFP32 +endif + +#FILTER DATA TYPE +ifdef fmt_B +PULP_CFLAGS += -DMB${fmt_B} +else +PULP_CFLAGS += -DMBFP32 +endif + +# OUTPUT DATA TYPE + +ifdef fmt_OUT +PULP_CFLAGS += -DOUT${fmt_OUT} +else +PULP_CFLAGS += -DOUTFP32 +endif +endif + +# VECTORIAL FORMAT for half-precision FP +ifdef vec +PULP_CFLAGS += -DVECTORIAL +endif + +# CHECK RESULTS +ifdef check +PULP_CFLAGS += -DCHECK +endif + +ifdef PRINT_RESULTS +PULP_CFLAGS += -DPRINT_RESULTS +endif + +ifdef verbose +PULP_CFLAGS += -DVERBOSE +endif + +# STATISTICS +ifdef stats +PULP_CFLAGS += -DSTATS +endif + +include $(PULP_SDK_HOME)/install/rules/pulp.mk diff --git a/fpu_tests/matmul/FP16ALT/config.h b/fpu_tests/matmul/FP16ALT/config.h new file mode 100644 index 0000000..9505082 --- /dev/null +++ b/fpu_tests/matmul/FP16ALT/config.h @@ -0,0 +1,96 @@ +#ifndef _CONFIG_MATMUL_ +#define _CONFIG_MATMUL_ + +#ifdef FABRIC +#define DATA_LOCATION +#else +#define DATA_LOCATION L1_DATA +#endif + +//Define INPUT data types + +#ifdef FIXED + #ifdef FP16 + typedef signed short v2s __attribute__((vector_size (4))); + typedef float16 MA_TYPE; + typedef float16 MB_TYPE; + typedef float16 OUT_TYPE; + typedef float16 MA_VTYPE __attribute__((vector_size (4))); + typedef float16 MB_VTYPE __attribute__((vector_size (4))); + typedef float16 OUT_VTYPE __attribute__((vector_size (4))); + #undef USE_INTRINSICS + #elif defined(FP16ALT) + typedef signed short v2s __attribute__((vector_size (4))); + typedef float16alt MA_TYPE; + typedef float16alt MB_TYPE; + typedef float16alt OUT_TYPE; + typedef float16alt MA_VTYPE __attribute__((vector_size (4))); + typedef float16alt MB_VTYPE __attribute__((vector_size (4))); + typedef float16alt OUT_VTYPE __attribute__((vector_size (4))); + #undef USE_INTRINSICS + #elif defined(FP32) + typedef float MA_TYPE; + typedef float MB_TYPE; + typedef float OUT_TYPE; + #endif + +#else // MIXED + #ifdef MAFP32 + typedef float MA_TYPE; + #elif MAFP16 + typedef signed short v2s __attribute__((vector_size (4))); + typedef float16 MA_TYPE; + typedef float16 MA_VTYPE __attribute__((vector_size (4))); + #undef USE_INTRINSICS + #elif MAFP16ALT + typedef signed short v2s __attribute__((vector_size (4))); + typedef float16alt MA_TYPE; + typedef float16alt MA_VTYPE __attribute__((vector_size (4))); + #undef USE_INTRINSICS + #endif + + #ifdef MBFP32 + typedef float MB_TYPE; + #elif MBFP16 + typedef signed short v2s __attribute__((vector_size (4))); + typedef float16 MB_TYPE; + typedef float16 MB_VTYPE __attribute__((vector_size (4))); + #undef USE_INTRINSICS + #elif MBFP16ALT + typedef signed short v2s __attribute__((vector_size (4))); + typedef float16alt MB_TYPE; + typedef float16alt MB_VTYPE __attribute__((vector_size (4))); + #undef USE_INTRINSICS + #endif + // Define output data types + #ifdef OUTFP32 + typedef float OUT_TYPE; + #elif OUTFP16 + typedef signed short v2s __attribute__((vector_size (4))); + typedef float16 OUT_TYPE; + typedef float16 OUT_VTYPE __attribute__((vector_size (4))); + #elif OUTFP16ALT + typedef signed short v2s __attribute__((vector_size (4))); + typedef float16alt OUT_TYPE; + typedef float16alt OUT_VTYPE __attribute__((vector_size (4))); + #endif + +#endif + +#ifndef THR + #define THR 0.004f +#endif +#ifdef VECTORIAL + #if defined(MAFP16) && defined (MBFP16ALT) || defined (MAFP16ALT) && defined (MBFP16) + #error "Vecotrization does not work for different data types...!!!" + #endif + + #if defined (MAFP32) || defined (MBFP32) || defined (OUTFP32) + + #error "Vecotrization does not work for FP32 data type...!!!" + #endif +#endif + +void matMul(MA_TYPE * __restrict__ A, MB_TYPE * __restrict__ B, OUT_TYPE * __restrict__ C, int M, int N, int P); + +#endif diff --git a/fpu_tests/matmul/FP16ALT/data.h b/fpu_tests/matmul/FP16ALT/data.h new file mode 100644 index 0000000..f01329d --- /dev/null +++ b/fpu_tests/matmul/FP16ALT/data.h @@ -0,0 +1,7 @@ +#define M 8 +#define N 8 +#define P 8 + +PI_L2 MA_TYPE A_mat[] = {-0.1435546875, -2.203125, 0.20703125, -0.00146484375, -0.10498046875, -0.255859375, 1.3515625, -0.7109375, 1.171875, 0.283203125, 0.390625, 1.7890625, 1.4921875, 0.59375, 0.5625, -2.40625, -0.76953125, 0.83203125, 0.89453125, 0.1142578125, 0.365234375, -0.55859375, 2.15625, -0.5859375, -1.1328125, -0.55859375, -0.1259765625, 1.4921875, 0.41015625, 0.11669921875, -0.78515625, -1.0859375, -0.71484375, -0.67578125, -0.76171875, 1.2109375, 1.1484375, 0.66015625, 0.6875, -0.74609375, -0.03564453125, 0.72265625, 0.0849609375, -1.234375, 0.72265625, -2.140625, -0.97265625, -2.328125, -0.9453125, 0.09912109375, -0.00640869140625, -0.59765625, -0.5078125, -0.75, 0.04248046875, -0.431640625, -0.326171875, -0.52734375, 0.5078125, -1.0078125, -0.07275390625, 0.125, 0.055419921875, -1.09375, }; +PI_L2 MB_TYPE B_mat[] = {-3.21875, 0.76953125, -0.875, -0.44921875, 1.0078125, -1.7265625, 0.369140625, 0.287109375, 0.13671875, -0.50390625, -0.486328125, 0.71484375, 0.392578125, -0.1494140625, 0.5625, 0.451171875, -0.16796875, 0.40234375, 0.3671875, 1.4921875, -0.796875, 1.1015625, 0.388671875, 0.97265625, -0.609375, 1.3046875, -0.0189208984375, -1.328125, 0.0986328125, 0.67578125, -0.09716796875, -0.1962890625, 0.671875, 0.271484375, 0.7421875, -0.8828125, -1.0625, -2.171875, 0.30859375, 1.4453125, -1.5703125, -0.57421875, 1.1015625, 0.953125, 0.396484375, 0.77734375, 0.435546875, 1.9375, -0.0255126953125, 1.8046875, 1.3203125, 0.80078125, -2.140625, 0.5625, 0.08203125, -0.6796875, -1.6328125, -0.08544921875, -1.3046875, 0.3828125, 0.3515625, 0.333984375, -0.89453125, -0.1181640625, }; +PI_L2 OUT_TYPE ref[] = {1.59375, 3.703125, 3.609375, -0.5390625, -4.3125, 1.359375, -0.61328125, -2.3125, -0.890625, 4.53125, 4.59375, -3.34375, -2.25, -3.6875, 3.5, 3.71875, 4.40625, 3.84375, 3.859375, 2.78125, -6.59375, 2.0625, 1.09375, -0.953125, 4.5625, 0.0224609375, 2.0, -3.359375, -0.201171875, 1.3125, 0.15234375, 0.4921875, 2.53125, 2.296875, 4.09375, -3.03125, -2.953125, -0.5390625, 0.30078125, 1.0703125, 8.625, -2.109375, -0.34375, -2.0625, -0.3046875, -5.34375, 1.8359375, -1.5390625, 4.9375, -1.15625, 0.203125, 0.8828125, -0.96875, 1.609375, -0.328125, -2.296875, 3.046875, -0.9921875, 2.328125, 1.671875, -1.4140625, 0.443359375, 0.890625, 0.5859375, }; diff --git a/fpu_tests/matmul/FP16ALT/main.c b/fpu_tests/matmul/FP16ALT/main.c new file mode 100644 index 0000000..7d12782 --- /dev/null +++ b/fpu_tests/matmul/FP16ALT/main.c @@ -0,0 +1,122 @@ +// License, Version 0.51 (the "License"); you may not use this file except in +// or agreed to in writing, software, hardware and materials distributed under +// this License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR +// CONDITIONS OF ANY KIND, either express or implied. See the License for the +// specific language governing permissions and limitations under the License. + +#include "config.h" +#include "pulp.h" + +#include +#include +#include /* for CHAR_BIT */ +#include + +#include "data.h" + +#define STACK_SIZE 2048 + +void main_fn(testresult_t *result, void (*start)(), void (*stop)()); + +testcase_t testcases[] = { + { .name = "Matrix Multiplication", .test = main_fn }, + {0, 0} +}; + +DATA_LOCATION MA_TYPE matA[M*N] __attribute__ ((aligned (4))); +DATA_LOCATION MB_TYPE matB[N*P] __attribute__ ((aligned (4))); +DATA_LOCATION OUT_TYPE matC[M*P] __attribute__ ((aligned (4))); + +// End of computation +int done = 0; + +int retval = 0; + +void __attribute__ ((noinline)) matrix_init(MA_TYPE * __restrict__ A, MB_TYPE * __restrict__ B, OUT_TYPE * __restrict__ C) { + for (int i = 0; i < M; i++) + for (int j = 0; j < N; j++){ + A[i*N+j] = A_mat[i*N+j]; + + + } + + for (int i = 0; i < N; i++) + for (int j = 0; j < P; j++){ + B[i*P+j] = B_mat[i*P+j]; + } + for (int i = 0; i < M; i++) + for (int j = 0; j < P; j++) + C[i*P+j] = 0; + +} + +int __attribute ((noinline)) check_result(OUT_TYPE * __restrict__ result) { + #ifndef FABRIC + synch_barrier(); + #endif + + if(get_core_id() == 0) { + float diff; + int err = 0; + + for (int i = 0; i < (M*P); i++) { + diff = fabs(result[i] - ref[i]); + if(diff > THR) { + err++; + #ifdef VERBOSE + + printf("Error at index %d:\t refrence %f\t output %f\t error %.4f\n", i, ref[i], result[i], diff); + #endif + + } + + #ifdef PRINT_RESULTS + + printf("index %d:\t refrence %f\t output %f\t error %f\n", i, ref[i], result[i], diff); + #endif + } + + return err; + + } +} + +void main_fn(testresult_t *result, void (*start)(), void (*stop)()){ + + if (get_core_id() == 0) + matrix_init(matA, matB, matC); + + #ifndef FABRIC + synch_barrier(); + #endif + + #ifdef STATS + start(); + #endif + matMul(matA, matB, matC, M, N, P); + + #ifdef STATS + stop(); + #endif + + #ifdef CHECK + result->errors = check_result(matC); + #endif +}; + +int main() +{ + #ifdef FABRIC + main_fn(); + #else + if (rt_cluster_id() != 0) + return bench_cluster_forward(0); + + int nbErrors = run_suite(testcases); + + synch_barrier(); + #endif + retval = nbErrors; + + return retval; +} diff --git a/fpu_tests/matmul/FP16ALT/matmul.c b/fpu_tests/matmul/FP16ALT/matmul.c new file mode 100644 index 0000000..0a616ca --- /dev/null +++ b/fpu_tests/matmul/FP16ALT/matmul.c @@ -0,0 +1,103 @@ +#include "config.h" +#include "pulp.h" + +#ifdef VECTORIAL + +void __attribute__ ((noinline)) matMul(MA_TYPE * __restrict__ A, MB_TYPE * __restrict__ B, OUT_TYPE * __restrict__ C, int M, int N, int P){ + + OUT_VTYPE temp; + MA_VTYPE Av; + MB_VTYPE Bv0; + MB_VTYPE Bv1; + OUT_VTYPE *Cv; + int blockSize = (M+NUM_CORES-1)/NUM_CORES; + int start = get_core_id()*blockSize; + int end = start + blockSize < M? start + blockSize : M; + + for (int i = start; i < end; i++) { + for (int j=0; j < (P & 0xfffffffe); j+=2) { + + temp = (OUT_VTYPE) {0, 0}; + + // Manual unrolling + for (int k=0; k<(N & 0xfffffffe); k+=2){ + Av = *((MA_VTYPE *) &A[i*N+k]); + Bv0 = *((MB_VTYPE *) &B[k*P+j]); + Bv1 = *((MB_VTYPE *) &B[k*P+j+P]); + temp += (OUT_VTYPE)(__builtin_shuffle(Av, (v2s){0,0})) * Bv0; + temp += (OUT_VTYPE)(__builtin_shuffle(Av, (v2s){1,1})) * Bv1; + } + + if (N & 0x00000001) + { + temp[0] += A[i*N+N-1] * B[(N-1)*P+j]; + temp[1] += A[i*N+N-1] * B[(N-1)*P+j+1]; + } + Cv = (OUT_VTYPE *) &C[i*P+j]; + + *Cv = temp; + } + } + /// Leftover in P + if (P & 0x00000001) + { + for (int i = start; i < end; i++) { + + OUT_TYPE temp1 = 0; + + // Manual unrolling + for (int k=0; k<(N & 0xfffffffe); k+=2){ + temp1 += A[i*N+k] * B[k*P+P-1]; + temp1 += A[i*N+k+1] * B[k*P+P-1+P]; + } + if (N & 0x00000001) + { + temp1 += A[i*N+N-1] * B[(N-1)*P+P-1]; + } + C[i*P+(P-1)]=temp1; + } + } + + #if NUM_CORES > 1 + synch_barrier(); + #endif +} +#else + +void __attribute__ ((noinline)) matMul(MA_TYPE * __restrict__ A, MB_TYPE * __restrict__ B, OUT_TYPE * __restrict__ C, int M, int N, int P) { + + int blockSize = (M+NUM_CORES-1)/NUM_CORES; + int start = get_core_id()*blockSize; + int end = start + blockSize < M? start + blockSize : M; + + for (int i = start; i < end; i++) { + for (int j = 0; j < P; j++) { + OUT_TYPE temp = 0; + + //Manual unrolling + for (int k = 0; k < (N & 0xfffffffe); k+=2) { + temp += (OUT_TYPE)(A[i*N+k] * B[k*P+j]); + temp += (OUT_TYPE)(A[i*N+k+1] * B[k*P+j+P]); + + } + C[i*P+j] = (OUT_TYPE)(temp); + } + } + // Leftover on N + + if (N & 0x00000001) + { + for (int i=start; i 1 + synch_barrier(); + #endif +} +#endif diff --git a/fpu_tests/matmul/FP16ALT/support_func.c b/fpu_tests/matmul/FP16ALT/support_func.c new file mode 100644 index 0000000..6d24d2e --- /dev/null +++ b/fpu_tests/matmul/FP16ALT/support_func.c @@ -0,0 +1,15 @@ +#include "config.h" +#include "pulp.h" +double __extendohfdf2(float16alt value) +{ + float result; + __asm__ __volatile__ ("fcvt.s.ah %0, %1": "=f"(result): "f"(value) :); + return (double) result; +} + +double __extendhfdf2(float16 value) +{ + float result; + __asm__ __volatile__ ("fcvt.s.h %0, %1": "=f"(result): "f"(value) :); + return (double) result; +} diff --git a/fpu_tests/matmul/FP32/Makefile b/fpu_tests/matmul/FP32/Makefile new file mode 100644 index 0000000..f9116c0 --- /dev/null +++ b/fpu_tests/matmul/FP32/Makefile @@ -0,0 +1,82 @@ +PULP_APP = test + +PULP_APP_FC_SRCS = main.c +PULP_APP_SRCS = support_func.c matmul.c + +PULP_CFLAGS += -O3 -g3 +PULP_CFLAGS += -mno-memcpy + +ifdef cores +PULP_CFLAGS += -DNUM_CORES=${cores} #-flto -DFABRIC=1 +else +PULP_CFLAGS += -DNUM_CORES=1 +endif + + +ifdef FABRIC +PULP_CFLAGS += -DFABRIC +endif + +ifdef cores +PULP_CFLAGS += -DUSE_INTRINSICS +endif + +ifdef thr +PULP_CFLAGS += -DTHR=${thr} +endif + +PULP_CFLAGS += -fno-tree-vectorize + + +ifdef fmt +PULP_CFLAGS += -D${fmt} -DFIXED + +else +# FP FORMAT +#INPUT DATA TYPE +ifdef fmt_A +PULP_CFLAGS += -DMA${fmt_A} +else +PULP_CFLAGS += -DMAFP32 +endif + +#FILTER DATA TYPE +ifdef fmt_B +PULP_CFLAGS += -DMB${fmt_B} +else +PULP_CFLAGS += -DMBFP32 +endif + +# OUTPUT DATA TYPE + +ifdef fmt_OUT +PULP_CFLAGS += -DOUT${fmt_OUT} +else +PULP_CFLAGS += -DOUTFP32 +endif +endif + +# VECTORIAL FORMAT for half-precision FP +ifdef vec +PULP_CFLAGS += -DVECTORIAL +endif + +# CHECK RESULTS +ifdef check +PULP_CFLAGS += -DCHECK +endif + +ifdef PRINT_RESULTS +PULP_CFLAGS += -DPRINT_RESULTS +endif + +ifdef verbose +PULP_CFLAGS += -DVERBOSE +endif + +# STATISTICS +ifdef stats +PULP_CFLAGS += -DSTATS +endif + +include $(PULP_SDK_HOME)/install/rules/pulp.mk diff --git a/fpu_tests/matmul/FP32/config.h b/fpu_tests/matmul/FP32/config.h new file mode 100644 index 0000000..9505082 --- /dev/null +++ b/fpu_tests/matmul/FP32/config.h @@ -0,0 +1,96 @@ +#ifndef _CONFIG_MATMUL_ +#define _CONFIG_MATMUL_ + +#ifdef FABRIC +#define DATA_LOCATION +#else +#define DATA_LOCATION L1_DATA +#endif + +//Define INPUT data types + +#ifdef FIXED + #ifdef FP16 + typedef signed short v2s __attribute__((vector_size (4))); + typedef float16 MA_TYPE; + typedef float16 MB_TYPE; + typedef float16 OUT_TYPE; + typedef float16 MA_VTYPE __attribute__((vector_size (4))); + typedef float16 MB_VTYPE __attribute__((vector_size (4))); + typedef float16 OUT_VTYPE __attribute__((vector_size (4))); + #undef USE_INTRINSICS + #elif defined(FP16ALT) + typedef signed short v2s __attribute__((vector_size (4))); + typedef float16alt MA_TYPE; + typedef float16alt MB_TYPE; + typedef float16alt OUT_TYPE; + typedef float16alt MA_VTYPE __attribute__((vector_size (4))); + typedef float16alt MB_VTYPE __attribute__((vector_size (4))); + typedef float16alt OUT_VTYPE __attribute__((vector_size (4))); + #undef USE_INTRINSICS + #elif defined(FP32) + typedef float MA_TYPE; + typedef float MB_TYPE; + typedef float OUT_TYPE; + #endif + +#else // MIXED + #ifdef MAFP32 + typedef float MA_TYPE; + #elif MAFP16 + typedef signed short v2s __attribute__((vector_size (4))); + typedef float16 MA_TYPE; + typedef float16 MA_VTYPE __attribute__((vector_size (4))); + #undef USE_INTRINSICS + #elif MAFP16ALT + typedef signed short v2s __attribute__((vector_size (4))); + typedef float16alt MA_TYPE; + typedef float16alt MA_VTYPE __attribute__((vector_size (4))); + #undef USE_INTRINSICS + #endif + + #ifdef MBFP32 + typedef float MB_TYPE; + #elif MBFP16 + typedef signed short v2s __attribute__((vector_size (4))); + typedef float16 MB_TYPE; + typedef float16 MB_VTYPE __attribute__((vector_size (4))); + #undef USE_INTRINSICS + #elif MBFP16ALT + typedef signed short v2s __attribute__((vector_size (4))); + typedef float16alt MB_TYPE; + typedef float16alt MB_VTYPE __attribute__((vector_size (4))); + #undef USE_INTRINSICS + #endif + // Define output data types + #ifdef OUTFP32 + typedef float OUT_TYPE; + #elif OUTFP16 + typedef signed short v2s __attribute__((vector_size (4))); + typedef float16 OUT_TYPE; + typedef float16 OUT_VTYPE __attribute__((vector_size (4))); + #elif OUTFP16ALT + typedef signed short v2s __attribute__((vector_size (4))); + typedef float16alt OUT_TYPE; + typedef float16alt OUT_VTYPE __attribute__((vector_size (4))); + #endif + +#endif + +#ifndef THR + #define THR 0.004f +#endif +#ifdef VECTORIAL + #if defined(MAFP16) && defined (MBFP16ALT) || defined (MAFP16ALT) && defined (MBFP16) + #error "Vecotrization does not work for different data types...!!!" + #endif + + #if defined (MAFP32) || defined (MBFP32) || defined (OUTFP32) + + #error "Vecotrization does not work for FP32 data type...!!!" + #endif +#endif + +void matMul(MA_TYPE * __restrict__ A, MB_TYPE * __restrict__ B, OUT_TYPE * __restrict__ C, int M, int N, int P); + +#endif diff --git a/fpu_tests/matmul/FP32/data.h b/fpu_tests/matmul/FP32/data.h new file mode 100644 index 0000000..18b3c69 --- /dev/null +++ b/fpu_tests/matmul/FP32/data.h @@ -0,0 +1,7 @@ +#define M 8 +#define N 8 +#define P 8 + +PI_L2 MA_TYPE A_mat[] = {-1.321346640586853, -0.14075148105621338, -1.3874461650848389, 0.28156477212905884, -0.9179959893226624, -1.2968281507492065, 0.19895713031291962, -0.1636660248041153, 0.09745144098997116, -0.4712808132171631, -1.2986916303634644, -1.3279190063476562, -0.6729908585548401, 0.21538715064525604, 0.0033319147769361734, -0.3368145227432251, -0.4880366027355194, -1.6056562662124634, -0.06749758124351501, 0.537982702255249, -1.518497109413147, -0.14922605454921722, 1.2041049003601074, 0.08387433737516403, 1.0984026193618774, -0.27249911427497864, -0.6649801731109619, -0.6570414304733276, -0.3877118229866028, -0.819801926612854, 0.21040719747543335, 2.10652232170105, -0.1445361226797104, 0.8136182427406311, -0.6583006978034973, -0.3472365438938141, -1.0367175340652466, 1.103456974029541, -0.19918836653232574, 0.05155167728662491, 1.4965381622314453, 0.9884462356567383, 1.1312751770019531, -0.5285311341285706, -0.37252330780029297, -0.5133379697799683, 0.3439998924732208, -0.6833076477050781, -1.3308806419372559, -0.0043663098476827145, 1.0170615911483765, -0.2980661988258362, -0.6847434043884277, 0.132366344332695, 1.3589580059051514, -0.03737796097993851, -0.5342410802841187, -0.7537646293640137, -1.2974865436553955, -0.5541737079620361, -0.4874458611011505, 1.8318110704421997, 0.20764854550361633, 1.5493804216384888, }; +PI_L2 MB_TYPE B_mat[] = {-0.8827683925628662, -0.5542697310447693, 0.14389587938785553, -1.975010633468628, 0.20784620940685272, 0.013685223646461964, -0.9441406726837158, 0.2295272946357727, 0.18610191345214844, -0.022595224902033806, -2.596245288848877, 0.2539166808128357, 0.181132510304451, 0.5449540615081787, -0.025274118408560753, -0.07331778109073639, -0.7438264489173889, -0.23840615153312683, 1.428622841835022, -0.34748250246047974, -1.5984361171722412, 0.20564231276512146, -1.1283481121063232, -0.9706998467445374, 1.064945936203003, 0.5016964077949524, 1.2105423212051392, -0.5837512612342834, -0.983349084854126, 1.118739128112793, -0.43573465943336487, -0.2066168338060379, 2.088926315307617, 0.21492750942707062, 0.019352668896317482, -1.092134952545166, 2.3897173404693604, 0.4519634544849396, -1.5889497995376587, -1.6419037580490112, 0.4415695369243622, -2.7164535522460938, 0.9438610076904297, -0.4197200834751129, -0.4402216672897339, -1.895782709121704, 1.4696519374847412, -0.043221864849328995, -0.6337109208106995, 0.13316427171230316, 1.1930891275405884, -1.0255396366119385, 0.17155316472053528, 0.0703289583325386, -0.42407506704330444, 0.22795960307121277, 0.6689052581787109, 1.656773567199707, -0.28926777839660645, 0.4480336606502533, -0.4898584485054016, 0.8577049374580383, -0.40668636560440063, -1.1225101947784424, }; +PI_L2 OUT_TYPE ref[] = {-0.25370487570762634, 4.288405895233154, -2.4230763912200928, 4.161197662353516, 0.1321820169687271, 1.8521130084991455, 2.2288806438446045, 2.7880353927612305, -2.160022497177124, -1.68727707862854, -1.93358314037323, 1.4045865535736084, 1.7790610790252686, -3.0093014240264893, 3.4853577613830566, 3.0664453506469727, -3.1897361278533936, 0.9710832238197327, 5.895380020141602, 0.7893388867378235, -4.211012363433838, -0.540488064289093, 1.99186372756958, 2.640082359313965, -1.1216058731079102, 4.887918949127197, -2.019449234008789, -0.1283983588218689, 0.3265409469604492, 2.1952335834503174, -1.5282257795333862, -0.5912652015686035, -1.118781328201294, -3.1169605255126953, -2.7250733375549316, 1.8199642896652222, -1.511614203453064, -2.6127007007598877, 4.342489242553711, 2.1691524982452393, -4.221386909484863, -1.1585693359375, -1.2581945657730103, -2.8258895874023438, -1.068955421447754, 0.44341498613357544, -2.514594793319702, 0.7613731622695923, -2.158013105392456, -0.041946373879909515, 2.655857563018799, 1.7298434972763062, -3.0531845092773438, -0.6418022513389587, 0.9603833556175232, 0.23947691917419434, 1.4017069339752197, -2.1417248249053955, 0.8747122287750244, 1.8828234672546387, -0.3232908248901367, -3.6543807983398438, 4.977419853210449, 0.33591794967651367, }; diff --git a/fpu_tests/matmul/FP32/main.c b/fpu_tests/matmul/FP32/main.c new file mode 100644 index 0000000..7d12782 --- /dev/null +++ b/fpu_tests/matmul/FP32/main.c @@ -0,0 +1,122 @@ +// License, Version 0.51 (the "License"); you may not use this file except in +// or agreed to in writing, software, hardware and materials distributed under +// this License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR +// CONDITIONS OF ANY KIND, either express or implied. See the License for the +// specific language governing permissions and limitations under the License. + +#include "config.h" +#include "pulp.h" + +#include +#include +#include /* for CHAR_BIT */ +#include + +#include "data.h" + +#define STACK_SIZE 2048 + +void main_fn(testresult_t *result, void (*start)(), void (*stop)()); + +testcase_t testcases[] = { + { .name = "Matrix Multiplication", .test = main_fn }, + {0, 0} +}; + +DATA_LOCATION MA_TYPE matA[M*N] __attribute__ ((aligned (4))); +DATA_LOCATION MB_TYPE matB[N*P] __attribute__ ((aligned (4))); +DATA_LOCATION OUT_TYPE matC[M*P] __attribute__ ((aligned (4))); + +// End of computation +int done = 0; + +int retval = 0; + +void __attribute__ ((noinline)) matrix_init(MA_TYPE * __restrict__ A, MB_TYPE * __restrict__ B, OUT_TYPE * __restrict__ C) { + for (int i = 0; i < M; i++) + for (int j = 0; j < N; j++){ + A[i*N+j] = A_mat[i*N+j]; + + + } + + for (int i = 0; i < N; i++) + for (int j = 0; j < P; j++){ + B[i*P+j] = B_mat[i*P+j]; + } + for (int i = 0; i < M; i++) + for (int j = 0; j < P; j++) + C[i*P+j] = 0; + +} + +int __attribute ((noinline)) check_result(OUT_TYPE * __restrict__ result) { + #ifndef FABRIC + synch_barrier(); + #endif + + if(get_core_id() == 0) { + float diff; + int err = 0; + + for (int i = 0; i < (M*P); i++) { + diff = fabs(result[i] - ref[i]); + if(diff > THR) { + err++; + #ifdef VERBOSE + + printf("Error at index %d:\t refrence %f\t output %f\t error %.4f\n", i, ref[i], result[i], diff); + #endif + + } + + #ifdef PRINT_RESULTS + + printf("index %d:\t refrence %f\t output %f\t error %f\n", i, ref[i], result[i], diff); + #endif + } + + return err; + + } +} + +void main_fn(testresult_t *result, void (*start)(), void (*stop)()){ + + if (get_core_id() == 0) + matrix_init(matA, matB, matC); + + #ifndef FABRIC + synch_barrier(); + #endif + + #ifdef STATS + start(); + #endif + matMul(matA, matB, matC, M, N, P); + + #ifdef STATS + stop(); + #endif + + #ifdef CHECK + result->errors = check_result(matC); + #endif +}; + +int main() +{ + #ifdef FABRIC + main_fn(); + #else + if (rt_cluster_id() != 0) + return bench_cluster_forward(0); + + int nbErrors = run_suite(testcases); + + synch_barrier(); + #endif + retval = nbErrors; + + return retval; +} diff --git a/fpu_tests/matmul/FP32/matmul.c b/fpu_tests/matmul/FP32/matmul.c new file mode 100644 index 0000000..0a616ca --- /dev/null +++ b/fpu_tests/matmul/FP32/matmul.c @@ -0,0 +1,103 @@ +#include "config.h" +#include "pulp.h" + +#ifdef VECTORIAL + +void __attribute__ ((noinline)) matMul(MA_TYPE * __restrict__ A, MB_TYPE * __restrict__ B, OUT_TYPE * __restrict__ C, int M, int N, int P){ + + OUT_VTYPE temp; + MA_VTYPE Av; + MB_VTYPE Bv0; + MB_VTYPE Bv1; + OUT_VTYPE *Cv; + int blockSize = (M+NUM_CORES-1)/NUM_CORES; + int start = get_core_id()*blockSize; + int end = start + blockSize < M? start + blockSize : M; + + for (int i = start; i < end; i++) { + for (int j=0; j < (P & 0xfffffffe); j+=2) { + + temp = (OUT_VTYPE) {0, 0}; + + // Manual unrolling + for (int k=0; k<(N & 0xfffffffe); k+=2){ + Av = *((MA_VTYPE *) &A[i*N+k]); + Bv0 = *((MB_VTYPE *) &B[k*P+j]); + Bv1 = *((MB_VTYPE *) &B[k*P+j+P]); + temp += (OUT_VTYPE)(__builtin_shuffle(Av, (v2s){0,0})) * Bv0; + temp += (OUT_VTYPE)(__builtin_shuffle(Av, (v2s){1,1})) * Bv1; + } + + if (N & 0x00000001) + { + temp[0] += A[i*N+N-1] * B[(N-1)*P+j]; + temp[1] += A[i*N+N-1] * B[(N-1)*P+j+1]; + } + Cv = (OUT_VTYPE *) &C[i*P+j]; + + *Cv = temp; + } + } + /// Leftover in P + if (P & 0x00000001) + { + for (int i = start; i < end; i++) { + + OUT_TYPE temp1 = 0; + + // Manual unrolling + for (int k=0; k<(N & 0xfffffffe); k+=2){ + temp1 += A[i*N+k] * B[k*P+P-1]; + temp1 += A[i*N+k+1] * B[k*P+P-1+P]; + } + if (N & 0x00000001) + { + temp1 += A[i*N+N-1] * B[(N-1)*P+P-1]; + } + C[i*P+(P-1)]=temp1; + } + } + + #if NUM_CORES > 1 + synch_barrier(); + #endif +} +#else + +void __attribute__ ((noinline)) matMul(MA_TYPE * __restrict__ A, MB_TYPE * __restrict__ B, OUT_TYPE * __restrict__ C, int M, int N, int P) { + + int blockSize = (M+NUM_CORES-1)/NUM_CORES; + int start = get_core_id()*blockSize; + int end = start + blockSize < M? start + blockSize : M; + + for (int i = start; i < end; i++) { + for (int j = 0; j < P; j++) { + OUT_TYPE temp = 0; + + //Manual unrolling + for (int k = 0; k < (N & 0xfffffffe); k+=2) { + temp += (OUT_TYPE)(A[i*N+k] * B[k*P+j]); + temp += (OUT_TYPE)(A[i*N+k+1] * B[k*P+j+P]); + + } + C[i*P+j] = (OUT_TYPE)(temp); + } + } + // Leftover on N + + if (N & 0x00000001) + { + for (int i=start; i 1 + synch_barrier(); + #endif +} +#endif diff --git a/fpu_tests/matmul/FP32/support_func.c b/fpu_tests/matmul/FP32/support_func.c new file mode 100644 index 0000000..6d24d2e --- /dev/null +++ b/fpu_tests/matmul/FP32/support_func.c @@ -0,0 +1,15 @@ +#include "config.h" +#include "pulp.h" +double __extendohfdf2(float16alt value) +{ + float result; + __asm__ __volatile__ ("fcvt.s.ah %0, %1": "=f"(result): "f"(value) :); + return (double) result; +} + +double __extendhfdf2(float16 value) +{ + float result; + __asm__ __volatile__ ("fcvt.s.h %0, %1": "=f"(result): "f"(value) :); + return (double) result; +} diff --git a/fpu_tests/matmul/README.md b/fpu_tests/matmul/README.md new file mode 100644 index 0000000..538deba --- /dev/null +++ b/fpu_tests/matmul/README.md @@ -0,0 +1,38 @@ +# MatMul test +This test performs a matrix multiplication on FP32/FP16/FP16ALT data and can also be used to measure performances. +In this folder you can find pre-generated golden models. + +## Running a test +After the platform and the SDK setup you can run the test: + +~~~~~shell +make clean all [platform=rtl] run +~~~~~ + +If you want to run this test on RTL, remember to specify the platform which is gvsoc by default. +There are several flags useful to activate some functionalities: + +- `cores=N_CORES` set the number of cores used for the execution to `N_CORES`, by default `cores=1`. There is also the ability to run on the Fabric controller by using `FABRIC=1` instead of `cores=N_CORE`. +- `fmt=FP_FMT` specifies the floating-point format for data, by deafult it is set to `FP32` but you can also choose `FP16` or `FP16ALT` formats. **For this application you can use mixed-precision in the C code by using `fmt_A=FP_A fmt_B=FP_B fmt_OUT=FP_OUT` instead of `fmt`.** +- `vec=1` activates vectorial format **only for half-precision floating point (FP16 and FP16ALT)** +- `check=1` activates the result check +- `verbose=1` prints the wrong results +- `stats=1` activates performance measurement +- `PRINT_RESULTS=1` print outputs of C code + + +## Generating the golden model +If you want to re-generate a golden model, you can use the [data_generator.py](./data_generator.py) script with the following command: + +~~~~~shell +./data_generator.py --M=m --N=n --P=p --float_type=fmt --MAC_flag=MAC_FLAG +~~~~~ +- specifies the floating-point format for data, by deafult it is set to `FP32` but you can also choose `FP16` and `FP16ALT` formats. **Also, you can run the mixed-precision golden model by using `--float_type=FP_A,FP_B,FP_OUT`.** +- `MAC_flag` is used to emulate the multiply-and-add operator available on most DSP instruction sets for embedded devices. It can be true or false. To emulate `FP16` and `FP16ALT` behavior on PULP, true this flag. + +The script will generate three floating-point matrices fo format `fmt` (FP32/FP16/FP16ALT): +- A_mat[m,n] input matrix +- B_mat[n,p] input matrix +- ref[m,p] output matrix + +The generated header file will be written in the [references](./references) folder. diff --git a/fpu_tests/matmul/data_generator.py b/fpu_tests/matmul/data_generator.py new file mode 100755 index 0000000..26905a2 --- /dev/null +++ b/fpu_tests/matmul/data_generator.py @@ -0,0 +1,206 @@ +#!/bin/python3 + +import os +import argparse +import sys + +import torch +from torch import nn + + +def relative_absolute_error(true, pred): + true_mean = torch.mean(true) + squared_error_num = torch.sum(torch.abs(true - pred)) + squared_error_den = torch.sum(torch.abs(true - true_mean)) + rae_loss = squared_error_num / squared_error_den + return rae_loss + + +def mean_squared_error(true, pred): + squared_error = torch.square(true - pred) + sum_squared_error = torch.sum(squared_error) + size = true.size(dim=0) * true.size(dim=1) + mse_loss = sum_squared_error / size + return mse_loss + + +def matrix_init(IN, dt): + temp = torch.zeros((IN.shape[0], IN.shape[1]), dtype=dt) + # iterate through rows of IN + for i in range(IN.shape[0]): + # iterate through columns of IN + for j in range(IN.shape[1]): + temp[i][j] = IN[i][j] + return temp + + +def error_metric(ref, res): + + # calculate manually because metrics doesn't supprt bfloat16 + d = ref - res + mse_f = torch.mean(d**2) + mae_f = torch.mean(abs(d)) + rmse_f = torch.sqrt(mse_f) + r2_f = 1-(torch.sum(d**2)/torch.sum((ref-torch.mean(ref))**2)) + print("Results of metrics:") + print("MAE:",mae_f.item()) + print("MSE:", mse_f.item()) + print("RMSE:", rmse_f.item()) + print("R-Squared:", r2_f.item()) + rae = relative_absolute_error(ref, res) + print("RAE is", rae.item()) + + +def matrix_mult(Xs, Ys, dt, mac_flag, cast_flag, cast_to): + Rs = torch.zeros((Xs.shape[0], Ys.shape[1]), dtype=dt) + # iterate through rows of X + for i in range(Xs.shape[0]): + # iterate through columns of Y + for j in range(Ys.shape[1]): + temp = torch.tensor([0], dtype=dt) + # iterate through rows of Y + for k in range(Ys.shape[0]): + a = Xs[i][k] + b = Ys[k][j] + if cast_flag == "true": + if cast_to == "FP16": + a = a.type(torch.float16) + b = b.type(torch.float16) + elif cast_to == "FP16ALT": + a = a.type(torch.bfloat16) + b = b.type(torch.bfloat16) + if mac_flag == "true": + a = a.type(torch.float32) + b = b.type(torch.float32) + temp = temp.type(torch.float32) + temp += a * b + if mac_flag == "true": + temp = temp.type(dt) + + Rs[i][j] = temp + return Rs + + +def write_matrix(matrix_to_write, name, file_pointer, float_type): + matrix_string = '' + sz0 = matrix_to_write.size()[0] + sz1 = matrix_to_write.size()[1] + if 'ref' in name: + file_pointer.write("PI_L2 OUT_TYPE %s[] = {" % name) + elif 'A_mat' in name: + file_pointer.write("PI_L2 MA_TYPE %s[] = {" % name) + else: + file_pointer.write("PI_L2 MB_TYPE %s[] = {" % name) + if float_type == torch.float32: + name = ")" + elif float_type == torch.float16: + name = ", dtype=torch.float16)" + elif float_type == torch.bfloat16: + name = ", dtype=torch.bfloat16)" + for i in range(sz0): + for j in range(sz1): + matrix_string += str(matrix_to_write[i][j].item()).replace('tensor(', '').replace(name, '') + matrix_string += ', ' + file_pointer.write("%s" % matrix_string) + file_pointer.write("};\n") + + +def get_inital_config(): + # get arguments and data format + parser = argparse.ArgumentParser() + parser.add_argument('--M') + parser.add_argument('--N') + parser.add_argument('--P') + + parser.add_argument('--MAC_flag', default="true") + parser.add_argument('--float_type', default='FP32') + args = parser.parse_args() + + M = int(args.M) + N = int(args.N) + P = int(args.P) + mac_flag = str(args.MAC_flag) + bits = args.float_type.split(",") + return M, N, P, bits, mac_flag + + +def select_dtypes(user_dtypes, num_param): + types_dict = { + "FP32": torch.float32, + "FP16": torch.float16, + "FP16ALT": torch.bfloat16 + } + dtypes = [] + if len(user_dtypes) == 1: + for i in range(num_param): + dtypes.append(types_dict[user_dtypes[0]]) + elif len(user_dtypes) == num_param: + for i in range(num_param): + dtypes.append(types_dict[user_dtypes[i]]) + else: + for i in range(len(user_dtypes)): + dtypes.append(types_dict[user_dtypes[i]]) + if 'FP32' in user_dtypes: + for i in range(len(user_dtypes), num_param): + dtypes.append(types_dict["FP32"]) + elif 'FP16' in user_dtypes: + for i in range(len(user_dtypes), num_param): + dtypes.append(types_dict["FP16"]) + else: + for i in range(len(user_dtypes), num_param): + dtypes.append(types_dict["FP16ALT"]) + return dtypes + +def check_cast(datatypes): + result = len(set(datatypes)) == 1 + if result : #All Elements in List are Equal + return "false" + else: #All Elements in List are Not Equal + if torch.float32 in datatypes: + return "false" + else: + return "true" + +def save_data_into_hfile(M, N, P, A_mat, B_mat, res): + # Generate header file + f = open('data.h', 'w') + f.write('\ +#define M %s\n\ +#define N %s\n\ +#define P %s\n\n' % (M, N, P)) + write_matrix(A_mat, 'A_mat', f, A_mat.dtype) + write_matrix(B_mat, 'B_mat', f, B_mat.dtype) + write_matrix(res, 'ref', f, res.dtype) + + f.close() + + +def main(): + M, N, P, bits, mac_flag = get_inital_config() + + # Create reference matrices + A_ref = torch.randn((M, N), dtype=torch.float32) + B_ref = torch.randn((N, P), dtype=torch.float32) + + # calculate reference output + ref = matrix_mult(Xs=A_ref, Ys=B_ref, dt=torch.float32, mac_flag=mac_flag, cast_flag="false",cast_to="false") + + # set the data types based on the parser input + datatypes = select_dtypes(bits, 3) + + cast_flag = check_cast(datatypes[0:2]) + cast_to = "FP16ALT" + A_mat = matrix_init(A_ref, dt=datatypes[0]) + B_mat = matrix_init(B_ref, dt=datatypes[1]) + + res = matrix_mult(Xs=A_mat, Ys=B_mat, dt=datatypes[2], mac_flag=mac_flag, cast_flag=cast_flag, cast_to = cast_to) + + error_metric(ref, res) + save_data_into_hfile(M, N, P, A_mat, B_mat, res) + print("############################## Done! ###################################") + return None + + +if __name__ == "__main__": + main() + pass diff --git a/hwpe/neureka/Makefile b/hwpe/neureka/Makefile new file mode 100644 index 0000000..22ba1d0 --- /dev/null +++ b/hwpe/neureka/Makefile @@ -0,0 +1,49 @@ +ACCELERATOR ?= neureka + +LIBDIR := $(abspath ./pulp-nnx) +ACC_DIR := $(LIBDIR)/$(ACCELERATOR) + +## Test +INC_DIRS += inc +PULP_APP_SRCS += $(wildcard src/*.c) +SRC_DIRS += src + +## Library +INC_DIRS += $(LIBDIR)/inc $(LIBDIR)/util +PULP_APP_SRCS += $(LIBDIR)/src/pulp_nnx_$(ACCELERATOR).c $(wildcard $(LIBDIR)/util/*.c) +SRC_DIRS += $(LIBDIR)/src $(LIBDIR)/util + +## Accelerator +INC_DIRS += $(ACC_DIR)/hal $(ACC_DIR)/bsp $(ACC_DIR)/bsp/pulp_cluster +PULP_APP_SRCS += $(wildcard $(ACC_DIR)/hal/*.c) $(wildcard $(ACC_DIR)/bsp/pulp_cluster/*.c) +SRC_DIRS += $(ACC_DIR)/hal $(ACC_DIR)/bsp/pulp_cluster + +## Generated +INC_DIRS += gen/inc +SRC_DIRS += gen/src + +INC_FLAGS += $(addprefix -I,$(INC_DIRS)) + +# Flags +ACCELERATOR_UPPERCASE := $(shell echo $(ACCELERATOR) | tr [:lower:] [:upper:]) +PULP_CFLAGS += -DNNX_ACCELERATOR=\"$(ACCELERATOR)\" -DNNX_$(ACCELERATOR_UPPERCASE) -DNNX_NEUREKA_PULP_CLUSTER -DNNX_NEUREKA_PE_H=4 -DNNX_NEUREKA_PE_W=4 +PULP_CFLAGS += $(INC_FLAGS) -O3 + +PULP_APP = test + +ifeq ($(no_ecc),1) + PULP_CFLAGS += -DNO_ECC +endif + +ifeq ($(fault_inject),1) + export FAULT_INJECTION=1 + export FAULT_INJECTION_SCRIPT=$(CURDIR)/pulp_inject_fault.tcl +endif + +ifeq ($(multi_bit_upset),1) + export MULTI_BIT_UPSET=1 +else + export MULTI_BIT_UPSET=0 +endif + +include $(PULP_SDK_HOME)/install/rules/pulp_rt.mk diff --git a/hwpe/neureka/gen/inc/bias.h b/hwpe/neureka/gen/inc/bias.h new file mode 100644 index 0000000..30d072b --- /dev/null +++ b/hwpe/neureka/gen/inc/bias.h @@ -0,0 +1,14 @@ +#ifndef __BIAS_H__ +#define __BIAS_H__ + +#include + +#define BIAS_SIZE (32) +PI_L1 int32_t bias[BIAS_SIZE] = { + -0x65c83656, 0x79b5657f, -0x57f742d4, 0x48370263, -0x322008d7, -0x40c1a507, -0x6cb54499, -0x76a3f065, -0x13494905, -0x17d3f6d0, + -0x64732a81, 0x60b4468a, 0x1176b544, -0x1168daef, -0x40e1a4fd, -0x3746219b, 0x18afd65e, 0x6f6ff1d7, -0x61e9d6e3, 0x45b33266, + 0x79d3867b, 0x1c699c9e, 0x6ebc54cb, -0x7f508e3e, -0x1bb33223, 0x6e771d3c, -0x42009579, 0x2c809ab3, -0x3fe5e70c, -0x468955b7, + -0x4405229, -0x79a9c840 +}; + +#endif // __BIAS_H__ diff --git a/hwpe/neureka/gen/inc/input.h b/hwpe/neureka/gen/inc/input.h new file mode 100644 index 0000000..2c7c3e5 --- /dev/null +++ b/hwpe/neureka/gen/inc/input.h @@ -0,0 +1,65 @@ +#ifndef __INPUT_H__ +#define __INPUT_H__ + +#include + +#define INPUT_SIZE (512) + +PI_L1 uint8_t input[INPUT_SIZE] = { + 0xc2, 0x9c, 0xad, 0x2f, 0x37, 0xd4, 0x88, 0x59, 0x67, 0xd8, + 0x73, 0x01, 0x9c, 0x5f, 0xc4, 0x64, 0xd9, 0x74, 0xa9, 0xe7, + 0x18, 0x9a, 0x6e, 0xd7, 0x77, 0xc2, 0x71, 0xa6, 0xdc, 0x3f, + 0xab, 0x2b, 0x36, 0x6c, 0x87, 0x3d, 0x9b, 0x68, 0x64, 0x62, + 0xc4, 0x13, 0x65, 0x5c, 0x3c, 0xcf, 0xd0, 0x0a, 0x12, 0xc1, + 0x18, 0xb4, 0x82, 0x15, 0x77, 0x44, 0x92, 0xb6, 0x6d, 0x09, + 0xc7, 0x0a, 0x41, 0xc1, 0xe9, 0xfe, 0x82, 0x73, 0x1c, 0x1d, + 0xd4, 0xb8, 0x49, 0x81, 0x3e, 0x3a, 0xa7, 0x32, 0x41, 0x19, + 0xcb, 0x37, 0xc8, 0x56, 0x72, 0x34, 0x91, 0x11, 0xa4, 0x99, + 0x9d, 0xc5, 0x7a, 0x50, 0x22, 0x65, 0x87, 0xc6, 0xe1, 0x95, + 0xe8, 0x3a, 0x61, 0xdb, 0x01, 0xb3, 0x56, 0x46, 0xa9, 0xdd, + 0x21, 0xb2, 0xb9, 0xbf, 0x93, 0x3f, 0x33, 0x87, 0x86, 0x65, + 0x20, 0xef, 0xdf, 0xd3, 0xdc, 0xb6, 0xe8, 0x5e, 0xdf, 0xdd, + 0x43, 0xad, 0xbc, 0x81, 0x6e, 0x8b, 0x61, 0x28, 0xef, 0xc6, + 0x5c, 0x7f, 0x01, 0x5a, 0x66, 0x52, 0x5a, 0x14, 0x0f, 0x32, + 0x12, 0x07, 0xb9, 0x98, 0xc8, 0x81, 0x2b, 0x67, 0x07, 0x7f, + 0xcc, 0x2c, 0x68, 0x1f, 0xd9, 0xda, 0xc9, 0x5a, 0x49, 0x8b, + 0x24, 0x03, 0x16, 0xa8, 0x5b, 0xc8, 0x4b, 0x77, 0xfd, 0x50, + 0x0a, 0x3d, 0x7d, 0x1e, 0x99, 0xe4, 0x5b, 0x3b, 0xb2, 0x89, + 0xf5, 0x12, 0x43, 0xec, 0x65, 0x1a, 0x4d, 0x13, 0x3d, 0x61, + 0x95, 0x48, 0x24, 0xf9, 0x0c, 0xed, 0xba, 0xad, 0x0d, 0x93, + 0xed, 0x35, 0x51, 0x30, 0x48, 0x11, 0x04, 0x5b, 0xcd, 0xa7, + 0xc1, 0x1d, 0x5c, 0xd3, 0xa3, 0xd1, 0x67, 0xb9, 0x14, 0xdf, + 0x96, 0x54, 0x5b, 0x07, 0x27, 0x39, 0xef, 0x81, 0x75, 0x0b, + 0x2a, 0x5b, 0x78, 0x3d, 0x19, 0x5e, 0x20, 0x69, 0x38, 0xc8, + 0x68, 0x4a, 0x2d, 0x39, 0xb5, 0x93, 0x8e, 0xb3, 0x8f, 0x17, + 0xc3, 0xb8, 0x59, 0x2d, 0x9b, 0x2a, 0x4c, 0x93, 0x13, 0xe9, + 0x25, 0x52, 0xf4, 0x6d, 0x9e, 0x84, 0x9c, 0x47, 0x29, 0xdc, + 0xa5, 0x0d, 0x27, 0xf1, 0x74, 0x51, 0x0b, 0x1e, 0xf3, 0xce, + 0x7b, 0xc4, 0x19, 0x71, 0x2d, 0x58, 0x3b, 0x1f, 0x46, 0xd7, + 0xe9, 0x4e, 0xe8, 0x2a, 0x7f, 0x30, 0x06, 0xbb, 0x0a, 0x33, + 0x5e, 0xce, 0x69, 0x46, 0x08, 0x44, 0xca, 0xb2, 0x55, 0xab, + 0x65, 0x6d, 0xe2, 0xce, 0xe4, 0xbe, 0x99, 0x76, 0x3c, 0xd1, + 0x96, 0x71, 0xa5, 0x24, 0x48, 0x69, 0xee, 0xe9, 0x10, 0xf5, + 0x69, 0xbe, 0x66, 0x5e, 0x87, 0x23, 0x2f, 0xe1, 0xdc, 0x05, + 0x28, 0x2b, 0x92, 0x3b, 0x04, 0x2f, 0x56, 0xb2, 0x38, 0x70, + 0x5e, 0x6d, 0xca, 0x08, 0x5b, 0x23, 0x30, 0xf0, 0x34, 0xd1, + 0xc7, 0x7a, 0x56, 0xb8, 0x5a, 0x57, 0x01, 0xe4, 0xc8, 0x80, + 0x7a, 0x2e, 0xed, 0xee, 0x51, 0xf9, 0x10, 0x8b, 0x54, 0x61, + 0x20, 0x3a, 0x90, 0x0b, 0xaa, 0x65, 0x81, 0xc6, 0x99, 0x40, + 0x23, 0xc2, 0x24, 0xf2, 0x61, 0x8c, 0x42, 0x06, 0xb4, 0xa3, + 0x0f, 0xed, 0x6b, 0xd5, 0x2d, 0xb5, 0x09, 0x96, 0xe3, 0x5b, + 0x2e, 0x3a, 0x62, 0xd7, 0x7f, 0x29, 0x03, 0x8a, 0x26, 0x71, + 0x10, 0xae, 0x28, 0x3b, 0x1a, 0xf3, 0x9d, 0xf6, 0x37, 0x23, + 0x84, 0x3c, 0x1f, 0x13, 0xdf, 0x74, 0x63, 0xa2, 0xb2, 0x88, + 0xee, 0xf3, 0x6a, 0xcd, 0x8c, 0xa9, 0x5a, 0xf5, 0xc9, 0xc8, + 0x53, 0xc8, 0xd4, 0x58, 0x44, 0x27, 0x0e, 0x3d, 0xb0, 0x72, + 0xd2, 0x3d, 0x31, 0xf3, 0x76, 0xf2, 0x83, 0x03, 0xfc, 0xd1, + 0x29, 0xc0, 0x19, 0x81, 0xb9, 0x65, 0x8b, 0xf4, 0xe1, 0x8f, + 0xf3, 0x80, 0xc2, 0xe1, 0xb2, 0xd0, 0x27, 0x9a, 0x0d, 0xd7, + 0xf5, 0x46, 0x6d, 0x37, 0xdf, 0x16, 0xe5, 0x40, 0x63, 0xac, + 0xdd, 0xe2 +}; + + + +#endif // __INPUT_H__ diff --git a/hwpe/neureka/gen/inc/layer_conf.h b/hwpe/neureka/gen/inc/layer_conf.h new file mode 100644 index 0000000..42e2de0 --- /dev/null +++ b/hwpe/neureka/gen/inc/layer_conf.h @@ -0,0 +1,42 @@ +#ifndef __LAYER_CONF_H__ +#define __LAYER_CONF_H__ + +#define TEST_NAME "test" +#define INPUT_HEIGHT (4) +#define INPUT_WIDTH (4) +#define INPUT_CHANNEL (32) +#define INPUT_SIGNED (0) +#define INPUT_BITS (8) + +#define OUTPUT_HEIGHT (4) +#define OUTPUT_WIDTH (4) +#define OUTPUT_CHANNEL (32) +#define OUTPUT_BITS (8) + +#define WEIGHT_HEIGHT (1) +#define WEIGHT_WIDTH (1) +#define WEIGHT_CHANNEL_IN (32) +#define WEIGHT_CHANNEL_OUT (32) +#define WEIGHT_BITS (8) +#define WEIGHT_OFFSET (-128) + +#define SCALE_BITS (8) + +#define BIAS_BITS (32) + +#define PADDING_TOP (0) +#define PADDING_BOTTOM (0) +#define PADDING_LEFT (0) +#define PADDING_RIGHT (0) +#define PADDING_VALUE (0) + +#define STRIDE_HEIGHT (1) +#define STRIDE_WIDTH (1) + +#define GROUPS (1) +#define OUTSHIFT (23) +#define HAS_NORM_QUANT (1) +#define HAS_BIAS (1) +#define HAS_RELU (1) + +#endif // __LAYER_CONF_H__ diff --git a/hwpe/neureka/gen/inc/output.h b/hwpe/neureka/gen/inc/output.h new file mode 100644 index 0000000..472a3bb --- /dev/null +++ b/hwpe/neureka/gen/inc/output.h @@ -0,0 +1,10 @@ +#ifndef __OUTPUT_H__ +#define __OUTPUT_H__ + +#include + +#define OUTPUT_SIZE (512) +PI_L1 uint8_t output[OUTPUT_SIZE]; + + +#endif // __OUTPUT_H__ diff --git a/hwpe/neureka/gen/inc/scale.h b/hwpe/neureka/gen/inc/scale.h new file mode 100644 index 0000000..8ae79a5 --- /dev/null +++ b/hwpe/neureka/gen/inc/scale.h @@ -0,0 +1,15 @@ +#ifndef __SCALE_H__ +#define __SCALE_H__ + +#include + +#define SCALE_SIZE (32) +PI_L1 uint8_t scale[SCALE_SIZE] = { + 0x2c, 0xca, 0xa6, 0xb9, 0x5f, 0xfb, 0xb4, 0x1e, 0x98, 0x1b, + 0xf1, 0xdf, 0xdd, 0xcf, 0xde, 0xf4, 0x82, 0xfd, 0x38, 0x59, + 0x2b, 0xa6, 0x10, 0x67, 0xa4, 0x2a, 0xf7, 0x12, 0x89, 0xcc, + 0x53, 0x1c +}; + + +#endif // __SCALE_H__ diff --git a/hwpe/neureka/gen/inc/weight.h b/hwpe/neureka/gen/inc/weight.h new file mode 100644 index 0000000..dfa4788 --- /dev/null +++ b/hwpe/neureka/gen/inc/weight.h @@ -0,0 +1,115 @@ +#ifndef __WEIGHT_H__ +#define __WEIGHT_H__ + +#include + +#define WEIGHT_SIZE (1024) +PI_L1 uint8_t weight[WEIGHT_SIZE] = { + 0x6e, 0xe7, 0xcc, 0xf1, 0x1d, 0x56, 0xfe, 0xa4, 0xdd, 0x6c, + 0x22, 0xe7, 0x2b, 0x7d, 0x5a, 0xc1, 0x16, 0x58, 0x21, 0xc1, + 0x16, 0x95, 0x10, 0x54, 0x9c, 0xdd, 0xc9, 0x66, 0x89, 0x93, + 0xc7, 0xe1, 0x73, 0x89, 0xad, 0x4d, 0x48, 0x2e, 0xe5, 0x3e, + 0x29, 0x36, 0x3c, 0xae, 0xc3, 0xa4, 0x4a, 0x2b, 0x00, 0x54, + 0x42, 0xed, 0x55, 0x7d, 0x54, 0x94, 0x70, 0x1e, 0x3c, 0x46, + 0x86, 0x01, 0xd3, 0xa4, 0xe2, 0x52, 0x0c, 0x87, 0x0b, 0x5e, + 0x02, 0xfb, 0xcd, 0x76, 0xb6, 0x83, 0xc5, 0x9c, 0xf1, 0x6a, + 0x7f, 0x5f, 0xc0, 0x9c, 0x13, 0xde, 0xdd, 0x70, 0xb6, 0x38, + 0x98, 0x87, 0xe5, 0x71, 0xc7, 0x37, 0x9b, 0x47, 0x54, 0xfa, + 0xeb, 0xc7, 0x72, 0x0f, 0x61, 0x72, 0xff, 0x63, 0xc5, 0x59, + 0xb5, 0xeb, 0x0f, 0x38, 0xff, 0x68, 0x18, 0x4e, 0xdb, 0x0a, + 0x0e, 0xc6, 0x77, 0x17, 0xa5, 0x2e, 0x36, 0x00, 0x8e, 0xe2, + 0x41, 0x4f, 0x1e, 0x13, 0x83, 0x6a, 0x9b, 0x08, 0xc1, 0x63, + 0x4e, 0x14, 0xd8, 0xd0, 0x00, 0x8b, 0x06, 0x30, 0xcc, 0x11, + 0x44, 0x09, 0x1e, 0x9a, 0x07, 0xde, 0x4e, 0x6d, 0x45, 0x36, + 0xdd, 0x98, 0x27, 0x32, 0x60, 0xfa, 0xfb, 0x7b, 0x29, 0x73, + 0xe6, 0x6c, 0xec, 0xa1, 0x3f, 0x36, 0x9b, 0x8c, 0xa4, 0x03, + 0x08, 0x60, 0x2b, 0x06, 0xff, 0x89, 0x4d, 0x26, 0x90, 0x0e, + 0x34, 0xcf, 0xf4, 0x1a, 0xd6, 0xa6, 0x55, 0x06, 0xdf, 0x83, + 0x46, 0x0b, 0xec, 0x7a, 0x27, 0xb4, 0x88, 0x8e, 0xae, 0xa4, + 0xad, 0xcd, 0x3e, 0x2a, 0xc7, 0xba, 0xb6, 0x1b, 0x1f, 0xe3, + 0x26, 0x65, 0xc8, 0x2a, 0x0b, 0xaa, 0xfa, 0xf9, 0x5c, 0xe3, + 0x07, 0x50, 0xc9, 0x51, 0x26, 0x10, 0x83, 0xa6, 0x3e, 0x54, + 0x7b, 0xe3, 0x46, 0x79, 0x9a, 0xbe, 0x25, 0xe9, 0x83, 0x2b, + 0xbb, 0xec, 0x29, 0x7c, 0xe9, 0xc7, 0x28, 0x99, 0x1d, 0x7f, + 0xb3, 0x1b, 0x01, 0xa6, 0xe2, 0xed, 0x8b, 0xce, 0x0e, 0xe1, + 0x8a, 0x93, 0x44, 0x13, 0xae, 0xee, 0x19, 0x7d, 0x87, 0xea, + 0xd7, 0x70, 0x9f, 0x3c, 0xbf, 0x2f, 0x5c, 0x60, 0x10, 0xae, + 0x4b, 0x6b, 0x2d, 0x7e, 0xe5, 0x8a, 0xa9, 0xa0, 0xf9, 0x8e, + 0x4f, 0x98, 0x19, 0xf9, 0x3e, 0x4b, 0x0d, 0xf0, 0x81, 0xe0, + 0x52, 0xa8, 0xb5, 0x29, 0x40, 0x0d, 0x71, 0x90, 0x39, 0xe8, + 0x7d, 0x15, 0xf7, 0x21, 0x59, 0x34, 0xf3, 0xfb, 0xc2, 0x51, + 0x37, 0xee, 0x78, 0x32, 0x06, 0xdd, 0xfb, 0xf4, 0x39, 0xb7, + 0x96, 0x1f, 0x17, 0x94, 0x36, 0x2e, 0xb7, 0xd2, 0x6b, 0xa3, + 0x5d, 0x35, 0xcb, 0x76, 0xb2, 0xa9, 0x01, 0xaa, 0xd1, 0xd1, + 0x8a, 0xb7, 0x86, 0x17, 0x21, 0x18, 0xba, 0xa2, 0x38, 0xbe, + 0xc9, 0x64, 0x2d, 0xf4, 0x81, 0xc2, 0xd1, 0x97, 0xbb, 0xcd, + 0x04, 0x50, 0x20, 0xbb, 0x67, 0x20, 0xb4, 0x8a, 0x96, 0x30, + 0x8f, 0x35, 0xa4, 0xb0, 0xc2, 0x8c, 0x4e, 0x9c, 0xc7, 0x2d, + 0xbb, 0x90, 0x2d, 0x4a, 0x96, 0xbb, 0xb9, 0x71, 0x35, 0x37, + 0xe7, 0xc8, 0x54, 0x1c, 0x91, 0x15, 0xb7, 0x46, 0x28, 0x3e, + 0x90, 0x85, 0xa6, 0x09, 0xba, 0xd4, 0x5a, 0x51, 0x5d, 0x4a, + 0xb6, 0xa0, 0xb1, 0x84, 0x12, 0x9d, 0x85, 0x6d, 0xa7, 0x07, + 0x7d, 0x3b, 0x24, 0x44, 0x61, 0xb7, 0x78, 0x41, 0xba, 0x29, + 0x8b, 0xc9, 0x67, 0x2e, 0x54, 0x72, 0x79, 0x11, 0x61, 0xe9, + 0x31, 0x84, 0x21, 0x70, 0x1e, 0xcc, 0x5c, 0x03, 0x75, 0x19, + 0xab, 0x3d, 0xea, 0x1d, 0x15, 0xae, 0xba, 0xe5, 0xa2, 0x0b, + 0x73, 0xf4, 0xa3, 0x55, 0x3c, 0x81, 0x3c, 0x00, 0x30, 0xb0, + 0x2e, 0xca, 0x8f, 0xd8, 0xd3, 0x71, 0x2a, 0x9e, 0x40, 0xaf, + 0x0d, 0x20, 0xa1, 0x22, 0xf8, 0x7e, 0xa4, 0x8d, 0x5a, 0x7a, + 0xfc, 0x23, 0x05, 0x4c, 0xa3, 0xc1, 0x16, 0x95, 0x5e, 0xa9, + 0x6e, 0xbf, 0xf8, 0xaf, 0x5f, 0xe3, 0xb0, 0x22, 0x62, 0x39, + 0x45, 0xc9, 0x47, 0x84, 0x0e, 0x53, 0x79, 0xa2, 0xa8, 0x20, + 0x43, 0x65, 0x63, 0x4a, 0x6d, 0x10, 0x7c, 0x03, 0x5f, 0xd0, + 0xbe, 0x6f, 0x5a, 0x91, 0x41, 0xef, 0x9e, 0x06, 0xc9, 0x43, + 0x1b, 0xd9, 0x6f, 0xe5, 0x69, 0xac, 0xb2, 0xe4, 0x35, 0xea, + 0x8a, 0x8b, 0xb1, 0x5c, 0x20, 0x53, 0x38, 0x40, 0x29, 0xc6, + 0x0e, 0x64, 0xa3, 0xf7, 0xbf, 0x75, 0xad, 0x84, 0x6d, 0x9b, + 0xdd, 0x17, 0x10, 0x3e, 0x85, 0x6a, 0xc2, 0xc2, 0xc1, 0x22, + 0xb0, 0xf7, 0xae, 0x65, 0x43, 0x72, 0x4a, 0xbd, 0xeb, 0xe0, + 0x4e, 0xf9, 0x88, 0xa7, 0x00, 0x02, 0x8d, 0xbc, 0x05, 0x2f, + 0x6c, 0x8d, 0xa5, 0xb6, 0x02, 0x64, 0x32, 0x55, 0x1d, 0xde, + 0x76, 0xc6, 0x54, 0x95, 0xf9, 0xe7, 0xa5, 0x71, 0x66, 0xc0, + 0xe6, 0xab, 0xd7, 0xb7, 0x03, 0xa1, 0x38, 0xc4, 0x6f, 0x90, + 0x0a, 0x87, 0x25, 0x39, 0x42, 0x8f, 0xc7, 0x6b, 0x62, 0x2e, + 0x13, 0xde, 0x07, 0x1e, 0xa7, 0x00, 0xf0, 0x8d, 0xeb, 0xd6, + 0xc2, 0x9e, 0x20, 0x58, 0xe7, 0x7f, 0xc6, 0x20, 0xd6, 0xb1, + 0xfe, 0xf3, 0xee, 0x34, 0x9c, 0x14, 0x1e, 0xf7, 0xa4, 0x18, + 0x2c, 0xdd, 0xfb, 0xde, 0x4a, 0x95, 0xf8, 0xb0, 0x73, 0x14, + 0x09, 0x89, 0x75, 0x4c, 0xe8, 0xc8, 0x00, 0x73, 0xdc, 0x49, + 0x90, 0x58, 0x15, 0x53, 0x22, 0xca, 0x16, 0xc5, 0x49, 0xd5, + 0x2b, 0x98, 0x2f, 0x05, 0x2d, 0x8d, 0x6b, 0x0a, 0x0e, 0xac, + 0xfb, 0x7d, 0x42, 0x12, 0x83, 0xe8, 0x8d, 0x72, 0xa3, 0xf2, + 0xf7, 0x04, 0xc6, 0x87, 0x97, 0xa5, 0x82, 0x5b, 0x85, 0xea, + 0x8f, 0xd3, 0x68, 0x74, 0x3e, 0xf7, 0x36, 0x0c, 0xa0, 0x83, + 0x51, 0x68, 0xf9, 0xfb, 0xbe, 0x10, 0xde, 0xad, 0xec, 0x91, + 0xea, 0x12, 0x2e, 0x4a, 0xf5, 0x35, 0x03, 0x50, 0x3b, 0x5f, + 0x1e, 0xdf, 0xdc, 0x95, 0x68, 0xeb, 0x87, 0x8e, 0x24, 0xa4, + 0x70, 0x13, 0x9e, 0x09, 0x50, 0xa5, 0x15, 0x78, 0x7f, 0x18, + 0x06, 0x61, 0x49, 0x8a, 0xb4, 0x65, 0xca, 0x33, 0xe2, 0xa7, + 0x57, 0x51, 0xa1, 0xcf, 0x58, 0x82, 0xa5, 0xa0, 0xab, 0xd1, + 0x5f, 0xf5, 0x68, 0x2c, 0xad, 0x4e, 0xe5, 0xd1, 0x96, 0x4f, + 0xe0, 0x51, 0x65, 0x0c, 0x44, 0xb8, 0xc6, 0x5b, 0xc8, 0x0e, + 0xe5, 0x2a, 0x7e, 0x74, 0xd7, 0x45, 0x7b, 0xb5, 0x03, 0x4a, + 0x77, 0x7f, 0x8e, 0xda, 0x26, 0x5c, 0xe3, 0x58, 0xbc, 0x36, + 0xa5, 0x6e, 0xa3, 0x7e, 0x87, 0xb9, 0x80, 0xd6, 0x93, 0x5e, + 0xf5, 0x24, 0xd4, 0x2d, 0xbc, 0x4d, 0xc8, 0xe7, 0xdc, 0x85, + 0x44, 0x00, 0x4b, 0x8b, 0x2d, 0x05, 0x32, 0x97, 0x4c, 0x9c, + 0xb9, 0xb4, 0x97, 0x97, 0x55, 0x60, 0x0b, 0x98, 0x21, 0x4f, + 0xa2, 0x2e, 0x4d, 0xcc, 0x5b, 0x8d, 0xde, 0x25, 0xaa, 0x0a, + 0xfc, 0xca, 0xd1, 0x54, 0x90, 0xbe, 0xef, 0xe6, 0x93, 0x49, + 0xbb, 0x33, 0xaf, 0xf9, 0x5b, 0x98, 0xc4, 0xce, 0x3c, 0x22, + 0xd0, 0xed, 0x5a, 0x9e, 0x01, 0xc0, 0x6a, 0x76, 0x2a, 0x74, + 0x8f, 0x65, 0xdd, 0xec, 0x7b, 0xd8, 0xef, 0x0e, 0xc0, 0x0d, + 0xdb, 0x47, 0x8b, 0x6a, 0x0d, 0xc5, 0xe5, 0x53, 0xb2, 0x22, + 0x84, 0x71, 0xb2, 0xf6, 0x99, 0x42, 0x14, 0x43, 0x94, 0xad, + 0x61, 0xbd, 0x00, 0xef, 0xf7, 0xfd, 0x20, 0xd7, 0x0c, 0x67, + 0xf7, 0xca, 0xdf, 0x78, 0xb0, 0x28, 0x95, 0xb9, 0x0e, 0x4c, + 0x3c, 0xbb, 0x2b, 0x85, 0xa3, 0x68, 0x78, 0x6f, 0x31, 0xe7, + 0x5f, 0x7b, 0xa7, 0x5f, 0xe7, 0x17, 0x35, 0xdd, 0x20, 0x2c, + 0x10, 0x3a, 0x98, 0xe3, 0xb8, 0x7a, 0x8e, 0x6f, 0xee, 0x34, + 0x14, 0x75, 0x19, 0xf8 +}; + + + +#endif // __WEIGHT_H__ diff --git a/hwpe/neureka/inc/ecc_check.h b/hwpe/neureka/inc/ecc_check.h new file mode 100644 index 0000000..3f9783d --- /dev/null +++ b/hwpe/neureka/inc/ecc_check.h @@ -0,0 +1,27 @@ +/* + * Copyright 2024 ETH Zurich and University of Bologna + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * SPDX-License-Identifier: Apache-2.0 + */ + +#ifndef __ECC_CHECK_H__ +#define __ECC_CHECK_H__ + +#include + +#define ECC_REGS (4) +extern uint32_t ecc_errs[ECC_REGS]; + +#endif // __ECC_CHECK_H__ diff --git a/hwpe/neureka/inc/layer_util.h b/hwpe/neureka/inc/layer_util.h new file mode 100644 index 0000000..e44ede9 --- /dev/null +++ b/hwpe/neureka/inc/layer_util.h @@ -0,0 +1,40 @@ +/* + * Luka Macan + * + * Copyright 2023 ETH Zurich and University of Bologna + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * SPDX-License-Identifier: Apache-2.0 + */ + +#ifndef __LAYER_UTIL_H__ +#define __LAYER_UTIL_H__ + +#include "layer_conf.h" +#include + +static void layer_info() { + printf("Layer info:\n" + " - input: (%dx%dx%d)\n" + " - output: (%dx%dx%d)\n" + " - weight: (%dx%dx%dx%d)\n" + " - stride: (%dx%d)\n" + " - padding: (%dx%dx%dx%d)\n", + INPUT_HEIGHT, INPUT_WIDTH, INPUT_CHANNEL, OUTPUT_HEIGHT, OUTPUT_WIDTH, + OUTPUT_CHANNEL, WEIGHT_CHANNEL_OUT, WEIGHT_HEIGHT, WEIGHT_WIDTH, + WEIGHT_CHANNEL_IN, STRIDE_HEIGHT, STRIDE_WIDTH, PADDING_TOP, + PADDING_BOTTOM, PADDING_LEFT, PADDING_RIGHT); +} + +#endif // __LAYER_UTIL_H__ diff --git a/hwpe/neureka/inc/nnx_layer.h b/hwpe/neureka/inc/nnx_layer.h new file mode 100644 index 0000000..cbaf4b9 --- /dev/null +++ b/hwpe/neureka/inc/nnx_layer.h @@ -0,0 +1,26 @@ +/* + * Luka Macan + * + * Copyright 2023 ETH Zurich and University of Bologna + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * SPDX-License-Identifier: Apache-2.0 + */ + +#ifndef __NNX_LAYER_H__ +#define __NNX_LAYER_H__ + +void execute_nnx_layer(void *unused_args); + +#endif // __NNX_LAYER_H__ diff --git a/hwpe/neureka/inc/pmsis.h b/hwpe/neureka/inc/pmsis.h new file mode 100644 index 0000000..dbb6a91 --- /dev/null +++ b/hwpe/neureka/inc/pmsis.h @@ -0,0 +1,11 @@ +// fake pmsis.h +#include +#include +// fake data in L2, actually in L1! +#ifndef PI_L1 + #define PI_L1 __attribute__((section(".data_l1"))) +#endif +#ifndef PI_L2 + #define PI_L2 __attribute__((section(".data_l1"))) +#endif + diff --git a/hwpe/neureka/pulp-nnx b/hwpe/neureka/pulp-nnx new file mode 160000 index 0000000..b1e7c0a --- /dev/null +++ b/hwpe/neureka/pulp-nnx @@ -0,0 +1 @@ +Subproject commit b1e7c0a517e770079f2f07acae013489b5d9d0f4 diff --git a/hwpe/neureka/pulp_inject_fault.tcl b/hwpe/neureka/pulp_inject_fault.tcl new file mode 100644 index 0000000..fa7efb2 --- /dev/null +++ b/hwpe/neureka/pulp_inject_fault.tcl @@ -0,0 +1,53 @@ +# Copyright 2023 ETH Zurich and University of Bologna. +# Solderpad Hardware License, Version 0.51, see LICENSE for details. +# SPDX-License-Identifier: SHL-0.51 +# +# Author: Michael Rogenmoser (michaero@iis.ee.ethz.ch) + +transcript quietly +if {! [info exists ::env(VSIM_PATH)]} {error "Define VSIM_PATH"} +set utils_base_path [file join $::env(VSIM_PATH) scripts fault_injection_utils] +set script_base_path [file join $::env(VSIM_PATH) fault_injection_sim scripts] + +set verbosity 2 +set log_injections 1 +# Easy way to generate a variable seed +# set seed [clock seconds] +# Default value +set seed 12345 +set print_statistics 1 + +set inject_start_time 80000000000ps +set inject_stop_time 150000000000ps +set injection_clock "pulp_cluster_tb/cluster_i/clk_i" +set injection_clock_trigger 0 +set fault_period 100 +set rand_initial_injection_phase 1 +# max_num set to 0 means until stop_time +set max_num_fault_inject 0 +set signal_fault_duration 20ns +set register_fault_duration 0ns + +set allow_multi_bit_upset $::env(MULTI_BIT_UPSET) +set use_bitwidth_as_weight 0 +set check_core_output_modification 0 +set check_core_next_state_modification 0 +set reg_to_sig_ratio 1 + +source [file join $utils_base_path pulp_extract_nets.tcl] + +set inject_signals_netlist [] +set inject_register_netlist [] +set output_netlist [] +set next_state_netlist [] +set assertion_disable_list [] + +# for {set idx 0} {$idx < 12} {incr idx} { +# set inject_signals_netlist [list {*}$inject_signals_netlist {*}[get_all_core_nets $idx]] +# set output_netlist [list {*}$output_netlist {*}[get_core_output_nets $idx]] +# } + +set inject_register_netlist [list {*}$inject_register_netlist {*}[get_memory_slice {0 16} {0 50}]] + +source [file join $script_base_path inject_fault.tcl] + diff --git a/hwpe/neureka/src/main.c b/hwpe/neureka/src/main.c new file mode 100644 index 0000000..d0133cf --- /dev/null +++ b/hwpe/neureka/src/main.c @@ -0,0 +1,105 @@ +/* + * Copyright (C) 2020-2024 ETH Zurich and University of Bologna + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* + * Authors: Francesco Conti + * Gianna Paulin + * Renzo Andri + * Arpan Suravi Prasad + * Luka Macan + * Main Test Program for N-EUREKA + */ + +#include +#include +#include + +#include "layer_util.h" +#include "nnx_layer.h" +#ifndef NO_ECC +#include "ecc_check.h" +#endif + +#define OUTPUT_SIZE 512 + +extern uint8_t output[]; + +#ifndef NO_ECC +uint32_t ecc_errs[ECC_REGS]; +#endif + +static int check_output() { + uint32_t checksum = 0; + for (int i = 0; i < OUTPUT_SIZE; i++) { + checksum += output[i]; + } + return (checksum != 0x00007330); +} + +int errors = 0; +#ifndef NO_ECC +unsigned int intc_data_correctable_cnt = 0; +unsigned int intc_meta_correctable_cnt = 0; +unsigned int intc_data_uncorrectable_cnt = 0; +unsigned int intc_meta_uncorrectable_cnt = 0; +#endif + +int main() { + + unsigned int core_id = get_core_id(); + unsigned int cluster_id = rt_cluster_id(); + + if (core_id == 0) { + + // execute NNX layer + execute_nnx_layer(NULL); + + errors = check_output(); + + *(int *) 0x1A1040A0 = errors; + if(errors) + printf ("[KO] Terminated test with errors!!!\n"); + else + printf ("[OK] Terminated test with no errors!!!\n"); + + #ifndef NO_ECC + // Check number of detected errors by ECC modules inside interconnect + intc_data_correctable_cnt = hwpe_hci_ecc_get_data_correctable_count(cluster_id); + intc_meta_correctable_cnt = hwpe_hci_ecc_get_meta_correctable_count(cluster_id); + intc_data_uncorrectable_cnt = hwpe_hci_ecc_get_data_uncorrectable_count(cluster_id); + intc_meta_uncorrectable_cnt = hwpe_hci_ecc_get_meta_uncorrectable_count(cluster_id); + for (int i = 0; i < 16; i++) { + intc_meta_correctable_cnt += tcdm_scrubber_get_mismatch_count(cluster_id, i); + } + + printf("Data errors corrected inside Neureka: %d. Data errors uncorrectable inside Neureka: %d\n", + ecc_errs[0], ecc_errs[1]); + printf("Meta errors corrected inside Neureka: %d. Meta errors uncorrectable inside Neureka: %d\n", + ecc_errs[2], ecc_errs[3]); + + printf("Data errors corrected inside intc: %d. Data errors uncorrectable inside intc: %d\n", + intc_data_correctable_cnt, intc_data_uncorrectable_cnt); + printf("Meta errors corrected inside intc: %d. Meta errors uncorrectable inside intc: %d\n", + intc_meta_correctable_cnt, intc_meta_uncorrectable_cnt); + #endif + } + synch_barrier(); + #ifndef NO_ECC + return (errors != 0) && (intc_data_uncorrectable_cnt == 0 && intc_meta_uncorrectable_cnt == 0 && (ecc_errs[1]==0 && ecc_errs[3]==0)); + #else + return errors; + #endif +} diff --git a/hwpe/neureka/src/nnx_layer.c b/hwpe/neureka/src/nnx_layer.c new file mode 100644 index 0000000..06a7dd4 --- /dev/null +++ b/hwpe/neureka/src/nnx_layer.c @@ -0,0 +1,176 @@ +/* + * Luka Macan + * + * Copyright 2023 ETH Zurich and University of Bologna + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * SPDX-License-Identifier: Apache-2.0 + */ + +#include "nnx_layer.h" +#include "ecc_check.h" +#include "pulp.h" + +#include "neureka.h" +#include "neureka_pulp_cluster_bsp.h" +#include "neureka_task.h" +#include "pulp_nnx_neureka.h" + +#define NULL 0 + +typedef neureka_norm_mode_e nnx_norm_mode_e; +typedef neureka_quant_t nnx_quant_t; +typedef neureka_quant_function_e nnx_quant_function_e; +typedef neureka_norm_t nnx_norm_t; +typedef neureka_task_t nnx_task_t; +typedef neureka_dev_t nnx_dev_t; +typedef neureka_pulp_cluster_conf_t nnx_bsp_conf_t; +typedef neureka_task_flag_e nnx_task_flag_e; + +#define nnxTaskFlagTrue neurekaTaskFlagTrue +#define nnxTaskFlagFalse neurekaTaskFlagFalse + +#define nnx_task_init neureka_task_init +#define nnx_task_set_op_to_conv neureka_task_set_op_to_conv +#define nnx_task_set_bits neureka_task_set_bits +#define nnx_task_set_norm_quant neureka_task_set_norm_quant +#define nnx_task_set_weight_offset neureka_task_set_weight_offset +#define nnx_task_set_weight_source neureka_task_set_weight_source +#define nnx_task_set_activation_prefetch neureka_task_set_activation_prefetch +#define nnx_task_set_dims neureka_task_set_dims +#define nnx_task_set_ptrs_conv neureka_task_set_ptrs_conv +#define nnx_task_set_ptrs_norm_quant neureka_task_set_ptrs_norm_quant + +#define nnx_bsp_get_dev neureka_pulp_cluster_get_dev + +#define nnx_init neureka_nnx_init +#define nnx_dispatch_wait neureka_nnx_dispatch_wait +#define nnx_dispatch neureka_nnx_dispatch +#define nnx_resolve_wait neureka_nnx_resolve_wait +#define nnx_read_ecc_regs neureka_nnx_read_ecc_regs +#define nnx_term neureka_nnx_term + +// Generated headers +#include "layer_conf.h" +#if HAS_BIAS != 0 + #include "bias.h" +#endif +#include "input.h" +#include "output.h" +#if HAS_NORM_QUANT != 0 + #include "scale.h" +#endif +#include "weight.h" + +static void task_prepare(nnx_task_t *task) { + nnx_task_init(task); + nnx_task_set_op_to_conv(task, WEIGHT_HEIGHT, GROUPS > 1); + nnx_task_set_bits(task, INPUT_BITS, OUTPUT_BITS, WEIGHT_BITS); + + nnx_task_set_weight_offset(task, weightOffsetModeLayerWise, WEIGHT_OFFSET); + +#ifdef NEUREKA_WEIGHT_SOURCE_WMEM + nnx_task_set_weight_source(task, neurekaWeightSourceWmem); + nnx_task_set_activation_prefetch(task, activationPrefetchOn); +#else + neureka_task_set_weight_source(task, neurekaWeightSourceTcdm); + nnx_task_set_activation_prefetch(task, activationPrefetchOff); +#endif +#if INPUT_SIGNED == 1 + neureka_task_set_input_signed(task); +#else + neureka_task_set_input_unsigned(task); +#endif + + const uint32_t w_in_stride = INPUT_CHANNEL * INPUT_BITS / 8; + const uint32_t h_in_stride = INPUT_WIDTH * w_in_stride; + const uint32_t w_out_stride = OUTPUT_CHANNEL * OUTPUT_BITS / 8; + const uint32_t h_out_stride = OUTPUT_WIDTH * w_out_stride; + +#if STRIDE_HEIGHT == 2 && STRIDE_WIDTH == 2 + nnx_task_set_dims_stride2x2( + task, INPUT_HEIGHT, INPUT_WIDTH, INPUT_CHANNEL, h_in_stride, w_in_stride, + OUTPUT_HEIGHT, OUTPUT_WIDTH, OUTPUT_CHANNEL, h_out_stride, w_out_stride, + WEIGHT_HEIGHT, WEIGHT_WIDTH, PADDING_TOP, PADDING_BOTTOM, PADDING_LEFT, + PADDING_RIGHT); +#else + nnx_task_set_dims(task, INPUT_WIDTH, INPUT_CHANNEL, h_in_stride, w_in_stride, + OUTPUT_HEIGHT, OUTPUT_WIDTH, OUTPUT_CHANNEL, h_out_stride, + w_out_stride, PADDING_TOP, PADDING_BOTTOM, PADDING_LEFT, + PADDING_RIGHT); +#endif + + nnx_task_set_ptrs_conv(task, (uint32_t)input, INPUT_WIDTH, w_in_stride, + PADDING_TOP, PADDING_LEFT, (uint32_t)output, + (uint32_t)weight); +#if HAS_NORM_QUANT == 1 +#if SCALE_BITS == 8 + const nnx_norm_mode_e normMode = normMode8Bit; +#elif SCALE_BITS == 32 + const nnx_norm_mode_e normMode = normMode32Bit; +#endif + + const nnx_task_flag_e flag_bias = + HAS_BIAS ? nnxTaskFlagTrue : nnxTaskFlagFalse; + const uint32_t bias_ptr = (uint32_t)(HAS_BIAS ? bias : NULL); + + nnx_quant_function_e quant_function = + HAS_RELU ? quantFunctionRelu : quantFunctionIdentity; + + nnx_task_set_norm_quant(task, + (nnx_quant_t){.shift_amount = OUTSHIFT, + .function = quant_function, + .flag_rounding = nnxTaskFlagFalse}, + (nnx_norm_t){.mode = normMode, + .flag_bias = flag_bias, + .flag_shift = nnxTaskFlagFalse}); + + nnx_task_set_ptrs_norm_quant(task, (uint32_t)scale, NULL, bias_ptr); +#endif // HAS_NORM_QUANT +} + +static void task_execute(nnx_task_t *task) { + nnx_dev_t *dev = nnx_bsp_get_dev(); + + nnx_bsp_conf_t conf = {.max_stall = 8}; + nnx_init(dev, &conf); + + nnx_dispatch_wait(dev); + + // printf("CFG:\n"); + // for (int i=0; idata)[i]); + // } +#if STRIDE_HEIGHT == 2 && STRIDE_WIDTH == 2 + nnx_dispatch_stride2x2(dev, task, INPUT_WIDTH, INPUT_CHANNEL, OUTPUT_HEIGHT, + OUTPUT_WIDTH, OUTPUT_CHANNEL, WEIGHT_HEIGHT, + WEIGHT_WIDTH); +#else + nnx_dispatch(dev, task); +#endif + + nnx_resolve_wait(dev, task); +#ifndef NO_ECC + nnx_read_ecc_regs(dev, (uint32_t)ecc_errs); +#endif + + nnx_term(dev); + +} + +void execute_nnx_layer(void *args) { + nnx_task_t task; + task_prepare(&task); + task_execute(&task); +} diff --git a/hwpe/redmule/Makefile b/hwpe/redmule/Makefile new file mode 100644 index 0000000..a92a1db --- /dev/null +++ b/hwpe/redmule/Makefile @@ -0,0 +1,35 @@ +PULP_APP = test +PULP_APP_SRCS = redmule.c +PULP_CFLAGS = -O3 + +ifeq ($(use_dma),1) + PULP_CFLAGS += -DUSE_DMA +endif +ifeq ($(no_ecc),1) + PULP_CFLAGS += -DNO_ECC +endif + +ifeq ($(fault_inject),1) + export FAULT_INJECTION=1 + export FAULT_INJECTION_SCRIPT=$(CURDIR)/pulp_inject_fault.tcl +endif + +ifeq ($(multi_bit_upset),1) + export MULTI_BIT_UPSET=1 +else + export MULTI_BIT_UPSET=0 +endif + +include $(PULP_SDK_HOME)/install/rules/pulp_rt.mk + +Golden := redmule-golden-model + +OP ?= gemm +M ?= 32 +N ?= 32 +K ?= 32 +fp_fmt ?= FP16 +SW ?= $(shell pwd) + +golden: + $(MAKE) -C $(Golden) $(OP) SW=$(SW)/inc M=$(M) N=$(N) K=$(K) fp_fmt=$(fp_fmt) diff --git a/hwpe/redmule/archi_redmule.h b/hwpe/redmule/archi_redmule.h new file mode 100644 index 0000000..0f04614 --- /dev/null +++ b/hwpe/redmule/archi_redmule.h @@ -0,0 +1,151 @@ +/* + * Copyright (C) 2022-2023 ETH Zurich and University of Bologna + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * SPDX-License-Identifier: Apache-2.0 + * + * Author: Yvan Tortorella + * + * High-level architecture of RedMulE + * + */ + +#ifndef __ARCHI_REDMULE_H__ +#define __ARCHI_REDMULE_H__ + +/* + * |========================================================================| + * || || + * ||Control and generic configuration register layout || + * |========================================================================| + * || # reg | offset | bits | bitmask || content || + * ||-------+----------+---------+--------------++-------------------------|| + * || 0 | 0x0000 | 31: 0 | 0xFFFFFFFF || TRIGGER || + * || 1 | 0x0004 | 31: 0 | 0xFFFFFFFF || ACQUIRE || + * || 2 | 0x0008 | 31: 0 | 0xFFFFFFFF || EVT_ENABLE || + * || 3 | 0x000c | 31: 0 | 0xFFFFFFFF || STATUS || + * || 4 | 0x0010 | 31: 0 | 0xFFFFFFFF || RUNNING_JOB || + * || 5 | 0x0014 | 31: 0 | 0xFFFFFFFF || SOFT_CLEAR || + * |========================================================================| + * || || + * ||Job-dependent registers layout || + * |========================================================================| + * || # reg | offset | bits | bitmask || content || + * ||-------+----------+---------+--------------++-------------------------|| + * || 0 | 0x0040 | 31: 0 | 0xFFFFFFFF || X_ADDR || + * ||-------+----------+---------+--------------++-------------------------|| + * || 1 | 0x0044 | 31: 0 | 0xFFFFFFFF || W_ADDR || + * ||-------+----------+---------+--------------++-------------------------|| + * || 2 | 0x0048 | 31: 0 | 0xFFFFFFFF || Z_ADDR || + * ||-------+----------+---------+--------------++-------------------------|| + * || 3 | 0x004C | | || Matrix Config 0 Reg || + * || | | 31:16 | 0xFFFF0000 || K Size (W Columns) || + * || | | 15: 0 | 0x0000FFFF || M Size (X Rows) || + * ||-------+----------+---------+--------------++-------------------------|| + * || 4 | 0x0050 | | || Matrix Config 1 Reg || + * || | | 31:16 | 0xFFFFFFFF || N Size (X Cols/W Rows) || + * ||-------+----------+---------+--------------++-------------------------|| + * || 5 | 0x0054 | | || Matrix Arithmetic Reg || + * || | | 12:10 | 0x00001C00 || Operation selection || + * || | | 9: 7 | 0x00000380 || Input/Output format || + * |========================================================================| + * + */ + +/* PULP Cluster Archi defines */ +#define ARCHI_CLUST_CTRL_BASE ARCHI_CLUSTER_CTRL_ADDR +#define ARCHI_CLUST_HWPE_BASE ARCHI_HWCE_ADDR +#define DMA_COMMAND_QUEUE ARCHI_MCHAN_DEMUX_ADDR +#define DMA_STATUS_REGISTER (ARCHI_MCHAN_DEMUX_ADDR + 4) +#define ARCHI_CL_HWPE_EVT0 12 +#define ARCHI_CL_HWPE_EVT1 13 +#define FC_DMA_EVENT 8 +#define CL_DMA_EVENT 22 +#define CLUST_CTRL_HWPE_EN 0x18 +#define CLUST_CTRL_HWPE_EN_MASK 0x800 +#define __builtin_bitinsert(a,b,c,d) (a | (((b << (32-c)) >> (32-c)) << d)) + +// RedMulE architecture +#define ADDR_WIDTH 32 +#define DATA_WIDTH 256 +#define REDMULE_FMT 16 +#define ARRAY_HEIGHT 4 +#define PIPE_REGS 3 +#define ARRAY_WIDTH 12 /* Superior limit is ARRAY_HEIGHT*PIPE_REGS */ + +// Commands +#define REDMULE_TRIGGER 0x00 +#define REDMULE_ACQUIRE 0x04 +#define REDMULE_FINISHED 0x08 +#define REDMULE_STATUS 0x0C +#define REDMULE_RUNNING_JOB 0x10 +#define REDMULE_SOFT_CLEAR 0x14 + +// Registers +#define REDMULE_REG_OFFS 0x40 +#define REDMULE_REG_X_PTR 0x00 +#define REDMULE_REG_W_PTR 0x04 +#define REDMULE_REG_Z_PTR 0x08 +#define REDMULE_MCFG0_PTR 0x0C +#define REDMULE_MCFG1_PTR 0x10 +#define REDMULE_ARITH_PTR 0x14 + +#define REDMULE_ECC_REG_OFFS 0x90 +#define DATA_CORR_ERR 0x00 +#define DATA_UNCORR_ERR 0x04 +#define METADATA_CORR_ERR 0x08 +#define METADATA_UNCORR_ERR 0x0c + +// OPs definition +#define MATMUL 0x0 +#define GEMM 0x1 +#define ADDMAX 0x2 +#define ADDMIN 0x3 +#define MULMAX 0x4 +#define MULMIN 0x5 +#define MAXMIN 0x6 +#define MINMAX 0x7 + +// GEMM formats +#define Float8 0x0 +#define Float16 0x1 +#define Float8Alt 0x2 +#define Float16Alt 0x3 + +#define RNE 0x0 +#define RTZ 0x1 +#define OP_FMADD 0x0 +#define OP_ADD 0x2 +#define OP_MUL 0x3 +#define OP_MINMAX 0x7 + +// FP Formats encoding +#define FP16 0x2 +#define FP8 0x3 +#define FP16ALT 0x4 +#define FP8ALT 0x5 + +/* DMA Archi */ +#define DMA_TX 0 +#define DMA_RX 1 +#define DMA_INC 1 + +#define PLP_DMA_TYPE_BIT 0x00000011 +#define PLP_DMA_INCR_BIT 0x00000012 +#define PLP_DMA_2D_BIT 0x00000013 +#define PLP_DMA_ELE_BIT 0x00000014 +#define PLP_DMA_ILE_BIT 0x00000015 +#define PLP_DMA_BLE_BIT 0x00000016 +#define PLP_DMA_2D_TCDM_BIT 0x0000017 + +#endif diff --git a/hwpe/redmule/hal_redmule.h b/hwpe/redmule/hal_redmule.h new file mode 100644 index 0000000..14dc663 --- /dev/null +++ b/hwpe/redmule/hal_redmule.h @@ -0,0 +1,384 @@ +/* + * Copyright (C) 2022-2023 ETH Zurich and University of Bologna + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * SPDX-License-Identifier: Apache-2.0 + * + * Author: Yvan Tortorella + * + * RedMulE Hardware Abstraction Layer (HAL) + */ + +#ifndef __HAL_REDMULE_H__ +#define __HAL_REDMULE_H__ + +#include +#include "inc/x_input.h" +#include "inc/w_input.h" +#include "inc/y_input.h" +#include "inc/z_output.h" +#include "inc/golden.h" +#include "inc/tensor_dim.h" + +/* + * + * For control, generic configuration register layout, + * and job-dependent register map, look at redmule_archi.h + * + */ + +// For all the following functions we use __builtin_pulp_OffsetedWrite and __builtin_pulp_OffsetedRead +// instead of classic load/store because otherwise the compiler is not able to correctly factorize +// the HWPE base in case several accesses are done, ending up with twice more code + +#define HWPE_WRITE(value, offset) *(volatile int *)(ARCHI_CLUST_HWPE_BASE + offset) = value +#define HWPE_READ(offset) *(volatile int *)(ARCHI_CLUST_HWPE_BASE + offset) + +static inline void redmule_x_add_set (unsigned int value) { + HWPE_WRITE(value, REDMULE_REG_OFFS + REDMULE_REG_X_PTR); +} + +static inline void redmule_w_add_set (unsigned int value) { + HWPE_WRITE(value, REDMULE_REG_OFFS + REDMULE_REG_W_PTR); +} + +static inline void redmule_z_add_set (unsigned int value) { + HWPE_WRITE(value, REDMULE_REG_OFFS + REDMULE_REG_Z_PTR); +} + +static inline void redmule_mcfg_set (uint32_t mcfg0, uint32_t mcfg1) { + HWPE_WRITE(mcfg0, REDMULE_REG_OFFS + REDMULE_MCFG0_PTR); + HWPE_WRITE(mcfg1, REDMULE_REG_OFFS + REDMULE_MCFG1_PTR); +} + +static inline void redmule_arith_set(uint32_t arith) { + HWPE_WRITE(arith, REDMULE_REG_OFFS + REDMULE_ARITH_PTR); +} + +static inline void hwpe_trigger_job() { + HWPE_WRITE(0, REDMULE_TRIGGER); +} + +static inline int hwpe_acquire_job() { + return HWPE_READ(REDMULE_ACQUIRE); +} + +static inline unsigned int hwpe_get_status() { + return HWPE_READ(REDMULE_STATUS); +} + +static inline unsigned int hwpe_get_running_job() { + return HWPE_READ(REDMULE_RUNNING_JOB); +} + +static inline void hwpe_soft_clear() { + HWPE_WRITE(0, REDMULE_SOFT_CLEAR); +} + +static inline void hwpe_cg_enable() { + *(volatile int*) (ARCHI_CLUST_CTRL_BASE + CLUST_CTRL_HWPE_EN) |= CLUST_CTRL_HWPE_EN_MASK; +} + +static inline void hwpe_cg_disable() { + *(volatile int*) (ARCHI_CLUST_CTRL_BASE + CLUST_CTRL_HWPE_EN) &= ~CLUST_CTRL_HWPE_EN_MASK; +} + +static inline void redmule_evt_wait() { + do { + eu_evt_maskWaitAndClr (1 << ARCHI_CL_HWPE_EVT0); + } while((*(int volatile *)(ARCHI_CLUST_HWPE_BASE + REDMULE_STATUS)) != 0); +} + +static inline int hwpe_wait_acquire() { + int job_id = hwpe_acquire_job(); + while(job_id < 0) { + eu_evt_maskWaitAndClr (1 << ARCHI_CL_HWPE_EVT0); + job_id = hwpe_acquire_job(); + } + return job_id; +} + +static inline unsigned int redmule_get_data_correctable_count () { + return HWPE_READ(REDMULE_ECC_REG_OFFS + DATA_CORR_ERR); +} + +static inline unsigned int redmule_get_data_uncorrectable_count () { + return HWPE_READ(REDMULE_ECC_REG_OFFS + DATA_UNCORR_ERR); +} + +static inline unsigned int redmule_get_meta_correctable_count () { + return HWPE_READ(REDMULE_ECC_REG_OFFS + METADATA_CORR_ERR); +} + +static inline unsigned int redmule_get_meta_uncorrectable_count () { + return HWPE_READ(REDMULE_ECC_REG_OFFS + METADATA_UNCORR_ERR); +} + +/* DMA APIs */ +static inline int mchan_alloc(){ + return *(volatile int*) DMA_COMMAND_QUEUE; +} + +static inline void mchan_transfer(unsigned int len, + unsigned int ext_addr, + unsigned int tcdm_addr) { + + *(volatile int*) DMA_COMMAND_QUEUE = len | + (DMA_RX << PLP_DMA_TYPE_BIT) | + (DMA_INC << PLP_DMA_INCR_BIT) | + (0 << PLP_DMA_2D_BIT) | + (1 << PLP_DMA_ELE_BIT) | + (1 << PLP_DMA_ILE_BIT) | + (0 << PLP_DMA_BLE_BIT) | + (0 << PLP_DMA_2D_TCDM_BIT); + *(volatile int*) DMA_COMMAND_QUEUE = tcdm_addr; + *(volatile int*) DMA_COMMAND_QUEUE = ext_addr; +} + +static inline void mchan_barrier(int id) { + while(((*(volatile int*)(DMA_STATUS_REGISTER)) >> id ) & 0x1 ) { + eu_evt_maskWaitAndClr(1 << FC_DMA_EVENT); + } +} + +static inline void mchan_free(int id) { + *(volatile int*) DMA_STATUS_REGISTER = 0x1 << id; +} + +void redmule_cfg(unsigned int x, unsigned int w, unsigned int z, uint16_t m_size, uint16_t n_size, + uint16_t k_size, uint8_t gemm_op, uint8_t gemm_fmt) { + + uint32_t mcfg_reg0 = 0; + uint32_t mcfg_reg1 = 0; + uint32_t arith_reg = 0; + + mcfg_reg0 = (k_size << 16) | (m_size << 0); + mcfg_reg1 = n_size << 0; + + arith_reg = (gemm_op << 10) | (gemm_fmt << 7); + + redmule_x_add_set((unsigned int)x); + redmule_w_add_set((unsigned int)w); + redmule_z_add_set((unsigned int)z); + redmule_mcfg_set((unsigned int)mcfg_reg0, (unsigned int)mcfg_reg1); + redmule_arith_set((unsigned int)arith_reg); +} + +void generate_test_data16(int x_start_addr, + int w_start_addr, + int y_start_addr, + int m_size, + int n_size, + int k_size) { + + int x_addr = x_start_addr; + int w_addr = w_start_addr; + int y_addr = y_start_addr; + int x_end_addr = x_start_addr + (2*m_size*n_size); + int w_end_addr = w_start_addr + (2*n_size*k_size); + int y_end_addr = y_start_addr + (2*m_size*k_size); + + // Generating input stimuli from golden model + for (x_addr = x_start_addr; x_addr < x_end_addr; x_addr += 2) { + int x = x_addr - x_start_addr; + *(uint32_t *)(x_addr) = x_inp[x/2]; + } + + // Generating Weight stimuli from golden model + for (w_addr = w_start_addr; w_addr < w_end_addr; w_addr += 2) { + int w = w_addr - w_start_addr; + *(uint32_t *)(w_addr) = w_inp[w/2]; + } + + for (y_addr = y_start_addr; y_addr < y_end_addr; y_addr += 2) { + int y = y_addr - y_start_addr; + *(uint32_t *)(y_addr) = y_inp[y/2]; + } +} + +int redmule_compare16 (int z_start_addr, int m_size, int k_size) { + int err = 0; + int z_end_addr = z_start_addr + 2*m_size*k_size; + uint16_t z_computed; + uint16_t diff, diff_1, diff_2; + + for (int z_addr = z_start_addr; z_addr < z_end_addr; z_addr += 2) { + int z = z_addr - z_start_addr; + z_computed = *(uint32_t *)(z_addr); + + if ( z_computed != z_oup[z/2] ) err++; + } + + return err; + +} + +int redmule16_compare_int(uint32_t *actual_z, uint32_t *golden_z, int len) { + #define ERR 0x0000 + uint32_t actual_word = 0; + uint16_t actual_MSHWord, actual_LSHWord; + uint32_t golden_word = 0; + uint16_t golden_MSHWord, golden_LSHWord; + uint32_t actual = 0; + uint32_t golden = 0; + + int errors = 0; + int error; + + for (int i=0; i golden_LSHWord) ? (actual_LSHWord - golden_LSHWord) : 0; + diff = (actual_LSHWord < golden_LSHWord) ? (golden_LSHWord - actual_LSHWord) : 0; + + if (diff > ERR) { + error = 1; + #ifdef VERBOSE + tfp_printf ("diff: 0x%08x\n", diff); + tfp_printf ("LSW: Error!\n"); + #endif + } + + // Checking Most Significant Half-Word + actual_MSHWord = (uint16_t)((actual_word >> 16) & 0x0000FFFF); + golden_MSHWord = (uint16_t)((golden_word >> 16) & 0x0000FFFF); + + diff = (actual_MSHWord > golden_MSHWord) ? (actual_MSHWord - golden_MSHWord) : 0; + diff = (actual_MSHWord < golden_MSHWord) ? (golden_MSHWord - actual_MSHWord) : 0; + + if (diff > ERR) { + error = 1; + #ifdef VERBOSE + tfp_printf ("diff: 0x%08x\n", diff); + tfp_printf ("MSW: Error!\n"); + #endif + } + + errors += error; + + #ifdef DEBUG + tfp_printf(" Golden: 0x%08x; Actual: 0x%08x,\n", golden_word, actual_word); + #endif + + #ifdef VERBOSE + if(error) { + if(errors==1) tfp_printf(" golden <- actual @ address @ index\n"); + tfp_printf(" 0x%08x <- 0x%08x @ 0x%08x @ 0x%08x\n", golden_word, actual_word, (actual_z+i), i*4); + } + #endif + } + return errors; +} + +int redmule8_compare_int(uint32_t *actual_z, uint32_t *golden_z, int len) { + #define ERR 0x0011 + uint32_t actual_word = 0; + uint8_t actual_Byte0, + actual_Byte1, + actual_Byte2, + actual_Byte3; + uint32_t golden_word = 0; + uint8_t golden_Byte0, + golden_Byte1, + golden_Byte2, + golden_Byte3; + uint32_t actual = 0; + uint32_t golden = 0; + + int errors = 0; + int error; + + for (int i=0; i golden_Byte0) ? (actual_Byte0 - golden_Byte0) : 0; + diff = (actual_Byte0 < golden_Byte0) ? (golden_Byte0 - actual_Byte0) : 0; + + if (diff > ERR) { + error = 1; + tfp_printf ("diff: 0x%08x\n", diff); + tfp_printf ("Byte0: Error!\n"); + } + + // Cheching Byte1 + actual_Byte1 = (uint8_t)( (actual_word >> 8 ) & 0x000000FF); + golden_Byte1 = (uint8_t)( (golden_word >> 8 ) & 0x000000FF); + + diff = (actual_Byte1 > golden_Byte1) ? (actual_Byte1 - golden_Byte1) : 0; + diff = (actual_Byte1 < golden_Byte1) ? (golden_Byte1 - actual_Byte1) : 0; + + if (diff > ERR) { + error = 1; + tfp_printf ("diff: 0x%08x\n", diff); + tfp_printf ("Byte1: Error!\n"); + } + + // Cheching Byte2 + actual_Byte2 = (uint8_t)( (actual_word >> 16 ) & 0x000000FF); + golden_Byte2 = (uint8_t)( (golden_word >> 16 ) & 0x000000FF); + + diff = (actual_Byte2 > golden_Byte2) ? (actual_Byte2 - golden_Byte2) : 0; + diff = (actual_Byte2 < golden_Byte2) ? (golden_Byte2 - actual_Byte2) : 0; + + if (diff > ERR) { + error = 1; + tfp_printf ("diff: 0x%08x\n", diff); + tfp_printf ("Byte2: Error!\n"); + } + + // Cheching Byte3 + actual_Byte3 = (uint8_t)( (actual_word >> 24 ) & 0x000000FF); + golden_Byte3 = (uint8_t)( (golden_word >> 24 ) & 0x000000FF); + + diff = (actual_Byte3 > golden_Byte3) ? (actual_Byte3 - golden_Byte3) : 0; + diff = (actual_Byte3 < golden_Byte3) ? (golden_Byte3 - actual_Byte3) : 0; + + if (diff > ERR) { + error = 1; + tfp_printf ("diff: 0x%08x\n", diff); + tfp_printf ("Byte3: Error!\n"); + } + + errors += error; + + #ifdef DEBUG + tfp_printf(" Golden: 0x%08x; Actual: 0x%08x,\n", golden_word, actual_word); + #endif + + #ifdef VERBOSE + if(error) { + if(errors==1) tfp_printf(" golden <- actual @ address @ index\n"); + tfp_printf(" 0x%08x <- 0x%08x @ 0x%08x @ 0x%08x\n", golden_word, actual_word, (actual_z+i), i*4); + } + #endif + } + return errors; +} + +#endif diff --git a/hwpe/redmule/inc/golden.h b/hwpe/redmule/inc/golden.h new file mode 100644 index 0000000..d18cb60 --- /dev/null +++ b/hwpe/redmule/inc/golden.h @@ -0,0 +1,1155 @@ + /* Header file generated by RedMulE Golden Model */ +uint32_t golden [1152] = { +0x4b524c08, +0x4bed4c14, +0x4ba64c2d, +0x4c104ca5, +0x4b6d4c37, +0x4bd24af1, +0x4c0f4c16, +0x4b964ccd, +0x4b9a4c23, +0x4bc84c05, +0x4b1a4ac8, +0x4b3f4c24, +0x4c014b58, +0x4b714bc1, +0x4c374c8e, +0x4cb54c12, +0x4bae4c0a, +0x4c0e4c56, +0x4a814bec, +0x4b4e4c14, +0x4b554bac, +0x4b224c20, +0x4c684c4e, +0x4c334bba, +0x4a3949ed, +0x4ae249d5, +0x4a024a83, +0x49f64aed, +0x4a4c4a1e, +0x4a1049a9, +0x49c549fd, +0x493c4b06, +0x4a314a76, +0x49a7496e, +0x48fc4842, +0x49a94a22, +0x4ade498d, +0x49724aaa, +0x4a2c4a76, +0x4b374a1a, +0x4a2b49b0, +0x4a214a37, +0x49814a4b, +0x49f04a4b, +0x4a014a9f, +0x49404a15, +0x4a8349f2, +0x4a274a01, +0x4b794b62, +0x4c004b15, +0x4b2d4b91, +0x4af04c1e, +0x4aed4aab, +0x4aaa4af1, +0x4adf4b65, +0x4a874c04, +0x4b204af3, +0x4ada4a7c, +0x4a3749e9, +0x4b3f4b2d, +0x4b034a84, +0x4a9f4b15, +0x4b1d4c34, +0x4bf94b50, +0x4afa4aed, +0x4b304b39, +0x4a2a4b22, +0x4a894bdf, +0x4ad64b97, +0x4a814b77, +0x4b924b56, +0x4b544adc, +0x4ada4b28, +0x4a7f4a71, +0x4a8f4aca, +0x4a0d4b14, +0x4ac14a41, +0x4a46497f, +0x4ae24a27, +0x4a2a4b06, +0x4a5249ef, +0x4a1d49e1, +0x49954964, +0x49b34a4a, +0x4ac8497d, +0x4a1b4a0d, +0x4ab94bc2, +0x4b4949ba, +0x4aa14b0a, +0x4b134ae4, +0x48d54aae, +0x49f04b35, +0x49cb4ae6, +0x49ff4b49, +0x4b494b14, +0x4a814a01, +0x4a354a40, +0x4aad4a90, +0x4ad14ada, +0x4b094a6c, +0x4a4d4a96, +0x49e3492f, +0x4a794a74, +0x4a154b59, +0x4a9649e7, +0x49bb49ea, +0x49354967, +0x4a3c4a18, +0x4aeb49c3, +0x4a8f4b1f, +0x4b064bee, +0x4b6c4a18, +0x49e24adf, +0x4aac4aa7, +0x48d44ab5, +0x4a704ac8, +0x4a5549cd, +0x4a394ae7, +0x4b3b4af1, +0x4abd49e9, +0x49f649cc, +0x49d549f2, +0x49cb4a75, +0x49fd4ae2, +0x49b74a00, +0x494049d2, +0x4a1e49f4, +0x49ad4a2b, +0x49644948, +0x4a2e499d, +0x48eb4930, +0x498d4a53, +0x4a10497b, +0x49254a5f, +0x490e4b0b, +0x4a734a4a, +0x493a49d4, +0x49ee49a8, +0x48f54a23, +0x49344a27, +0x4a0149ab, +0x497549f0, +0x4a754a77, +0x495f493c, +0x4ae24ac3, +0x4b424a29, +0x49fe4ad9, +0x4b044b00, +0x4b224b30, +0x4a0e49f6, +0x4abc4ae3, +0x4a6a4b47, +0x4a5e4a5b, +0x4a804a42, +0x49be49a1, +0x4a104b36, +0x4ae54a2b, +0x4aa44ad0, +0x4aad4b3c, +0x4c1a4a2a, +0x4b2f4b2c, +0x4a774aa0, +0x49e84af6, +0x4a0a4a4b, +0x4a144ae4, +0x4a1d4aa8, +0x4bae4ae0, +0x4b3a49c9, +0x4a854af0, +0x4a914a70, +0x4aba4a7c, +0x4a9a4ae7, +0x4ab54b17, +0x4a544a25, +0x4b594ab5, +0x4a644b5b, +0x49e14a74, +0x4a664ac6, +0x498f49cb, +0x4ab74b1f, +0x4af44a0a, +0x49fa4aab, +0x4abb4c05, +0x4bbe4a46, +0x4a374a9f, +0x4a694a8c, +0x492c4a50, +0x49c64b10, +0x4a914b26, +0x4a674b2b, +0x4bb24b4f, +0x4a864a05, +0x4a794b3a, +0x4b1e4ac0, +0x4b054ac3, +0x49e14c11, +0x4a964aa4, +0x4aab4a06, +0x4a664acc, +0x4aa74b27, +0x4aeb4a37, +0x4aae4a98, +0x492e4973, +0x4a1c4ad4, +0x4aca49f9, +0x4a514ac8, +0x4a874ba4, +0x4b3c4ac1, +0x4a8f4add, +0x4ad74a7d, +0x49b94adc, +0x4a954aca, +0x4a374ada, +0x4ad04b55, +0x4b1c4b78, +0x4b1f4a29, +0x4aca4a63, +0x4a9249b7, +0x49fe4ada, +0x4a3d4ab5, +0x49d94a42, +0x4a0049fc, +0x4a344ade, +0x49314b06, +0x4a634943, +0x497849e9, +0x48f24965, +0x49f54a89, +0x49ac4a38, +0x49b14a38, +0x4a094b82, +0x4b644a31, +0x4a2c4a91, +0x4a974a1e, +0x48a04ab3, +0x496d49fd, +0x494e4a1e, +0x49604a0e, +0x4b1a4b38, +0x49f649ae, +0x4a514a7f, +0x4a5f4a0d, +0x4a4c4a11, +0x49aa4b44, +0x4a7e4a60, +0x4a0c4a36, +0x4a564a27, +0x497d4b50, +0x49f34a2b, +0x4a214a2f, +0x491448db, +0x49f74a92, +0x4a7d499d, +0x49c44a42, +0x49f04ab0, +0x4ad24a17, +0x4a654a17, +0x49bc4a4a, +0x496c49b2, +0x4a014acc, +0x49f24a5e, +0x495d4a87, +0x4a7c4af6, +0x4ac94a0d, +0x4a5b4988, +0x4a174a71, +0x4a1a4ae3, +0x4a7e4a00, +0x49fd4a47, +0x49dd499f, +0x4a224a83, +0x49c64a19, +0x4aa24a0a, +0x49b14971, +0x48a44890, +0x49a84a89, +0x49bc49fa, +0x49e24996, +0x49df4b36, +0x4b514a58, +0x4a544b09, +0x4a2d4a87, +0x493b4a78, +0x494d49cd, +0x497a4983, +0x4a504a78, +0x4b0b4a81, +0x4a414921, +0x4aaf4aa6, +0x4ade4ab0, +0x4a804b5d, +0x4a434bb8, +0x4a734a9f, +0x4a444ae0, +0x4aef4ae1, +0x4a7f4b70, +0x4b074a1c, +0x4a294a54, +0x49d0494e, +0x4a594ac3, +0x4abe49ec, +0x4a7c4abe, +0x4b144afe, +0x4bbc4a27, +0x4adc4ad0, +0x4b054b72, +0x49714ae4, +0x4a7a4a4b, +0x4a084a8d, +0x4a514ae2, +0x4b014b1c, +0x4b184a4a, +0x4a4b4a35, +0x4a1749cf, +0x49dd4a6e, +0x4a1d4a79, +0x49ad4ac7, +0x49c44924, +0x4a9d4a33, +0x4a364a98, +0x4a3049b6, +0x4a15498d, +0x48ea48da, +0x49e24a14, +0x4a4449ab, +0x49734a2c, +0x4a2b4ba2, +0x4afd4a29, +0x49944a81, +0x4a504a16, +0x48754a68, +0x49534a25, +0x4a1f4a2e, +0x49d24ad3, +0x4b0e49dc, +0x4a6449e3, +0x4b454a67, +0x4b164a92, +0x4a7e4b93, +0x4a8a4ae8, +0x4b124ade, +0x4a984a76, +0x4b004a57, +0x4a4f4b10, +0x49fb4a7b, +0x4ac34a48, +0x496b4998, +0x4aa74b02, +0x4af44a63, +0x4a254ad6, +0x4abe4b23, +0x4bdc4af0, +0x4a6f4acb, +0x4ae74a8a, +0x49d64a40, +0x4a1b4a4e, +0x4b3e4ad3, +0x4ab84b6e, +0x4b854b19, +0x4ad64a20, +0x492c4916, +0x49a848c6, +0x493d48eb, +0x492049e4, +0x490f497a, +0x489f48cd, +0x497b49b9, +0x490d4a0d, +0x490a4968, +0x490248b5, +0x481d489d, +0x48fb4933, +0x491e489d, +0x48fd49a4, +0x497649a8, +0x49c048ed, +0x490149d0, +0x495a497f, +0x489f48db, +0x4906490c, +0x491248fd, +0x4908499c, +0x49b64922, +0x49c74852, +0x495749eb, +0x49f149e9, +0x49dd4a79, +0x49824a74, +0x49f449c2, +0x494f4937, +0x49ac4a28, +0x48ad49cf, +0x4a23496a, +0x4a834950, +0x495548bc, +0x49924a60, +0x499b49a3, +0x492d4a31, +0x49804aea, +0x4a7c499f, +0x490449a9, +0x4a344a17, +0x48f749d9, +0x49a649a2, +0x4a044a91, +0x493149ee, +0x4acc4a4f, +0x4a0149a6, +0x4af74a67, +0x4aca4a92, +0x4b144b39, +0x4ac64b05, +0x4a764a53, +0x4a0a4a41, +0x4a214a65, +0x4a194ba7, +0x4a7d49ea, +0x4a2d4a08, +0x494e4930, +0x49b64ab8, +0x4ab749b8, +0x4a304b4d, +0x4a9b4b1c, +0x4bbb4abe, +0x4a164ada, +0x4a794aeb, +0x499b4aa2, +0x49eb4afd, +0x4a654a51, +0x49de4b60, +0x4ac04bad, +0x4a7c4a21, +0x4b304b17, +0x4bd34afa, +0x4ae44b33, +0x4bb64be9, +0x4b7f4b60, +0x4a0f4ad4, +0x4b4a4bd2, +0x4a494bdc, +0x4b734a7d, +0x4a984af5, +0x49e04999, +0x4a914b70, +0x4b444abe, +0x4adb4b2b, +0x4b224bf0, +0x4c3c4a02, +0x4b2d4bdf, +0x4b3b4b1a, +0x4a094bec, +0x4a8d4b54, +0x4ae94b11, +0x4a1b4b63, +0x4bb44beb, +0x4b1e4b1d, +0x4a5d49da, +0x4ae34a46, +0x49ac4a1f, +0x4a064add, +0x4a4c4b11, +0x49af4990, +0x4a164a0f, +0x496a4b22, +0x4a0e4a1e, +0x4a154a3f, +0x49624921, +0x49da4a12, +0x4a5149ed, +0x49a94a7c, +0x4a464b0c, +0x4b3749cb, +0x4a6d4ace, +0x49994a66, +0x495a4a3a, +0x49214abf, +0x499249da, +0x495d4a93, +0x4a964aa8, +0x4a254a29, +0x4a0a497d, +0x49d249bf, +0x49934a66, +0x49f34a2a, +0x4a184a4c, +0x490c49a3, +0x4a3249b4, +0x49f34a2d, +0x4a0c4a06, +0x49ed4936, +0x493648e1, +0x4a054a33, +0x4a494914, +0x495e4a30, +0x49f14a73, +0x4ad74966, +0x49c049fa, +0x499549f4, +0x49184a12, +0x49a34a91, +0x493b4a15, +0x49454b13, +0x4a494a16, +0x49cd4979, +0x4ad54a5e, +0x4ac24ad2, +0x4a704af9, +0x4afb4bb7, +0x4ac84ba0, +0x4aa74a43, +0x4b454b03, +0x4a084bd9, +0x4aea4a33, +0x4a974a3f, +0x496149da, +0x4ab94b20, +0x4a8f4a73, +0x4a6e4a2c, +0x4a6d4bda, +0x4bf04a5a, +0x4af74b7b, +0x4aba4b3d, +0x49614b3f, +0x49934ada, +0x49bf4ae4, +0x4a6d4b0a, +0x4bd74ace, +0x4aeb4a61, +0x49b649cb, +0x4a4d4996, +0x497c4a39, +0x4a694afa, +0x49404a2b, +0x492d49c0, +0x49b44a15, +0x49ae4a40, +0x49684969, +0x498149ea, +0x48b348ca, +0x49604a18, +0x499049ac, +0x49584a17, +0x4a164b2a, +0x4aa04a3c, +0x495349a7, +0x4a564996, +0x491849eb, +0x49514948, +0x49364982, +0x499249b4, +0x4a174a9c, +0x49ee492e, +0x4aa54af4, +0x4a8e4a04, +0x4a144ad9, +0x4b844b0e, +0x4a664bb4, +0x4a6b4a2a, +0x4a594a74, +0x49a54af0, +0x4aea4a79, +0x4a904a90, +0x49824961, +0x4a8e4aea, +0x4af649f1, +0x49e04a63, +0x4a344b74, +0x4b8d4a68, +0x49fc4aa4, +0x49b34a60, +0x4a114a4c, +0x49064a71, +0x49c14a47, +0x49764a81, +0x4adb4b2d, +0x4a2d49e1, +0x49c049a1, +0x498b49b6, +0x494d49eb, +0x49d449fd, +0x4a814931, +0x49534961, +0x498949c9, +0x497649cd, +0x49a448fb, +0x496948c5, +0x48e348d0, +0x495c4a23, +0x4a1b48eb, +0x48f94a07, +0x49824a6d, +0x4a3d49c4, +0x495c498b, +0x4a104931, +0x48fe49ce, +0x49a5497b, +0x49a64a09, +0x49534aa2, +0x4a3049ff, +0x49c348f5, +0x49684a01, +0x4951497d, +0x48fd4a12, +0x49c849d8, +0x49c04987, +0x498148ab, +0x49d4495e, +0x48dc49b8, +0x491b490d, +0x491f48cd, +0x48814840, +0x485749f7, +0x495b493c, +0x497a495a, +0x498c4a34, +0x4a4e4900, +0x49aa49bb, +0x49bd499f, +0x48a4493b, +0x49454977, +0x48ef4945, +0x4910499c, +0x4aad49c4, +0x492e48f9, +0x4b0c4b0c, +0x4b704b29, +0x4a9a4b6c, +0x4af24bcb, +0x4b384af1, +0x4ac14a0d, +0x4b254b1a, +0x4a264be6, +0x4acc4b43, +0x4a6d4a96, +0x49f34a40, +0x4adb4aea, +0x4b3a4b0a, +0x4a974b1a, +0x4acc4bf5, +0x4c0b4b64, +0x4a4d4adc, +0x4aaa4ab0, +0x49ff4a75, +0x4aa34ad9, +0x4ab84aed, +0x4a624b42, +0x4b614b21, +0x4ad84a65, +0x4aae4ac3, +0x4ac049e7, +0x4a2a4ab9, +0x4a994aeb, +0x4ad44add, +0x49c449e2, +0x4a944af6, +0x4a3e4aac, +0x4ac04a53, +0x4a7849a9, +0x49ad4901, +0x4a044ac8, +0x4ac349e4, +0x4a0e4aa7, +0x4a4d4b92, +0x4b274a04, +0x4a054ae6, +0x4a0c4a60, +0x498a4a26, +0x4a274b16, +0x4a6d4ab3, +0x49bf4afa, +0x4b144ad0, +0x4a9f49c4, +0x4a454a9e, +0x4ae14a66, +0x4ad54a7a, +0x4a8c4b8c, +0x4b0d4a75, +0x49a449cb, +0x4a6f4b1a, +0x4a314ba5, +0x49f54a24, +0x4a824aa7, +0x49574913, +0x4a024a96, +0x4a5f4a2c, +0x4a5d4b2b, +0x4b444c22, +0x4c064a59, +0x4a3d4b22, +0x4af34ada, +0x48d74ad3, +0x4ab24af6, +0x4ae34b11, +0x4a8a4bcc, +0x4b0a4b0a, +0x4b424a53, +0x4a3a4a5f, +0x4abe49be, +0x4a3c4a91, +0x49fc4b64, +0x4a5f4a28, +0x49c449fe, +0x4a404a75, +0x4a134b24, +0x4a6849d0, +0x4a3a4973, +0x495c492c, +0x49a34aa0, +0x4a7d4978, +0x4a214afa, +0x4a6e4b08, +0x4b854a45, +0x49bd4a4e, +0x4aa74aae, +0x48fd4a0f, +0x4a0c4a4f, +0x4a064a7a, +0x49924a62, +0x4aa04b2c, +0x4a8d4a27, +0x4ad24ad6, +0x4b364a41, +0x49ce4b2a, +0x4a884b5d, +0x4ab24a5d, +0x4a044a18, +0x4a794a93, +0x49c54b1a, +0x4a2c4a48, +0x4a7e4a40, +0x49c04972, +0x49dc4abc, +0x4a5d4a64, +0x4a584b30, +0x4a5a4be0, +0x4bcb4aae, +0x4a4f4a87, +0x4ace4aa0, +0x49704a8b, +0x49a34ae7, +0x49cf4a91, +0x4a814b21, +0x4b6b4b30, +0x49f94a06, +0x4a1d4a27, +0x4a344a0e, +0x49af49de, +0x49ba4a3a, +0x4a0b4a05, +0x49944994, +0x495d4a57, +0x48e54a8f, +0x49bf498e, +0x499c4966, +0x48fb48b0, +0x49924a33, +0x49f449aa, +0x49d04a13, +0x4a344aee, +0x4ac449fb, +0x49514a08, +0x49e54a3d, +0x48c449ba, +0x49454a19, +0x495749f8, +0x48d24a47, +0x4a144a4e, +0x496d492f, +0x4a3c4a89, +0x4ac449e3, +0x4a8e4a78, +0x4a2e4b2b, +0x4a624b0e, +0x49f64a48, +0x4aa649eb, +0x49ec4b4d, +0x4afe4a5f, +0x4a6c4a79, +0x49b448cc, +0x4adb4a46, +0x4a8b498f, +0x49894a4c, +0x4a7e4b20, +0x4b234ada, +0x49cb4a8c, +0x4a514a58, +0x49894a2a, +0x4a214a50, +0x49f84a13, +0x49c74ae8, +0x4ace4adc, +0x4a214a18, +0x49d248d2, +0x49e94985, +0x49604a0f, +0x498b49c7, +0x4960497c, +0x48bb4886, +0x48f249c3, +0x48b249fc, +0x49c549ae, +0x49364891, +0x482b4849, +0x493e49ed, +0x492c4999, +0x493c4977, +0x497a4a50, +0x4ae549f9, +0x48c949c3, +0x49c74a5e, +0x48c049a0, +0x48d3498d, +0x4a094988, +0x48f149e4, +0x4a274930, +0x49494910, +0x4be44bad, +0x4b7a4aac, +0x4aff4b3f, +0x4aef4bfa, +0x4ba64b76, +0x4a774aed, +0x4b2b4b38, +0x4aa04bb9, +0x4b374b70, +0x4b194ac1, +0x4a2f49eb, +0x4ac54bd3, +0x4b3a4a6f, +0x4a734b80, +0x4aad4c1f, +0x4c074b16, +0x4aec4b16, +0x4b0c4a7b, +0x4acc4b33, +0x4a754b76, +0x4add4bd2, +0x4a434bbb, +0x4c064bde, +0x4b094b57, +0x4a474a13, +0x4a944a38, +0x4a224a6f, +0x499b4ab0, +0x49fc4a1a, +0x492e4986, +0x4a4a4a1e, +0x49a64afd, +0x49d949f6, +0x4a644a56, +0x4902492d, +0x499a49df, +0x49c2497e, +0x49c84a8f, +0x4a7e4af5, +0x4a964a23, +0x49f84a49, +0x4a024a11, +0x490b4a5c, +0x49954a5e, +0x49cf4a0f, +0x4a744ae7, +0x4a954aca, +0x49f549ad, +0x4a494aaa, +0x4a394a5b, +0x49dd4ad5, +0x4a954af8, +0x4a3e4a50, +0x4a4249f6, +0x4ade4a8c, +0x4a2b4ad3, +0x4a4e4a3e, +0x4aa04a6b, +0x498e49a6, +0x4a144afb, +0x4a454998, +0x49df4a5f, +0x4a554b9e, +0x4b604ada, +0x4a5d4a61, +0x4acc4ae5, +0x49324a44, +0x4a2c4a36, +0x4a5c49e8, +0x4a2b4a9b, +0x4b664ac0, +0x4ad649ff, +0x4b934ac2, +0x4b174a9c, +0x4ab14ad9, +0x4b124b2e, +0x4a884a89, +0x4ace4a85, +0x4a5e4b8e, +0x4a6d4b3d, +0x4a3c49cf, +0x4a944a4f, +0x495f49ce, +0x4ac54af2, +0x4ad04a56, +0x4a1b4b63, +0x4ac34bd6, +0x4b794a51, +0x4a9f4a8e, +0x4ae34a0f, +0x49144aae, +0x49ed4a44, +0x4a974a82, +0x4a884b41, +0x4b164bba, +0x4a7e49d2, +0x4a6e49f2, +0x4a5c4a81, +0x4a0a4aeb, +0x4ac24a73, +0x4a6e4a93, +0x49c84920, +0x4acd4a41, +0x499b4b05, +0x49e24a4e, +0x4a3449a7, +0x49694929, +0x4a624a56, +0x4b3f49b6, +0x49fb4aec, +0x4a5e4afa, +0x4b9949f1, +0x49a24a7e, +0x4a004ad1, +0x496b4a2a, +0x49b84a5e, +0x4b114ace, +0x49f64ae2, +0x4b004a39, +0x4a4a4a3c, +0x4a624a92, +0x4a794a4e, +0x4a214ab0, +0x4a4d4b76, +0x4a5a4a1d, +0x4a3149ce, +0x4a284a51, +0x49324b1b, +0x4a1a491f, +0x4a2e4a33, +0x4a17490f, +0x4aa24a43, +0x4a914a26, +0x499c4a4e, +0x4a5b4b51, +0x4b794a4c, +0x4a3749f6, +0x4ab44a49, +0x490649cd, +0x49af49f3, +0x4a024af1, +0x4a914a4a, +0x4ab34aa5, +0x4a67499f, +0x4a3f4a3b, +0x4aa549f3, +0x498049cb, +0x49dc49f7, +0x49bd4a70, +0x491b48ff, +0x49d54932, +0x49c54a8c, +0x490d49bb, +0x49d749d9, +0x486548cf, +0x492c49cf, +0x49fd4909, +0x49cf4a33, +0x49e34aeb, +0x4a4a4a32, +0x494d499a, +0x4a3849a3, +0x494f49d3, +0x495d4a43, +0x4a3b4ab2, +0x49914a7d, +0x4aeb49c9, +0x4985499e, +0x4bb34b7c, +0x4b414ac0, +0x4b3b4afa, +0x4b114c33, +0x4ada4b6b, +0x4b204b1c, +0x4b6b4b91, +0x4a264c57, +0x4b184a9b, +0x4aca4a93, +0x4a504a1d, +0x4a304afe, +0x4b6a4a3c, +0x4a5f4b8d, +0x4b764b91, +0x4bc24acc, +0x4af44b2c, +0x4b3c4aea, +0x49e54b5e, +0x4a444b18, +0x4a7a4b2f, +0x4a2f4a6b, +0x4be24bc0, +0x4a7a4aaa, +0x4ad34a84, +0x4b2c4a28, +0x4a4d4afb, +0x4a964c18, +0x4a8b4abc, +0x4a0a4a34, +0x4aeb4b0c, +0x4a674b93, +0x4a984af0, +0x4a5f4a26, +0x49c949cc, +0x4a634a4d, +0x4b3c4a12, +0x4a1c4b03, +0x4ad54b70, +0x4b2b4ac7, +0x4a974adf, +0x4a714a39, +0x499c4a92, +0x4a034a83, +0x4a134ae5, +0x4a364a6a, +0x4b454b06, +0x4ad249f3, +0x4a4949f7, +0x4ab14a91, +0x4a6f4b0f, +0x4a6e4b24, +0x4a784b0b, +0x4a8e4a1e, +0x4ad54a2d, +0x4a694b14, +0x49d94a34, +0x4a7f4a70, +0x49504946, +0x49e94a89, +0x4b5c49e3, +0x4a4e4ae0, +0x4a304af8, +0x4b044a25, +0x4ad14a7e, +0x4a904ac7, +0x49474a2e, +0x49754a9d, +0x4a894ac1, +0x4a1e4ae8, +0x4b484b18, +0x49fc4a13, +0x4b394aec, +0x4b394a12, +0x4aca4ae8, +0x4a6b4bdf, +0x4b664ad5, +0x4a1b4a82, +0x4ada4b03, +0x4a724bde, +0x4ad84aef, +0x4ac84a59, +0x4a4149ba, +0x4a6c4b73, +0x4b274a54, +0x4ac74b94, +0x4acb4b64, +0x4be24a2d, +0x4a564ae6, +0x4b2c4a62, +0x49db4b0f, +0x4afd4afb, +0x4afe4b23, +0x49cc4bbc, +0x4b814b54, +0x4b3a4a8f, +0x4ac54a6c, +0x49f94a37, +0x4ab94a91, +0x49f94bb2, +0x4a3b4a8d, +0x4a274aab, +0x4ad34a9c, +0x4a7f4b24, +0x4a784aee, +0x4a164ab4, +0x499b49e3, +0x49fb4ae9, +0x4a36496b, +0x49bd4a04, +0x4a084b04, +0x4ae54a91, +0x49fe4ab2, +0x4a484a79, +0x48ec4a54, +0x49b24acc, +0x49cf4ad1, +0x4a1a4b09, +0x4aa64b3f, +0x4a144979, +0x4a5a4b1c, +0x4adc4a71, +0x4a604b35, +0x4a2f4aeb, +0x4a9d4a3c, +0x4a8549cd, +0x4a8d4ad1, +0x49724c07, +0x4a774a2c, +0x49aa4a55, +0x49734922, +0x4a314af1, +0x4aae4995, +0x4a504a97, +0x4ac64b17, +0x4b534a35, +0x49ce4ad4, +0x4b8a4af5, +0x49824ad5, +0x4a234ad1, +0x4a904a58, +0x49b14afa, +0x4af34b43, +0x4a6a4968, +0x4a624a3c, +0x4a374a08, +0x49d44a1c, +0x4a1a4aa9, +0x4a4d4a90, +0x49b949e3, +0x49d14a1e, +0x49eb4a88, +0x49c349ea, +0x4a2b4a58, +0x491748e7, +0x4a0e49b8, +0x4a5749b1, +0x496c4a9a, +0x49eb4b0c, +0x4ae44a17, +0x49cc4a90, +0x49b649b6, +0x49494a15, +0x495b4a79, +0x49e54a43, +0x49fe4a84, +0x4a7c4a91, +0x4a4f497a, +}; \ No newline at end of file diff --git a/hwpe/redmule/inc/tensor_dim.h b/hwpe/redmule/inc/tensor_dim.h new file mode 100644 index 0000000..ab5aca4 --- /dev/null +++ b/hwpe/redmule/inc/tensor_dim.h @@ -0,0 +1,13 @@ + /* Header file generated by RedMulE Golden Model */ +#ifndef __TENSOR_DIM__ +#define __TENSOR_DIM__ + +#define M_SIZE 48 +#define N_SIZE 48 +#define K_SIZE 48 +#define SRC_FMT FP16 +#define DST_FMT FP16 +#define FPFORMAT 16 +uint8_t gemm_ops = GEMM; + +#endif diff --git a/hwpe/redmule/inc/w_2D.h b/hwpe/redmule/inc/w_2D.h new file mode 100644 index 0000000..32e8267 --- /dev/null +++ b/hwpe/redmule/inc/w_2D.h @@ -0,0 +1,51 @@ + /* Header file generated by RedMulE Golden Model */ +uint16_t w_inp_2D [48][48] = { +0x35fc, 0x3b0d, 0x3932, 0x38db, 0x351c, 0x3606, 0x2cac, 0x3881, 0x39f7, 0x3a4e, 0x36dc, 0x3be4, 0x3b10, 0x380f, 0x3a86, 0x3068, 0x39ef, 0x3843, 0x3799, 0x32e7, 0x37ec, 0x2f9f, 0x3b70, 0x3ad0, 0x3a4e, 0x2c0e, 0x34f2, 0x3996, 0x3496, 0x3744, 0x3a0a, 0x39e5, 0x3665, 0x3ae8, 0x3bd5, 0x3673, 0x28b7, 0x3b20, 0x36e9, 0x37f6, 0x36ba, 0x334c, 0x38f3, 0x3991, 0x3513, 0x36fd, 0x3249, 0x359b, +0x3a1f, 0x3af4, 0x3469, 0x3b47, 0x3a83, 0x302a, 0x2e5b, 0x3aea, 0x3b41, 0x392d, 0x2167, 0x2d48, 0x3b1a, 0x3b67, 0x353b, 0x3646, 0x2caa, 0x2fad, 0x1808, 0x3840, 0x3b9c, 0x305a, 0x2ebf, 0x3a6c, 0x366b, 0x34d2, 0x3752, 0x386d, 0x3be9, 0x3583, 0x353d, 0x3bcf, 0x3b4c, 0x37a2, 0x3324, 0x2f81, 0x3aa0, 0x31ad, 0x3beb, 0x327b, 0x221c, 0x3719, 0x3624, 0x3ad2, 0x3662, 0x3b80, 0x3a90, 0x3849, +0x364b, 0x37a3, 0x3a8f, 0x39b5, 0x3ac3, 0x2cc3, 0x3a4d, 0x36bb, 0x3aa9, 0x38e3, 0x3b3d, 0x34c2, 0x2f39, 0x3986, 0x3add, 0x3aba, 0x3aec, 0x35a9, 0x3730, 0x3345, 0x335c, 0x34d7, 0x322d, 0x3bb7, 0x39b5, 0x3bca, 0x361b, 0x3462, 0x31e5, 0x35c1, 0x3b65, 0x3b1a, 0x34fd, 0x3b93, 0x3bf5, 0x338a, 0x376e, 0x3b22, 0x325f, 0x2cd5, 0x3424, 0x37a3, 0x391f, 0x37bd, 0x3acc, 0x3439, 0x38ed, 0x3636, +0x3138, 0x3798, 0x3801, 0x3982, 0x3adb, 0x39c1, 0x3bce, 0x2eb9, 0x3799, 0x347f, 0x372a, 0x3a6e, 0x2e9c, 0x3a35, 0x3a62, 0x3468, 0x349a, 0x27e7, 0x36eb, 0x3b0e, 0x3842, 0x393e, 0x242c, 0x3b0b, 0x36f8, 0x338a, 0x3813, 0x2fe8, 0x393c, 0x2c58, 0x3a15, 0x3407, 0x2a90, 0x2d77, 0x3bab, 0x398f, 0x32bc, 0x2115, 0x36e8, 0x357e, 0x3ab3, 0x39ff, 0x2f1e, 0x38cb, 0x3979, 0x36cd, 0x37bc, 0x23ff, +0x3ba7, 0x3884, 0x325a, 0x3308, 0x3b58, 0x3a4e, 0x36e0, 0x3add, 0x30bb, 0x3b1b, 0x35b7, 0x2dea, 0x36fa, 0x34c3, 0x3a49, 0x2cb4, 0x31bf, 0x21f5, 0x3188, 0x31ad, 0x292c, 0x3a61, 0x36f6, 0x32c8, 0x3aa0, 0x3b1f, 0x3aa1, 0x38c3, 0x3848, 0x39e9, 0x15bf, 0x3a81, 0x383e, 0x394b, 0x3046, 0x373d, 0x3577, 0x3673, 0x3ad4, 0x3be4, 0x3afd, 0x3888, 0x39df, 0x2a50, 0x34ce, 0x389d, 0x3457, 0x32f9, +0x3ad8, 0x2cee, 0x36d4, 0x3804, 0x3987, 0x3887, 0x3b55, 0x372b, 0x3b31, 0x36b8, 0x3481, 0x37be, 0x2d47, 0x31fb, 0x3b5c, 0x35d0, 0x2d16, 0x38a5, 0x373b, 0x3a4d, 0x3a3e, 0x2460, 0x3a0e, 0x34da, 0x3776, 0x383a, 0x3a9a, 0x3613, 0x3832, 0x2a7f, 0x394e, 0x3bb2, 0x3736, 0x3408, 0x3824, 0x32d3, 0x3964, 0x31f6, 0x3aef, 0x252b, 0x3482, 0x207c, 0x3bab, 0x2d1b, 0x3a9c, 0x37bd, 0x384e, 0x3829, +0x2e22, 0x3333, 0x39a1, 0x30a4, 0x37bf, 0x3a7f, 0x3752, 0x3506, 0x2876, 0x34b7, 0x3476, 0x34a2, 0x3a31, 0x2db6, 0x3210, 0x318e, 0x1e10, 0x3395, 0x387a, 0x3674, 0x3381, 0x2b89, 0x3613, 0x304e, 0x38ab, 0x38f3, 0x3a29, 0x379a, 0x3876, 0x2c22, 0x353b, 0x3a4c, 0x3bdb, 0x2dd6, 0x3a77, 0x3a19, 0x38ed, 0x349d, 0x34a3, 0x38f8, 0x314a, 0x3915, 0x3869, 0x3512, 0x3976, 0x3873, 0x3049, 0x3750, +0x39ab, 0x3b69, 0x3825, 0x3595, 0x3922, 0x3871, 0x3308, 0x3856, 0x3b8f, 0x27c9, 0x2bfe, 0x3aa1, 0x3a6e, 0x3642, 0x385e, 0x3502, 0x3ac5, 0x3a06, 0x3a83, 0x37c9, 0x29d7, 0x2ffd, 0x386c, 0x34eb, 0x33f9, 0x3758, 0x18b1, 0x28d1, 0x3bfb, 0x3892, 0x388e, 0x39ae, 0x3623, 0x29c6, 0x39a7, 0x38b7, 0x393f, 0x2acf, 0x34a9, 0x3088, 0x380a, 0x3974, 0x304b, 0x332c, 0x2a6a, 0x379b, 0x3bdd, 0x1dd6, +0x148c, 0x34ae, 0x3a32, 0x366b, 0x39e8, 0x346b, 0x3986, 0x3ae4, 0x3576, 0x391e, 0x3834, 0x37f9, 0x2fac, 0x3738, 0x3b73, 0x3b95, 0x351c, 0x38d3, 0x2af2, 0x3624, 0x3505, 0x3810, 0x2d15, 0x3b25, 0x380c, 0x3ab4, 0x3a00, 0x381d, 0x33cd, 0x397a, 0x3a08, 0x3ab0, 0x2fc2, 0x3868, 0x37aa, 0x3668, 0x36d0, 0x37d9, 0x3474, 0x38a1, 0x2eb8, 0x396e, 0x397e, 0x35df, 0x3082, 0x3795, 0x3b81, 0x3a97, +0x34ba, 0x3535, 0x234d, 0x3750, 0x3095, 0x3a02, 0x3bec, 0x2e19, 0x378b, 0x37d4, 0x3b3c, 0x2fc6, 0x3a80, 0x317a, 0x3b20, 0x381a, 0x343b, 0x3842, 0x3938, 0x3866, 0x34dd, 0x3a3e, 0x3ac4, 0x343d, 0x358c, 0x34e3, 0x37ab, 0x2def, 0x368c, 0x389e, 0x3835, 0x388e, 0x36aa, 0x35d4, 0x3771, 0x3378, 0x30cb, 0x37ca, 0x3863, 0x3376, 0x2d72, 0x2f74, 0x351b, 0x3618, 0x3b8c, 0x3279, 0x379f, 0x382d, +0x385d, 0x3baa, 0x30eb, 0x2c8d, 0x3bb6, 0x3a11, 0x3852, 0x3a3c, 0x28e8, 0x3632, 0x3a2c, 0x35c4, 0x39aa, 0x36f9, 0x3142, 0x27de, 0x31ba, 0x3938, 0x368a, 0x387e, 0x3777, 0x37f1, 0x3abd, 0x3a2a, 0x3881, 0x3beb, 0x3ac4, 0x303d, 0x3262, 0x3282, 0x3064, 0x3b74, 0x2f15, 0x31a8, 0x39d5, 0x3a1f, 0x37ea, 0x3807, 0x2c37, 0x374e, 0x39fa, 0x3ab7, 0x3957, 0x31c7, 0x3a21, 0x3162, 0x3812, 0x3476, +0x33e1, 0x3198, 0x3933, 0x35d9, 0x2b29, 0x3872, 0x3758, 0x34c9, 0x2da4, 0x3a45, 0x35fa, 0x3923, 0x3a06, 0x38d3, 0x3866, 0x295f, 0x3579, 0x39f5, 0x28a9, 0x3242, 0x3907, 0x3700, 0x3bc7, 0x3934, 0x36c6, 0x3562, 0x3654, 0x3916, 0x3be3, 0x35f8, 0x33aa, 0x3035, 0x3511, 0x3ab6, 0x3687, 0x3838, 0x3ae3, 0x3183, 0x3b8c, 0x38b7, 0x396d, 0x35ce, 0x3a03, 0x29be, 0x3bd0, 0x39a8, 0x3b96, 0x3951, +0x32b5, 0x3448, 0x3ae5, 0x39ae, 0x3a15, 0x3019, 0x39a4, 0x3626, 0x3863, 0x3b0d, 0x3337, 0x36b8, 0x3971, 0x3943, 0x3b19, 0x33d7, 0x2e81, 0x325e, 0x3957, 0x357e, 0x3441, 0x38f7, 0x3a33, 0x2f39, 0x3999, 0x30d0, 0x376a, 0x389a, 0x3842, 0x3985, 0x3769, 0x38e1, 0x3953, 0x349f, 0x386d, 0x3aee, 0x3946, 0x39dd, 0x3a64, 0x3953, 0x393d, 0x3560, 0x30f2, 0x35ba, 0x3611, 0x3a3d, 0x39a9, 0x39ee, +0x386a, 0x3aaa, 0x3bdf, 0x3a80, 0x3acb, 0x3950, 0x35af, 0x33c5, 0x371f, 0x349e, 0x378d, 0x3b6a, 0x3356, 0x391c, 0x396f, 0x35f1, 0x3bfa, 0x392c, 0x2937, 0x35ed, 0x3187, 0x3b63, 0x39c0, 0x3676, 0x37dd, 0x3108, 0x3409, 0x35f8, 0x3958, 0x3844, 0x3bae, 0x36d5, 0x35e3, 0x2b3d, 0x3814, 0x3737, 0x367d, 0x3ac9, 0x3bca, 0x3abb, 0x30a1, 0x3b81, 0x3454, 0x2f9f, 0x387e, 0x3810, 0x3a84, 0x375a, +0x3adb, 0x363b, 0x37c9, 0x34f9, 0x304a, 0x36d3, 0x3381, 0x32a3, 0x3a82, 0x3baa, 0x34ec, 0x3aaa, 0x3474, 0x30e9, 0x3430, 0x3953, 0x33e5, 0x3532, 0x2b12, 0x39cc, 0x38eb, 0x3919, 0x3b4c, 0x336f, 0x3033, 0x34c6, 0x3623, 0x3414, 0x3b27, 0x3adf, 0x375f, 0x39ef, 0x38ff, 0x30ac, 0x399b, 0x3bb6, 0x2eb2, 0x37b5, 0x3b67, 0x3976, 0x3bba, 0x3855, 0x38bc, 0x3b24, 0x39f5, 0x38f5, 0x3647, 0x3b3e, +0x3481, 0x3984, 0x391e, 0x3b18, 0x3503, 0x3740, 0x3881, 0x38dd, 0x37a3, 0x35c6, 0x3b5d, 0x348a, 0x35e9, 0x30e7, 0x36e4, 0x374a, 0x317e, 0x3763, 0x33ac, 0x3752, 0x23a2, 0x3157, 0x3458, 0x34dd, 0x38c6, 0x39f5, 0x3b90, 0x341e, 0x3a4e, 0x3a9e, 0x3847, 0x3534, 0x37b0, 0x394b, 0x3235, 0x3370, 0x3a93, 0x398c, 0x3696, 0x28be, 0x3bc9, 0x34d3, 0x3061, 0x3a77, 0x3b81, 0x399d, 0x343a, 0x315a, +0x3537, 0x39d5, 0x2d26, 0x396a, 0x3a5f, 0x3a73, 0x390f, 0x2fdf, 0x3b36, 0x26da, 0x3b4f, 0x3376, 0x3b54, 0x3a06, 0x3a70, 0x38f7, 0x3b54, 0x3a21, 0x396e, 0x3818, 0x3564, 0x25ad, 0x3838, 0x378a, 0x3467, 0x3801, 0x3b6d, 0x38dd, 0x2891, 0x388a, 0x376d, 0x2dd7, 0x393c, 0x38a8, 0x3829, 0x3bad, 0x3b91, 0x3860, 0x3bc6, 0x3ad4, 0x3be9, 0x3a7e, 0x3a24, 0x3622, 0x35ee, 0x37cf, 0x3081, 0x3a71, +0x2fe3, 0x35d4, 0x3b7c, 0x2e07, 0x3a86, 0x3807, 0x3592, 0x37a8, 0x2f01, 0x3ad0, 0x3296, 0x31aa, 0x2a76, 0x3780, 0x2903, 0x3642, 0x2923, 0x31f4, 0x38b6, 0x3a02, 0x328d, 0x323b, 0x36af, 0x384d, 0x3965, 0x3950, 0x28be, 0x3b82, 0x3aa9, 0x3b59, 0x2c6e, 0x39ff, 0x3872, 0x3521, 0x3b2a, 0x2519, 0x3819, 0x332c, 0x3ada, 0x3903, 0x3998, 0x3ab1, 0x3bb8, 0x3afe, 0x3801, 0x3976, 0x3936, 0x376d, +0x3111, 0x34d6, 0x309d, 0x362e, 0x29e6, 0x2b85, 0x360c, 0x38d7, 0x3789, 0x3aad, 0x3275, 0x34c3, 0x3987, 0x38e5, 0x2eef, 0x2fa6, 0x384d, 0x38c2, 0x3955, 0x39fd, 0x2ef6, 0x3954, 0x3884, 0x3bd5, 0x3bb3, 0x2a83, 0x3585, 0x2c68, 0x3a2c, 0x33c6, 0x34c3, 0x3bdb, 0x34e4, 0x3a8c, 0x36ba, 0x390d, 0x34b6, 0x347a, 0x34e8, 0x36d4, 0x3802, 0x3523, 0x38b6, 0x35a5, 0x3271, 0x3ae6, 0x3b39, 0x39c3, +0x376e, 0x3570, 0x3816, 0x3085, 0x343d, 0x2fe4, 0x3b5f, 0x36f9, 0x3ac5, 0x37cd, 0x3ac3, 0x3add, 0x34bb, 0x3a7f, 0x2864, 0x39f1, 0x3826, 0x29a0, 0x3a74, 0x3871, 0x399a, 0x35aa, 0x38d7, 0x355e, 0x30dd, 0x3a16, 0x3473, 0x35d4, 0x326e, 0x2d92, 0x3ac7, 0x33f5, 0x2c76, 0x387b, 0x2f6e, 0x30ae, 0x2eea, 0x3a58, 0x31c0, 0x29a9, 0x3941, 0x3747, 0x30ec, 0x320c, 0x38e2, 0x3843, 0x356b, 0x3878, +0x2de2, 0x38c4, 0x39ea, 0x3535, 0x3478, 0x3437, 0x3983, 0x38f8, 0x3620, 0x3282, 0x38e2, 0x358a, 0x39ee, 0x3842, 0x3ad2, 0x2cc7, 0x3923, 0x3bf5, 0x3671, 0x2cf9, 0x36ca, 0x34b0, 0x2f2d, 0x2dcc, 0x37c6, 0x34bd, 0x1958, 0x3874, 0x3053, 0x3b1c, 0x387d, 0x38d4, 0x3bb8, 0x39d7, 0x3ad3, 0x38d4, 0x3adc, 0x25cf, 0x2431, 0x3340, 0x2920, 0x3436, 0x2de5, 0x3773, 0x25ba, 0x30d4, 0x36de, 0x3b4e, +0x3b11, 0x38cd, 0x3bf1, 0x32b9, 0x3487, 0x39d5, 0x39db, 0x3417, 0x3bc9, 0x3809, 0x3a1f, 0x31d7, 0x38e9, 0x3bdd, 0x3a7a, 0x3ad3, 0x3246, 0x3990, 0x3965, 0x316f, 0x1cf3, 0x3903, 0x3afd, 0x38ba, 0x3190, 0x3bc5, 0x38fa, 0x3814, 0x2aa6, 0x38be, 0x3433, 0x38c3, 0x3b3e, 0x3b7e, 0x3918, 0x3abd, 0x39b7, 0x3532, 0x3893, 0x3786, 0x2df3, 0x2669, 0x3bdb, 0x368f, 0x3b55, 0x385d, 0x39e4, 0x3814, +0x36ad, 0x38c5, 0x386b, 0x3718, 0x34b3, 0x3941, 0x34f3, 0x389e, 0x37ab, 0x3a84, 0x2a6e, 0x3bf9, 0x342e, 0x361b, 0x3bb9, 0x322f, 0x36e6, 0x349c, 0x3961, 0x34e2, 0x2e2f, 0x3642, 0x357d, 0x32b8, 0x259d, 0x3a58, 0x3aa7, 0x3759, 0x3352, 0x3bb1, 0x352c, 0x3776, 0x3aa6, 0x2a06, 0x3b7a, 0x38ae, 0x330e, 0x377a, 0x3841, 0x2cb3, 0x3aa6, 0x3bfc, 0x39a2, 0x3257, 0x3584, 0x38ac, 0x3761, 0x3623, +0x38ae, 0x37d1, 0x361f, 0x3080, 0x3816, 0x3936, 0x3864, 0x3a8c, 0x377c, 0x3847, 0x37c3, 0x35ab, 0x33c1, 0x39ec, 0x368c, 0x3b72, 0x322e, 0x2e35, 0x3983, 0x3a36, 0x3456, 0x33d0, 0x320a, 0x37b9, 0x18b9, 0x39ec, 0x3782, 0x3178, 0x3adb, 0x376d, 0x3514, 0x2f00, 0x39e8, 0x2e6a, 0x2153, 0x3bdb, 0x38b0, 0x2c53, 0x35e5, 0x3b3d, 0x3863, 0x3ae6, 0x3a0c, 0x3bfa, 0x3829, 0x3a6c, 0x2e19, 0x3a59, +0x3892, 0x363e, 0x303c, 0x3bdd, 0x3565, 0x3b18, 0x383c, 0x3437, 0x38bb, 0x3bb1, 0x3665, 0x2d86, 0x36de, 0x34ba, 0x3853, 0x385c, 0x31a6, 0x3a8e, 0x2cde, 0x3adc, 0x2cd5, 0x3884, 0x28de, 0x3b06, 0x29b4, 0x38df, 0x3955, 0x363f, 0x32a2, 0x35ea, 0x3879, 0x368e, 0x39aa, 0x382c, 0x34a0, 0x34ac, 0x374b, 0x3846, 0x32c2, 0x3bf8, 0x3a62, 0x3b6d, 0x3b1e, 0x3aa8, 0x333e, 0x3621, 0x3911, 0x3a8a, +0x3738, 0x3a91, 0x394f, 0x3ba9, 0x3a11, 0x3a08, 0x3b02, 0x38fe, 0x3860, 0x39db, 0x3b3a, 0x3090, 0x3836, 0x324d, 0x2d84, 0x384b, 0x2e3a, 0x3bee, 0x33ff, 0x3be7, 0x3144, 0x31b4, 0x39f9, 0x3c00, 0x3614, 0x2c49, 0x3706, 0x2f7e, 0x39bb, 0x31a9, 0x39e9, 0x382e, 0x3868, 0x3a2c, 0x369f, 0x39fb, 0x3bdb, 0x39e5, 0x3956, 0x340e, 0x38ab, 0x36d8, 0x38f1, 0x3baf, 0x3a9f, 0x3b9f, 0x3593, 0x3aa7, +0x3b35, 0x36dd, 0x39b1, 0x3a34, 0x3471, 0x3b10, 0x357b, 0x3901, 0x3a1a, 0x2b62, 0x333f, 0x39f4, 0x3532, 0x3439, 0x3b58, 0x3747, 0x35b6, 0x385e, 0x3809, 0x3292, 0x3685, 0x306a, 0x3650, 0x3bf9, 0x3944, 0x3ad6, 0x3967, 0x3bc1, 0x383f, 0x398c, 0x3903, 0x37a5, 0x3886, 0x3578, 0x2fbd, 0x2d16, 0x3679, 0x3989, 0x360f, 0x3722, 0x3816, 0x3af2, 0x391b, 0x38ff, 0x3aac, 0x38fa, 0x3495, 0x36a2, +0x392b, 0x30ef, 0x36ab, 0x3b08, 0x2874, 0x36bf, 0x3ab9, 0x3826, 0x3aa3, 0x3264, 0x367c, 0x3bb2, 0x36af, 0x3bd0, 0x3686, 0x39fa, 0x38c7, 0x3828, 0x2ece, 0x38dc, 0x2503, 0x39a9, 0x1e5b, 0x36d0, 0x2cda, 0x3876, 0x3898, 0x2f2f, 0x388e, 0x3957, 0x2de2, 0x3527, 0x38ff, 0x3bca, 0x3b64, 0x3871, 0x3569, 0x33e0, 0x39fb, 0x3841, 0x3956, 0x3548, 0x2dc0, 0x34f8, 0x3ac5, 0x3825, 0x390b, 0x3afd, +0x39b6, 0x31e0, 0x347c, 0x390a, 0x3797, 0x340d, 0x3965, 0x393c, 0x39b9, 0x354a, 0x3735, 0x39c0, 0x3a12, 0x3705, 0x3aa8, 0x2d54, 0x39ae, 0x3b94, 0x390d, 0x3ae2, 0x35bc, 0x3bc5, 0x342d, 0x3960, 0x3927, 0x3b75, 0x3b59, 0x37a8, 0x38b0, 0x3a31, 0x34c6, 0x387b, 0x3421, 0x3201, 0x2e3e, 0x355e, 0x31b3, 0x37ee, 0x264f, 0x383b, 0x3a97, 0x2f43, 0x21b1, 0x246d, 0x3941, 0x3895, 0x33c2, 0x3922, +0x3be3, 0x3b92, 0x30b0, 0x3a4d, 0x3276, 0x3254, 0x388b, 0x2a11, 0x337c, 0x3a12, 0x3bcb, 0x3830, 0x3716, 0x3211, 0x3397, 0x375b, 0x3704, 0x31c3, 0x3b40, 0x3882, 0x3644, 0x34b4, 0x2cd3, 0x328f, 0x3944, 0x32a0, 0x3a25, 0x3865, 0x3989, 0x387d, 0x3333, 0x37b6, 0x3b1a, 0x36d8, 0x3191, 0x38b6, 0x3aa9, 0x3593, 0x3ac6, 0x391b, 0x39a8, 0x3762, 0x3832, 0x348d, 0x3b8e, 0x2e1b, 0x3609, 0x2f99, +0x39a8, 0x3b3a, 0x326e, 0x3af1, 0x35fe, 0x3a6d, 0x3865, 0x2e64, 0x35f7, 0x3250, 0x394d, 0x35cc, 0x38d4, 0x34e3, 0x3998, 0x38d8, 0x344d, 0x35f6, 0x370f, 0x2dd9, 0x3318, 0x3175, 0x2ca7, 0x3b8d, 0x381b, 0x2e3f, 0x38e2, 0x3a20, 0x3980, 0x3b51, 0x3bc5, 0x34ad, 0x38fb, 0x351f, 0x35f4, 0x3a7c, 0x30a3, 0x29c3, 0x34b0, 0x38dd, 0x32d0, 0x3196, 0x3a52, 0x3b1a, 0x3bd5, 0x2336, 0x2b84, 0x373c, +0x3b48, 0x2cc4, 0x3ae6, 0x36c5, 0x3bef, 0x3429, 0x39e0, 0x37e5, 0x393f, 0x3075, 0x371d, 0x3ae5, 0x3bcf, 0x3985, 0x3a61, 0x3952, 0x3a59, 0x3b67, 0x2eed, 0x38c7, 0x3984, 0x3ab3, 0x3bf6, 0x3b8c, 0x3aa2, 0x38b7, 0x361d, 0x3889, 0x3bf2, 0x357d, 0x3906, 0x3916, 0x3b6b, 0x2ce3, 0x38f5, 0x38a3, 0x3a03, 0x3848, 0x32e4, 0x31f1, 0x3659, 0x321c, 0x3b9d, 0x3543, 0x346f, 0x3ad2, 0x28be, 0x3814, +0x3ac3, 0x3a25, 0x370d, 0x3959, 0x39f1, 0x3564, 0x3abd, 0x30e3, 0x2e05, 0x352e, 0x38fd, 0x32b4, 0x34fe, 0x3806, 0x37f7, 0x30ce, 0x352d, 0x28aa, 0x3bb6, 0x3596, 0x367c, 0x3179, 0x3888, 0x2435, 0x39ff, 0x30bc, 0x2d57, 0x3b18, 0x3816, 0x37c6, 0x3700, 0x3801, 0x30a1, 0x397d, 0x3995, 0x3b34, 0x3b32, 0x3a23, 0x2899, 0x2d9e, 0x383b, 0x38dc, 0x3174, 0x38c8, 0x34c9, 0x38cc, 0x3813, 0x3224, +0x3580, 0x3913, 0x3908, 0x378e, 0x359d, 0x368a, 0x3b98, 0x3a4e, 0x3647, 0x256b, 0x31bd, 0x3aac, 0x3bd7, 0x253b, 0x2c43, 0x3b2e, 0x3a7d, 0x3533, 0x3638, 0x31ab, 0x2ffc, 0x2ae2, 0x391f, 0x303f, 0x3a56, 0x3830, 0x3af0, 0x3894, 0x3bda, 0x3a64, 0x3887, 0x318a, 0x349b, 0x3a9a, 0x348a, 0x3a9f, 0x3895, 0x2df3, 0x33e6, 0x3751, 0x3493, 0x35d7, 0x347b, 0x390e, 0x38ca, 0x336e, 0x3b06, 0x38dc, +0x3b26, 0x37c1, 0x392a, 0x34c8, 0x3b85, 0x3bdc, 0x3b87, 0x32d8, 0x38c7, 0x36e8, 0x37ea, 0x3ae2, 0x3514, 0x3a11, 0x3997, 0x3058, 0x39a3, 0x3bb8, 0x3b14, 0x375f, 0x3ab4, 0x3afa, 0x3454, 0x37a2, 0x2753, 0x368f, 0x2eeb, 0x3744, 0x3516, 0x301b, 0x32ce, 0x37bd, 0x3b00, 0x3904, 0x3b32, 0x2a9b, 0x357d, 0x3a9f, 0x3bfd, 0x38e5, 0x37a9, 0x3255, 0x3585, 0x38e5, 0x3888, 0x34e0, 0x37c5, 0x3a3e, +0x372b, 0x2170, 0x35ba, 0x3aea, 0x31e7, 0x3839, 0x371c, 0x3a87, 0x36d8, 0x31ca, 0x3aa6, 0x2b08, 0x3b9e, 0x3851, 0x3bc8, 0x371a, 0x3a32, 0x3417, 0x3adb, 0x2bc3, 0x3a5c, 0x3052, 0x3b2d, 0x3509, 0x366c, 0x28b2, 0x37c2, 0x3ae5, 0x3723, 0x37f9, 0x3837, 0x3b4b, 0x2e1c, 0x3a39, 0x3957, 0x3187, 0x39db, 0x35e5, 0x348a, 0x39a1, 0x3446, 0x398b, 0x2c5a, 0x350f, 0x387a, 0x38c0, 0x3991, 0x3ab3, +0x3a43, 0x34a9, 0x38f7, 0x38e1, 0x37cd, 0x336e, 0x3a65, 0x35c1, 0x2cee, 0x3893, 0x2da1, 0x36e3, 0x3522, 0x2a40, 0x3b9e, 0x3742, 0x3bfa, 0x3634, 0x347b, 0x2d83, 0x39f7, 0x3a2c, 0x3b1e, 0x32eb, 0x3506, 0x3a5d, 0x34f9, 0x354c, 0x3104, 0x2cdf, 0x3a35, 0x3a08, 0x319e, 0x37b7, 0x3570, 0x3b22, 0x387a, 0x330c, 0x3706, 0x31a6, 0x38de, 0x3bbc, 0x38e7, 0x360e, 0x3257, 0x331b, 0x315d, 0x320e, +0x3908, 0x3375, 0x2d75, 0x3182, 0x3304, 0x2d93, 0x3868, 0x38ca, 0x2d07, 0x3253, 0x39ff, 0x3456, 0x37fc, 0x3a8d, 0x37d4, 0x360e, 0x32e6, 0x36ab, 0x3a4d, 0x3411, 0x3a14, 0x3a5f, 0x38bf, 0x3858, 0x3688, 0x25c2, 0x3949, 0x2a05, 0x3b45, 0x359f, 0x3af5, 0x3408, 0x2fa0, 0x34e8, 0x28c2, 0x3944, 0x3300, 0x3212, 0x3311, 0x3b6c, 0x306c, 0x220c, 0x300b, 0x3a38, 0x3bb2, 0x3ab9, 0x2c5f, 0x2ec8, +0x3610, 0x3057, 0x30e9, 0x3357, 0x39fb, 0x39df, 0x3be6, 0x36b0, 0x32e6, 0x384a, 0x338c, 0x3b6f, 0x3bcb, 0x3787, 0x3be7, 0x3af5, 0x35f5, 0x3915, 0x2178, 0x36ee, 0x392e, 0x37b4, 0x3a03, 0x3414, 0x38a5, 0x3afc, 0x39ba, 0x3655, 0x2e40, 0x377f, 0x3811, 0x3b95, 0x3753, 0x39e9, 0x38a2, 0x3b58, 0x37c7, 0x2371, 0x2ff7, 0x3592, 0x34e5, 0x3203, 0x3719, 0x384d, 0x3ad5, 0x3a1c, 0x35cf, 0x39b4, +0x367e, 0x3846, 0x2ef6, 0x3af1, 0x2ede, 0x3ae8, 0x390d, 0x3607, 0x3956, 0x348e, 0x3869, 0x31e3, 0x2d45, 0x1d83, 0x37af, 0x3885, 0x3aa6, 0x3a0e, 0x34d9, 0x3b1a, 0x38ae, 0x3958, 0x35b2, 0x3ad5, 0x3462, 0x3630, 0x3900, 0x394a, 0x3b42, 0x36e6, 0x39c2, 0x3149, 0x35f1, 0x377c, 0x354e, 0x29af, 0x3a9c, 0x3892, 0x3b4f, 0x33da, 0x3980, 0x2b89, 0x3984, 0x31a, 0x3455, 0x3abd, 0x3b48, 0x3223, +0x356d, 0x3b1c, 0x3703, 0x36bf, 0x2fd8, 0x3972, 0x3b08, 0x3b5f, 0x3a35, 0x3996, 0x3ad5, 0x3631, 0x3923, 0x3a56, 0x3515, 0x37aa, 0x3bc3, 0x32de, 0x3aa1, 0x3579, 0x3acd, 0x3046, 0x36ff, 0x370e, 0x3bcd, 0x363c, 0x3836, 0x3609, 0x38e2, 0x3569, 0x2808, 0x383d, 0x3b7c, 0x386f, 0x2655, 0x1df6, 0x389e, 0x3460, 0x3895, 0x33b2, 0x3a42, 0x37d2, 0x3938, 0x3316, 0x3b24, 0x326f, 0x2c93, 0x3a2a, +0x369d, 0x3aea, 0x287f, 0x3ae7, 0x3900, 0x2bd7, 0x2f4f, 0x3ad3, 0x3adc, 0x3aac, 0x385e, 0x3002, 0x34de, 0x380d, 0x3998, 0x340f, 0x3695, 0x3bdb, 0x321a, 0x2a8f, 0x39fa, 0x2f3f, 0x3b44, 0x355f, 0x32b7, 0x39d3, 0x2854, 0x39db, 0x3318, 0x383b, 0x2f98, 0x393d, 0x3b71, 0x3b26, 0x37af, 0x3734, 0x3af6, 0x33bc, 0x2ac2, 0x360a, 0x3219, 0x2d1f, 0x3477, 0x1525, 0x3324, 0x3bdd, 0x3581, 0x2905, +0x3131, 0x3b47, 0x3947, 0x3bef, 0x3046, 0x3938, 0x2ca4, 0x28be, 0x321d, 0x3bc9, 0x2f66, 0x3559, 0x326e, 0x39d8, 0x33b1, 0x3715, 0x3aef, 0x2c8b, 0x3b06, 0x36ba, 0x3957, 0x3825, 0x364e, 0x387d, 0x3130, 0x3a56, 0x3bf6, 0x3797, 0x39d4, 0x37d9, 0x3371, 0x321e, 0x31ac, 0x3a66, 0x220e, 0x363d, 0x33ca, 0x387b, 0x3b5e, 0x3b67, 0x3974, 0x3a18, 0x3bb4, 0x3ba7, 0x2583, 0x3a2f, 0x36e4, 0x3575, +0x3a64, 0x35bd, 0x3a5b, 0x3909, 0x38a1, 0x3a4c, 0x349c, 0x3afe, 0x3ad4, 0x2e2f, 0x2e19, 0x3a17, 0x356b, 0x3b5f, 0x3852, 0x3a62, 0x3ba9, 0x3992, 0x3a86, 0x3a73, 0x3042, 0x2a7c, 0x3841, 0x33ae, 0x2f4c, 0x35b6, 0x349e, 0x387b, 0x39d8, 0x370c, 0x3b8a, 0x3b54, 0x3a63, 0x37cb, 0x3bb9, 0x3af4, 0x3720, 0x39df, 0x39e9, 0x38bb, 0x3bb9, 0x354f, 0x3bd9, 0x3bbb, 0x39c6, 0x3aaf, 0x3654, 0x254c, +0x3b96, 0x38d3, 0x2e2e, 0x33df, 0x3a9a, 0x1c03, 0x3ac0, 0x3416, 0x319f, 0x39e5, 0x306a, 0x2f55, 0x3acb, 0x3b00, 0x396d, 0x3915, 0x3abc, 0x3856, 0x32ba, 0x38e8, 0x35e5, 0x3817, 0x3a8f, 0x1882, 0x383d, 0x396c, 0x35da, 0x37c5, 0x3ba3, 0x398c, 0x390b, 0x3a95, 0x3078, 0x3612, 0x3812, 0x1e29, 0x3559, 0x366a, 0x3832, 0x3909, 0x36b6, 0x2c9e, 0x3999, 0x2fbd, 0x38a3, 0x34b5, 0x3689, 0x3bfc, +0x2d8d, 0x39f8, 0x3add, 0x3384, 0x3a91, 0x37f3, 0x2cdd, 0x3b57, 0x37fd, 0x3158, 0x3a28, 0x3bf2, 0x344e, 0x360b, 0x3365, 0x3aff, 0x386d, 0x31d8, 0x38d4, 0x3b6a, 0x34ae, 0x346c, 0x3beb, 0x24e1, 0x3958, 0x3a6a, 0x37d2, 0x397e, 0x38c4, 0x2ec6, 0x383f, 0x3a1d, 0x39aa, 0x3abe, 0x35ac, 0x3280, 0x3618, 0x240d, 0x38f3, 0x317c, 0x301b, 0x3a2e, 0x31e1, 0x3795, 0x390d, 0x39e1, 0x3400, 0x367f, +0x3701, 0x3865, 0x39b2, 0x2f08, 0x3baf, 0x2cf5, 0x2d91, 0x3a37, 0x37bf, 0x39e8, 0x384c, 0x30b7, 0x3a22, 0x36c7, 0x3854, 0x39e2, 0x35d5, 0x39db, 0x3b20, 0x33b4, 0x34ea, 0x3aad, 0x3827, 0x359e, 0x3580, 0x2fa6, 0x2c22, 0x3479, 0x39b4, 0x3a62, 0x3b25, 0x3b3a, 0x34b6, 0x2d83, 0x3a9c, 0x3bc0, 0x339a, 0x3074, 0x399a, 0x3540, 0x2982, 0x3638, 0x3a89, 0x36fc, 0x2b61, 0x3121, 0x3225, 0x3862, +0x2ff4, 0x36a8, 0x337a, 0x3854, 0x3b79, 0x3589, 0x3275, 0x3bde, 0x3bd6, 0x3975, 0x273c, 0x29df, 0x36f2, 0x39e8, 0x2ad3, 0x3538, 0x3976, 0x3b92, 0x2e45, 0x3b57, 0x3a3b, 0x34d3, 0x36fe, 0x2fe4, 0x3764, 0x3a33, 0x3b3e, 0x3b67, 0x3a99, 0x3874, 0x3418, 0x35f9, 0x39c7, 0x31fd, 0x37b7, 0x36f7, 0x385c, 0x3add, 0x3716, 0x36cb, 0x3a4a, 0x3bca, 0x38b9, 0x3622, 0x231b, 0x3bca, 0x3938, 0x385b +}; \ No newline at end of file diff --git a/hwpe/redmule/inc/w_input.h b/hwpe/redmule/inc/w_input.h new file mode 100644 index 0000000..b90f9aa --- /dev/null +++ b/hwpe/redmule/inc/w_input.h @@ -0,0 +1,51 @@ + /* Header file generated by RedMulE Golden Model */ +uint16_t w_inp [2304] = { +0x35fc, 0x3b0d, 0x3932, 0x38db, 0x351c, 0x3606, 0x2cac, 0x3881, 0x39f7, 0x3a4e, 0x36dc, 0x3be4, 0x3b10, 0x380f, 0x3a86, 0x3068, 0x39ef, 0x3843, 0x3799, 0x32e7, 0x37ec, 0x2f9f, 0x3b70, 0x3ad0, 0x3a4e, 0x2c0e, 0x34f2, 0x3996, 0x3496, 0x3744, 0x3a0a, 0x39e5, 0x3665, 0x3ae8, 0x3bd5, 0x3673, 0x28b7, 0x3b20, 0x36e9, 0x37f6, 0x36ba, 0x334c, 0x38f3, 0x3991, 0x3513, 0x36fd, 0x3249, 0x359b, +0x3a1f, 0x3af4, 0x3469, 0x3b47, 0x3a83, 0x302a, 0x2e5b, 0x3aea, 0x3b41, 0x392d, 0x2167, 0x2d48, 0x3b1a, 0x3b67, 0x353b, 0x3646, 0x2caa, 0x2fad, 0x1808, 0x3840, 0x3b9c, 0x305a, 0x2ebf, 0x3a6c, 0x366b, 0x34d2, 0x3752, 0x386d, 0x3be9, 0x3583, 0x353d, 0x3bcf, 0x3b4c, 0x37a2, 0x3324, 0x2f81, 0x3aa0, 0x31ad, 0x3beb, 0x327b, 0x221c, 0x3719, 0x3624, 0x3ad2, 0x3662, 0x3b80, 0x3a90, 0x3849, +0x364b, 0x37a3, 0x3a8f, 0x39b5, 0x3ac3, 0x2cc3, 0x3a4d, 0x36bb, 0x3aa9, 0x38e3, 0x3b3d, 0x34c2, 0x2f39, 0x3986, 0x3add, 0x3aba, 0x3aec, 0x35a9, 0x3730, 0x3345, 0x335c, 0x34d7, 0x322d, 0x3bb7, 0x39b5, 0x3bca, 0x361b, 0x3462, 0x31e5, 0x35c1, 0x3b65, 0x3b1a, 0x34fd, 0x3b93, 0x3bf5, 0x338a, 0x376e, 0x3b22, 0x325f, 0x2cd5, 0x3424, 0x37a3, 0x391f, 0x37bd, 0x3acc, 0x3439, 0x38ed, 0x3636, +0x3138, 0x3798, 0x3801, 0x3982, 0x3adb, 0x39c1, 0x3bce, 0x2eb9, 0x3799, 0x347f, 0x372a, 0x3a6e, 0x2e9c, 0x3a35, 0x3a62, 0x3468, 0x349a, 0x27e7, 0x36eb, 0x3b0e, 0x3842, 0x393e, 0x242c, 0x3b0b, 0x36f8, 0x338a, 0x3813, 0x2fe8, 0x393c, 0x2c58, 0x3a15, 0x3407, 0x2a90, 0x2d77, 0x3bab, 0x398f, 0x32bc, 0x2115, 0x36e8, 0x357e, 0x3ab3, 0x39ff, 0x2f1e, 0x38cb, 0x3979, 0x36cd, 0x37bc, 0x23ff, +0x3ba7, 0x3884, 0x325a, 0x3308, 0x3b58, 0x3a4e, 0x36e0, 0x3add, 0x30bb, 0x3b1b, 0x35b7, 0x2dea, 0x36fa, 0x34c3, 0x3a49, 0x2cb4, 0x31bf, 0x21f5, 0x3188, 0x31ad, 0x292c, 0x3a61, 0x36f6, 0x32c8, 0x3aa0, 0x3b1f, 0x3aa1, 0x38c3, 0x3848, 0x39e9, 0x15bf, 0x3a81, 0x383e, 0x394b, 0x3046, 0x373d, 0x3577, 0x3673, 0x3ad4, 0x3be4, 0x3afd, 0x3888, 0x39df, 0x2a50, 0x34ce, 0x389d, 0x3457, 0x32f9, +0x3ad8, 0x2cee, 0x36d4, 0x3804, 0x3987, 0x3887, 0x3b55, 0x372b, 0x3b31, 0x36b8, 0x3481, 0x37be, 0x2d47, 0x31fb, 0x3b5c, 0x35d0, 0x2d16, 0x38a5, 0x373b, 0x3a4d, 0x3a3e, 0x2460, 0x3a0e, 0x34da, 0x3776, 0x383a, 0x3a9a, 0x3613, 0x3832, 0x2a7f, 0x394e, 0x3bb2, 0x3736, 0x3408, 0x3824, 0x32d3, 0x3964, 0x31f6, 0x3aef, 0x252b, 0x3482, 0x207c, 0x3bab, 0x2d1b, 0x3a9c, 0x37bd, 0x384e, 0x3829, +0x2e22, 0x3333, 0x39a1, 0x30a4, 0x37bf, 0x3a7f, 0x3752, 0x3506, 0x2876, 0x34b7, 0x3476, 0x34a2, 0x3a31, 0x2db6, 0x3210, 0x318e, 0x1e10, 0x3395, 0x387a, 0x3674, 0x3381, 0x2b89, 0x3613, 0x304e, 0x38ab, 0x38f3, 0x3a29, 0x379a, 0x3876, 0x2c22, 0x353b, 0x3a4c, 0x3bdb, 0x2dd6, 0x3a77, 0x3a19, 0x38ed, 0x349d, 0x34a3, 0x38f8, 0x314a, 0x3915, 0x3869, 0x3512, 0x3976, 0x3873, 0x3049, 0x3750, +0x39ab, 0x3b69, 0x3825, 0x3595, 0x3922, 0x3871, 0x3308, 0x3856, 0x3b8f, 0x27c9, 0x2bfe, 0x3aa1, 0x3a6e, 0x3642, 0x385e, 0x3502, 0x3ac5, 0x3a06, 0x3a83, 0x37c9, 0x29d7, 0x2ffd, 0x386c, 0x34eb, 0x33f9, 0x3758, 0x18b1, 0x28d1, 0x3bfb, 0x3892, 0x388e, 0x39ae, 0x3623, 0x29c6, 0x39a7, 0x38b7, 0x393f, 0x2acf, 0x34a9, 0x3088, 0x380a, 0x3974, 0x304b, 0x332c, 0x2a6a, 0x379b, 0x3bdd, 0x1dd6, +0x148c, 0x34ae, 0x3a32, 0x366b, 0x39e8, 0x346b, 0x3986, 0x3ae4, 0x3576, 0x391e, 0x3834, 0x37f9, 0x2fac, 0x3738, 0x3b73, 0x3b95, 0x351c, 0x38d3, 0x2af2, 0x3624, 0x3505, 0x3810, 0x2d15, 0x3b25, 0x380c, 0x3ab4, 0x3a00, 0x381d, 0x33cd, 0x397a, 0x3a08, 0x3ab0, 0x2fc2, 0x3868, 0x37aa, 0x3668, 0x36d0, 0x37d9, 0x3474, 0x38a1, 0x2eb8, 0x396e, 0x397e, 0x35df, 0x3082, 0x3795, 0x3b81, 0x3a97, +0x34ba, 0x3535, 0x234d, 0x3750, 0x3095, 0x3a02, 0x3bec, 0x2e19, 0x378b, 0x37d4, 0x3b3c, 0x2fc6, 0x3a80, 0x317a, 0x3b20, 0x381a, 0x343b, 0x3842, 0x3938, 0x3866, 0x34dd, 0x3a3e, 0x3ac4, 0x343d, 0x358c, 0x34e3, 0x37ab, 0x2def, 0x368c, 0x389e, 0x3835, 0x388e, 0x36aa, 0x35d4, 0x3771, 0x3378, 0x30cb, 0x37ca, 0x3863, 0x3376, 0x2d72, 0x2f74, 0x351b, 0x3618, 0x3b8c, 0x3279, 0x379f, 0x382d, +0x385d, 0x3baa, 0x30eb, 0x2c8d, 0x3bb6, 0x3a11, 0x3852, 0x3a3c, 0x28e8, 0x3632, 0x3a2c, 0x35c4, 0x39aa, 0x36f9, 0x3142, 0x27de, 0x31ba, 0x3938, 0x368a, 0x387e, 0x3777, 0x37f1, 0x3abd, 0x3a2a, 0x3881, 0x3beb, 0x3ac4, 0x303d, 0x3262, 0x3282, 0x3064, 0x3b74, 0x2f15, 0x31a8, 0x39d5, 0x3a1f, 0x37ea, 0x3807, 0x2c37, 0x374e, 0x39fa, 0x3ab7, 0x3957, 0x31c7, 0x3a21, 0x3162, 0x3812, 0x3476, +0x33e1, 0x3198, 0x3933, 0x35d9, 0x2b29, 0x3872, 0x3758, 0x34c9, 0x2da4, 0x3a45, 0x35fa, 0x3923, 0x3a06, 0x38d3, 0x3866, 0x295f, 0x3579, 0x39f5, 0x28a9, 0x3242, 0x3907, 0x3700, 0x3bc7, 0x3934, 0x36c6, 0x3562, 0x3654, 0x3916, 0x3be3, 0x35f8, 0x33aa, 0x3035, 0x3511, 0x3ab6, 0x3687, 0x3838, 0x3ae3, 0x3183, 0x3b8c, 0x38b7, 0x396d, 0x35ce, 0x3a03, 0x29be, 0x3bd0, 0x39a8, 0x3b96, 0x3951, +0x32b5, 0x3448, 0x3ae5, 0x39ae, 0x3a15, 0x3019, 0x39a4, 0x3626, 0x3863, 0x3b0d, 0x3337, 0x36b8, 0x3971, 0x3943, 0x3b19, 0x33d7, 0x2e81, 0x325e, 0x3957, 0x357e, 0x3441, 0x38f7, 0x3a33, 0x2f39, 0x3999, 0x30d0, 0x376a, 0x389a, 0x3842, 0x3985, 0x3769, 0x38e1, 0x3953, 0x349f, 0x386d, 0x3aee, 0x3946, 0x39dd, 0x3a64, 0x3953, 0x393d, 0x3560, 0x30f2, 0x35ba, 0x3611, 0x3a3d, 0x39a9, 0x39ee, +0x386a, 0x3aaa, 0x3bdf, 0x3a80, 0x3acb, 0x3950, 0x35af, 0x33c5, 0x371f, 0x349e, 0x378d, 0x3b6a, 0x3356, 0x391c, 0x396f, 0x35f1, 0x3bfa, 0x392c, 0x2937, 0x35ed, 0x3187, 0x3b63, 0x39c0, 0x3676, 0x37dd, 0x3108, 0x3409, 0x35f8, 0x3958, 0x3844, 0x3bae, 0x36d5, 0x35e3, 0x2b3d, 0x3814, 0x3737, 0x367d, 0x3ac9, 0x3bca, 0x3abb, 0x30a1, 0x3b81, 0x3454, 0x2f9f, 0x387e, 0x3810, 0x3a84, 0x375a, +0x3adb, 0x363b, 0x37c9, 0x34f9, 0x304a, 0x36d3, 0x3381, 0x32a3, 0x3a82, 0x3baa, 0x34ec, 0x3aaa, 0x3474, 0x30e9, 0x3430, 0x3953, 0x33e5, 0x3532, 0x2b12, 0x39cc, 0x38eb, 0x3919, 0x3b4c, 0x336f, 0x3033, 0x34c6, 0x3623, 0x3414, 0x3b27, 0x3adf, 0x375f, 0x39ef, 0x38ff, 0x30ac, 0x399b, 0x3bb6, 0x2eb2, 0x37b5, 0x3b67, 0x3976, 0x3bba, 0x3855, 0x38bc, 0x3b24, 0x39f5, 0x38f5, 0x3647, 0x3b3e, +0x3481, 0x3984, 0x391e, 0x3b18, 0x3503, 0x3740, 0x3881, 0x38dd, 0x37a3, 0x35c6, 0x3b5d, 0x348a, 0x35e9, 0x30e7, 0x36e4, 0x374a, 0x317e, 0x3763, 0x33ac, 0x3752, 0x23a2, 0x3157, 0x3458, 0x34dd, 0x38c6, 0x39f5, 0x3b90, 0x341e, 0x3a4e, 0x3a9e, 0x3847, 0x3534, 0x37b0, 0x394b, 0x3235, 0x3370, 0x3a93, 0x398c, 0x3696, 0x28be, 0x3bc9, 0x34d3, 0x3061, 0x3a77, 0x3b81, 0x399d, 0x343a, 0x315a, +0x3537, 0x39d5, 0x2d26, 0x396a, 0x3a5f, 0x3a73, 0x390f, 0x2fdf, 0x3b36, 0x26da, 0x3b4f, 0x3376, 0x3b54, 0x3a06, 0x3a70, 0x38f7, 0x3b54, 0x3a21, 0x396e, 0x3818, 0x3564, 0x25ad, 0x3838, 0x378a, 0x3467, 0x3801, 0x3b6d, 0x38dd, 0x2891, 0x388a, 0x376d, 0x2dd7, 0x393c, 0x38a8, 0x3829, 0x3bad, 0x3b91, 0x3860, 0x3bc6, 0x3ad4, 0x3be9, 0x3a7e, 0x3a24, 0x3622, 0x35ee, 0x37cf, 0x3081, 0x3a71, +0x2fe3, 0x35d4, 0x3b7c, 0x2e07, 0x3a86, 0x3807, 0x3592, 0x37a8, 0x2f01, 0x3ad0, 0x3296, 0x31aa, 0x2a76, 0x3780, 0x2903, 0x3642, 0x2923, 0x31f4, 0x38b6, 0x3a02, 0x328d, 0x323b, 0x36af, 0x384d, 0x3965, 0x3950, 0x28be, 0x3b82, 0x3aa9, 0x3b59, 0x2c6e, 0x39ff, 0x3872, 0x3521, 0x3b2a, 0x2519, 0x3819, 0x332c, 0x3ada, 0x3903, 0x3998, 0x3ab1, 0x3bb8, 0x3afe, 0x3801, 0x3976, 0x3936, 0x376d, +0x3111, 0x34d6, 0x309d, 0x362e, 0x29e6, 0x2b85, 0x360c, 0x38d7, 0x3789, 0x3aad, 0x3275, 0x34c3, 0x3987, 0x38e5, 0x2eef, 0x2fa6, 0x384d, 0x38c2, 0x3955, 0x39fd, 0x2ef6, 0x3954, 0x3884, 0x3bd5, 0x3bb3, 0x2a83, 0x3585, 0x2c68, 0x3a2c, 0x33c6, 0x34c3, 0x3bdb, 0x34e4, 0x3a8c, 0x36ba, 0x390d, 0x34b6, 0x347a, 0x34e8, 0x36d4, 0x3802, 0x3523, 0x38b6, 0x35a5, 0x3271, 0x3ae6, 0x3b39, 0x39c3, +0x376e, 0x3570, 0x3816, 0x3085, 0x343d, 0x2fe4, 0x3b5f, 0x36f9, 0x3ac5, 0x37cd, 0x3ac3, 0x3add, 0x34bb, 0x3a7f, 0x2864, 0x39f1, 0x3826, 0x29a0, 0x3a74, 0x3871, 0x399a, 0x35aa, 0x38d7, 0x355e, 0x30dd, 0x3a16, 0x3473, 0x35d4, 0x326e, 0x2d92, 0x3ac7, 0x33f5, 0x2c76, 0x387b, 0x2f6e, 0x30ae, 0x2eea, 0x3a58, 0x31c0, 0x29a9, 0x3941, 0x3747, 0x30ec, 0x320c, 0x38e2, 0x3843, 0x356b, 0x3878, +0x2de2, 0x38c4, 0x39ea, 0x3535, 0x3478, 0x3437, 0x3983, 0x38f8, 0x3620, 0x3282, 0x38e2, 0x358a, 0x39ee, 0x3842, 0x3ad2, 0x2cc7, 0x3923, 0x3bf5, 0x3671, 0x2cf9, 0x36ca, 0x34b0, 0x2f2d, 0x2dcc, 0x37c6, 0x34bd, 0x1958, 0x3874, 0x3053, 0x3b1c, 0x387d, 0x38d4, 0x3bb8, 0x39d7, 0x3ad3, 0x38d4, 0x3adc, 0x25cf, 0x2431, 0x3340, 0x2920, 0x3436, 0x2de5, 0x3773, 0x25ba, 0x30d4, 0x36de, 0x3b4e, +0x3b11, 0x38cd, 0x3bf1, 0x32b9, 0x3487, 0x39d5, 0x39db, 0x3417, 0x3bc9, 0x3809, 0x3a1f, 0x31d7, 0x38e9, 0x3bdd, 0x3a7a, 0x3ad3, 0x3246, 0x3990, 0x3965, 0x316f, 0x1cf3, 0x3903, 0x3afd, 0x38ba, 0x3190, 0x3bc5, 0x38fa, 0x3814, 0x2aa6, 0x38be, 0x3433, 0x38c3, 0x3b3e, 0x3b7e, 0x3918, 0x3abd, 0x39b7, 0x3532, 0x3893, 0x3786, 0x2df3, 0x2669, 0x3bdb, 0x368f, 0x3b55, 0x385d, 0x39e4, 0x3814, +0x36ad, 0x38c5, 0x386b, 0x3718, 0x34b3, 0x3941, 0x34f3, 0x389e, 0x37ab, 0x3a84, 0x2a6e, 0x3bf9, 0x342e, 0x361b, 0x3bb9, 0x322f, 0x36e6, 0x349c, 0x3961, 0x34e2, 0x2e2f, 0x3642, 0x357d, 0x32b8, 0x259d, 0x3a58, 0x3aa7, 0x3759, 0x3352, 0x3bb1, 0x352c, 0x3776, 0x3aa6, 0x2a06, 0x3b7a, 0x38ae, 0x330e, 0x377a, 0x3841, 0x2cb3, 0x3aa6, 0x3bfc, 0x39a2, 0x3257, 0x3584, 0x38ac, 0x3761, 0x3623, +0x38ae, 0x37d1, 0x361f, 0x3080, 0x3816, 0x3936, 0x3864, 0x3a8c, 0x377c, 0x3847, 0x37c3, 0x35ab, 0x33c1, 0x39ec, 0x368c, 0x3b72, 0x322e, 0x2e35, 0x3983, 0x3a36, 0x3456, 0x33d0, 0x320a, 0x37b9, 0x18b9, 0x39ec, 0x3782, 0x3178, 0x3adb, 0x376d, 0x3514, 0x2f00, 0x39e8, 0x2e6a, 0x2153, 0x3bdb, 0x38b0, 0x2c53, 0x35e5, 0x3b3d, 0x3863, 0x3ae6, 0x3a0c, 0x3bfa, 0x3829, 0x3a6c, 0x2e19, 0x3a59, +0x3892, 0x363e, 0x303c, 0x3bdd, 0x3565, 0x3b18, 0x383c, 0x3437, 0x38bb, 0x3bb1, 0x3665, 0x2d86, 0x36de, 0x34ba, 0x3853, 0x385c, 0x31a6, 0x3a8e, 0x2cde, 0x3adc, 0x2cd5, 0x3884, 0x28de, 0x3b06, 0x29b4, 0x38df, 0x3955, 0x363f, 0x32a2, 0x35ea, 0x3879, 0x368e, 0x39aa, 0x382c, 0x34a0, 0x34ac, 0x374b, 0x3846, 0x32c2, 0x3bf8, 0x3a62, 0x3b6d, 0x3b1e, 0x3aa8, 0x333e, 0x3621, 0x3911, 0x3a8a, +0x3738, 0x3a91, 0x394f, 0x3ba9, 0x3a11, 0x3a08, 0x3b02, 0x38fe, 0x3860, 0x39db, 0x3b3a, 0x3090, 0x3836, 0x324d, 0x2d84, 0x384b, 0x2e3a, 0x3bee, 0x33ff, 0x3be7, 0x3144, 0x31b4, 0x39f9, 0x3c00, 0x3614, 0x2c49, 0x3706, 0x2f7e, 0x39bb, 0x31a9, 0x39e9, 0x382e, 0x3868, 0x3a2c, 0x369f, 0x39fb, 0x3bdb, 0x39e5, 0x3956, 0x340e, 0x38ab, 0x36d8, 0x38f1, 0x3baf, 0x3a9f, 0x3b9f, 0x3593, 0x3aa7, +0x3b35, 0x36dd, 0x39b1, 0x3a34, 0x3471, 0x3b10, 0x357b, 0x3901, 0x3a1a, 0x2b62, 0x333f, 0x39f4, 0x3532, 0x3439, 0x3b58, 0x3747, 0x35b6, 0x385e, 0x3809, 0x3292, 0x3685, 0x306a, 0x3650, 0x3bf9, 0x3944, 0x3ad6, 0x3967, 0x3bc1, 0x383f, 0x398c, 0x3903, 0x37a5, 0x3886, 0x3578, 0x2fbd, 0x2d16, 0x3679, 0x3989, 0x360f, 0x3722, 0x3816, 0x3af2, 0x391b, 0x38ff, 0x3aac, 0x38fa, 0x3495, 0x36a2, +0x392b, 0x30ef, 0x36ab, 0x3b08, 0x2874, 0x36bf, 0x3ab9, 0x3826, 0x3aa3, 0x3264, 0x367c, 0x3bb2, 0x36af, 0x3bd0, 0x3686, 0x39fa, 0x38c7, 0x3828, 0x2ece, 0x38dc, 0x2503, 0x39a9, 0x1e5b, 0x36d0, 0x2cda, 0x3876, 0x3898, 0x2f2f, 0x388e, 0x3957, 0x2de2, 0x3527, 0x38ff, 0x3bca, 0x3b64, 0x3871, 0x3569, 0x33e0, 0x39fb, 0x3841, 0x3956, 0x3548, 0x2dc0, 0x34f8, 0x3ac5, 0x3825, 0x390b, 0x3afd, +0x39b6, 0x31e0, 0x347c, 0x390a, 0x3797, 0x340d, 0x3965, 0x393c, 0x39b9, 0x354a, 0x3735, 0x39c0, 0x3a12, 0x3705, 0x3aa8, 0x2d54, 0x39ae, 0x3b94, 0x390d, 0x3ae2, 0x35bc, 0x3bc5, 0x342d, 0x3960, 0x3927, 0x3b75, 0x3b59, 0x37a8, 0x38b0, 0x3a31, 0x34c6, 0x387b, 0x3421, 0x3201, 0x2e3e, 0x355e, 0x31b3, 0x37ee, 0x264f, 0x383b, 0x3a97, 0x2f43, 0x21b1, 0x246d, 0x3941, 0x3895, 0x33c2, 0x3922, +0x3be3, 0x3b92, 0x30b0, 0x3a4d, 0x3276, 0x3254, 0x388b, 0x2a11, 0x337c, 0x3a12, 0x3bcb, 0x3830, 0x3716, 0x3211, 0x3397, 0x375b, 0x3704, 0x31c3, 0x3b40, 0x3882, 0x3644, 0x34b4, 0x2cd3, 0x328f, 0x3944, 0x32a0, 0x3a25, 0x3865, 0x3989, 0x387d, 0x3333, 0x37b6, 0x3b1a, 0x36d8, 0x3191, 0x38b6, 0x3aa9, 0x3593, 0x3ac6, 0x391b, 0x39a8, 0x3762, 0x3832, 0x348d, 0x3b8e, 0x2e1b, 0x3609, 0x2f99, +0x39a8, 0x3b3a, 0x326e, 0x3af1, 0x35fe, 0x3a6d, 0x3865, 0x2e64, 0x35f7, 0x3250, 0x394d, 0x35cc, 0x38d4, 0x34e3, 0x3998, 0x38d8, 0x344d, 0x35f6, 0x370f, 0x2dd9, 0x3318, 0x3175, 0x2ca7, 0x3b8d, 0x381b, 0x2e3f, 0x38e2, 0x3a20, 0x3980, 0x3b51, 0x3bc5, 0x34ad, 0x38fb, 0x351f, 0x35f4, 0x3a7c, 0x30a3, 0x29c3, 0x34b0, 0x38dd, 0x32d0, 0x3196, 0x3a52, 0x3b1a, 0x3bd5, 0x2336, 0x2b84, 0x373c, +0x3b48, 0x2cc4, 0x3ae6, 0x36c5, 0x3bef, 0x3429, 0x39e0, 0x37e5, 0x393f, 0x3075, 0x371d, 0x3ae5, 0x3bcf, 0x3985, 0x3a61, 0x3952, 0x3a59, 0x3b67, 0x2eed, 0x38c7, 0x3984, 0x3ab3, 0x3bf6, 0x3b8c, 0x3aa2, 0x38b7, 0x361d, 0x3889, 0x3bf2, 0x357d, 0x3906, 0x3916, 0x3b6b, 0x2ce3, 0x38f5, 0x38a3, 0x3a03, 0x3848, 0x32e4, 0x31f1, 0x3659, 0x321c, 0x3b9d, 0x3543, 0x346f, 0x3ad2, 0x28be, 0x3814, +0x3ac3, 0x3a25, 0x370d, 0x3959, 0x39f1, 0x3564, 0x3abd, 0x30e3, 0x2e05, 0x352e, 0x38fd, 0x32b4, 0x34fe, 0x3806, 0x37f7, 0x30ce, 0x352d, 0x28aa, 0x3bb6, 0x3596, 0x367c, 0x3179, 0x3888, 0x2435, 0x39ff, 0x30bc, 0x2d57, 0x3b18, 0x3816, 0x37c6, 0x3700, 0x3801, 0x30a1, 0x397d, 0x3995, 0x3b34, 0x3b32, 0x3a23, 0x2899, 0x2d9e, 0x383b, 0x38dc, 0x3174, 0x38c8, 0x34c9, 0x38cc, 0x3813, 0x3224, +0x3580, 0x3913, 0x3908, 0x378e, 0x359d, 0x368a, 0x3b98, 0x3a4e, 0x3647, 0x256b, 0x31bd, 0x3aac, 0x3bd7, 0x253b, 0x2c43, 0x3b2e, 0x3a7d, 0x3533, 0x3638, 0x31ab, 0x2ffc, 0x2ae2, 0x391f, 0x303f, 0x3a56, 0x3830, 0x3af0, 0x3894, 0x3bda, 0x3a64, 0x3887, 0x318a, 0x349b, 0x3a9a, 0x348a, 0x3a9f, 0x3895, 0x2df3, 0x33e6, 0x3751, 0x3493, 0x35d7, 0x347b, 0x390e, 0x38ca, 0x336e, 0x3b06, 0x38dc, +0x3b26, 0x37c1, 0x392a, 0x34c8, 0x3b85, 0x3bdc, 0x3b87, 0x32d8, 0x38c7, 0x36e8, 0x37ea, 0x3ae2, 0x3514, 0x3a11, 0x3997, 0x3058, 0x39a3, 0x3bb8, 0x3b14, 0x375f, 0x3ab4, 0x3afa, 0x3454, 0x37a2, 0x2753, 0x368f, 0x2eeb, 0x3744, 0x3516, 0x301b, 0x32ce, 0x37bd, 0x3b00, 0x3904, 0x3b32, 0x2a9b, 0x357d, 0x3a9f, 0x3bfd, 0x38e5, 0x37a9, 0x3255, 0x3585, 0x38e5, 0x3888, 0x34e0, 0x37c5, 0x3a3e, +0x372b, 0x2170, 0x35ba, 0x3aea, 0x31e7, 0x3839, 0x371c, 0x3a87, 0x36d8, 0x31ca, 0x3aa6, 0x2b08, 0x3b9e, 0x3851, 0x3bc8, 0x371a, 0x3a32, 0x3417, 0x3adb, 0x2bc3, 0x3a5c, 0x3052, 0x3b2d, 0x3509, 0x366c, 0x28b2, 0x37c2, 0x3ae5, 0x3723, 0x37f9, 0x3837, 0x3b4b, 0x2e1c, 0x3a39, 0x3957, 0x3187, 0x39db, 0x35e5, 0x348a, 0x39a1, 0x3446, 0x398b, 0x2c5a, 0x350f, 0x387a, 0x38c0, 0x3991, 0x3ab3, +0x3a43, 0x34a9, 0x38f7, 0x38e1, 0x37cd, 0x336e, 0x3a65, 0x35c1, 0x2cee, 0x3893, 0x2da1, 0x36e3, 0x3522, 0x2a40, 0x3b9e, 0x3742, 0x3bfa, 0x3634, 0x347b, 0x2d83, 0x39f7, 0x3a2c, 0x3b1e, 0x32eb, 0x3506, 0x3a5d, 0x34f9, 0x354c, 0x3104, 0x2cdf, 0x3a35, 0x3a08, 0x319e, 0x37b7, 0x3570, 0x3b22, 0x387a, 0x330c, 0x3706, 0x31a6, 0x38de, 0x3bbc, 0x38e7, 0x360e, 0x3257, 0x331b, 0x315d, 0x320e, +0x3908, 0x3375, 0x2d75, 0x3182, 0x3304, 0x2d93, 0x3868, 0x38ca, 0x2d07, 0x3253, 0x39ff, 0x3456, 0x37fc, 0x3a8d, 0x37d4, 0x360e, 0x32e6, 0x36ab, 0x3a4d, 0x3411, 0x3a14, 0x3a5f, 0x38bf, 0x3858, 0x3688, 0x25c2, 0x3949, 0x2a05, 0x3b45, 0x359f, 0x3af5, 0x3408, 0x2fa0, 0x34e8, 0x28c2, 0x3944, 0x3300, 0x3212, 0x3311, 0x3b6c, 0x306c, 0x220c, 0x300b, 0x3a38, 0x3bb2, 0x3ab9, 0x2c5f, 0x2ec8, +0x3610, 0x3057, 0x30e9, 0x3357, 0x39fb, 0x39df, 0x3be6, 0x36b0, 0x32e6, 0x384a, 0x338c, 0x3b6f, 0x3bcb, 0x3787, 0x3be7, 0x3af5, 0x35f5, 0x3915, 0x2178, 0x36ee, 0x392e, 0x37b4, 0x3a03, 0x3414, 0x38a5, 0x3afc, 0x39ba, 0x3655, 0x2e40, 0x377f, 0x3811, 0x3b95, 0x3753, 0x39e9, 0x38a2, 0x3b58, 0x37c7, 0x2371, 0x2ff7, 0x3592, 0x34e5, 0x3203, 0x3719, 0x384d, 0x3ad5, 0x3a1c, 0x35cf, 0x39b4, +0x367e, 0x3846, 0x2ef6, 0x3af1, 0x2ede, 0x3ae8, 0x390d, 0x3607, 0x3956, 0x348e, 0x3869, 0x31e3, 0x2d45, 0x1d83, 0x37af, 0x3885, 0x3aa6, 0x3a0e, 0x34d9, 0x3b1a, 0x38ae, 0x3958, 0x35b2, 0x3ad5, 0x3462, 0x3630, 0x3900, 0x394a, 0x3b42, 0x36e6, 0x39c2, 0x3149, 0x35f1, 0x377c, 0x354e, 0x29af, 0x3a9c, 0x3892, 0x3b4f, 0x33da, 0x3980, 0x2b89, 0x3984, 0x31a, 0x3455, 0x3abd, 0x3b48, 0x3223, +0x356d, 0x3b1c, 0x3703, 0x36bf, 0x2fd8, 0x3972, 0x3b08, 0x3b5f, 0x3a35, 0x3996, 0x3ad5, 0x3631, 0x3923, 0x3a56, 0x3515, 0x37aa, 0x3bc3, 0x32de, 0x3aa1, 0x3579, 0x3acd, 0x3046, 0x36ff, 0x370e, 0x3bcd, 0x363c, 0x3836, 0x3609, 0x38e2, 0x3569, 0x2808, 0x383d, 0x3b7c, 0x386f, 0x2655, 0x1df6, 0x389e, 0x3460, 0x3895, 0x33b2, 0x3a42, 0x37d2, 0x3938, 0x3316, 0x3b24, 0x326f, 0x2c93, 0x3a2a, +0x369d, 0x3aea, 0x287f, 0x3ae7, 0x3900, 0x2bd7, 0x2f4f, 0x3ad3, 0x3adc, 0x3aac, 0x385e, 0x3002, 0x34de, 0x380d, 0x3998, 0x340f, 0x3695, 0x3bdb, 0x321a, 0x2a8f, 0x39fa, 0x2f3f, 0x3b44, 0x355f, 0x32b7, 0x39d3, 0x2854, 0x39db, 0x3318, 0x383b, 0x2f98, 0x393d, 0x3b71, 0x3b26, 0x37af, 0x3734, 0x3af6, 0x33bc, 0x2ac2, 0x360a, 0x3219, 0x2d1f, 0x3477, 0x1525, 0x3324, 0x3bdd, 0x3581, 0x2905, +0x3131, 0x3b47, 0x3947, 0x3bef, 0x3046, 0x3938, 0x2ca4, 0x28be, 0x321d, 0x3bc9, 0x2f66, 0x3559, 0x326e, 0x39d8, 0x33b1, 0x3715, 0x3aef, 0x2c8b, 0x3b06, 0x36ba, 0x3957, 0x3825, 0x364e, 0x387d, 0x3130, 0x3a56, 0x3bf6, 0x3797, 0x39d4, 0x37d9, 0x3371, 0x321e, 0x31ac, 0x3a66, 0x220e, 0x363d, 0x33ca, 0x387b, 0x3b5e, 0x3b67, 0x3974, 0x3a18, 0x3bb4, 0x3ba7, 0x2583, 0x3a2f, 0x36e4, 0x3575, +0x3a64, 0x35bd, 0x3a5b, 0x3909, 0x38a1, 0x3a4c, 0x349c, 0x3afe, 0x3ad4, 0x2e2f, 0x2e19, 0x3a17, 0x356b, 0x3b5f, 0x3852, 0x3a62, 0x3ba9, 0x3992, 0x3a86, 0x3a73, 0x3042, 0x2a7c, 0x3841, 0x33ae, 0x2f4c, 0x35b6, 0x349e, 0x387b, 0x39d8, 0x370c, 0x3b8a, 0x3b54, 0x3a63, 0x37cb, 0x3bb9, 0x3af4, 0x3720, 0x39df, 0x39e9, 0x38bb, 0x3bb9, 0x354f, 0x3bd9, 0x3bbb, 0x39c6, 0x3aaf, 0x3654, 0x254c, +0x3b96, 0x38d3, 0x2e2e, 0x33df, 0x3a9a, 0x1c03, 0x3ac0, 0x3416, 0x319f, 0x39e5, 0x306a, 0x2f55, 0x3acb, 0x3b00, 0x396d, 0x3915, 0x3abc, 0x3856, 0x32ba, 0x38e8, 0x35e5, 0x3817, 0x3a8f, 0x1882, 0x383d, 0x396c, 0x35da, 0x37c5, 0x3ba3, 0x398c, 0x390b, 0x3a95, 0x3078, 0x3612, 0x3812, 0x1e29, 0x3559, 0x366a, 0x3832, 0x3909, 0x36b6, 0x2c9e, 0x3999, 0x2fbd, 0x38a3, 0x34b5, 0x3689, 0x3bfc, +0x2d8d, 0x39f8, 0x3add, 0x3384, 0x3a91, 0x37f3, 0x2cdd, 0x3b57, 0x37fd, 0x3158, 0x3a28, 0x3bf2, 0x344e, 0x360b, 0x3365, 0x3aff, 0x386d, 0x31d8, 0x38d4, 0x3b6a, 0x34ae, 0x346c, 0x3beb, 0x24e1, 0x3958, 0x3a6a, 0x37d2, 0x397e, 0x38c4, 0x2ec6, 0x383f, 0x3a1d, 0x39aa, 0x3abe, 0x35ac, 0x3280, 0x3618, 0x240d, 0x38f3, 0x317c, 0x301b, 0x3a2e, 0x31e1, 0x3795, 0x390d, 0x39e1, 0x3400, 0x367f, +0x3701, 0x3865, 0x39b2, 0x2f08, 0x3baf, 0x2cf5, 0x2d91, 0x3a37, 0x37bf, 0x39e8, 0x384c, 0x30b7, 0x3a22, 0x36c7, 0x3854, 0x39e2, 0x35d5, 0x39db, 0x3b20, 0x33b4, 0x34ea, 0x3aad, 0x3827, 0x359e, 0x3580, 0x2fa6, 0x2c22, 0x3479, 0x39b4, 0x3a62, 0x3b25, 0x3b3a, 0x34b6, 0x2d83, 0x3a9c, 0x3bc0, 0x339a, 0x3074, 0x399a, 0x3540, 0x2982, 0x3638, 0x3a89, 0x36fc, 0x2b61, 0x3121, 0x3225, 0x3862, +0x2ff4, 0x36a8, 0x337a, 0x3854, 0x3b79, 0x3589, 0x3275, 0x3bde, 0x3bd6, 0x3975, 0x273c, 0x29df, 0x36f2, 0x39e8, 0x2ad3, 0x3538, 0x3976, 0x3b92, 0x2e45, 0x3b57, 0x3a3b, 0x34d3, 0x36fe, 0x2fe4, 0x3764, 0x3a33, 0x3b3e, 0x3b67, 0x3a99, 0x3874, 0x3418, 0x35f9, 0x39c7, 0x31fd, 0x37b7, 0x36f7, 0x385c, 0x3add, 0x3716, 0x36cb, 0x3a4a, 0x3bca, 0x38b9, 0x3622, 0x231b, 0x3bca, 0x3938, 0x385b +}; \ No newline at end of file diff --git a/hwpe/redmule/inc/x_2D.h b/hwpe/redmule/inc/x_2D.h new file mode 100644 index 0000000..a20e883 --- /dev/null +++ b/hwpe/redmule/inc/x_2D.h @@ -0,0 +1,51 @@ + /* Header file generated by RedMulE Golden Model */ +uint16_t x_inp_2D [48][48] = { +0x348f, 0x3244, 0x3b67, 0x3ab8, 0x3ab1, 0x39f4, 0x3807, 0x3ba3, 0x37e3, 0x3bd4, 0x337e, 0x36cb, 0x3a60, 0x381e, 0x3b98, 0x2c0e, 0x3421, 0x3bc4, 0x3b18, 0x3703, 0x3b8d, 0x3a06, 0x38f6, 0x36af, 0x322a, 0x3354, 0x3bf3, 0x3b7e, 0x38cf, 0x3826, 0x35be, 0x3a42, 0x39c4, 0x3b62, 0x3a29, 0x3b5b, 0x39ab, 0x3a4c, 0x3b44, 0x3b48, 0x3831, 0x31ca, 0x3918, 0x39bb, 0x3a82, 0x3830, 0x39af, 0x39ba, +0x3853, 0x2b2a, 0x39bc, 0x36e5, 0x3bb8, 0x37f6, 0x2e8d, 0x3a93, 0x3b53, 0x3424, 0x38a6, 0x3583, 0x39cd, 0x35f0, 0x3556, 0x3956, 0x3a10, 0x37de, 0x353b, 0x2cdd, 0x3779, 0x2a45, 0x3b07, 0x303f, 0x3b95, 0x3903, 0x3275, 0x391c, 0x39bd, 0x3503, 0x328e, 0x2f75, 0x35da, 0x3a32, 0x3974, 0x37a0, 0x3ab6, 0x34c9, 0x3674, 0x3859, 0x2c40, 0x38da, 0x38be, 0x38a1, 0x38a4, 0x3a74, 0x2167, 0x33f4, +0x38d2, 0x3a5a, 0x30a7, 0x3b8e, 0x39bd, 0x382a, 0x3714, 0x35f7, 0x3b34, 0x3535, 0x3b2c, 0x39b1, 0x3902, 0x3965, 0x3b7b, 0x3a1d, 0x3ae6, 0x3b0e, 0x3960, 0x37b6, 0x3872, 0x2dc4, 0x320f, 0x2c60, 0x38c9, 0x3a10, 0x387b, 0x39f1, 0x3929, 0x387c, 0x3ae4, 0x3881, 0x3a7c, 0x39c9, 0x3ae4, 0x38ec, 0x3ad0, 0x314a, 0x2d1e, 0x3b18, 0x2629, 0x358b, 0x3760, 0x2e4f, 0x3996, 0x394c, 0x3aa1, 0x28cc, +0x2c01, 0x38d9, 0x2a1c, 0x3bac, 0x3b50, 0x38e3, 0x33ac, 0x317a, 0x3277, 0x2f5e, 0x36b4, 0x39a2, 0x34fa, 0x24f8, 0x3b5c, 0x3890, 0x248e, 0x39c1, 0x37be, 0x2830, 0x3aa0, 0x3a1f, 0x3bb4, 0x3af9, 0x1c84, 0x3a33, 0x3742, 0x3bdb, 0x28be, 0x3bc1, 0x3572, 0x3911, 0x39d2, 0x35b5, 0x3ab6, 0x3206, 0x3914, 0x3127, 0x3adf, 0x362d, 0x340d, 0x3b5b, 0x3a05, 0x3b25, 0x3b65, 0x361b, 0x3801, 0x2d22, +0x2d9e, 0x3a91, 0x2db9, 0x3861, 0x39f9, 0x3aab, 0x3afa, 0x30bb, 0x3a1e, 0x2f27, 0x329a, 0x3bb7, 0x3472, 0x37b5, 0x3462, 0x32bd, 0x2722, 0x3ba7, 0x2bb9, 0x2431, 0x39bd, 0x38fc, 0x3b4f, 0x3b45, 0x3572, 0x37b8, 0x3aa7, 0x3a36, 0x3b2d, 0x3422, 0x3b09, 0x397f, 0x26b3, 0x3a0f, 0x3625, 0x3b6a, 0x3493, 0x3771, 0x357e, 0x360b, 0x30e8, 0x3905, 0x3a55, 0x39b9, 0x3344, 0x36d2, 0x3a6e, 0x3809, +0x3240, 0x39e0, 0x3746, 0x3b22, 0x34ba, 0x391b, 0x3939, 0x3321, 0x31e2, 0x3a97, 0x3bc0, 0x34a3, 0x3adb, 0x3a6d, 0x34af, 0x37b3, 0x3a63, 0x3702, 0x36c7, 0x3b73, 0x273c, 0x3808, 0x21e6, 0x3b34, 0x381c, 0x3825, 0x2fde, 0x299c, 0x2f4a, 0x3733, 0x314e, 0x3b89, 0x2e89, 0x37d2, 0x36a2, 0x353a, 0x3901, 0x3a9e, 0x2c1a, 0x3880, 0x37e7, 0x346f, 0x3361, 0x3896, 0x2f56, 0x3aa7, 0x33dd, 0x390b, +0x3bb0, 0x3b1a, 0x2d21, 0x3562, 0x38d8, 0x2f77, 0x38f6, 0x3158, 0x36cd, 0x35a1, 0x2b2e, 0x2938, 0x3af9, 0x348a, 0x399b, 0x3954, 0x29b8, 0x39a7, 0x3a83, 0x3bcb, 0x38ee, 0x3806, 0x2697, 0x3628, 0x3b38, 0x38be, 0x363c, 0x387e, 0x3a6c, 0x3b92, 0x335f, 0x37ba, 0x37da, 0x342e, 0x3509, 0x3be9, 0x392a, 0x32d7, 0x3ac6, 0x346e, 0x38f4, 0x3b5a, 0x3814, 0x3875, 0x39c9, 0x3a9f, 0x37c3, 0x3b00, +0x3675, 0x3a15, 0x36ec, 0x3b53, 0x3915, 0x36c4, 0x3462, 0x3b05, 0x2b3e, 0x351e, 0x369c, 0x38aa, 0x3342, 0x2e71, 0x3af1, 0x3aa7, 0x39d1, 0x3b0b, 0x3be9, 0x3a0a, 0x344f, 0x3b04, 0x39d6, 0x3864, 0x34e9, 0x308e, 0x3b6b, 0x32bf, 0x3610, 0x36d2, 0x350f, 0x3a78, 0x306f, 0x30e5, 0x3213, 0x3b6c, 0x356f, 0x38db, 0x387e, 0x3064, 0x3bf7, 0x2e00, 0x3bc4, 0x39df, 0x3758, 0x397f, 0x38a8, 0x34b8, +0x2c53, 0x36b9, 0x38a5, 0x2c24, 0x2836, 0x3a5a, 0x3acf, 0x37b2, 0x33f7, 0x3858, 0x3204, 0x37f8, 0x394c, 0x3781, 0x3b0f, 0x306a, 0x3ab4, 0x3a72, 0x3861, 0x3ab7, 0x3857, 0x375a, 0x3886, 0x3833, 0x3b06, 0x3bf9, 0x3bdc, 0x356c, 0x380f, 0x394f, 0x3942, 0x39cb, 0x3a2e, 0x3a94, 0x3b77, 0x36b3, 0x3585, 0x3916, 0x3ba5, 0x31de, 0x33fe, 0x2f98, 0x3953, 0x38c1, 0x38b4, 0x2c65, 0x30f6, 0x3523, +0x3661, 0x3b45, 0x2cba, 0x3615, 0x38a1, 0x3a9b, 0x3b75, 0x3be3, 0x3978, 0x36ba, 0x3a1e, 0x3bc1, 0x3bd2, 0x3738, 0x2f64, 0x3998, 0x3868, 0x34ae, 0x36b5, 0x3468, 0x390a, 0x2484, 0x3146, 0x30ea, 0x332b, 0x35b8, 0x390a, 0x3903, 0x288a, 0x3b74, 0x3bf9, 0x396a, 0x3bae, 0x30e3, 0x3857, 0x1ce7, 0x253f, 0x3b44, 0x3a54, 0x31b4, 0x37e2, 0x3b32, 0x323d, 0x3808, 0x34de, 0x3759, 0x300c, 0x3257, +0x37d3, 0x28ef, 0x3bd0, 0x39f1, 0x3b26, 0x3988, 0x3756, 0x39d5, 0x38b8, 0x3906, 0x30e3, 0x3b48, 0x34cb, 0x38cc, 0x3b88, 0x2c93, 0x3aae, 0x3822, 0x35fa, 0x39a0, 0x3830, 0x382b, 0x38c8, 0x348b, 0x3293, 0x397f, 0x39aa, 0x3416, 0x3b17, 0x34a7, 0x3671, 0x2942, 0x38ce, 0x2e26, 0x3832, 0x3ab2, 0x2e39, 0x3700, 0x3399, 0x34c7, 0x3ac6, 0x193b, 0x3a2b, 0x3481, 0x3b02, 0x3a2c, 0x2d24, 0x2fb8, +0x3aa9, 0x3599, 0x3520, 0x3551, 0x2561, 0x2e7a, 0x3b26, 0x3463, 0x2f1c, 0x2e4d, 0x343d, 0x3502, 0x2d9b, 0x3b38, 0x37a5, 0x3ba2, 0x34b4, 0x3891, 0x3af1, 0x2c37, 0x39e9, 0x3658, 0x3188, 0x24f0, 0x3a41, 0x3bf1, 0x3707, 0x3101, 0x34fb, 0x32cc, 0x35bb, 0x3acd, 0x38af, 0x39e9, 0x3974, 0x32e1, 0x32f7, 0x32e3, 0x3ad5, 0x2a73, 0x39e6, 0x3b01, 0x3347, 0x3bd1, 0x3791, 0x3aaf, 0x3be8, 0x3a88, +0x376a, 0x3127, 0x3858, 0x3481, 0x3689, 0x33b9, 0x38ee, 0x3a6d, 0x3b96, 0x35c2, 0x3a21, 0x34a7, 0x39f2, 0x344e, 0x3a81, 0x30a6, 0x39c1, 0x3bd2, 0x26f5, 0x3a2f, 0x3a6a, 0x3a30, 0x2ca0, 0x3046, 0x38ae, 0x39cf, 0x3610, 0x3b72, 0x3766, 0x3b24, 0x3877, 0x3baf, 0x3a09, 0x383d, 0x3b1c, 0x39ab, 0x2d04, 0x366a, 0x3b9a, 0x33d3, 0x36d3, 0x3834, 0x395a, 0x3227, 0x2f00, 0x3124, 0x3b27, 0x3674, +0x2c8d, 0x39ff, 0x3686, 0x3a0c, 0x395f, 0x392e, 0x33f7, 0x3910, 0x3907, 0x303a, 0x2cc5, 0x380b, 0x2999, 0x37e7, 0x39dc, 0x37cf, 0x3a77, 0x377a, 0x3bbc, 0x3817, 0x3bce, 0x396f, 0x39d2, 0x3abb, 0x348e, 0x32bc, 0x365c, 0x349a, 0x2c22, 0x329c, 0x37c4, 0x3a6f, 0x370b, 0x3ade, 0x2886, 0x3625, 0x3086, 0x382b, 0x3677, 0x3828, 0x2fe5, 0x3456, 0x36a4, 0x3820, 0x3a32, 0x36fe, 0x3851, 0x3b25, +0x3b48, 0x38ad, 0x3a5f, 0x399c, 0x3586, 0x313d, 0x2e15, 0x3626, 0x393e, 0x2ed4, 0x3be6, 0x2c4e, 0x3926, 0x3a90, 0x3b28, 0x389d, 0x32bc, 0x3b76, 0x391f, 0x3bee, 0x30d8, 0x3598, 0x368c, 0x39d0, 0x3b45, 0x34e1, 0x3939, 0x3513, 0x3392, 0x388b, 0x3a88, 0x397f, 0x3861, 0x345d, 0x3384, 0x371d, 0x365b, 0x2d16, 0x3ad6, 0x3537, 0x3896, 0x399d, 0x3ab4, 0x3286, 0x35dd, 0x399f, 0x39ed, 0x39f7, +0x3acf, 0x38ac, 0x317c, 0x3608, 0x33f2, 0x2bca, 0x3970, 0x2f27, 0x3636, 0x397b, 0x3570, 0x340f, 0x3184, 0x2ddd, 0x36d4, 0x3458, 0x3968, 0x3716, 0x343c, 0x3852, 0x3ab2, 0x3673, 0x3937, 0x31bf, 0x397d, 0x31ce, 0x2ec4, 0x39b8, 0x329f, 0x2b35, 0x3b1e, 0x3ab1, 0x3604, 0x2815, 0x361d, 0x3bd1, 0x350c, 0x34be, 0x37df, 0x3422, 0x3819, 0x30aa, 0x38f3, 0x378d, 0x352d, 0x34d3, 0x3177, 0x3a8e, +0x2dff, 0x34b7, 0x30fd, 0x3ae0, 0x3710, 0x33e6, 0x3ba0, 0x3786, 0x3008, 0x3739, 0x3a4e, 0x3b30, 0x3aac, 0x344e, 0x3b85, 0x344e, 0x3873, 0x3882, 0x3be0, 0x37b1, 0x3860, 0x33ff, 0x35fb, 0x3414, 0x3785, 0x3bf8, 0x3513, 0x3317, 0x3a99, 0x349e, 0x2f56, 0x3b82, 0x3717, 0x360d, 0x354d, 0x3663, 0x39d8, 0x3766, 0x2f0d, 0x319e, 0x31aa, 0x2ded, 0x32e1, 0x3942, 0x3901, 0x3571, 0x27e6, 0x3adb, +0x31d1, 0x38b4, 0x31b1, 0x39a8, 0x3b99, 0x37d1, 0x3b32, 0x3021, 0x3a93, 0x39e9, 0x38f7, 0x38b8, 0x3639, 0x39e8, 0x392f, 0x393d, 0x3602, 0x368f, 0x2fe5, 0x32a3, 0x38bd, 0x3a11, 0x3be2, 0x29e2, 0x357a, 0x3810, 0x39e4, 0x3568, 0x3584, 0x3aaf, 0x3bdf, 0x350b, 0x30e2, 0x2f69, 0x3500, 0x38fb, 0x34e5, 0x336b, 0x387b, 0x36b8, 0x366c, 0x32b0, 0x3599, 0x3b7f, 0x3aa1, 0x3ae7, 0x38f5, 0x3a99, +0x338c, 0x3a97, 0x3807, 0x3520, 0x3ba8, 0x307b, 0x3ad3, 0x37bb, 0x364a, 0x3b20, 0x3b30, 0x39bb, 0x3b9e, 0x34f3, 0x34d3, 0x35d6, 0x34be, 0x3be0, 0x383a, 0x346a, 0x3aef, 0x3b6d, 0x36cb, 0x2d86, 0x3819, 0x3b7f, 0x3ba9, 0x3afe, 0x3bc3, 0x3a11, 0x31b7, 0x37e9, 0x3820, 0x398a, 0x36f0, 0x3968, 0x38cd, 0x2763, 0x303f, 0x3848, 0x3bd8, 0x3b81, 0x37a0, 0x3831, 0x32f0, 0x33a1, 0x3860, 0x39fb, +0x3a76, 0x3a11, 0x3952, 0x35ac, 0x340c, 0x3af6, 0x39a8, 0x3955, 0x3775, 0x3a7a, 0x2df5, 0x2943, 0x39b1, 0x37f4, 0x33f2, 0x3985, 0x370e, 0x3b33, 0x3b60, 0x3818, 0x3a43, 0x39ba, 0x3640, 0x3715, 0x30b0, 0x3511, 0x3560, 0x3ac2, 0x3a6d, 0x38d1, 0x36fa, 0x3824, 0x2727, 0x3360, 0x3970, 0x3400, 0x3a89, 0x26c2, 0x2e28, 0x398d, 0x368e, 0x37f4, 0x3add, 0x3280, 0x323b, 0x38fa, 0x24ad, 0x36e4, +0x3557, 0x3849, 0x3998, 0x325f, 0x39bb, 0x31f8, 0x2e0b, 0x2b6c, 0x39da, 0x3846, 0x3a54, 0x376e, 0x31c3, 0x34c7, 0x39e7, 0x376b, 0x3abc, 0x3adc, 0x37e7, 0x2ef3, 0x28ca, 0x3abc, 0x2e0e, 0x35f6, 0x31bd, 0x35af, 0x338f, 0x3886, 0x36b9, 0x2cc2, 0x311a, 0x39b1, 0x328d, 0x389d, 0x3a0b, 0x31a7, 0x3666, 0x29ea, 0x2ea9, 0x3b75, 0x38df, 0x39c9, 0x3b4a, 0x377f, 0x3908, 0x3879, 0x3b8e, 0x3875, +0x3bfa, 0x3a08, 0x3755, 0x3a00, 0x3815, 0x3bd0, 0x36db, 0x3a1c, 0x3735, 0x2dcc, 0x27e9, 0x3931, 0x3766, 0x352e, 0x386f, 0x3b57, 0x381c, 0x3a3d, 0x3b9a, 0x3318, 0x3b51, 0x3a5b, 0x31b1, 0x395d, 0x38af, 0x380b, 0x2fcf, 0x38e5, 0x387d, 0x268f, 0x32fb, 0x39c2, 0x3a6e, 0x346e, 0x3966, 0x2bc6, 0x3775, 0x34ed, 0x3b08, 0x3877, 0x3bfd, 0x3b50, 0x36ba, 0x3729, 0x3405, 0x3922, 0x387f, 0x3419, +0x2dff, 0x3158, 0x3977, 0x372e, 0x3404, 0x3429, 0x34e3, 0x34ab, 0x38ce, 0x3875, 0x3a15, 0x3575, 0x3bf5, 0x35ee, 0x394b, 0x3827, 0x2cda, 0x32d1, 0x2f50, 0x38c7, 0x36a6, 0x3184, 0x2e37, 0x3920, 0x3450, 0x392b, 0x38df, 0x3851, 0x3521, 0x32b7, 0x3934, 0x39fc, 0x3adf, 0x3b4a, 0x3477, 0x3bff, 0x2ea7, 0x3a25, 0x3425, 0x3878, 0x3a0d, 0x33a8, 0x346b, 0x384f, 0x36b8, 0x2a4a, 0x3ad8, 0x39bc, +0x3a3a, 0x39db, 0x3980, 0x34d6, 0x37bb, 0x3b02, 0x301f, 0x3a2c, 0x367d, 0x3991, 0x3a67, 0x3507, 0x3563, 0x3361, 0x3128, 0x3888, 0x2938, 0x3059, 0x3984, 0x3a7b, 0x2576, 0x2e91, 0x3ad1, 0x342d, 0x3609, 0x369c, 0x3ad9, 0x3708, 0x3b39, 0x3886, 0x344e, 0x3a72, 0x327c, 0x397f, 0x3b90, 0x35bd, 0x332e, 0x3652, 0x23c5, 0x3a86, 0x3a94, 0x39fb, 0x222b, 0x3a24, 0x3637, 0x3b56, 0x3afb, 0x3ab4, +0x3393, 0x2440, 0x39d7, 0x2e45, 0x3a47, 0x2f01, 0x3940, 0x3451, 0x3989, 0x31b7, 0x3acd, 0x3a78, 0x38cc, 0x34e5, 0x3a2b, 0x3919, 0x2a1e, 0x27bd, 0x24f1, 0x3a34, 0x3670, 0x3155, 0x3217, 0x3a63, 0x3be9, 0x3873, 0x37c2, 0x2e6e, 0x1f1e, 0x3aca, 0x2c5c, 0x3b45, 0x3432, 0x3271, 0x31d6, 0x3247, 0x2ba2, 0x3649, 0x3b1b, 0x360e, 0x3577, 0x354b, 0x3b16, 0x3818, 0x3983, 0x388a, 0x3a04, 0x398d, +0x3bbb, 0x33f6, 0x2d28, 0x2663, 0x3b63, 0x38b7, 0x336f, 0x37dd, 0x3548, 0x304d, 0x30dd, 0x345a, 0x3a44, 0x398c, 0x382c, 0x3852, 0x20b2, 0x3859, 0x310a, 0x36bf, 0x3020, 0x3818, 0x3146, 0x3844, 0x34b2, 0x3534, 0x30b0, 0x3a25, 0x3516, 0x3908, 0x2a38, 0x3882, 0x3a84, 0x3869, 0x37de, 0x36f3, 0x324b, 0x365b, 0x3a4c, 0x2ec9, 0x2e4a, 0x393f, 0x384f, 0x3a8e, 0x3630, 0x391f, 0x3539, 0x39ed, +0x3a5a, 0x3bd3, 0x3b62, 0x39a1, 0x3896, 0x3747, 0x3bc9, 0x314d, 0x3a7c, 0x3658, 0x3122, 0x1fd9, 0x3b62, 0x38fa, 0x379d, 0x37af, 0x387d, 0x3a70, 0x3987, 0x38cc, 0x38b3, 0x1a67, 0x3a2b, 0x2c66, 0x3748, 0x3480, 0x39db, 0x2cf4, 0x3bdc, 0x3506, 0x387b, 0x3a38, 0x2fdc, 0x3aa2, 0x3891, 0x3716, 0x3ad4, 0x3b2c, 0x3584, 0x389a, 0x3bc8, 0x37b7, 0x3a78, 0x3a5c, 0x3a6e, 0x2f67, 0x34e0, 0x33ec, +0x3746, 0x3b19, 0x36c5, 0x3294, 0x3b64, 0x318c, 0x349a, 0x35cb, 0x3298, 0x3aed, 0x387b, 0x3526, 0x2bb8, 0x3a73, 0x388f, 0x3399, 0x3b48, 0x395e, 0x35ad, 0x3aaf, 0x35fe, 0x2daf, 0x3560, 0x373c, 0x3b71, 0x3b24, 0x2e17, 0x39c2, 0x3a7b, 0x3914, 0x36ca, 0x3a4c, 0x2d0e, 0x3927, 0x3582, 0x3578, 0x321e, 0x2a26, 0x39e0, 0x3755, 0x3894, 0x388d, 0x3a1e, 0x39d1, 0x3972, 0x363d, 0x38f3, 0x3947, +0x2ac7, 0x39a1, 0x351b, 0x378b, 0x3a3e, 0x3ba9, 0x3bf8, 0x3559, 0x3961, 0x3b07, 0x21bb, 0x3bff, 0x3b00, 0x2dc7, 0x350e, 0x331c, 0x3696, 0x3b67, 0x3ad3, 0x3052, 0x3993, 0x33de, 0x3ac1, 0x3b5d, 0x3b19, 0x3419, 0x31ed, 0x3736, 0x3856, 0x3699, 0x3b41, 0x3163, 0x3a60, 0x3985, 0x2fa1, 0x3a61, 0x38e2, 0x2d73, 0x35a4, 0x3771, 0x3a6f, 0x2b6c, 0x3a5b, 0x3b2d, 0x391f, 0x31ad, 0x3abd, 0x35f1, +0x2b56, 0x371d, 0x3092, 0x383a, 0x3845, 0x3805, 0x3931, 0x364f, 0x39be, 0x3bc2, 0x3b10, 0x3233, 0x3a78, 0x3abe, 0x3904, 0x383b, 0x302c, 0x388a, 0x30d2, 0x374d, 0x361b, 0x39c1, 0x356b, 0x2e92, 0x39e2, 0x2d42, 0x3260, 0x3ad1, 0x38e1, 0x3a83, 0x3b87, 0x39fd, 0x34ac, 0x38f0, 0x2eb3, 0x3bcf, 0x328a, 0x1f8d, 0x3ab4, 0x3835, 0x2933, 0x38c0, 0x3a69, 0x3a21, 0x39a6, 0x3796, 0x2ccf, 0x38fa, +0x38d6, 0x3bed, 0x385e, 0x392b, 0x3888, 0x3a71, 0x3430, 0x2f5f, 0x34bb, 0x3a19, 0x330b, 0x35e0, 0x32af, 0x3367, 0x34bb, 0x3ab7, 0x3844, 0x38f3, 0x3a7d, 0x2019, 0x364f, 0x35b2, 0x3b5a, 0x2919, 0x3326, 0x396c, 0x2ce5, 0x2df7, 0x3bed, 0x3ae9, 0x3712, 0x3b3b, 0x3bbb, 0x3943, 0x335f, 0x3083, 0x3a46, 0x39f7, 0x390d, 0x34ed, 0x3219, 0x3502, 0x3b5f, 0x3a0c, 0x39ca, 0x3a52, 0x38cb, 0x39a2, +0x3b7c, 0x361c, 0x3332, 0x3941, 0x3a0a, 0x2e87, 0x39aa, 0x33a1, 0x2cb2, 0x2726, 0x317c, 0x36d3, 0x37d2, 0x3792, 0x369d, 0x3971, 0x3243, 0x3b78, 0x37e4, 0x38f2, 0x37c2, 0x3a84, 0x38fa, 0x1d50, 0x2ec4, 0x340e, 0x35df, 0x361a, 0x3b67, 0x3bb6, 0x3bbc, 0x39df, 0x3571, 0x3881, 0x3660, 0x363a, 0x3922, 0x3170, 0x35d4, 0x3be3, 0x35da, 0x357e, 0x2cb2, 0x34a7, 0x38df, 0x341d, 0x3961, 0x354a, +0x37b8, 0x34a5, 0x3ac5, 0x383a, 0x3116, 0x30a5, 0x2489, 0x39f8, 0x3b9e, 0x3b0d, 0x3593, 0x3303, 0x2e28, 0x395f, 0x317f, 0x37cb, 0x3878, 0x3b20, 0x3bcc, 0x3592, 0x3237, 0x3a65, 0x3959, 0x39de, 0x3b7d, 0x2fea, 0x353c, 0x2f58, 0x3b49, 0x35df, 0x3bda, 0x3718, 0x3429, 0x3497, 0x3bad, 0x3623, 0x3b67, 0x3b2a, 0x2bf1, 0x3ac8, 0x35e2, 0x3887, 0x2ee7, 0x39d6, 0x2c31, 0x35ba, 0x3658, 0x39a6, +0x3b07, 0x386c, 0x3415, 0x3a85, 0x3911, 0x30df, 0x3b20, 0x38bd, 0x392a, 0x352c, 0x3558, 0x2486, 0x2f62, 0x3a99, 0x38f5, 0x2dfc, 0x38f9, 0x3bbb, 0x3be2, 0x34b1, 0x3b6e, 0x2cf2, 0x3a61, 0x25f9, 0x3024, 0x3b46, 0x3332, 0x2385, 0x3017, 0x1a5f, 0x39f7, 0x365e, 0x33f7, 0x3478, 0x28da, 0x3808, 0x3b4b, 0x2610, 0x30fd, 0x392c, 0x37aa, 0x361e, 0x2d9e, 0x3287, 0x34cd, 0x376f, 0x356e, 0x3b74, +0x3acb, 0x395f, 0x3974, 0x3179, 0x3b19, 0x385d, 0x31c1, 0x3bd8, 0x365a, 0x375f, 0x383f, 0x3a31, 0x31c2, 0x3bc0, 0x39d7, 0x3a6a, 0x3766, 0x3841, 0x3a91, 0x3b0a, 0x2c17, 0x3a75, 0x3988, 0x378f, 0x3871, 0x3ada, 0x360c, 0x3136, 0x38f9, 0x3b55, 0x2c2b, 0x368d, 0x3940, 0x3783, 0x38ed, 0x38d0, 0x377c, 0x3b27, 0x39f3, 0x3afc, 0x3ad7, 0x2e41, 0x3ae4, 0x37a7, 0x36c3, 0x2ab0, 0x27f6, 0x3b55, +0x358f, 0x3ad7, 0x2b72, 0x3a7f, 0x205b, 0x37f1, 0x34c8, 0x2f69, 0x3356, 0x3732, 0x3194, 0x32ce, 0x38ad, 0x2c9b, 0x344c, 0x3aaf, 0x38f5, 0x39f3, 0x3428, 0x3276, 0x389c, 0x3a37, 0x3bbd, 0x34ab, 0x3910, 0x38b4, 0x37b5, 0x28d8, 0x378f, 0x3796, 0x3931, 0x38f9, 0x3a06, 0x3848, 0x3a15, 0x370e, 0x33da, 0x389a, 0x36fd, 0x3a76, 0x37f4, 0x22f8, 0x3b5a, 0x39ac, 0x3b8e, 0x37f7, 0x3918, 0x365b, +0x39d3, 0x3402, 0x325b, 0x3a97, 0x3253, 0x3915, 0x3a5e, 0x331f, 0x3954, 0x34e7, 0x3548, 0x3562, 0x2611, 0x3a97, 0x3a02, 0x33e5, 0x31a0, 0x3495, 0x3b34, 0x3948, 0x39b3, 0x37a6, 0x366a, 0x3bf2, 0x3932, 0x37d3, 0x2c6f, 0x39d2, 0x367f, 0x237b, 0x384d, 0x2f93, 0x3b84, 0x3770, 0x3997, 0x3b31, 0x3959, 0x3bd1, 0x2e11, 0x33ba, 0x2fd6, 0x38a6, 0x37ef, 0x38a9, 0x3bef, 0x3b98, 0x3b80, 0x3921, +0x3ac9, 0x3b94, 0x2da8, 0x39b1, 0x3096, 0x35b1, 0x39a8, 0x3abc, 0x3b01, 0x36dc, 0x3bd2, 0x39fa, 0x3441, 0x2b98, 0x3628, 0x3933, 0x323d, 0x386a, 0x330d, 0x38d4, 0x327a, 0x3581, 0x351e, 0x39ea, 0x3709, 0x39c9, 0x39ce, 0x3749, 0x392a, 0x3bbd, 0x3bf6, 0x3a92, 0x38b8, 0x39b7, 0x2e49, 0x3523, 0x35ea, 0x350c, 0x39f7, 0x2fe2, 0x3a5e, 0x3901, 0x3bcc, 0x1da2, 0x3807, 0x3a7b, 0x3ab7, 0x3095, +0x380f, 0x3bce, 0x3aa2, 0x3bcd, 0x3887, 0x2f27, 0x3999, 0x3a35, 0x3884, 0x29bf, 0x3aed, 0x32ec, 0x3831, 0x351b, 0x386e, 0x38cc, 0x35e8, 0x3b73, 0x37ee, 0x36f3, 0x32de, 0x3a8e, 0x3a7f, 0x37b2, 0x39fb, 0x26f9, 0x31c1, 0x3a69, 0x3aa1, 0x2e39, 0x186f, 0x39ca, 0x2d4c, 0x35dd, 0x2d94, 0x39df, 0x3a3f, 0x2fad, 0x2850, 0x3630, 0x3470, 0x3580, 0x3b38, 0x3639, 0x385a, 0x3778, 0x3843, 0x3bbb, +0x336e, 0x350e, 0x30a3, 0x3b56, 0x3b24, 0x3859, 0x3090, 0x398d, 0x3afd, 0x33bd, 0x3a92, 0x393e, 0x39cc, 0x2711, 0x3bf0, 0x38c7, 0x2f96, 0x3a3d, 0x3a9a, 0x3843, 0x3940, 0x33c8, 0x35c0, 0x2f6c, 0x37e3, 0x3b04, 0x3aa1, 0x3810, 0x3b66, 0x142f, 0x3b9d, 0x368f, 0x3b90, 0x3550, 0x3b2a, 0x2747, 0x38f8, 0x3a55, 0x386c, 0xd14, 0x36eb, 0x341e, 0x3b4f, 0x2bca, 0x2c8a, 0x3664, 0x3829, 0x2ed0, +0x388c, 0x388a, 0x3481, 0x39f6, 0x3287, 0x38da, 0x394d, 0x3ae5, 0x3811, 0x21e1, 0x2d3a, 0x217d, 0x3b63, 0x34af, 0x38e5, 0x3870, 0x34b9, 0x38e3, 0x358e, 0x39ea, 0x26e8, 0x3984, 0x382c, 0x3b28, 0x37b4, 0x360b, 0x3740, 0x2c22, 0x3960, 0x39c5, 0x37f7, 0x249d, 0x391b, 0x3765, 0x2c22, 0x3942, 0x3ab8, 0x2b4a, 0x1da1, 0x3be5, 0x3010, 0x3542, 0x3aac, 0x3af5, 0x36b2, 0x2698, 0x34fb, 0x3a9d, +0x3b9d, 0x3bbb, 0x2378, 0x3b83, 0x3b93, 0x304e, 0x2b45, 0x378c, 0x37c1, 0x3ade, 0x38e3, 0x37d2, 0x3ba1, 0x3b3e, 0x362c, 0x3bcd, 0x3a02, 0x2723, 0x287c, 0x3bdd, 0x3b13, 0x3b43, 0x3b2a, 0x3a87, 0x35dd, 0x2c4c, 0x379c, 0x37af, 0x3b2f, 0x37fb, 0x34e7, 0x3207, 0x39a5, 0x381d, 0x39ef, 0x3652, 0x37aa, 0x3a07, 0x3bd2, 0x3bcb, 0x38cc, 0x38b6, 0x27d8, 0x3a0c, 0x2fec, 0x3847, 0x2fa0, 0x3529, +0x35ec, 0x3b54, 0x3a7a, 0x3bba, 0x396b, 0x32de, 0x375b, 0x37b8, 0x28c3, 0x3943, 0x2dff, 0x2c42, 0x36f4, 0x3637, 0x3115, 0x3a45, 0x3ba4, 0x3af8, 0x281c, 0x3ad8, 0x3b4c, 0x388a, 0x39f5, 0x308e, 0x3ab9, 0x3ab6, 0x2fe0, 0x36f8, 0x3bba, 0x29a5, 0x3752, 0x39f8, 0x33cb, 0x3b35, 0x356a, 0x3339, 0x3bb9, 0x3bd9, 0x3818, 0x3bbf, 0x3a13, 0x3551, 0x3975, 0x2709, 0x3af7, 0x3459, 0x2bbc, 0x36b6, +0x3b29, 0x2d13, 0x3999, 0x3b0f, 0x39cb, 0x3ae9, 0x3413, 0x38ab, 0x3a6a, 0x374e, 0x33b8, 0x3a15, 0x3618, 0x2d46, 0x330b, 0x3a3b, 0x3a6b, 0x3a90, 0x2ef4, 0x3bff, 0x2dd7, 0x3887, 0x360b, 0x382c, 0x375e, 0x32f0, 0x38d4, 0x3aa5, 0x36aa, 0x37af, 0x22fd, 0x3725, 0x3b3f, 0x37a7, 0x3452, 0x1c44, 0x35af, 0x3670, 0x3bfe, 0x27be, 0x380b, 0x3828, 0x3a88, 0x388e, 0x3571, 0x3b6c, 0x3821, 0x3a57, +0x3588, 0x2e21, 0x2ca3, 0x39d1, 0x3a56, 0x38d4, 0x39d6, 0x352b, 0x38f2, 0x396b, 0x3a8d, 0x2ccf, 0x3920, 0x390f, 0x3933, 0x2aa9, 0x3b6a, 0x3991, 0x389f, 0x3974, 0x2d2c, 0x3b59, 0x31b7, 0x3601, 0x38b8, 0x35ef, 0x3864, 0x3a43, 0x38d6, 0x3bc5, 0x39d7, 0x3740, 0x340b, 0x3630, 0x34f1, 0x3b1a, 0x3a16, 0x36fa, 0x38fe, 0x3980, 0x3929, 0x3b41, 0x3bf4, 0x2e4a, 0x3ac1, 0x30a3, 0x35a2, 0x3bee, +0x3a86, 0x1850, 0x35fb, 0x38e1, 0x2971, 0x368e, 0x3590, 0x38cb, 0x2ba6, 0x3b2b, 0x38d6, 0x386a, 0x30a2, 0x3262, 0x335b, 0x3571, 0x3a39, 0x3bf7, 0x2c12, 0x3abd, 0x391d, 0x38c5, 0x3578, 0x3a6c, 0x2dcd, 0x3818, 0x34b4, 0x3848, 0x2fa9, 0x3b24, 0x38d5, 0x3a7f, 0x31ec, 0x31a9, 0x3ab6, 0x345a, 0x3a71, 0x395c, 0x3bfd, 0x3be8, 0x3b5d, 0x325b, 0x3914, 0x39cf, 0x39c3, 0x3518, 0x38b7, 0x3500, +0x3a47, 0x3436, 0x382f, 0x37ae, 0x386b, 0x371b, 0x3a89, 0x3837, 0x379d, 0x352f, 0x3911, 0x3b1f, 0x3ba2, 0x39a2, 0x30d5, 0x2f54, 0x3a40, 0x398b, 0x188d, 0x2439, 0x2816, 0x3886, 0x3b4e, 0x3bac, 0x21a1, 0x379c, 0x3b9d, 0x3a9e, 0x3a29, 0x3a12, 0x396c, 0x39ef, 0x37e2, 0x29f9, 0x3a76, 0x38a1, 0x3a84, 0x357c, 0x3a66, 0x2edc, 0x2eb4, 0x3a98, 0x34b4, 0x3653, 0x2b4c, 0x281c, 0x3af1, 0x3652, +0x39d9, 0x3b52, 0x3976, 0x3005, 0x33ec, 0x3960, 0x38e9, 0x35e0, 0x3790, 0x3b8c, 0x3346, 0x3722, 0x35fc, 0x333b, 0x3242, 0x3a42, 0x3865, 0x39d9, 0x38bb, 0x3930, 0x362a, 0x341b, 0x3973, 0x3ac8, 0x3913, 0x2c64, 0x3808, 0x384c, 0x393c, 0x3b7d, 0x3862, 0x3703, 0x2f4e, 0x352b, 0x37f9, 0x345c, 0x3a97, 0x2ee3, 0x300c, 0x372d, 0x3a61, 0x2cf1, 0x3801, 0x377c, 0x316e, 0x382d, 0x3af3, 0x34c3 +}; \ No newline at end of file diff --git a/hwpe/redmule/inc/x_input.h b/hwpe/redmule/inc/x_input.h new file mode 100644 index 0000000..3312e91 --- /dev/null +++ b/hwpe/redmule/inc/x_input.h @@ -0,0 +1,51 @@ + /* Header file generated by RedMulE Golden Model */ +uint16_t x_inp [2304] = { +0x348f, 0x3244, 0x3b67, 0x3ab8, 0x3ab1, 0x39f4, 0x3807, 0x3ba3, 0x37e3, 0x3bd4, 0x337e, 0x36cb, 0x3a60, 0x381e, 0x3b98, 0x2c0e, 0x3421, 0x3bc4, 0x3b18, 0x3703, 0x3b8d, 0x3a06, 0x38f6, 0x36af, 0x322a, 0x3354, 0x3bf3, 0x3b7e, 0x38cf, 0x3826, 0x35be, 0x3a42, 0x39c4, 0x3b62, 0x3a29, 0x3b5b, 0x39ab, 0x3a4c, 0x3b44, 0x3b48, 0x3831, 0x31ca, 0x3918, 0x39bb, 0x3a82, 0x3830, 0x39af, 0x39ba, +0x3853, 0x2b2a, 0x39bc, 0x36e5, 0x3bb8, 0x37f6, 0x2e8d, 0x3a93, 0x3b53, 0x3424, 0x38a6, 0x3583, 0x39cd, 0x35f0, 0x3556, 0x3956, 0x3a10, 0x37de, 0x353b, 0x2cdd, 0x3779, 0x2a45, 0x3b07, 0x303f, 0x3b95, 0x3903, 0x3275, 0x391c, 0x39bd, 0x3503, 0x328e, 0x2f75, 0x35da, 0x3a32, 0x3974, 0x37a0, 0x3ab6, 0x34c9, 0x3674, 0x3859, 0x2c40, 0x38da, 0x38be, 0x38a1, 0x38a4, 0x3a74, 0x2167, 0x33f4, +0x38d2, 0x3a5a, 0x30a7, 0x3b8e, 0x39bd, 0x382a, 0x3714, 0x35f7, 0x3b34, 0x3535, 0x3b2c, 0x39b1, 0x3902, 0x3965, 0x3b7b, 0x3a1d, 0x3ae6, 0x3b0e, 0x3960, 0x37b6, 0x3872, 0x2dc4, 0x320f, 0x2c60, 0x38c9, 0x3a10, 0x387b, 0x39f1, 0x3929, 0x387c, 0x3ae4, 0x3881, 0x3a7c, 0x39c9, 0x3ae4, 0x38ec, 0x3ad0, 0x314a, 0x2d1e, 0x3b18, 0x2629, 0x358b, 0x3760, 0x2e4f, 0x3996, 0x394c, 0x3aa1, 0x28cc, +0x2c01, 0x38d9, 0x2a1c, 0x3bac, 0x3b50, 0x38e3, 0x33ac, 0x317a, 0x3277, 0x2f5e, 0x36b4, 0x39a2, 0x34fa, 0x24f8, 0x3b5c, 0x3890, 0x248e, 0x39c1, 0x37be, 0x2830, 0x3aa0, 0x3a1f, 0x3bb4, 0x3af9, 0x1c84, 0x3a33, 0x3742, 0x3bdb, 0x28be, 0x3bc1, 0x3572, 0x3911, 0x39d2, 0x35b5, 0x3ab6, 0x3206, 0x3914, 0x3127, 0x3adf, 0x362d, 0x340d, 0x3b5b, 0x3a05, 0x3b25, 0x3b65, 0x361b, 0x3801, 0x2d22, +0x2d9e, 0x3a91, 0x2db9, 0x3861, 0x39f9, 0x3aab, 0x3afa, 0x30bb, 0x3a1e, 0x2f27, 0x329a, 0x3bb7, 0x3472, 0x37b5, 0x3462, 0x32bd, 0x2722, 0x3ba7, 0x2bb9, 0x2431, 0x39bd, 0x38fc, 0x3b4f, 0x3b45, 0x3572, 0x37b8, 0x3aa7, 0x3a36, 0x3b2d, 0x3422, 0x3b09, 0x397f, 0x26b3, 0x3a0f, 0x3625, 0x3b6a, 0x3493, 0x3771, 0x357e, 0x360b, 0x30e8, 0x3905, 0x3a55, 0x39b9, 0x3344, 0x36d2, 0x3a6e, 0x3809, +0x3240, 0x39e0, 0x3746, 0x3b22, 0x34ba, 0x391b, 0x3939, 0x3321, 0x31e2, 0x3a97, 0x3bc0, 0x34a3, 0x3adb, 0x3a6d, 0x34af, 0x37b3, 0x3a63, 0x3702, 0x36c7, 0x3b73, 0x273c, 0x3808, 0x21e6, 0x3b34, 0x381c, 0x3825, 0x2fde, 0x299c, 0x2f4a, 0x3733, 0x314e, 0x3b89, 0x2e89, 0x37d2, 0x36a2, 0x353a, 0x3901, 0x3a9e, 0x2c1a, 0x3880, 0x37e7, 0x346f, 0x3361, 0x3896, 0x2f56, 0x3aa7, 0x33dd, 0x390b, +0x3bb0, 0x3b1a, 0x2d21, 0x3562, 0x38d8, 0x2f77, 0x38f6, 0x3158, 0x36cd, 0x35a1, 0x2b2e, 0x2938, 0x3af9, 0x348a, 0x399b, 0x3954, 0x29b8, 0x39a7, 0x3a83, 0x3bcb, 0x38ee, 0x3806, 0x2697, 0x3628, 0x3b38, 0x38be, 0x363c, 0x387e, 0x3a6c, 0x3b92, 0x335f, 0x37ba, 0x37da, 0x342e, 0x3509, 0x3be9, 0x392a, 0x32d7, 0x3ac6, 0x346e, 0x38f4, 0x3b5a, 0x3814, 0x3875, 0x39c9, 0x3a9f, 0x37c3, 0x3b00, +0x3675, 0x3a15, 0x36ec, 0x3b53, 0x3915, 0x36c4, 0x3462, 0x3b05, 0x2b3e, 0x351e, 0x369c, 0x38aa, 0x3342, 0x2e71, 0x3af1, 0x3aa7, 0x39d1, 0x3b0b, 0x3be9, 0x3a0a, 0x344f, 0x3b04, 0x39d6, 0x3864, 0x34e9, 0x308e, 0x3b6b, 0x32bf, 0x3610, 0x36d2, 0x350f, 0x3a78, 0x306f, 0x30e5, 0x3213, 0x3b6c, 0x356f, 0x38db, 0x387e, 0x3064, 0x3bf7, 0x2e00, 0x3bc4, 0x39df, 0x3758, 0x397f, 0x38a8, 0x34b8, +0x2c53, 0x36b9, 0x38a5, 0x2c24, 0x2836, 0x3a5a, 0x3acf, 0x37b2, 0x33f7, 0x3858, 0x3204, 0x37f8, 0x394c, 0x3781, 0x3b0f, 0x306a, 0x3ab4, 0x3a72, 0x3861, 0x3ab7, 0x3857, 0x375a, 0x3886, 0x3833, 0x3b06, 0x3bf9, 0x3bdc, 0x356c, 0x380f, 0x394f, 0x3942, 0x39cb, 0x3a2e, 0x3a94, 0x3b77, 0x36b3, 0x3585, 0x3916, 0x3ba5, 0x31de, 0x33fe, 0x2f98, 0x3953, 0x38c1, 0x38b4, 0x2c65, 0x30f6, 0x3523, +0x3661, 0x3b45, 0x2cba, 0x3615, 0x38a1, 0x3a9b, 0x3b75, 0x3be3, 0x3978, 0x36ba, 0x3a1e, 0x3bc1, 0x3bd2, 0x3738, 0x2f64, 0x3998, 0x3868, 0x34ae, 0x36b5, 0x3468, 0x390a, 0x2484, 0x3146, 0x30ea, 0x332b, 0x35b8, 0x390a, 0x3903, 0x288a, 0x3b74, 0x3bf9, 0x396a, 0x3bae, 0x30e3, 0x3857, 0x1ce7, 0x253f, 0x3b44, 0x3a54, 0x31b4, 0x37e2, 0x3b32, 0x323d, 0x3808, 0x34de, 0x3759, 0x300c, 0x3257, +0x37d3, 0x28ef, 0x3bd0, 0x39f1, 0x3b26, 0x3988, 0x3756, 0x39d5, 0x38b8, 0x3906, 0x30e3, 0x3b48, 0x34cb, 0x38cc, 0x3b88, 0x2c93, 0x3aae, 0x3822, 0x35fa, 0x39a0, 0x3830, 0x382b, 0x38c8, 0x348b, 0x3293, 0x397f, 0x39aa, 0x3416, 0x3b17, 0x34a7, 0x3671, 0x2942, 0x38ce, 0x2e26, 0x3832, 0x3ab2, 0x2e39, 0x3700, 0x3399, 0x34c7, 0x3ac6, 0x193b, 0x3a2b, 0x3481, 0x3b02, 0x3a2c, 0x2d24, 0x2fb8, +0x3aa9, 0x3599, 0x3520, 0x3551, 0x2561, 0x2e7a, 0x3b26, 0x3463, 0x2f1c, 0x2e4d, 0x343d, 0x3502, 0x2d9b, 0x3b38, 0x37a5, 0x3ba2, 0x34b4, 0x3891, 0x3af1, 0x2c37, 0x39e9, 0x3658, 0x3188, 0x24f0, 0x3a41, 0x3bf1, 0x3707, 0x3101, 0x34fb, 0x32cc, 0x35bb, 0x3acd, 0x38af, 0x39e9, 0x3974, 0x32e1, 0x32f7, 0x32e3, 0x3ad5, 0x2a73, 0x39e6, 0x3b01, 0x3347, 0x3bd1, 0x3791, 0x3aaf, 0x3be8, 0x3a88, +0x376a, 0x3127, 0x3858, 0x3481, 0x3689, 0x33b9, 0x38ee, 0x3a6d, 0x3b96, 0x35c2, 0x3a21, 0x34a7, 0x39f2, 0x344e, 0x3a81, 0x30a6, 0x39c1, 0x3bd2, 0x26f5, 0x3a2f, 0x3a6a, 0x3a30, 0x2ca0, 0x3046, 0x38ae, 0x39cf, 0x3610, 0x3b72, 0x3766, 0x3b24, 0x3877, 0x3baf, 0x3a09, 0x383d, 0x3b1c, 0x39ab, 0x2d04, 0x366a, 0x3b9a, 0x33d3, 0x36d3, 0x3834, 0x395a, 0x3227, 0x2f00, 0x3124, 0x3b27, 0x3674, +0x2c8d, 0x39ff, 0x3686, 0x3a0c, 0x395f, 0x392e, 0x33f7, 0x3910, 0x3907, 0x303a, 0x2cc5, 0x380b, 0x2999, 0x37e7, 0x39dc, 0x37cf, 0x3a77, 0x377a, 0x3bbc, 0x3817, 0x3bce, 0x396f, 0x39d2, 0x3abb, 0x348e, 0x32bc, 0x365c, 0x349a, 0x2c22, 0x329c, 0x37c4, 0x3a6f, 0x370b, 0x3ade, 0x2886, 0x3625, 0x3086, 0x382b, 0x3677, 0x3828, 0x2fe5, 0x3456, 0x36a4, 0x3820, 0x3a32, 0x36fe, 0x3851, 0x3b25, +0x3b48, 0x38ad, 0x3a5f, 0x399c, 0x3586, 0x313d, 0x2e15, 0x3626, 0x393e, 0x2ed4, 0x3be6, 0x2c4e, 0x3926, 0x3a90, 0x3b28, 0x389d, 0x32bc, 0x3b76, 0x391f, 0x3bee, 0x30d8, 0x3598, 0x368c, 0x39d0, 0x3b45, 0x34e1, 0x3939, 0x3513, 0x3392, 0x388b, 0x3a88, 0x397f, 0x3861, 0x345d, 0x3384, 0x371d, 0x365b, 0x2d16, 0x3ad6, 0x3537, 0x3896, 0x399d, 0x3ab4, 0x3286, 0x35dd, 0x399f, 0x39ed, 0x39f7, +0x3acf, 0x38ac, 0x317c, 0x3608, 0x33f2, 0x2bca, 0x3970, 0x2f27, 0x3636, 0x397b, 0x3570, 0x340f, 0x3184, 0x2ddd, 0x36d4, 0x3458, 0x3968, 0x3716, 0x343c, 0x3852, 0x3ab2, 0x3673, 0x3937, 0x31bf, 0x397d, 0x31ce, 0x2ec4, 0x39b8, 0x329f, 0x2b35, 0x3b1e, 0x3ab1, 0x3604, 0x2815, 0x361d, 0x3bd1, 0x350c, 0x34be, 0x37df, 0x3422, 0x3819, 0x30aa, 0x38f3, 0x378d, 0x352d, 0x34d3, 0x3177, 0x3a8e, +0x2dff, 0x34b7, 0x30fd, 0x3ae0, 0x3710, 0x33e6, 0x3ba0, 0x3786, 0x3008, 0x3739, 0x3a4e, 0x3b30, 0x3aac, 0x344e, 0x3b85, 0x344e, 0x3873, 0x3882, 0x3be0, 0x37b1, 0x3860, 0x33ff, 0x35fb, 0x3414, 0x3785, 0x3bf8, 0x3513, 0x3317, 0x3a99, 0x349e, 0x2f56, 0x3b82, 0x3717, 0x360d, 0x354d, 0x3663, 0x39d8, 0x3766, 0x2f0d, 0x319e, 0x31aa, 0x2ded, 0x32e1, 0x3942, 0x3901, 0x3571, 0x27e6, 0x3adb, +0x31d1, 0x38b4, 0x31b1, 0x39a8, 0x3b99, 0x37d1, 0x3b32, 0x3021, 0x3a93, 0x39e9, 0x38f7, 0x38b8, 0x3639, 0x39e8, 0x392f, 0x393d, 0x3602, 0x368f, 0x2fe5, 0x32a3, 0x38bd, 0x3a11, 0x3be2, 0x29e2, 0x357a, 0x3810, 0x39e4, 0x3568, 0x3584, 0x3aaf, 0x3bdf, 0x350b, 0x30e2, 0x2f69, 0x3500, 0x38fb, 0x34e5, 0x336b, 0x387b, 0x36b8, 0x366c, 0x32b0, 0x3599, 0x3b7f, 0x3aa1, 0x3ae7, 0x38f5, 0x3a99, +0x338c, 0x3a97, 0x3807, 0x3520, 0x3ba8, 0x307b, 0x3ad3, 0x37bb, 0x364a, 0x3b20, 0x3b30, 0x39bb, 0x3b9e, 0x34f3, 0x34d3, 0x35d6, 0x34be, 0x3be0, 0x383a, 0x346a, 0x3aef, 0x3b6d, 0x36cb, 0x2d86, 0x3819, 0x3b7f, 0x3ba9, 0x3afe, 0x3bc3, 0x3a11, 0x31b7, 0x37e9, 0x3820, 0x398a, 0x36f0, 0x3968, 0x38cd, 0x2763, 0x303f, 0x3848, 0x3bd8, 0x3b81, 0x37a0, 0x3831, 0x32f0, 0x33a1, 0x3860, 0x39fb, +0x3a76, 0x3a11, 0x3952, 0x35ac, 0x340c, 0x3af6, 0x39a8, 0x3955, 0x3775, 0x3a7a, 0x2df5, 0x2943, 0x39b1, 0x37f4, 0x33f2, 0x3985, 0x370e, 0x3b33, 0x3b60, 0x3818, 0x3a43, 0x39ba, 0x3640, 0x3715, 0x30b0, 0x3511, 0x3560, 0x3ac2, 0x3a6d, 0x38d1, 0x36fa, 0x3824, 0x2727, 0x3360, 0x3970, 0x3400, 0x3a89, 0x26c2, 0x2e28, 0x398d, 0x368e, 0x37f4, 0x3add, 0x3280, 0x323b, 0x38fa, 0x24ad, 0x36e4, +0x3557, 0x3849, 0x3998, 0x325f, 0x39bb, 0x31f8, 0x2e0b, 0x2b6c, 0x39da, 0x3846, 0x3a54, 0x376e, 0x31c3, 0x34c7, 0x39e7, 0x376b, 0x3abc, 0x3adc, 0x37e7, 0x2ef3, 0x28ca, 0x3abc, 0x2e0e, 0x35f6, 0x31bd, 0x35af, 0x338f, 0x3886, 0x36b9, 0x2cc2, 0x311a, 0x39b1, 0x328d, 0x389d, 0x3a0b, 0x31a7, 0x3666, 0x29ea, 0x2ea9, 0x3b75, 0x38df, 0x39c9, 0x3b4a, 0x377f, 0x3908, 0x3879, 0x3b8e, 0x3875, +0x3bfa, 0x3a08, 0x3755, 0x3a00, 0x3815, 0x3bd0, 0x36db, 0x3a1c, 0x3735, 0x2dcc, 0x27e9, 0x3931, 0x3766, 0x352e, 0x386f, 0x3b57, 0x381c, 0x3a3d, 0x3b9a, 0x3318, 0x3b51, 0x3a5b, 0x31b1, 0x395d, 0x38af, 0x380b, 0x2fcf, 0x38e5, 0x387d, 0x268f, 0x32fb, 0x39c2, 0x3a6e, 0x346e, 0x3966, 0x2bc6, 0x3775, 0x34ed, 0x3b08, 0x3877, 0x3bfd, 0x3b50, 0x36ba, 0x3729, 0x3405, 0x3922, 0x387f, 0x3419, +0x2dff, 0x3158, 0x3977, 0x372e, 0x3404, 0x3429, 0x34e3, 0x34ab, 0x38ce, 0x3875, 0x3a15, 0x3575, 0x3bf5, 0x35ee, 0x394b, 0x3827, 0x2cda, 0x32d1, 0x2f50, 0x38c7, 0x36a6, 0x3184, 0x2e37, 0x3920, 0x3450, 0x392b, 0x38df, 0x3851, 0x3521, 0x32b7, 0x3934, 0x39fc, 0x3adf, 0x3b4a, 0x3477, 0x3bff, 0x2ea7, 0x3a25, 0x3425, 0x3878, 0x3a0d, 0x33a8, 0x346b, 0x384f, 0x36b8, 0x2a4a, 0x3ad8, 0x39bc, +0x3a3a, 0x39db, 0x3980, 0x34d6, 0x37bb, 0x3b02, 0x301f, 0x3a2c, 0x367d, 0x3991, 0x3a67, 0x3507, 0x3563, 0x3361, 0x3128, 0x3888, 0x2938, 0x3059, 0x3984, 0x3a7b, 0x2576, 0x2e91, 0x3ad1, 0x342d, 0x3609, 0x369c, 0x3ad9, 0x3708, 0x3b39, 0x3886, 0x344e, 0x3a72, 0x327c, 0x397f, 0x3b90, 0x35bd, 0x332e, 0x3652, 0x23c5, 0x3a86, 0x3a94, 0x39fb, 0x222b, 0x3a24, 0x3637, 0x3b56, 0x3afb, 0x3ab4, +0x3393, 0x2440, 0x39d7, 0x2e45, 0x3a47, 0x2f01, 0x3940, 0x3451, 0x3989, 0x31b7, 0x3acd, 0x3a78, 0x38cc, 0x34e5, 0x3a2b, 0x3919, 0x2a1e, 0x27bd, 0x24f1, 0x3a34, 0x3670, 0x3155, 0x3217, 0x3a63, 0x3be9, 0x3873, 0x37c2, 0x2e6e, 0x1f1e, 0x3aca, 0x2c5c, 0x3b45, 0x3432, 0x3271, 0x31d6, 0x3247, 0x2ba2, 0x3649, 0x3b1b, 0x360e, 0x3577, 0x354b, 0x3b16, 0x3818, 0x3983, 0x388a, 0x3a04, 0x398d, +0x3bbb, 0x33f6, 0x2d28, 0x2663, 0x3b63, 0x38b7, 0x336f, 0x37dd, 0x3548, 0x304d, 0x30dd, 0x345a, 0x3a44, 0x398c, 0x382c, 0x3852, 0x20b2, 0x3859, 0x310a, 0x36bf, 0x3020, 0x3818, 0x3146, 0x3844, 0x34b2, 0x3534, 0x30b0, 0x3a25, 0x3516, 0x3908, 0x2a38, 0x3882, 0x3a84, 0x3869, 0x37de, 0x36f3, 0x324b, 0x365b, 0x3a4c, 0x2ec9, 0x2e4a, 0x393f, 0x384f, 0x3a8e, 0x3630, 0x391f, 0x3539, 0x39ed, +0x3a5a, 0x3bd3, 0x3b62, 0x39a1, 0x3896, 0x3747, 0x3bc9, 0x314d, 0x3a7c, 0x3658, 0x3122, 0x1fd9, 0x3b62, 0x38fa, 0x379d, 0x37af, 0x387d, 0x3a70, 0x3987, 0x38cc, 0x38b3, 0x1a67, 0x3a2b, 0x2c66, 0x3748, 0x3480, 0x39db, 0x2cf4, 0x3bdc, 0x3506, 0x387b, 0x3a38, 0x2fdc, 0x3aa2, 0x3891, 0x3716, 0x3ad4, 0x3b2c, 0x3584, 0x389a, 0x3bc8, 0x37b7, 0x3a78, 0x3a5c, 0x3a6e, 0x2f67, 0x34e0, 0x33ec, +0x3746, 0x3b19, 0x36c5, 0x3294, 0x3b64, 0x318c, 0x349a, 0x35cb, 0x3298, 0x3aed, 0x387b, 0x3526, 0x2bb8, 0x3a73, 0x388f, 0x3399, 0x3b48, 0x395e, 0x35ad, 0x3aaf, 0x35fe, 0x2daf, 0x3560, 0x373c, 0x3b71, 0x3b24, 0x2e17, 0x39c2, 0x3a7b, 0x3914, 0x36ca, 0x3a4c, 0x2d0e, 0x3927, 0x3582, 0x3578, 0x321e, 0x2a26, 0x39e0, 0x3755, 0x3894, 0x388d, 0x3a1e, 0x39d1, 0x3972, 0x363d, 0x38f3, 0x3947, +0x2ac7, 0x39a1, 0x351b, 0x378b, 0x3a3e, 0x3ba9, 0x3bf8, 0x3559, 0x3961, 0x3b07, 0x21bb, 0x3bff, 0x3b00, 0x2dc7, 0x350e, 0x331c, 0x3696, 0x3b67, 0x3ad3, 0x3052, 0x3993, 0x33de, 0x3ac1, 0x3b5d, 0x3b19, 0x3419, 0x31ed, 0x3736, 0x3856, 0x3699, 0x3b41, 0x3163, 0x3a60, 0x3985, 0x2fa1, 0x3a61, 0x38e2, 0x2d73, 0x35a4, 0x3771, 0x3a6f, 0x2b6c, 0x3a5b, 0x3b2d, 0x391f, 0x31ad, 0x3abd, 0x35f1, +0x2b56, 0x371d, 0x3092, 0x383a, 0x3845, 0x3805, 0x3931, 0x364f, 0x39be, 0x3bc2, 0x3b10, 0x3233, 0x3a78, 0x3abe, 0x3904, 0x383b, 0x302c, 0x388a, 0x30d2, 0x374d, 0x361b, 0x39c1, 0x356b, 0x2e92, 0x39e2, 0x2d42, 0x3260, 0x3ad1, 0x38e1, 0x3a83, 0x3b87, 0x39fd, 0x34ac, 0x38f0, 0x2eb3, 0x3bcf, 0x328a, 0x1f8d, 0x3ab4, 0x3835, 0x2933, 0x38c0, 0x3a69, 0x3a21, 0x39a6, 0x3796, 0x2ccf, 0x38fa, +0x38d6, 0x3bed, 0x385e, 0x392b, 0x3888, 0x3a71, 0x3430, 0x2f5f, 0x34bb, 0x3a19, 0x330b, 0x35e0, 0x32af, 0x3367, 0x34bb, 0x3ab7, 0x3844, 0x38f3, 0x3a7d, 0x2019, 0x364f, 0x35b2, 0x3b5a, 0x2919, 0x3326, 0x396c, 0x2ce5, 0x2df7, 0x3bed, 0x3ae9, 0x3712, 0x3b3b, 0x3bbb, 0x3943, 0x335f, 0x3083, 0x3a46, 0x39f7, 0x390d, 0x34ed, 0x3219, 0x3502, 0x3b5f, 0x3a0c, 0x39ca, 0x3a52, 0x38cb, 0x39a2, +0x3b7c, 0x361c, 0x3332, 0x3941, 0x3a0a, 0x2e87, 0x39aa, 0x33a1, 0x2cb2, 0x2726, 0x317c, 0x36d3, 0x37d2, 0x3792, 0x369d, 0x3971, 0x3243, 0x3b78, 0x37e4, 0x38f2, 0x37c2, 0x3a84, 0x38fa, 0x1d50, 0x2ec4, 0x340e, 0x35df, 0x361a, 0x3b67, 0x3bb6, 0x3bbc, 0x39df, 0x3571, 0x3881, 0x3660, 0x363a, 0x3922, 0x3170, 0x35d4, 0x3be3, 0x35da, 0x357e, 0x2cb2, 0x34a7, 0x38df, 0x341d, 0x3961, 0x354a, +0x37b8, 0x34a5, 0x3ac5, 0x383a, 0x3116, 0x30a5, 0x2489, 0x39f8, 0x3b9e, 0x3b0d, 0x3593, 0x3303, 0x2e28, 0x395f, 0x317f, 0x37cb, 0x3878, 0x3b20, 0x3bcc, 0x3592, 0x3237, 0x3a65, 0x3959, 0x39de, 0x3b7d, 0x2fea, 0x353c, 0x2f58, 0x3b49, 0x35df, 0x3bda, 0x3718, 0x3429, 0x3497, 0x3bad, 0x3623, 0x3b67, 0x3b2a, 0x2bf1, 0x3ac8, 0x35e2, 0x3887, 0x2ee7, 0x39d6, 0x2c31, 0x35ba, 0x3658, 0x39a6, +0x3b07, 0x386c, 0x3415, 0x3a85, 0x3911, 0x30df, 0x3b20, 0x38bd, 0x392a, 0x352c, 0x3558, 0x2486, 0x2f62, 0x3a99, 0x38f5, 0x2dfc, 0x38f9, 0x3bbb, 0x3be2, 0x34b1, 0x3b6e, 0x2cf2, 0x3a61, 0x25f9, 0x3024, 0x3b46, 0x3332, 0x2385, 0x3017, 0x1a5f, 0x39f7, 0x365e, 0x33f7, 0x3478, 0x28da, 0x3808, 0x3b4b, 0x2610, 0x30fd, 0x392c, 0x37aa, 0x361e, 0x2d9e, 0x3287, 0x34cd, 0x376f, 0x356e, 0x3b74, +0x3acb, 0x395f, 0x3974, 0x3179, 0x3b19, 0x385d, 0x31c1, 0x3bd8, 0x365a, 0x375f, 0x383f, 0x3a31, 0x31c2, 0x3bc0, 0x39d7, 0x3a6a, 0x3766, 0x3841, 0x3a91, 0x3b0a, 0x2c17, 0x3a75, 0x3988, 0x378f, 0x3871, 0x3ada, 0x360c, 0x3136, 0x38f9, 0x3b55, 0x2c2b, 0x368d, 0x3940, 0x3783, 0x38ed, 0x38d0, 0x377c, 0x3b27, 0x39f3, 0x3afc, 0x3ad7, 0x2e41, 0x3ae4, 0x37a7, 0x36c3, 0x2ab0, 0x27f6, 0x3b55, +0x358f, 0x3ad7, 0x2b72, 0x3a7f, 0x205b, 0x37f1, 0x34c8, 0x2f69, 0x3356, 0x3732, 0x3194, 0x32ce, 0x38ad, 0x2c9b, 0x344c, 0x3aaf, 0x38f5, 0x39f3, 0x3428, 0x3276, 0x389c, 0x3a37, 0x3bbd, 0x34ab, 0x3910, 0x38b4, 0x37b5, 0x28d8, 0x378f, 0x3796, 0x3931, 0x38f9, 0x3a06, 0x3848, 0x3a15, 0x370e, 0x33da, 0x389a, 0x36fd, 0x3a76, 0x37f4, 0x22f8, 0x3b5a, 0x39ac, 0x3b8e, 0x37f7, 0x3918, 0x365b, +0x39d3, 0x3402, 0x325b, 0x3a97, 0x3253, 0x3915, 0x3a5e, 0x331f, 0x3954, 0x34e7, 0x3548, 0x3562, 0x2611, 0x3a97, 0x3a02, 0x33e5, 0x31a0, 0x3495, 0x3b34, 0x3948, 0x39b3, 0x37a6, 0x366a, 0x3bf2, 0x3932, 0x37d3, 0x2c6f, 0x39d2, 0x367f, 0x237b, 0x384d, 0x2f93, 0x3b84, 0x3770, 0x3997, 0x3b31, 0x3959, 0x3bd1, 0x2e11, 0x33ba, 0x2fd6, 0x38a6, 0x37ef, 0x38a9, 0x3bef, 0x3b98, 0x3b80, 0x3921, +0x3ac9, 0x3b94, 0x2da8, 0x39b1, 0x3096, 0x35b1, 0x39a8, 0x3abc, 0x3b01, 0x36dc, 0x3bd2, 0x39fa, 0x3441, 0x2b98, 0x3628, 0x3933, 0x323d, 0x386a, 0x330d, 0x38d4, 0x327a, 0x3581, 0x351e, 0x39ea, 0x3709, 0x39c9, 0x39ce, 0x3749, 0x392a, 0x3bbd, 0x3bf6, 0x3a92, 0x38b8, 0x39b7, 0x2e49, 0x3523, 0x35ea, 0x350c, 0x39f7, 0x2fe2, 0x3a5e, 0x3901, 0x3bcc, 0x1da2, 0x3807, 0x3a7b, 0x3ab7, 0x3095, +0x380f, 0x3bce, 0x3aa2, 0x3bcd, 0x3887, 0x2f27, 0x3999, 0x3a35, 0x3884, 0x29bf, 0x3aed, 0x32ec, 0x3831, 0x351b, 0x386e, 0x38cc, 0x35e8, 0x3b73, 0x37ee, 0x36f3, 0x32de, 0x3a8e, 0x3a7f, 0x37b2, 0x39fb, 0x26f9, 0x31c1, 0x3a69, 0x3aa1, 0x2e39, 0x186f, 0x39ca, 0x2d4c, 0x35dd, 0x2d94, 0x39df, 0x3a3f, 0x2fad, 0x2850, 0x3630, 0x3470, 0x3580, 0x3b38, 0x3639, 0x385a, 0x3778, 0x3843, 0x3bbb, +0x336e, 0x350e, 0x30a3, 0x3b56, 0x3b24, 0x3859, 0x3090, 0x398d, 0x3afd, 0x33bd, 0x3a92, 0x393e, 0x39cc, 0x2711, 0x3bf0, 0x38c7, 0x2f96, 0x3a3d, 0x3a9a, 0x3843, 0x3940, 0x33c8, 0x35c0, 0x2f6c, 0x37e3, 0x3b04, 0x3aa1, 0x3810, 0x3b66, 0x142f, 0x3b9d, 0x368f, 0x3b90, 0x3550, 0x3b2a, 0x2747, 0x38f8, 0x3a55, 0x386c, 0xd14, 0x36eb, 0x341e, 0x3b4f, 0x2bca, 0x2c8a, 0x3664, 0x3829, 0x2ed0, +0x388c, 0x388a, 0x3481, 0x39f6, 0x3287, 0x38da, 0x394d, 0x3ae5, 0x3811, 0x21e1, 0x2d3a, 0x217d, 0x3b63, 0x34af, 0x38e5, 0x3870, 0x34b9, 0x38e3, 0x358e, 0x39ea, 0x26e8, 0x3984, 0x382c, 0x3b28, 0x37b4, 0x360b, 0x3740, 0x2c22, 0x3960, 0x39c5, 0x37f7, 0x249d, 0x391b, 0x3765, 0x2c22, 0x3942, 0x3ab8, 0x2b4a, 0x1da1, 0x3be5, 0x3010, 0x3542, 0x3aac, 0x3af5, 0x36b2, 0x2698, 0x34fb, 0x3a9d, +0x3b9d, 0x3bbb, 0x2378, 0x3b83, 0x3b93, 0x304e, 0x2b45, 0x378c, 0x37c1, 0x3ade, 0x38e3, 0x37d2, 0x3ba1, 0x3b3e, 0x362c, 0x3bcd, 0x3a02, 0x2723, 0x287c, 0x3bdd, 0x3b13, 0x3b43, 0x3b2a, 0x3a87, 0x35dd, 0x2c4c, 0x379c, 0x37af, 0x3b2f, 0x37fb, 0x34e7, 0x3207, 0x39a5, 0x381d, 0x39ef, 0x3652, 0x37aa, 0x3a07, 0x3bd2, 0x3bcb, 0x38cc, 0x38b6, 0x27d8, 0x3a0c, 0x2fec, 0x3847, 0x2fa0, 0x3529, +0x35ec, 0x3b54, 0x3a7a, 0x3bba, 0x396b, 0x32de, 0x375b, 0x37b8, 0x28c3, 0x3943, 0x2dff, 0x2c42, 0x36f4, 0x3637, 0x3115, 0x3a45, 0x3ba4, 0x3af8, 0x281c, 0x3ad8, 0x3b4c, 0x388a, 0x39f5, 0x308e, 0x3ab9, 0x3ab6, 0x2fe0, 0x36f8, 0x3bba, 0x29a5, 0x3752, 0x39f8, 0x33cb, 0x3b35, 0x356a, 0x3339, 0x3bb9, 0x3bd9, 0x3818, 0x3bbf, 0x3a13, 0x3551, 0x3975, 0x2709, 0x3af7, 0x3459, 0x2bbc, 0x36b6, +0x3b29, 0x2d13, 0x3999, 0x3b0f, 0x39cb, 0x3ae9, 0x3413, 0x38ab, 0x3a6a, 0x374e, 0x33b8, 0x3a15, 0x3618, 0x2d46, 0x330b, 0x3a3b, 0x3a6b, 0x3a90, 0x2ef4, 0x3bff, 0x2dd7, 0x3887, 0x360b, 0x382c, 0x375e, 0x32f0, 0x38d4, 0x3aa5, 0x36aa, 0x37af, 0x22fd, 0x3725, 0x3b3f, 0x37a7, 0x3452, 0x1c44, 0x35af, 0x3670, 0x3bfe, 0x27be, 0x380b, 0x3828, 0x3a88, 0x388e, 0x3571, 0x3b6c, 0x3821, 0x3a57, +0x3588, 0x2e21, 0x2ca3, 0x39d1, 0x3a56, 0x38d4, 0x39d6, 0x352b, 0x38f2, 0x396b, 0x3a8d, 0x2ccf, 0x3920, 0x390f, 0x3933, 0x2aa9, 0x3b6a, 0x3991, 0x389f, 0x3974, 0x2d2c, 0x3b59, 0x31b7, 0x3601, 0x38b8, 0x35ef, 0x3864, 0x3a43, 0x38d6, 0x3bc5, 0x39d7, 0x3740, 0x340b, 0x3630, 0x34f1, 0x3b1a, 0x3a16, 0x36fa, 0x38fe, 0x3980, 0x3929, 0x3b41, 0x3bf4, 0x2e4a, 0x3ac1, 0x30a3, 0x35a2, 0x3bee, +0x3a86, 0x1850, 0x35fb, 0x38e1, 0x2971, 0x368e, 0x3590, 0x38cb, 0x2ba6, 0x3b2b, 0x38d6, 0x386a, 0x30a2, 0x3262, 0x335b, 0x3571, 0x3a39, 0x3bf7, 0x2c12, 0x3abd, 0x391d, 0x38c5, 0x3578, 0x3a6c, 0x2dcd, 0x3818, 0x34b4, 0x3848, 0x2fa9, 0x3b24, 0x38d5, 0x3a7f, 0x31ec, 0x31a9, 0x3ab6, 0x345a, 0x3a71, 0x395c, 0x3bfd, 0x3be8, 0x3b5d, 0x325b, 0x3914, 0x39cf, 0x39c3, 0x3518, 0x38b7, 0x3500, +0x3a47, 0x3436, 0x382f, 0x37ae, 0x386b, 0x371b, 0x3a89, 0x3837, 0x379d, 0x352f, 0x3911, 0x3b1f, 0x3ba2, 0x39a2, 0x30d5, 0x2f54, 0x3a40, 0x398b, 0x188d, 0x2439, 0x2816, 0x3886, 0x3b4e, 0x3bac, 0x21a1, 0x379c, 0x3b9d, 0x3a9e, 0x3a29, 0x3a12, 0x396c, 0x39ef, 0x37e2, 0x29f9, 0x3a76, 0x38a1, 0x3a84, 0x357c, 0x3a66, 0x2edc, 0x2eb4, 0x3a98, 0x34b4, 0x3653, 0x2b4c, 0x281c, 0x3af1, 0x3652, +0x39d9, 0x3b52, 0x3976, 0x3005, 0x33ec, 0x3960, 0x38e9, 0x35e0, 0x3790, 0x3b8c, 0x3346, 0x3722, 0x35fc, 0x333b, 0x3242, 0x3a42, 0x3865, 0x39d9, 0x38bb, 0x3930, 0x362a, 0x341b, 0x3973, 0x3ac8, 0x3913, 0x2c64, 0x3808, 0x384c, 0x393c, 0x3b7d, 0x3862, 0x3703, 0x2f4e, 0x352b, 0x37f9, 0x345c, 0x3a97, 0x2ee3, 0x300c, 0x372d, 0x3a61, 0x2cf1, 0x3801, 0x377c, 0x316e, 0x382d, 0x3af3, 0x34c3 +}; \ No newline at end of file diff --git a/hwpe/redmule/inc/y_2D.h b/hwpe/redmule/inc/y_2D.h new file mode 100644 index 0000000..96721c4 --- /dev/null +++ b/hwpe/redmule/inc/y_2D.h @@ -0,0 +1,51 @@ + /* Header file generated by RedMulE Golden Model */ +uint16_t y_inp_2D [48][48] = { +0x2a2c, 0x303b, 0x3a3b, 0x37e1, 0x3aa7, 0x32fc, 0x35c2, 0x3b7f, 0x3a5f, 0x2b3e, 0x32eb, 0x37cd, 0x3864, 0x37f2, 0x3b49, 0x3701, 0x3919, 0x1c22, 0x3a1e, 0x3abe, 0x3b89, 0x2f84, 0x300f, 0x385a, 0x3309, 0x350a, 0x32ec, 0x3657, 0x2a10, 0x3aa7, 0x38f3, 0x3625, 0x3af7, 0x374a, 0x38a5, 0x378d, 0x3a3a, 0x387b, 0x37bc, 0x383a, 0x3019, 0x3419, 0x38a5, 0x3794, 0x3770, 0x3ad3, 0x31d5, 0x3b7c, +0x37d1, 0x3547, 0x376d, 0x3b0c, 0x3590, 0x355e, 0x3a64, 0x2742, 0x388b, 0x3b2d, 0x3b41, 0x3a58, 0x3ac0, 0x39d0, 0x2ecc, 0x2767, 0x3b8d, 0x36cd, 0x380a, 0x2c1c, 0x3274, 0x2f60, 0x3757, 0x39ee, 0x3b01, 0x3b5f, 0x3aba, 0x334d, 0x39ce, 0x37f5, 0x3a2f, 0x3be6, 0x337f, 0x3341, 0x3510, 0x39a7, 0x3abb, 0x3be6, 0x3aae, 0x3b01, 0x37bd, 0x3129, 0x36d9, 0x3478, 0x3530, 0x3807, 0x380b, 0x3b2c, +0x399d, 0x35bc, 0x3971, 0x3bb8, 0x2ec7, 0x3a89, 0x3b38, 0x3a88, 0x22a9, 0x33d5, 0x3a10, 0x361d, 0x3ae5, 0x3b13, 0x3a6d, 0x3b3c, 0x3bf3, 0x391d, 0x3a20, 0x3324, 0x394a, 0x30fc, 0x3348, 0x3925, 0x316f, 0x3b75, 0x34dc, 0x30c2, 0x3949, 0x35bd, 0x38ac, 0x2e88, 0x3b96, 0x38c0, 0x2f84, 0x3644, 0x31d2, 0x3b26, 0x3a1c, 0x31ba, 0x3b5c, 0x3181, 0x3a9f, 0x35ae, 0x3208, 0x397a, 0x35f0, 0x3689, +0x37fb, 0x3aba, 0x3a69, 0x373a, 0x392f, 0x3adb, 0x3167, 0x29b8, 0x3920, 0x34ac, 0x3758, 0x38bf, 0x3940, 0x3baf, 0x32ef, 0x3b98, 0x3b9f, 0x3b30, 0x384f, 0x3539, 0x3a26, 0x398f, 0x2230, 0x39d8, 0x395b, 0x3a3f, 0x2d89, 0x3b01, 0x3b8c, 0x3a30, 0x38b4, 0x30ab, 0x35ab, 0x3a7e, 0x3850, 0x3894, 0x3424, 0x39d3, 0x3a42, 0x39d0, 0x39a8, 0x36a9, 0x3b35, 0x2cdf, 0x3705, 0x3841, 0x3b79, 0x3b23, +0x2dd5, 0x3a67, 0x3178, 0x37a5, 0x3b5b, 0x3b5a, 0x2a68, 0x38c4, 0x3b23, 0x3943, 0x310c, 0x3261, 0x3889, 0x380c, 0x3626, 0x39ab, 0x3b7b, 0x3b53, 0x3a4a, 0x2f44, 0x3a74, 0x346b, 0x3481, 0x379b, 0x3bd0, 0x3a76, 0x3bca, 0x38b3, 0x3b1a, 0x3a84, 0x373f, 0x3a52, 0x3554, 0x3690, 0x3b66, 0x3a12, 0x3aa5, 0x3b45, 0x38c3, 0x396a, 0x2d50, 0x3978, 0x2442, 0x3ab9, 0x3818, 0x34b6, 0x34c0, 0x3a08, +0x38a4, 0x380c, 0x3b25, 0x363e, 0x2e86, 0x356f, 0x394f, 0x38e2, 0x27ab, 0x3b59, 0x2e61, 0x34ea, 0x38e6, 0x3673, 0x39a5, 0x3785, 0x2ebb, 0x3314, 0x367e, 0x34e4, 0x3884, 0x2fbf, 0x2f51, 0x3105, 0x3a29, 0x3aae, 0x3aea, 0x3977, 0x3b46, 0x3b29, 0x3ab7, 0x374c, 0x2e01, 0x3935, 0x3965, 0x31ed, 0x380e, 0x340d, 0x3615, 0x2a10, 0x23ab, 0x3990, 0x2c3a, 0x3723, 0x3001, 0x25e3, 0x3649, 0x2491, +0x39f6, 0x3a32, 0x3171, 0x38bc, 0x390d, 0x39ec, 0x3621, 0x3511, 0x39c8, 0x2c9b, 0x24b6, 0x38fb, 0x201c, 0x3367, 0x3b6c, 0x3ada, 0x37ce, 0x368e, 0x3909, 0x32f0, 0x3180, 0x3aca, 0x39e8, 0x3a6f, 0x2f65, 0x3b78, 0x3b6f, 0x378c, 0x2938, 0x393a, 0x319f, 0x38aa, 0x386c, 0x3b7b, 0x3b7d, 0x387a, 0x3bdd, 0x3af5, 0x2e74, 0x2c3d, 0x3add, 0x2ef4, 0x3a16, 0x2d55, 0x387d, 0x35ce, 0x2753, 0x3b55, +0x3b84, 0x2ebf, 0x335a, 0x391b, 0x3870, 0x3a8e, 0x39a2, 0x3397, 0x3751, 0x3a3e, 0x3920, 0x379b, 0x31a4, 0x3b01, 0x3ad6, 0x3a94, 0x3825, 0x3840, 0x3690, 0x37e9, 0x3bf0, 0x3bb3, 0x39a6, 0x3bf2, 0x363b, 0x39e1, 0x306c, 0x36de, 0x3b80, 0x3b52, 0x3769, 0x389d, 0x3598, 0x36b1, 0x3a0c, 0x3647, 0x3587, 0x3884, 0x3a4d, 0x29ad, 0x382a, 0x35cb, 0x35d3, 0x374b, 0x374c, 0x3b35, 0x3a58, 0x39db, +0x3951, 0x38d5, 0x3ad1, 0x3b01, 0x3714, 0x3a8b, 0x3a1d, 0x360f, 0x2e2d, 0x3990, 0x35d5, 0x3b98, 0x3122, 0x2efe, 0x33bd, 0x3b8c, 0x37b8, 0x3a51, 0x38d8, 0x39ac, 0x3691, 0x31b6, 0x3557, 0x2cf7, 0x3a32, 0x3aa3, 0x35b8, 0x385b, 0x3a32, 0x3688, 0x367a, 0x30d6, 0x2f4b, 0x3ba0, 0x3121, 0x30af, 0x375b, 0x33f0, 0x3854, 0x3b73, 0x3a16, 0x3444, 0x393b, 0x393b, 0x30f4, 0x2d8b, 0x38a1, 0x2b29, +0x3679, 0x3966, 0x37a1, 0x3832, 0x39bc, 0x356b, 0x2d9a, 0x3a05, 0x3b20, 0x38e9, 0x38c2, 0x38c2, 0x3a76, 0x3523, 0x3812, 0x388d, 0x37f4, 0x3b3b, 0x3ab7, 0x3366, 0x39a9, 0x3bb3, 0x3ac8, 0x3ad9, 0x3994, 0x343f, 0x3669, 0x2e50, 0x3b6c, 0x3873, 0x3b13, 0x3acd, 0x2bf7, 0x3b9c, 0x34aa, 0x385b, 0x2dae, 0x2aac, 0x2882, 0x2d37, 0x3bd9, 0x32f9, 0x36e2, 0x3315, 0x395c, 0x3ace, 0x353c, 0x3b25, +0x3b1e, 0x3687, 0x2fee, 0x3917, 0x3027, 0x3238, 0x39ce, 0x323d, 0x3498, 0x3be7, 0x36c5, 0x36e0, 0x38b3, 0x3420, 0x36ed, 0x3353, 0x30cc, 0x3ab7, 0x323b, 0x3a05, 0x27f2, 0x3177, 0x3552, 0x3897, 0x2f99, 0x39d3, 0x31a0, 0x3634, 0x2d52, 0x2915, 0x33c4, 0x1585, 0x3bf7, 0x3ad6, 0x380d, 0x3673, 0x29d3, 0x3800, 0x39fa, 0x391c, 0x3263, 0x3025, 0x3995, 0x373e, 0x2941, 0x35b7, 0x3b45, 0x3a0f, +0x327c, 0x3172, 0x38aa, 0x298f, 0x3a13, 0x3b4a, 0x2b09, 0x3816, 0x3567, 0x390c, 0x3885, 0x38e9, 0x34f9, 0x39ca, 0x35f6, 0x3a74, 0x35f3, 0x1e43, 0x38d4, 0x26fc, 0x2d8a, 0x350f, 0x3456, 0x3862, 0x389c, 0x382a, 0x3756, 0x3941, 0x3ba5, 0x37fb, 0x39d9, 0x382d, 0x3ba3, 0x3b3c, 0x3619, 0x3228, 0x3a5b, 0x3753, 0x38f6, 0x3840, 0x2870, 0x3149, 0x39a4, 0x3ba1, 0x3b35, 0x3afa, 0x3248, 0x3a32, +0x34d3, 0x35a7, 0x34d4, 0x3b27, 0x3a3b, 0x3769, 0x380a, 0x34e9, 0x2434, 0x3452, 0x3a30, 0x34e8, 0x27e1, 0x39e2, 0x395f, 0x38e9, 0x342b, 0x3954, 0x3071, 0x38a3, 0x3153, 0x3974, 0x36d5, 0x37f9, 0x35c5, 0x3870, 0x3ba9, 0x3a57, 0x36c9, 0x3ab2, 0x2a4c, 0x3887, 0x339c, 0x3bc1, 0x3a83, 0x326c, 0x373a, 0x2c72, 0x2b29, 0x3a2d, 0x393a, 0x2fcb, 0x3800, 0x394f, 0x38c6, 0x3955, 0x3910, 0x378a, +0x3acd, 0x3a17, 0x355f, 0x39f4, 0x36e7, 0x3ae9, 0x3546, 0x261c, 0x3bec, 0x3472, 0x34cb, 0x3af4, 0x3712, 0x3a84, 0x368e, 0x3b1a, 0x2654, 0x3ace, 0x3a72, 0x39ad, 0x3858, 0x37c9, 0x3734, 0x3ba6, 0x3b15, 0x390d, 0x354f, 0x1b54, 0x3b79, 0x2ba6, 0x35dd, 0x3b25, 0x3bfe, 0x3405, 0x363d, 0x2f80, 0x39a7, 0x3400, 0x37ec, 0x2c2c, 0x3b6e, 0x3acc, 0x3b03, 0x39af, 0x31e7, 0x3958, 0x3480, 0x3977, +0x34e7, 0x35d1, 0x35bc, 0x38d0, 0x3b9e, 0x3ae4, 0x3865, 0x1e86, 0x32e5, 0x28d7, 0x3ae5, 0x3a0a, 0x3678, 0x3a1c, 0x3856, 0x280c, 0x3a5a, 0x30e7, 0x3b96, 0x3b1d, 0x3826, 0x2eb3, 0x3a15, 0x301f, 0x3a08, 0x340f, 0x3a8d, 0x1cb3, 0x2a89, 0x38ea, 0x3ae1, 0x384d, 0x3b70, 0x3982, 0x3077, 0x3af2, 0x37a9, 0x361b, 0x3335, 0x35db, 0x3701, 0x3a0a, 0x3aec, 0x39bb, 0x3bf6, 0x3b22, 0x3793, 0x3aef, +0x3a88, 0x3834, 0x33d4, 0x38ed, 0x2e48, 0x3291, 0x3b11, 0x3775, 0x36bc, 0x36d6, 0x314e, 0x3266, 0x3326, 0x2fe6, 0x386f, 0x3bdf, 0x3a3c, 0x2e72, 0x3238, 0x3a0e, 0x3812, 0x332b, 0x3594, 0x368b, 0x38f6, 0x381d, 0x3b00, 0x1c2d, 0x3abf, 0x3ac4, 0x2ced, 0x3128, 0x39e9, 0x2d97, 0x247d, 0x3a10, 0x2d03, 0x3a5a, 0x3839, 0x3985, 0x2d87, 0x3645, 0x387e, 0x34be, 0x29e6, 0x395c, 0x2ce6, 0x395f, +0x3a6c, 0x3545, 0x3b3f, 0x3ad1, 0x3b94, 0x3b9a, 0x2d92, 0x2e46, 0x3866, 0x3994, 0x3a0d, 0x341d, 0x3199, 0x30e4, 0x2d19, 0x34a9, 0x36d5, 0x3916, 0x385c, 0x3b9d, 0x3660, 0x39a5, 0x3091, 0x38d1, 0x3a0d, 0x34d5, 0x3b90, 0x3707, 0x32ae, 0x39e1, 0x382d, 0x2875, 0x2d57, 0x3484, 0x384e, 0x1cb2, 0x2e3d, 0x3575, 0x30f3, 0x3ac7, 0x37c0, 0x3a1c, 0x355a, 0x34d8, 0x38ac, 0x3839, 0x3abc, 0x3517, +0x2d7b, 0x3b2b, 0x3a3f, 0x3962, 0x3bcd, 0x3a92, 0x3983, 0x3b99, 0x3446, 0x37db, 0x3a51, 0x385c, 0x3179, 0x2942, 0x396b, 0x3855, 0x3872, 0x3a2b, 0x3b91, 0x35a7, 0x3a30, 0x2f3d, 0x39c2, 0x352a, 0x301a, 0x362b, 0x395a, 0x28fe, 0x2e22, 0x2b81, 0x3b3d, 0x3680, 0x3061, 0x3b29, 0x3a5a, 0x3549, 0x3bb2, 0x3bc9, 0x352f, 0x2e0b, 0x3220, 0x3637, 0x3b8c, 0x38c5, 0x3af1, 0x33b7, 0x3b6c, 0x389b, +0x3763, 0x23a5, 0x3461, 0x3a80, 0x35c7, 0x3200, 0x3811, 0x39e4, 0x356b, 0x39d5, 0x3974, 0x38b0, 0x3b00, 0x3bc7, 0x3a01, 0x3bf3, 0x3268, 0x3971, 0x3bbe, 0x37cc, 0x3607, 0x3327, 0x3995, 0x2bc0, 0x345f, 0x2ad7, 0x341f, 0x322a, 0x380d, 0x2b0f, 0x34b6, 0x38df, 0x382d, 0x35ca, 0x34c4, 0x3bce, 0x3a53, 0x36cc, 0x38ff, 0x38fd, 0x2c82, 0x3899, 0x3895, 0x3871, 0x3bd1, 0x3543, 0x3a44, 0x349b, +0x3512, 0x37a4, 0x3429, 0x399d, 0x37a6, 0x2afb, 0x37a4, 0x3832, 0x39f0, 0x38e0, 0x3266, 0x27b9, 0x3814, 0x327b, 0x3a8c, 0x31f9, 0x346d, 0x34c9, 0x3b8a, 0x359d, 0x39b2, 0x39d6, 0x3602, 0x2df2, 0x3b65, 0x2fe6, 0x3ad5, 0x3600, 0x3b32, 0x3b92, 0x34a1, 0x375b, 0x38f6, 0x3aab, 0x38f2, 0x3561, 0x367c, 0x3995, 0x39c0, 0x2ff3, 0x31f8, 0x3413, 0x3ba4, 0x2e61, 0x3b6f, 0x2956, 0x3af0, 0x35fa, +0x2a90, 0x33f4, 0x3885, 0x3803, 0x37c3, 0x3499, 0x38f4, 0x36a3, 0x3984, 0x3715, 0x3a15, 0x3a7d, 0x3885, 0x3a5e, 0x3921, 0x3af3, 0x397a, 0x380c, 0x381b, 0x3be7, 0x395e, 0x357d, 0x36bd, 0x3b7c, 0x34a2, 0x333c, 0x3be1, 0x3431, 0x3051, 0x38ec, 0x3a6d, 0x3aa9, 0x399a, 0x2b03, 0x394b, 0x3823, 0x3bc3, 0x388f, 0x3815, 0x3a7c, 0x3a85, 0x32fe, 0x3bbb, 0x38fd, 0x3b92, 0x3472, 0x367d, 0x32b2, +0x2c09, 0x3236, 0x36be, 0x3007, 0x30c2, 0x3666, 0x3b42, 0x3780, 0x3a9d, 0x314a, 0x3933, 0x3b0e, 0x3a76, 0x3ab1, 0x3acc, 0x35c7, 0x2834, 0x347e, 0x393e, 0x36fd, 0x3ac8, 0x3419, 0x3977, 0x3a68, 0x38aa, 0x2f27, 0x30a5, 0x3bef, 0x3bb0, 0x3629, 0x35ea, 0x3647, 0x39dd, 0x33ef, 0x3a4c, 0x33ba, 0x37c6, 0x3a33, 0x3824, 0x30c5, 0x3b25, 0x332d, 0x363f, 0x394d, 0x3289, 0x388e, 0x3978, 0x396b, +0x3647, 0x3876, 0x3364, 0x3b51, 0x3a09, 0x385c, 0x38cb, 0x3bb1, 0x3b8e, 0x3172, 0x3235, 0x3873, 0x3701, 0x2d2f, 0x3610, 0x35a8, 0x30da, 0x28c2, 0x3b5f, 0x39ef, 0x326b, 0x2b05, 0x378a, 0x3491, 0x3a86, 0x3a16, 0x3ae6, 0x3601, 0x3a6d, 0x394e, 0x389c, 0x3b19, 0x3af7, 0x36ee, 0x2bc3, 0x3a71, 0x3751, 0x3577, 0x34a3, 0x37da, 0x28ae, 0x2e26, 0x37d1, 0x3872, 0x3941, 0x31dd, 0x2b26, 0x3152, +0x3a0d, 0x33c1, 0x3572, 0x326b, 0x34a6, 0x373a, 0x39cc, 0x39d8, 0x39fd, 0x3af7, 0x390a, 0x3434, 0x34c6, 0x364a, 0x3417, 0x2962, 0x30dd, 0x38d1, 0x3a99, 0x3762, 0x2e6a, 0x392d, 0x3983, 0x3aa1, 0x322f, 0x3b7e, 0x2e09, 0x341d, 0x3412, 0x3995, 0x355f, 0x30a1, 0x3641, 0x35e6, 0x35d8, 0x38b9, 0x3920, 0x3be6, 0x3836, 0x35f2, 0x2af0, 0x3543, 0x34a2, 0x3a2a, 0x3b4a, 0x2c71, 0x3191, 0x39e5, +0x3812, 0x3841, 0x3aaa, 0x38d0, 0x2e84, 0x3106, 0x3649, 0x3927, 0x320a, 0x3bd9, 0x3478, 0x3a16, 0x39d2, 0x36e8, 0x35c3, 0x2cd9, 0x2fe8, 0x393f, 0x3406, 0x317e, 0x3abe, 0x36ec, 0x3a6d, 0x3a7d, 0x30bf, 0x2cd3, 0x363b, 0x3163, 0x36ae, 0x387a, 0x3a1e, 0x3013, 0x2cc7, 0x3845, 0x3587, 0x3a74, 0x3939, 0x35bc, 0x378e, 0x38ef, 0x39df, 0x374e, 0x3b2c, 0x388c, 0x37b0, 0x3421, 0x3837, 0x372a, +0x3b1c, 0x3509, 0x36ae, 0x24b6, 0x39eb, 0x34fe, 0x3b1e, 0x3925, 0x3407, 0x3a93, 0x3727, 0x37da, 0x3648, 0x3ac5, 0x3095, 0x25c6, 0x324d, 0x34cb, 0x2ee4, 0x3516, 0x35c6, 0x3744, 0x3314, 0x387e, 0x3bb6, 0x3344, 0x373b, 0x39a2, 0x355d, 0x38a3, 0x34b9, 0x3590, 0x3907, 0x39bb, 0x3908, 0x38fc, 0x2c76, 0x2ca0, 0x2a80, 0x37fb, 0x264c, 0x36e0, 0x3a2a, 0x3813, 0x3a15, 0x3bfb, 0x357f, 0x37a1, +0x3b41, 0x393b, 0x3ae1, 0x35f4, 0x39dc, 0x3ad5, 0x376c, 0x32bc, 0x2e82, 0x3ab0, 0x379d, 0x3a93, 0x3665, 0x38dd, 0x2afc, 0x3367, 0x3873, 0x3baa, 0x35d5, 0x3823, 0x3add, 0x37f4, 0x38aa, 0x357b, 0x3a4f, 0x3aab, 0x2832, 0x3667, 0x3823, 0x3106, 0x38e6, 0x3245, 0x3051, 0x30a3, 0x2db8, 0x39ac, 0x31e7, 0x325e, 0x3410, 0x39eb, 0x369c, 0x3aa4, 0x35b2, 0x3322, 0x308c, 0x2f88, 0x3b4b, 0x34fe, +0x3b32, 0x3235, 0x3b8b, 0x332b, 0x3001, 0x2067, 0x361e, 0x397b, 0x378b, 0x3ad9, 0x3236, 0x34b0, 0x387c, 0x37de, 0x38f2, 0x3861, 0x27fd, 0x3a01, 0x3992, 0x2d5c, 0x313f, 0x3a05, 0x3bfe, 0x34b1, 0x3bfb, 0x39f4, 0x3747, 0x3b61, 0x3bb1, 0x3145, 0x3446, 0x34e6, 0x3a96, 0x2d1d, 0x3bd7, 0x2c12, 0x3161, 0x3790, 0x3bea, 0x3518, 0x36a2, 0x3b7c, 0x3825, 0x325f, 0x3997, 0x38e8, 0x37c4, 0x312a, +0x3a69, 0x3177, 0x35f7, 0x3381, 0x32c4, 0x38bb, 0x3677, 0x30bd, 0x38da, 0x325a, 0x3944, 0x3913, 0x3962, 0x308d, 0x37ad, 0x3834, 0x385b, 0x3492, 0x3574, 0x38a5, 0x30e2, 0x35c1, 0x3975, 0x37ad, 0x3784, 0x33ea, 0x39ff, 0x328e, 0x3be0, 0x3b34, 0x3460, 0x3ab7, 0x3a60, 0x3477, 0x3938, 0x3342, 0x34cc, 0x31d0, 0x2c08, 0x3aab, 0x3bb2, 0x3ba5, 0x396b, 0x3ae2, 0x37af, 0x334a, 0x2866, 0x3836, +0x3528, 0x362b, 0x2b89, 0x2946, 0x3812, 0x2a40, 0x3b9c, 0x36a8, 0x2d19, 0x3b81, 0x3a64, 0x305b, 0x3143, 0x37b0, 0x35a7, 0x3579, 0x313e, 0x3b5f, 0x35f7, 0x385c, 0x3bbd, 0x2b09, 0x37c1, 0x3833, 0x30b6, 0x1dbb, 0x36f3, 0x3785, 0x351d, 0x1d0d, 0x398c, 0x3919, 0x312d, 0x2af8, 0x3ae6, 0x3ba3, 0x2821, 0x1bb5, 0x37d2, 0x3344, 0x3b88, 0x38e8, 0x333d, 0x37cb, 0x3962, 0x3100, 0x3260, 0x3aeb, +0x39d6, 0x36e1, 0x393a, 0x3a38, 0x383c, 0x35c6, 0x3acd, 0x38d9, 0x35f8, 0x377a, 0x3af7, 0x3903, 0x2148, 0x3851, 0x2a7b, 0x3452, 0x3425, 0x2fd4, 0x3751, 0x335c, 0x366e, 0x3a2b, 0x30c1, 0x317a, 0x355a, 0x2d45, 0x390c, 0x3aa9, 0x38f4, 0x3007, 0x3924, 0x381d, 0x378c, 0x3541, 0x3a37, 0x38d0, 0x351d, 0x37ad, 0x3abb, 0x3989, 0x3716, 0x33ed, 0x396a, 0x3b60, 0x3ba0, 0x3818, 0x3b94, 0x35a7, +0x369a, 0x3755, 0x3a5b, 0x3a1e, 0x35d3, 0x3a14, 0x1da4, 0x39f6, 0x3a81, 0x3ac3, 0x397d, 0x340b, 0x3aa7, 0x2b95, 0x3791, 0x1fa8, 0x2e38, 0x38e0, 0x3275, 0x3b9f, 0x3956, 0x2520, 0x3baf, 0x35c4, 0x3112, 0x3aee, 0x3a57, 0x31db, 0x394c, 0x35c7, 0x3a4f, 0x39fa, 0x3415, 0x26d6, 0x3a20, 0x383a, 0x35ed, 0x3549, 0x3907, 0x3858, 0x34f9, 0x3b66, 0x39f1, 0x2fc9, 0x3479, 0x3674, 0x3622, 0x34cc, +0x3aa6, 0x2c56, 0x347e, 0x39a1, 0x364c, 0x3b8b, 0x3abe, 0x311f, 0x3ae4, 0x3beb, 0x39a9, 0x3b8b, 0x3763, 0x3b33, 0x3407, 0x34a7, 0x31b8, 0x3a3d, 0x3a91, 0x3b44, 0x31ef, 0x3136, 0x3b43, 0x37a5, 0x39f8, 0x3893, 0x3851, 0x2991, 0x3b5a, 0x3a61, 0x3a0f, 0x397e, 0x3b5b, 0x34cd, 0x3647, 0x39ce, 0x3aab, 0x3899, 0x3baf, 0x3aea, 0x2aa1, 0x2da5, 0x3908, 0x29a7, 0x3bd7, 0x38d7, 0x36fd, 0x3aac, +0x38c1, 0x311e, 0x37d2, 0x3b9c, 0x36f8, 0x35aa, 0x3a7d, 0x26c4, 0x3467, 0x28c5, 0x1070, 0x2acd, 0x3ab6, 0x3310, 0x3876, 0x394f, 0x3a17, 0x3b9c, 0x3039, 0x32d0, 0x31bc, 0x2a58, 0x3ad3, 0x2dcb, 0x3acd, 0x38ad, 0x3ba0, 0x33fa, 0x3a3b, 0x37e9, 0x3b77, 0x3b04, 0x397a, 0x2fcb, 0x3b00, 0x397b, 0x39f3, 0x3b65, 0x386b, 0x38ec, 0x39d0, 0x3772, 0x3874, 0x3623, 0x3a9b, 0x3a01, 0x327e, 0x2cf5, +0x3993, 0x3be6, 0x375b, 0x3635, 0x3ba4, 0x3208, 0x3940, 0x3252, 0x3557, 0x39ae, 0x3a57, 0x2c3a, 0x389b, 0x3401, 0x3acf, 0x3beb, 0x3a90, 0x3add, 0x35cd, 0x38cf, 0x3328, 0x38e1, 0x3b21, 0x2e2e, 0x3395, 0x37e0, 0x3170, 0x384a, 0x32fe, 0x2383, 0x3aae, 0x3980, 0x3a4a, 0x314d, 0x33d8, 0x3adf, 0x34c2, 0x3a10, 0x3201, 0x3027, 0x38fb, 0x367c, 0x39b0, 0x2d2d, 0x3836, 0x326b, 0x3bf9, 0x3a35, +0x3258, 0x2acc, 0x3b1f, 0x35f8, 0x38e9, 0x344f, 0x289b, 0x345d, 0x3498, 0x3717, 0x355d, 0x29ff, 0x32c8, 0x3653, 0x39ef, 0x34ac, 0x3a94, 0x34cb, 0x395f, 0x3b8a, 0x38bb, 0x3759, 0x3318, 0x30b2, 0x3a03, 0x3174, 0x392e, 0x297d, 0x2548, 0x3b2c, 0x35b0, 0x3565, 0x323f, 0x3b9b, 0x3457, 0x384d, 0x38d6, 0x355d, 0x3008, 0x39c3, 0x2c5e, 0x3b90, 0x3ae3, 0x3a44, 0x3b8d, 0x307e, 0x3a86, 0x3058, +0x3add, 0x2333, 0x36c5, 0x280a, 0x3856, 0x2d97, 0x3419, 0x33a8, 0x3230, 0x2e85, 0x32f5, 0x3a43, 0x3a53, 0x3547, 0x208c, 0x3718, 0x31a0, 0x3460, 0x3788, 0x3aa0, 0x3abf, 0x2be0, 0x387c, 0x3bf2, 0x392b, 0x3a50, 0x3b0c, 0x380c, 0x39cf, 0x3af9, 0x31c0, 0x2f02, 0x3bb9, 0x3819, 0x3587, 0x30be, 0x3acd, 0x3693, 0x3576, 0x30ac, 0x3553, 0x36d6, 0x39ba, 0x31cb, 0x383b, 0x3ba1, 0x386d, 0x361b, +0x391a, 0x37c2, 0x398c, 0x3972, 0x32ad, 0x3b4f, 0x3617, 0x3b19, 0x36c4, 0x26e6, 0x3842, 0x3b5a, 0x3b60, 0x3061, 0x3af6, 0x3752, 0x2da0, 0x36d0, 0x34e5, 0x3ae4, 0x3909, 0x3a64, 0x3824, 0x352c, 0x339c, 0x327e, 0x3bf6, 0x3271, 0x2ebd, 0x39ff, 0x2883, 0x2f32, 0x30c1, 0x3b76, 0x2a62, 0x351a, 0x33d7, 0x39a7, 0x344c, 0x368a, 0x38d7, 0x38e4, 0x3a55, 0x3761, 0x3b7e, 0x367c, 0x35bf, 0x3441, +0x35a2, 0x3967, 0x3892, 0x2f81, 0x3881, 0x3b12, 0x3966, 0x390f, 0x2cf4, 0x32a9, 0x351e, 0x389b, 0x3712, 0x3806, 0x3ba7, 0x3137, 0x3911, 0x3706, 0x37cc, 0x3403, 0x3a9d, 0x322d, 0x3a3e, 0x3ae6, 0x3ad9, 0x37c7, 0x3b2b, 0x3b1f, 0x2dd7, 0x396c, 0x39de, 0x39db, 0x3bbb, 0x32fb, 0x38ee, 0x2c9e, 0x38a1, 0x3a41, 0x3938, 0x3497, 0x38f1, 0x3abd, 0x3a8f, 0x3be5, 0x3b00, 0x3482, 0x3731, 0x3a85, +0x39e6, 0x359a, 0x37f1, 0x3938, 0x37cb, 0x3051, 0x3a9a, 0x39ff, 0x39e0, 0x27b2, 0x3856, 0x36e9, 0x3ac2, 0x379a, 0x38fa, 0x3546, 0x2ab1, 0x35f6, 0x3aba, 0x39ce, 0x30f2, 0x3b07, 0x35e3, 0x38dd, 0x3a31, 0x3a87, 0x339b, 0x37e4, 0x39b5, 0x3642, 0x3aaa, 0x3b79, 0x3995, 0x39ba, 0x38fb, 0x3696, 0x348c, 0x35cf, 0x2df5, 0x3063, 0x3b39, 0x34ff, 0x3507, 0x3bc2, 0x3075, 0x300b, 0x3005, 0x37ff, +0x3b87, 0x3a23, 0x39bd, 0x38a5, 0x34a2, 0x2e3b, 0x2ffa, 0x3a5c, 0x382a, 0x1d4a, 0x39e0, 0x34a0, 0x30e8, 0x3a3b, 0x3bb6, 0x3b98, 0x3873, 0x30c9, 0x31c3, 0x3190, 0x3982, 0x352d, 0x39bd, 0x2977, 0x39e4, 0x3885, 0x3878, 0x38f1, 0x3706, 0x3874, 0x3a1b, 0x302f, 0x32be, 0x3a6f, 0x35b8, 0x38de, 0x2ef9, 0x39a5, 0x3ac2, 0x35a5, 0x3bb4, 0x3ab4, 0x3aea, 0x33ad, 0x3878, 0x3b22, 0x32af, 0x3ab1, +0x3ac1, 0x3aaa, 0x39d9, 0x3281, 0x26db, 0x3600, 0x3b1a, 0x308e, 0x2800, 0x3bbb, 0x3993, 0x3483, 0x3b99, 0x36d7, 0x38b6, 0x2e35, 0x1da9, 0x3bd9, 0x3395, 0x3bb4, 0x3b4f, 0x37e9, 0x28ad, 0x323b, 0x3901, 0x3b0a, 0x3a39, 0x2c30, 0x3a1a, 0x3bb2, 0x211a, 0x3ae0, 0x2f50, 0x387d, 0x382b, 0x350a, 0x3b88, 0x2f5a, 0x35eb, 0x3199, 0x30a3, 0x3724, 0x379e, 0x35e9, 0x33c8, 0x3859, 0x3984, 0x13b1, +0x372c, 0x34a3, 0x3504, 0x357a, 0x3881, 0x31da, 0x38a8, 0x3b7e, 0x2e03, 0x39d8, 0x30bf, 0x3ae1, 0x394b, 0x3a33, 0x382c, 0x3b0a, 0x39ea, 0x38d8, 0x3a3d, 0x34de, 0x3bbc, 0x3533, 0x2f62, 0x355f, 0x3863, 0x3a7b, 0x34c8, 0x39a5, 0x37d3, 0x3af4, 0x3685, 0x3b0f, 0x3b1a, 0x391b, 0x3492, 0x3b05, 0x2345, 0x398e, 0x372d, 0x3a99, 0x382f, 0x350e, 0x3076, 0x384a, 0x362b, 0x38e6, 0x38b0, 0x3a91, +0x2837, 0x2c9a, 0x381c, 0x3b93, 0x37d9, 0x3a1f, 0x2a6a, 0x351f, 0x3a89, 0x35ab, 0x379b, 0x35a4, 0x3874, 0x36d8, 0x30c5, 0x37a3, 0x384b, 0x31b9, 0x3b3f, 0x3928, 0x3810, 0x3af2, 0x287f, 0x3902, 0x343b, 0x3752, 0x36f3, 0x39a3, 0x3856, 0x3574, 0x327e, 0x30dd, 0x3bce, 0x3895, 0x3b0c, 0x38c3, 0x2fac, 0x21f3, 0x39c6, 0x28b0, 0x3081, 0x39cb, 0x38a5, 0x3a06, 0x3810, 0x380c, 0x3b58, 0x3159, +0x30b7, 0x3a80, 0x3914, 0x341a, 0x3154, 0x305d, 0x37b1, 0x3551, 0x2712, 0x3b44, 0x34c6, 0x3aaf, 0x3686, 0x319b, 0x3b0a, 0x37ca, 0x3a86, 0x3933, 0x3043, 0x3970, 0x2c82, 0x396e, 0x39b0, 0x3657, 0x39db, 0x3143, 0x33cb, 0x3a4f, 0x349f, 0x35b6, 0x2a9e, 0x39e1, 0x38a4, 0x2943, 0x25b6, 0x3966, 0x3b5e, 0x396e, 0x32a4, 0x3456, 0x35c8, 0x3b18, 0x3b5f, 0x37ba, 0x3554, 0x3979, 0x3b80, 0x3a88, +0x344f, 0x3a2c, 0x39e0, 0x3128, 0x3a0f, 0x390c, 0x3833, 0x39e5, 0x39e5, 0x3a75, 0x3b0a, 0x34ce, 0x383e, 0x3a7d, 0x3855, 0x3b1a, 0x3b5b, 0x37a8, 0x393f, 0x3103, 0x3b4d, 0x3b35, 0x3969, 0x366c, 0x34de, 0x3031, 0x30b1, 0x3788, 0x3521, 0x378d, 0x38f9, 0x379c, 0x39c9, 0x3507, 0x30cb, 0x3115, 0x3532, 0x298a, 0x3923, 0x37f9, 0x3be9, 0x39f8, 0x34b0, 0x3996, 0x34df, 0x3967, 0x3a9c, 0x30a8, +0x3bc8, 0x373c, 0x3174, 0x3a77, 0x36a2, 0x2992, 0x34f4, 0x3457, 0x2426, 0x3b9b, 0x35a1, 0x38a9, 0x39e6, 0x36ed, 0x3623, 0x2a73, 0x3afc, 0x3309, 0x3979, 0x3927, 0x3423, 0x3150, 0x3a55, 0x34c2, 0x34a2, 0x375b, 0x38a3, 0x3838, 0x3bc0, 0x3b15, 0x389d, 0x36e2, 0x361f, 0x3855, 0x3482, 0x3bb9, 0x3af9, 0x38ee, 0x3981, 0x312d, 0x3448, 0x3972, 0x3761, 0x38f2, 0x3a00, 0x34c3, 0x2dee, 0x3a23, +0x3a41, 0x3975, 0x388c, 0x2b7f, 0x3a39, 0x364d, 0x3849, 0x3600, 0x3885, 0x3761, 0x3845, 0x38ae, 0x3523, 0x32ae, 0x25d3, 0x391e, 0x36fb, 0x3897, 0x39f7, 0x3bb9, 0x3571, 0x395b, 0x364c, 0x39f1, 0x39d5, 0x3877, 0x3b82, 0x30e6, 0x3a99, 0x31b6, 0x3942, 0x33a7, 0x36b8, 0x3874, 0x2f01, 0x3607, 0x3914, 0x3b8a, 0x3589, 0x385b, 0x39c6, 0x3423, 0x286f, 0x3b94, 0x351f, 0x3bf9, 0x38d2, 0x39fa +}; \ No newline at end of file diff --git a/hwpe/redmule/inc/y_input.h b/hwpe/redmule/inc/y_input.h new file mode 100644 index 0000000..07f17ec --- /dev/null +++ b/hwpe/redmule/inc/y_input.h @@ -0,0 +1,51 @@ + /* Header file generated by RedMulE Golden Model */ +uint16_t y_inp [2304] = { +0x2a2c, 0x303b, 0x3a3b, 0x37e1, 0x3aa7, 0x32fc, 0x35c2, 0x3b7f, 0x3a5f, 0x2b3e, 0x32eb, 0x37cd, 0x3864, 0x37f2, 0x3b49, 0x3701, 0x3919, 0x1c22, 0x3a1e, 0x3abe, 0x3b89, 0x2f84, 0x300f, 0x385a, 0x3309, 0x350a, 0x32ec, 0x3657, 0x2a10, 0x3aa7, 0x38f3, 0x3625, 0x3af7, 0x374a, 0x38a5, 0x378d, 0x3a3a, 0x387b, 0x37bc, 0x383a, 0x3019, 0x3419, 0x38a5, 0x3794, 0x3770, 0x3ad3, 0x31d5, 0x3b7c, +0x37d1, 0x3547, 0x376d, 0x3b0c, 0x3590, 0x355e, 0x3a64, 0x2742, 0x388b, 0x3b2d, 0x3b41, 0x3a58, 0x3ac0, 0x39d0, 0x2ecc, 0x2767, 0x3b8d, 0x36cd, 0x380a, 0x2c1c, 0x3274, 0x2f60, 0x3757, 0x39ee, 0x3b01, 0x3b5f, 0x3aba, 0x334d, 0x39ce, 0x37f5, 0x3a2f, 0x3be6, 0x337f, 0x3341, 0x3510, 0x39a7, 0x3abb, 0x3be6, 0x3aae, 0x3b01, 0x37bd, 0x3129, 0x36d9, 0x3478, 0x3530, 0x3807, 0x380b, 0x3b2c, +0x399d, 0x35bc, 0x3971, 0x3bb8, 0x2ec7, 0x3a89, 0x3b38, 0x3a88, 0x22a9, 0x33d5, 0x3a10, 0x361d, 0x3ae5, 0x3b13, 0x3a6d, 0x3b3c, 0x3bf3, 0x391d, 0x3a20, 0x3324, 0x394a, 0x30fc, 0x3348, 0x3925, 0x316f, 0x3b75, 0x34dc, 0x30c2, 0x3949, 0x35bd, 0x38ac, 0x2e88, 0x3b96, 0x38c0, 0x2f84, 0x3644, 0x31d2, 0x3b26, 0x3a1c, 0x31ba, 0x3b5c, 0x3181, 0x3a9f, 0x35ae, 0x3208, 0x397a, 0x35f0, 0x3689, +0x37fb, 0x3aba, 0x3a69, 0x373a, 0x392f, 0x3adb, 0x3167, 0x29b8, 0x3920, 0x34ac, 0x3758, 0x38bf, 0x3940, 0x3baf, 0x32ef, 0x3b98, 0x3b9f, 0x3b30, 0x384f, 0x3539, 0x3a26, 0x398f, 0x2230, 0x39d8, 0x395b, 0x3a3f, 0x2d89, 0x3b01, 0x3b8c, 0x3a30, 0x38b4, 0x30ab, 0x35ab, 0x3a7e, 0x3850, 0x3894, 0x3424, 0x39d3, 0x3a42, 0x39d0, 0x39a8, 0x36a9, 0x3b35, 0x2cdf, 0x3705, 0x3841, 0x3b79, 0x3b23, +0x2dd5, 0x3a67, 0x3178, 0x37a5, 0x3b5b, 0x3b5a, 0x2a68, 0x38c4, 0x3b23, 0x3943, 0x310c, 0x3261, 0x3889, 0x380c, 0x3626, 0x39ab, 0x3b7b, 0x3b53, 0x3a4a, 0x2f44, 0x3a74, 0x346b, 0x3481, 0x379b, 0x3bd0, 0x3a76, 0x3bca, 0x38b3, 0x3b1a, 0x3a84, 0x373f, 0x3a52, 0x3554, 0x3690, 0x3b66, 0x3a12, 0x3aa5, 0x3b45, 0x38c3, 0x396a, 0x2d50, 0x3978, 0x2442, 0x3ab9, 0x3818, 0x34b6, 0x34c0, 0x3a08, +0x38a4, 0x380c, 0x3b25, 0x363e, 0x2e86, 0x356f, 0x394f, 0x38e2, 0x27ab, 0x3b59, 0x2e61, 0x34ea, 0x38e6, 0x3673, 0x39a5, 0x3785, 0x2ebb, 0x3314, 0x367e, 0x34e4, 0x3884, 0x2fbf, 0x2f51, 0x3105, 0x3a29, 0x3aae, 0x3aea, 0x3977, 0x3b46, 0x3b29, 0x3ab7, 0x374c, 0x2e01, 0x3935, 0x3965, 0x31ed, 0x380e, 0x340d, 0x3615, 0x2a10, 0x23ab, 0x3990, 0x2c3a, 0x3723, 0x3001, 0x25e3, 0x3649, 0x2491, +0x39f6, 0x3a32, 0x3171, 0x38bc, 0x390d, 0x39ec, 0x3621, 0x3511, 0x39c8, 0x2c9b, 0x24b6, 0x38fb, 0x201c, 0x3367, 0x3b6c, 0x3ada, 0x37ce, 0x368e, 0x3909, 0x32f0, 0x3180, 0x3aca, 0x39e8, 0x3a6f, 0x2f65, 0x3b78, 0x3b6f, 0x378c, 0x2938, 0x393a, 0x319f, 0x38aa, 0x386c, 0x3b7b, 0x3b7d, 0x387a, 0x3bdd, 0x3af5, 0x2e74, 0x2c3d, 0x3add, 0x2ef4, 0x3a16, 0x2d55, 0x387d, 0x35ce, 0x2753, 0x3b55, +0x3b84, 0x2ebf, 0x335a, 0x391b, 0x3870, 0x3a8e, 0x39a2, 0x3397, 0x3751, 0x3a3e, 0x3920, 0x379b, 0x31a4, 0x3b01, 0x3ad6, 0x3a94, 0x3825, 0x3840, 0x3690, 0x37e9, 0x3bf0, 0x3bb3, 0x39a6, 0x3bf2, 0x363b, 0x39e1, 0x306c, 0x36de, 0x3b80, 0x3b52, 0x3769, 0x389d, 0x3598, 0x36b1, 0x3a0c, 0x3647, 0x3587, 0x3884, 0x3a4d, 0x29ad, 0x382a, 0x35cb, 0x35d3, 0x374b, 0x374c, 0x3b35, 0x3a58, 0x39db, +0x3951, 0x38d5, 0x3ad1, 0x3b01, 0x3714, 0x3a8b, 0x3a1d, 0x360f, 0x2e2d, 0x3990, 0x35d5, 0x3b98, 0x3122, 0x2efe, 0x33bd, 0x3b8c, 0x37b8, 0x3a51, 0x38d8, 0x39ac, 0x3691, 0x31b6, 0x3557, 0x2cf7, 0x3a32, 0x3aa3, 0x35b8, 0x385b, 0x3a32, 0x3688, 0x367a, 0x30d6, 0x2f4b, 0x3ba0, 0x3121, 0x30af, 0x375b, 0x33f0, 0x3854, 0x3b73, 0x3a16, 0x3444, 0x393b, 0x393b, 0x30f4, 0x2d8b, 0x38a1, 0x2b29, +0x3679, 0x3966, 0x37a1, 0x3832, 0x39bc, 0x356b, 0x2d9a, 0x3a05, 0x3b20, 0x38e9, 0x38c2, 0x38c2, 0x3a76, 0x3523, 0x3812, 0x388d, 0x37f4, 0x3b3b, 0x3ab7, 0x3366, 0x39a9, 0x3bb3, 0x3ac8, 0x3ad9, 0x3994, 0x343f, 0x3669, 0x2e50, 0x3b6c, 0x3873, 0x3b13, 0x3acd, 0x2bf7, 0x3b9c, 0x34aa, 0x385b, 0x2dae, 0x2aac, 0x2882, 0x2d37, 0x3bd9, 0x32f9, 0x36e2, 0x3315, 0x395c, 0x3ace, 0x353c, 0x3b25, +0x3b1e, 0x3687, 0x2fee, 0x3917, 0x3027, 0x3238, 0x39ce, 0x323d, 0x3498, 0x3be7, 0x36c5, 0x36e0, 0x38b3, 0x3420, 0x36ed, 0x3353, 0x30cc, 0x3ab7, 0x323b, 0x3a05, 0x27f2, 0x3177, 0x3552, 0x3897, 0x2f99, 0x39d3, 0x31a0, 0x3634, 0x2d52, 0x2915, 0x33c4, 0x1585, 0x3bf7, 0x3ad6, 0x380d, 0x3673, 0x29d3, 0x3800, 0x39fa, 0x391c, 0x3263, 0x3025, 0x3995, 0x373e, 0x2941, 0x35b7, 0x3b45, 0x3a0f, +0x327c, 0x3172, 0x38aa, 0x298f, 0x3a13, 0x3b4a, 0x2b09, 0x3816, 0x3567, 0x390c, 0x3885, 0x38e9, 0x34f9, 0x39ca, 0x35f6, 0x3a74, 0x35f3, 0x1e43, 0x38d4, 0x26fc, 0x2d8a, 0x350f, 0x3456, 0x3862, 0x389c, 0x382a, 0x3756, 0x3941, 0x3ba5, 0x37fb, 0x39d9, 0x382d, 0x3ba3, 0x3b3c, 0x3619, 0x3228, 0x3a5b, 0x3753, 0x38f6, 0x3840, 0x2870, 0x3149, 0x39a4, 0x3ba1, 0x3b35, 0x3afa, 0x3248, 0x3a32, +0x34d3, 0x35a7, 0x34d4, 0x3b27, 0x3a3b, 0x3769, 0x380a, 0x34e9, 0x2434, 0x3452, 0x3a30, 0x34e8, 0x27e1, 0x39e2, 0x395f, 0x38e9, 0x342b, 0x3954, 0x3071, 0x38a3, 0x3153, 0x3974, 0x36d5, 0x37f9, 0x35c5, 0x3870, 0x3ba9, 0x3a57, 0x36c9, 0x3ab2, 0x2a4c, 0x3887, 0x339c, 0x3bc1, 0x3a83, 0x326c, 0x373a, 0x2c72, 0x2b29, 0x3a2d, 0x393a, 0x2fcb, 0x3800, 0x394f, 0x38c6, 0x3955, 0x3910, 0x378a, +0x3acd, 0x3a17, 0x355f, 0x39f4, 0x36e7, 0x3ae9, 0x3546, 0x261c, 0x3bec, 0x3472, 0x34cb, 0x3af4, 0x3712, 0x3a84, 0x368e, 0x3b1a, 0x2654, 0x3ace, 0x3a72, 0x39ad, 0x3858, 0x37c9, 0x3734, 0x3ba6, 0x3b15, 0x390d, 0x354f, 0x1b54, 0x3b79, 0x2ba6, 0x35dd, 0x3b25, 0x3bfe, 0x3405, 0x363d, 0x2f80, 0x39a7, 0x3400, 0x37ec, 0x2c2c, 0x3b6e, 0x3acc, 0x3b03, 0x39af, 0x31e7, 0x3958, 0x3480, 0x3977, +0x34e7, 0x35d1, 0x35bc, 0x38d0, 0x3b9e, 0x3ae4, 0x3865, 0x1e86, 0x32e5, 0x28d7, 0x3ae5, 0x3a0a, 0x3678, 0x3a1c, 0x3856, 0x280c, 0x3a5a, 0x30e7, 0x3b96, 0x3b1d, 0x3826, 0x2eb3, 0x3a15, 0x301f, 0x3a08, 0x340f, 0x3a8d, 0x1cb3, 0x2a89, 0x38ea, 0x3ae1, 0x384d, 0x3b70, 0x3982, 0x3077, 0x3af2, 0x37a9, 0x361b, 0x3335, 0x35db, 0x3701, 0x3a0a, 0x3aec, 0x39bb, 0x3bf6, 0x3b22, 0x3793, 0x3aef, +0x3a88, 0x3834, 0x33d4, 0x38ed, 0x2e48, 0x3291, 0x3b11, 0x3775, 0x36bc, 0x36d6, 0x314e, 0x3266, 0x3326, 0x2fe6, 0x386f, 0x3bdf, 0x3a3c, 0x2e72, 0x3238, 0x3a0e, 0x3812, 0x332b, 0x3594, 0x368b, 0x38f6, 0x381d, 0x3b00, 0x1c2d, 0x3abf, 0x3ac4, 0x2ced, 0x3128, 0x39e9, 0x2d97, 0x247d, 0x3a10, 0x2d03, 0x3a5a, 0x3839, 0x3985, 0x2d87, 0x3645, 0x387e, 0x34be, 0x29e6, 0x395c, 0x2ce6, 0x395f, +0x3a6c, 0x3545, 0x3b3f, 0x3ad1, 0x3b94, 0x3b9a, 0x2d92, 0x2e46, 0x3866, 0x3994, 0x3a0d, 0x341d, 0x3199, 0x30e4, 0x2d19, 0x34a9, 0x36d5, 0x3916, 0x385c, 0x3b9d, 0x3660, 0x39a5, 0x3091, 0x38d1, 0x3a0d, 0x34d5, 0x3b90, 0x3707, 0x32ae, 0x39e1, 0x382d, 0x2875, 0x2d57, 0x3484, 0x384e, 0x1cb2, 0x2e3d, 0x3575, 0x30f3, 0x3ac7, 0x37c0, 0x3a1c, 0x355a, 0x34d8, 0x38ac, 0x3839, 0x3abc, 0x3517, +0x2d7b, 0x3b2b, 0x3a3f, 0x3962, 0x3bcd, 0x3a92, 0x3983, 0x3b99, 0x3446, 0x37db, 0x3a51, 0x385c, 0x3179, 0x2942, 0x396b, 0x3855, 0x3872, 0x3a2b, 0x3b91, 0x35a7, 0x3a30, 0x2f3d, 0x39c2, 0x352a, 0x301a, 0x362b, 0x395a, 0x28fe, 0x2e22, 0x2b81, 0x3b3d, 0x3680, 0x3061, 0x3b29, 0x3a5a, 0x3549, 0x3bb2, 0x3bc9, 0x352f, 0x2e0b, 0x3220, 0x3637, 0x3b8c, 0x38c5, 0x3af1, 0x33b7, 0x3b6c, 0x389b, +0x3763, 0x23a5, 0x3461, 0x3a80, 0x35c7, 0x3200, 0x3811, 0x39e4, 0x356b, 0x39d5, 0x3974, 0x38b0, 0x3b00, 0x3bc7, 0x3a01, 0x3bf3, 0x3268, 0x3971, 0x3bbe, 0x37cc, 0x3607, 0x3327, 0x3995, 0x2bc0, 0x345f, 0x2ad7, 0x341f, 0x322a, 0x380d, 0x2b0f, 0x34b6, 0x38df, 0x382d, 0x35ca, 0x34c4, 0x3bce, 0x3a53, 0x36cc, 0x38ff, 0x38fd, 0x2c82, 0x3899, 0x3895, 0x3871, 0x3bd1, 0x3543, 0x3a44, 0x349b, +0x3512, 0x37a4, 0x3429, 0x399d, 0x37a6, 0x2afb, 0x37a4, 0x3832, 0x39f0, 0x38e0, 0x3266, 0x27b9, 0x3814, 0x327b, 0x3a8c, 0x31f9, 0x346d, 0x34c9, 0x3b8a, 0x359d, 0x39b2, 0x39d6, 0x3602, 0x2df2, 0x3b65, 0x2fe6, 0x3ad5, 0x3600, 0x3b32, 0x3b92, 0x34a1, 0x375b, 0x38f6, 0x3aab, 0x38f2, 0x3561, 0x367c, 0x3995, 0x39c0, 0x2ff3, 0x31f8, 0x3413, 0x3ba4, 0x2e61, 0x3b6f, 0x2956, 0x3af0, 0x35fa, +0x2a90, 0x33f4, 0x3885, 0x3803, 0x37c3, 0x3499, 0x38f4, 0x36a3, 0x3984, 0x3715, 0x3a15, 0x3a7d, 0x3885, 0x3a5e, 0x3921, 0x3af3, 0x397a, 0x380c, 0x381b, 0x3be7, 0x395e, 0x357d, 0x36bd, 0x3b7c, 0x34a2, 0x333c, 0x3be1, 0x3431, 0x3051, 0x38ec, 0x3a6d, 0x3aa9, 0x399a, 0x2b03, 0x394b, 0x3823, 0x3bc3, 0x388f, 0x3815, 0x3a7c, 0x3a85, 0x32fe, 0x3bbb, 0x38fd, 0x3b92, 0x3472, 0x367d, 0x32b2, +0x2c09, 0x3236, 0x36be, 0x3007, 0x30c2, 0x3666, 0x3b42, 0x3780, 0x3a9d, 0x314a, 0x3933, 0x3b0e, 0x3a76, 0x3ab1, 0x3acc, 0x35c7, 0x2834, 0x347e, 0x393e, 0x36fd, 0x3ac8, 0x3419, 0x3977, 0x3a68, 0x38aa, 0x2f27, 0x30a5, 0x3bef, 0x3bb0, 0x3629, 0x35ea, 0x3647, 0x39dd, 0x33ef, 0x3a4c, 0x33ba, 0x37c6, 0x3a33, 0x3824, 0x30c5, 0x3b25, 0x332d, 0x363f, 0x394d, 0x3289, 0x388e, 0x3978, 0x396b, +0x3647, 0x3876, 0x3364, 0x3b51, 0x3a09, 0x385c, 0x38cb, 0x3bb1, 0x3b8e, 0x3172, 0x3235, 0x3873, 0x3701, 0x2d2f, 0x3610, 0x35a8, 0x30da, 0x28c2, 0x3b5f, 0x39ef, 0x326b, 0x2b05, 0x378a, 0x3491, 0x3a86, 0x3a16, 0x3ae6, 0x3601, 0x3a6d, 0x394e, 0x389c, 0x3b19, 0x3af7, 0x36ee, 0x2bc3, 0x3a71, 0x3751, 0x3577, 0x34a3, 0x37da, 0x28ae, 0x2e26, 0x37d1, 0x3872, 0x3941, 0x31dd, 0x2b26, 0x3152, +0x3a0d, 0x33c1, 0x3572, 0x326b, 0x34a6, 0x373a, 0x39cc, 0x39d8, 0x39fd, 0x3af7, 0x390a, 0x3434, 0x34c6, 0x364a, 0x3417, 0x2962, 0x30dd, 0x38d1, 0x3a99, 0x3762, 0x2e6a, 0x392d, 0x3983, 0x3aa1, 0x322f, 0x3b7e, 0x2e09, 0x341d, 0x3412, 0x3995, 0x355f, 0x30a1, 0x3641, 0x35e6, 0x35d8, 0x38b9, 0x3920, 0x3be6, 0x3836, 0x35f2, 0x2af0, 0x3543, 0x34a2, 0x3a2a, 0x3b4a, 0x2c71, 0x3191, 0x39e5, +0x3812, 0x3841, 0x3aaa, 0x38d0, 0x2e84, 0x3106, 0x3649, 0x3927, 0x320a, 0x3bd9, 0x3478, 0x3a16, 0x39d2, 0x36e8, 0x35c3, 0x2cd9, 0x2fe8, 0x393f, 0x3406, 0x317e, 0x3abe, 0x36ec, 0x3a6d, 0x3a7d, 0x30bf, 0x2cd3, 0x363b, 0x3163, 0x36ae, 0x387a, 0x3a1e, 0x3013, 0x2cc7, 0x3845, 0x3587, 0x3a74, 0x3939, 0x35bc, 0x378e, 0x38ef, 0x39df, 0x374e, 0x3b2c, 0x388c, 0x37b0, 0x3421, 0x3837, 0x372a, +0x3b1c, 0x3509, 0x36ae, 0x24b6, 0x39eb, 0x34fe, 0x3b1e, 0x3925, 0x3407, 0x3a93, 0x3727, 0x37da, 0x3648, 0x3ac5, 0x3095, 0x25c6, 0x324d, 0x34cb, 0x2ee4, 0x3516, 0x35c6, 0x3744, 0x3314, 0x387e, 0x3bb6, 0x3344, 0x373b, 0x39a2, 0x355d, 0x38a3, 0x34b9, 0x3590, 0x3907, 0x39bb, 0x3908, 0x38fc, 0x2c76, 0x2ca0, 0x2a80, 0x37fb, 0x264c, 0x36e0, 0x3a2a, 0x3813, 0x3a15, 0x3bfb, 0x357f, 0x37a1, +0x3b41, 0x393b, 0x3ae1, 0x35f4, 0x39dc, 0x3ad5, 0x376c, 0x32bc, 0x2e82, 0x3ab0, 0x379d, 0x3a93, 0x3665, 0x38dd, 0x2afc, 0x3367, 0x3873, 0x3baa, 0x35d5, 0x3823, 0x3add, 0x37f4, 0x38aa, 0x357b, 0x3a4f, 0x3aab, 0x2832, 0x3667, 0x3823, 0x3106, 0x38e6, 0x3245, 0x3051, 0x30a3, 0x2db8, 0x39ac, 0x31e7, 0x325e, 0x3410, 0x39eb, 0x369c, 0x3aa4, 0x35b2, 0x3322, 0x308c, 0x2f88, 0x3b4b, 0x34fe, +0x3b32, 0x3235, 0x3b8b, 0x332b, 0x3001, 0x2067, 0x361e, 0x397b, 0x378b, 0x3ad9, 0x3236, 0x34b0, 0x387c, 0x37de, 0x38f2, 0x3861, 0x27fd, 0x3a01, 0x3992, 0x2d5c, 0x313f, 0x3a05, 0x3bfe, 0x34b1, 0x3bfb, 0x39f4, 0x3747, 0x3b61, 0x3bb1, 0x3145, 0x3446, 0x34e6, 0x3a96, 0x2d1d, 0x3bd7, 0x2c12, 0x3161, 0x3790, 0x3bea, 0x3518, 0x36a2, 0x3b7c, 0x3825, 0x325f, 0x3997, 0x38e8, 0x37c4, 0x312a, +0x3a69, 0x3177, 0x35f7, 0x3381, 0x32c4, 0x38bb, 0x3677, 0x30bd, 0x38da, 0x325a, 0x3944, 0x3913, 0x3962, 0x308d, 0x37ad, 0x3834, 0x385b, 0x3492, 0x3574, 0x38a5, 0x30e2, 0x35c1, 0x3975, 0x37ad, 0x3784, 0x33ea, 0x39ff, 0x328e, 0x3be0, 0x3b34, 0x3460, 0x3ab7, 0x3a60, 0x3477, 0x3938, 0x3342, 0x34cc, 0x31d0, 0x2c08, 0x3aab, 0x3bb2, 0x3ba5, 0x396b, 0x3ae2, 0x37af, 0x334a, 0x2866, 0x3836, +0x3528, 0x362b, 0x2b89, 0x2946, 0x3812, 0x2a40, 0x3b9c, 0x36a8, 0x2d19, 0x3b81, 0x3a64, 0x305b, 0x3143, 0x37b0, 0x35a7, 0x3579, 0x313e, 0x3b5f, 0x35f7, 0x385c, 0x3bbd, 0x2b09, 0x37c1, 0x3833, 0x30b6, 0x1dbb, 0x36f3, 0x3785, 0x351d, 0x1d0d, 0x398c, 0x3919, 0x312d, 0x2af8, 0x3ae6, 0x3ba3, 0x2821, 0x1bb5, 0x37d2, 0x3344, 0x3b88, 0x38e8, 0x333d, 0x37cb, 0x3962, 0x3100, 0x3260, 0x3aeb, +0x39d6, 0x36e1, 0x393a, 0x3a38, 0x383c, 0x35c6, 0x3acd, 0x38d9, 0x35f8, 0x377a, 0x3af7, 0x3903, 0x2148, 0x3851, 0x2a7b, 0x3452, 0x3425, 0x2fd4, 0x3751, 0x335c, 0x366e, 0x3a2b, 0x30c1, 0x317a, 0x355a, 0x2d45, 0x390c, 0x3aa9, 0x38f4, 0x3007, 0x3924, 0x381d, 0x378c, 0x3541, 0x3a37, 0x38d0, 0x351d, 0x37ad, 0x3abb, 0x3989, 0x3716, 0x33ed, 0x396a, 0x3b60, 0x3ba0, 0x3818, 0x3b94, 0x35a7, +0x369a, 0x3755, 0x3a5b, 0x3a1e, 0x35d3, 0x3a14, 0x1da4, 0x39f6, 0x3a81, 0x3ac3, 0x397d, 0x340b, 0x3aa7, 0x2b95, 0x3791, 0x1fa8, 0x2e38, 0x38e0, 0x3275, 0x3b9f, 0x3956, 0x2520, 0x3baf, 0x35c4, 0x3112, 0x3aee, 0x3a57, 0x31db, 0x394c, 0x35c7, 0x3a4f, 0x39fa, 0x3415, 0x26d6, 0x3a20, 0x383a, 0x35ed, 0x3549, 0x3907, 0x3858, 0x34f9, 0x3b66, 0x39f1, 0x2fc9, 0x3479, 0x3674, 0x3622, 0x34cc, +0x3aa6, 0x2c56, 0x347e, 0x39a1, 0x364c, 0x3b8b, 0x3abe, 0x311f, 0x3ae4, 0x3beb, 0x39a9, 0x3b8b, 0x3763, 0x3b33, 0x3407, 0x34a7, 0x31b8, 0x3a3d, 0x3a91, 0x3b44, 0x31ef, 0x3136, 0x3b43, 0x37a5, 0x39f8, 0x3893, 0x3851, 0x2991, 0x3b5a, 0x3a61, 0x3a0f, 0x397e, 0x3b5b, 0x34cd, 0x3647, 0x39ce, 0x3aab, 0x3899, 0x3baf, 0x3aea, 0x2aa1, 0x2da5, 0x3908, 0x29a7, 0x3bd7, 0x38d7, 0x36fd, 0x3aac, +0x38c1, 0x311e, 0x37d2, 0x3b9c, 0x36f8, 0x35aa, 0x3a7d, 0x26c4, 0x3467, 0x28c5, 0x1070, 0x2acd, 0x3ab6, 0x3310, 0x3876, 0x394f, 0x3a17, 0x3b9c, 0x3039, 0x32d0, 0x31bc, 0x2a58, 0x3ad3, 0x2dcb, 0x3acd, 0x38ad, 0x3ba0, 0x33fa, 0x3a3b, 0x37e9, 0x3b77, 0x3b04, 0x397a, 0x2fcb, 0x3b00, 0x397b, 0x39f3, 0x3b65, 0x386b, 0x38ec, 0x39d0, 0x3772, 0x3874, 0x3623, 0x3a9b, 0x3a01, 0x327e, 0x2cf5, +0x3993, 0x3be6, 0x375b, 0x3635, 0x3ba4, 0x3208, 0x3940, 0x3252, 0x3557, 0x39ae, 0x3a57, 0x2c3a, 0x389b, 0x3401, 0x3acf, 0x3beb, 0x3a90, 0x3add, 0x35cd, 0x38cf, 0x3328, 0x38e1, 0x3b21, 0x2e2e, 0x3395, 0x37e0, 0x3170, 0x384a, 0x32fe, 0x2383, 0x3aae, 0x3980, 0x3a4a, 0x314d, 0x33d8, 0x3adf, 0x34c2, 0x3a10, 0x3201, 0x3027, 0x38fb, 0x367c, 0x39b0, 0x2d2d, 0x3836, 0x326b, 0x3bf9, 0x3a35, +0x3258, 0x2acc, 0x3b1f, 0x35f8, 0x38e9, 0x344f, 0x289b, 0x345d, 0x3498, 0x3717, 0x355d, 0x29ff, 0x32c8, 0x3653, 0x39ef, 0x34ac, 0x3a94, 0x34cb, 0x395f, 0x3b8a, 0x38bb, 0x3759, 0x3318, 0x30b2, 0x3a03, 0x3174, 0x392e, 0x297d, 0x2548, 0x3b2c, 0x35b0, 0x3565, 0x323f, 0x3b9b, 0x3457, 0x384d, 0x38d6, 0x355d, 0x3008, 0x39c3, 0x2c5e, 0x3b90, 0x3ae3, 0x3a44, 0x3b8d, 0x307e, 0x3a86, 0x3058, +0x3add, 0x2333, 0x36c5, 0x280a, 0x3856, 0x2d97, 0x3419, 0x33a8, 0x3230, 0x2e85, 0x32f5, 0x3a43, 0x3a53, 0x3547, 0x208c, 0x3718, 0x31a0, 0x3460, 0x3788, 0x3aa0, 0x3abf, 0x2be0, 0x387c, 0x3bf2, 0x392b, 0x3a50, 0x3b0c, 0x380c, 0x39cf, 0x3af9, 0x31c0, 0x2f02, 0x3bb9, 0x3819, 0x3587, 0x30be, 0x3acd, 0x3693, 0x3576, 0x30ac, 0x3553, 0x36d6, 0x39ba, 0x31cb, 0x383b, 0x3ba1, 0x386d, 0x361b, +0x391a, 0x37c2, 0x398c, 0x3972, 0x32ad, 0x3b4f, 0x3617, 0x3b19, 0x36c4, 0x26e6, 0x3842, 0x3b5a, 0x3b60, 0x3061, 0x3af6, 0x3752, 0x2da0, 0x36d0, 0x34e5, 0x3ae4, 0x3909, 0x3a64, 0x3824, 0x352c, 0x339c, 0x327e, 0x3bf6, 0x3271, 0x2ebd, 0x39ff, 0x2883, 0x2f32, 0x30c1, 0x3b76, 0x2a62, 0x351a, 0x33d7, 0x39a7, 0x344c, 0x368a, 0x38d7, 0x38e4, 0x3a55, 0x3761, 0x3b7e, 0x367c, 0x35bf, 0x3441, +0x35a2, 0x3967, 0x3892, 0x2f81, 0x3881, 0x3b12, 0x3966, 0x390f, 0x2cf4, 0x32a9, 0x351e, 0x389b, 0x3712, 0x3806, 0x3ba7, 0x3137, 0x3911, 0x3706, 0x37cc, 0x3403, 0x3a9d, 0x322d, 0x3a3e, 0x3ae6, 0x3ad9, 0x37c7, 0x3b2b, 0x3b1f, 0x2dd7, 0x396c, 0x39de, 0x39db, 0x3bbb, 0x32fb, 0x38ee, 0x2c9e, 0x38a1, 0x3a41, 0x3938, 0x3497, 0x38f1, 0x3abd, 0x3a8f, 0x3be5, 0x3b00, 0x3482, 0x3731, 0x3a85, +0x39e6, 0x359a, 0x37f1, 0x3938, 0x37cb, 0x3051, 0x3a9a, 0x39ff, 0x39e0, 0x27b2, 0x3856, 0x36e9, 0x3ac2, 0x379a, 0x38fa, 0x3546, 0x2ab1, 0x35f6, 0x3aba, 0x39ce, 0x30f2, 0x3b07, 0x35e3, 0x38dd, 0x3a31, 0x3a87, 0x339b, 0x37e4, 0x39b5, 0x3642, 0x3aaa, 0x3b79, 0x3995, 0x39ba, 0x38fb, 0x3696, 0x348c, 0x35cf, 0x2df5, 0x3063, 0x3b39, 0x34ff, 0x3507, 0x3bc2, 0x3075, 0x300b, 0x3005, 0x37ff, +0x3b87, 0x3a23, 0x39bd, 0x38a5, 0x34a2, 0x2e3b, 0x2ffa, 0x3a5c, 0x382a, 0x1d4a, 0x39e0, 0x34a0, 0x30e8, 0x3a3b, 0x3bb6, 0x3b98, 0x3873, 0x30c9, 0x31c3, 0x3190, 0x3982, 0x352d, 0x39bd, 0x2977, 0x39e4, 0x3885, 0x3878, 0x38f1, 0x3706, 0x3874, 0x3a1b, 0x302f, 0x32be, 0x3a6f, 0x35b8, 0x38de, 0x2ef9, 0x39a5, 0x3ac2, 0x35a5, 0x3bb4, 0x3ab4, 0x3aea, 0x33ad, 0x3878, 0x3b22, 0x32af, 0x3ab1, +0x3ac1, 0x3aaa, 0x39d9, 0x3281, 0x26db, 0x3600, 0x3b1a, 0x308e, 0x2800, 0x3bbb, 0x3993, 0x3483, 0x3b99, 0x36d7, 0x38b6, 0x2e35, 0x1da9, 0x3bd9, 0x3395, 0x3bb4, 0x3b4f, 0x37e9, 0x28ad, 0x323b, 0x3901, 0x3b0a, 0x3a39, 0x2c30, 0x3a1a, 0x3bb2, 0x211a, 0x3ae0, 0x2f50, 0x387d, 0x382b, 0x350a, 0x3b88, 0x2f5a, 0x35eb, 0x3199, 0x30a3, 0x3724, 0x379e, 0x35e9, 0x33c8, 0x3859, 0x3984, 0x13b1, +0x372c, 0x34a3, 0x3504, 0x357a, 0x3881, 0x31da, 0x38a8, 0x3b7e, 0x2e03, 0x39d8, 0x30bf, 0x3ae1, 0x394b, 0x3a33, 0x382c, 0x3b0a, 0x39ea, 0x38d8, 0x3a3d, 0x34de, 0x3bbc, 0x3533, 0x2f62, 0x355f, 0x3863, 0x3a7b, 0x34c8, 0x39a5, 0x37d3, 0x3af4, 0x3685, 0x3b0f, 0x3b1a, 0x391b, 0x3492, 0x3b05, 0x2345, 0x398e, 0x372d, 0x3a99, 0x382f, 0x350e, 0x3076, 0x384a, 0x362b, 0x38e6, 0x38b0, 0x3a91, +0x2837, 0x2c9a, 0x381c, 0x3b93, 0x37d9, 0x3a1f, 0x2a6a, 0x351f, 0x3a89, 0x35ab, 0x379b, 0x35a4, 0x3874, 0x36d8, 0x30c5, 0x37a3, 0x384b, 0x31b9, 0x3b3f, 0x3928, 0x3810, 0x3af2, 0x287f, 0x3902, 0x343b, 0x3752, 0x36f3, 0x39a3, 0x3856, 0x3574, 0x327e, 0x30dd, 0x3bce, 0x3895, 0x3b0c, 0x38c3, 0x2fac, 0x21f3, 0x39c6, 0x28b0, 0x3081, 0x39cb, 0x38a5, 0x3a06, 0x3810, 0x380c, 0x3b58, 0x3159, +0x30b7, 0x3a80, 0x3914, 0x341a, 0x3154, 0x305d, 0x37b1, 0x3551, 0x2712, 0x3b44, 0x34c6, 0x3aaf, 0x3686, 0x319b, 0x3b0a, 0x37ca, 0x3a86, 0x3933, 0x3043, 0x3970, 0x2c82, 0x396e, 0x39b0, 0x3657, 0x39db, 0x3143, 0x33cb, 0x3a4f, 0x349f, 0x35b6, 0x2a9e, 0x39e1, 0x38a4, 0x2943, 0x25b6, 0x3966, 0x3b5e, 0x396e, 0x32a4, 0x3456, 0x35c8, 0x3b18, 0x3b5f, 0x37ba, 0x3554, 0x3979, 0x3b80, 0x3a88, +0x344f, 0x3a2c, 0x39e0, 0x3128, 0x3a0f, 0x390c, 0x3833, 0x39e5, 0x39e5, 0x3a75, 0x3b0a, 0x34ce, 0x383e, 0x3a7d, 0x3855, 0x3b1a, 0x3b5b, 0x37a8, 0x393f, 0x3103, 0x3b4d, 0x3b35, 0x3969, 0x366c, 0x34de, 0x3031, 0x30b1, 0x3788, 0x3521, 0x378d, 0x38f9, 0x379c, 0x39c9, 0x3507, 0x30cb, 0x3115, 0x3532, 0x298a, 0x3923, 0x37f9, 0x3be9, 0x39f8, 0x34b0, 0x3996, 0x34df, 0x3967, 0x3a9c, 0x30a8, +0x3bc8, 0x373c, 0x3174, 0x3a77, 0x36a2, 0x2992, 0x34f4, 0x3457, 0x2426, 0x3b9b, 0x35a1, 0x38a9, 0x39e6, 0x36ed, 0x3623, 0x2a73, 0x3afc, 0x3309, 0x3979, 0x3927, 0x3423, 0x3150, 0x3a55, 0x34c2, 0x34a2, 0x375b, 0x38a3, 0x3838, 0x3bc0, 0x3b15, 0x389d, 0x36e2, 0x361f, 0x3855, 0x3482, 0x3bb9, 0x3af9, 0x38ee, 0x3981, 0x312d, 0x3448, 0x3972, 0x3761, 0x38f2, 0x3a00, 0x34c3, 0x2dee, 0x3a23, +0x3a41, 0x3975, 0x388c, 0x2b7f, 0x3a39, 0x364d, 0x3849, 0x3600, 0x3885, 0x3761, 0x3845, 0x38ae, 0x3523, 0x32ae, 0x25d3, 0x391e, 0x36fb, 0x3897, 0x39f7, 0x3bb9, 0x3571, 0x395b, 0x364c, 0x39f1, 0x39d5, 0x3877, 0x3b82, 0x30e6, 0x3a99, 0x31b6, 0x3942, 0x33a7, 0x36b8, 0x3874, 0x2f01, 0x3607, 0x3914, 0x3b8a, 0x3589, 0x385b, 0x39c6, 0x3423, 0x286f, 0x3b94, 0x351f, 0x3bf9, 0x38d2, 0x39fa +}; \ No newline at end of file diff --git a/hwpe/redmule/inc/z_2D.h b/hwpe/redmule/inc/z_2D.h new file mode 100644 index 0000000..5c1e055 --- /dev/null +++ b/hwpe/redmule/inc/z_2D.h @@ -0,0 +1,51 @@ + /* Header file generated by RedMulE Golden Model */ +uint16_t z_oup_2D [48][48] = { +0x4c08, 0x4b52, 0x4c14, 0x4bed, 0x4c2d, 0x4ba6, 0x4ca5, 0x4c10, 0x4c37, 0x4b6d, 0x4af1, 0x4bd2, 0x4c16, 0x4c0f, 0x4ccd, 0x4b96, 0x4c23, 0x4b9a, 0x4c05, 0x4bc8, 0x4ac8, 0x4b1a, 0x4c24, 0x4b3f, 0x4b58, 0x4c01, 0x4bc1, 0x4b71, 0x4c8e, 0x4c37, 0x4c12, 0x4cb5, 0x4c0a, 0x4bae, 0x4c56, 0x4c0e, 0x4bec, 0x4a81, 0x4c14, 0x4b4e, 0x4bac, 0x4b55, 0x4c20, 0x4b22, 0x4c4e, 0x4c68, 0x4bba, 0x4c33, +0x49ed, 0x4a39, 0x49d5, 0x4ae2, 0x4a83, 0x4a02, 0x4aed, 0x49f6, 0x4a1e, 0x4a4c, 0x49a9, 0x4a10, 0x49fd, 0x49c5, 0x4b06, 0x493c, 0x4a76, 0x4a31, 0x496e, 0x49a7, 0x4842, 0x48fc, 0x4a22, 0x49a9, 0x498d, 0x4ade, 0x4aaa, 0x4972, 0x4a76, 0x4a2c, 0x4a1a, 0x4b37, 0x49b0, 0x4a2b, 0x4a37, 0x4a21, 0x4a4b, 0x4981, 0x4a4b, 0x49f0, 0x4a9f, 0x4a01, 0x4a15, 0x4940, 0x49f2, 0x4a83, 0x4a01, 0x4a27, +0x4b62, 0x4b79, 0x4b15, 0x4c00, 0x4b91, 0x4b2d, 0x4c1e, 0x4af0, 0x4aab, 0x4aed, 0x4af1, 0x4aaa, 0x4b65, 0x4adf, 0x4c04, 0x4a87, 0x4af3, 0x4b20, 0x4a7c, 0x4ada, 0x49e9, 0x4a37, 0x4b2d, 0x4b3f, 0x4a84, 0x4b03, 0x4b15, 0x4a9f, 0x4c34, 0x4b1d, 0x4b50, 0x4bf9, 0x4aed, 0x4afa, 0x4b39, 0x4b30, 0x4b22, 0x4a2a, 0x4bdf, 0x4a89, 0x4b97, 0x4ad6, 0x4b77, 0x4a81, 0x4b56, 0x4b92, 0x4adc, 0x4b54, +0x4b28, 0x4ada, 0x4a71, 0x4a7f, 0x4aca, 0x4a8f, 0x4b14, 0x4a0d, 0x4a41, 0x4ac1, 0x497f, 0x4a46, 0x4a27, 0x4ae2, 0x4b06, 0x4a2a, 0x49ef, 0x4a52, 0x49e1, 0x4a1d, 0x4964, 0x4995, 0x4a4a, 0x49b3, 0x497d, 0x4ac8, 0x4a0d, 0x4a1b, 0x4bc2, 0x4ab9, 0x49ba, 0x4b49, 0x4b0a, 0x4aa1, 0x4ae4, 0x4b13, 0x4aae, 0x48d5, 0x4b35, 0x49f0, 0x4ae6, 0x49cb, 0x4b49, 0x49ff, 0x4b14, 0x4b49, 0x4a01, 0x4a81, +0x4a40, 0x4a35, 0x4a90, 0x4aad, 0x4ada, 0x4ad1, 0x4a6c, 0x4b09, 0x4a96, 0x4a4d, 0x492f, 0x49e3, 0x4a74, 0x4a79, 0x4b59, 0x4a15, 0x49e7, 0x4a96, 0x49ea, 0x49bb, 0x4967, 0x4935, 0x4a18, 0x4a3c, 0x49c3, 0x4aeb, 0x4b1f, 0x4a8f, 0x4bee, 0x4b06, 0x4a18, 0x4b6c, 0x4adf, 0x49e2, 0x4aa7, 0x4aac, 0x4ab5, 0x48d4, 0x4ac8, 0x4a70, 0x49cd, 0x4a55, 0x4ae7, 0x4a39, 0x4af1, 0x4b3b, 0x49e9, 0x4abd, +0x49cc, 0x49f6, 0x49f2, 0x49d5, 0x4a75, 0x49cb, 0x4ae2, 0x49fd, 0x4a00, 0x49b7, 0x49d2, 0x4940, 0x49f4, 0x4a1e, 0x4a2b, 0x49ad, 0x4948, 0x4964, 0x499d, 0x4a2e, 0x4930, 0x48eb, 0x4a53, 0x498d, 0x497b, 0x4a10, 0x4a5f, 0x4925, 0x4b0b, 0x490e, 0x4a4a, 0x4a73, 0x49d4, 0x493a, 0x49a8, 0x49ee, 0x4a23, 0x48f5, 0x4a27, 0x4934, 0x49ab, 0x4a01, 0x49f0, 0x4975, 0x4a77, 0x4a75, 0x493c, 0x495f, +0x4ac3, 0x4ae2, 0x4a29, 0x4b42, 0x4ad9, 0x49fe, 0x4b00, 0x4b04, 0x4b30, 0x4b22, 0x49f6, 0x4a0e, 0x4ae3, 0x4abc, 0x4b47, 0x4a6a, 0x4a5b, 0x4a5e, 0x4a42, 0x4a80, 0x49a1, 0x49be, 0x4b36, 0x4a10, 0x4a2b, 0x4ae5, 0x4ad0, 0x4aa4, 0x4b3c, 0x4aad, 0x4a2a, 0x4c1a, 0x4b2c, 0x4b2f, 0x4aa0, 0x4a77, 0x4af6, 0x49e8, 0x4a4b, 0x4a0a, 0x4ae4, 0x4a14, 0x4aa8, 0x4a1d, 0x4ae0, 0x4bae, 0x49c9, 0x4b3a, +0x4af0, 0x4a85, 0x4a70, 0x4a91, 0x4a7c, 0x4aba, 0x4ae7, 0x4a9a, 0x4b17, 0x4ab5, 0x4a25, 0x4a54, 0x4ab5, 0x4b59, 0x4b5b, 0x4a64, 0x4a74, 0x49e1, 0x4ac6, 0x4a66, 0x49cb, 0x498f, 0x4b1f, 0x4ab7, 0x4a0a, 0x4af4, 0x4aab, 0x49fa, 0x4c05, 0x4abb, 0x4a46, 0x4bbe, 0x4a9f, 0x4a37, 0x4a8c, 0x4a69, 0x4a50, 0x492c, 0x4b10, 0x49c6, 0x4b26, 0x4a91, 0x4b2b, 0x4a67, 0x4b4f, 0x4bb2, 0x4a05, 0x4a86, +0x4b3a, 0x4a79, 0x4ac0, 0x4b1e, 0x4ac3, 0x4b05, 0x4c11, 0x49e1, 0x4aa4, 0x4a96, 0x4a06, 0x4aab, 0x4acc, 0x4a66, 0x4b27, 0x4aa7, 0x4a37, 0x4aeb, 0x4a98, 0x4aae, 0x4973, 0x492e, 0x4ad4, 0x4a1c, 0x49f9, 0x4aca, 0x4ac8, 0x4a51, 0x4ba4, 0x4a87, 0x4ac1, 0x4b3c, 0x4add, 0x4a8f, 0x4a7d, 0x4ad7, 0x4adc, 0x49b9, 0x4aca, 0x4a95, 0x4ada, 0x4a37, 0x4b55, 0x4ad0, 0x4b78, 0x4b1c, 0x4a29, 0x4b1f, +0x4a63, 0x4aca, 0x49b7, 0x4a92, 0x4ada, 0x49fe, 0x4ab5, 0x4a3d, 0x4a42, 0x49d9, 0x49fc, 0x4a00, 0x4ade, 0x4a34, 0x4b06, 0x4931, 0x4943, 0x4a63, 0x49e9, 0x4978, 0x4965, 0x48f2, 0x4a89, 0x49f5, 0x4a38, 0x49ac, 0x4a38, 0x49b1, 0x4b82, 0x4a09, 0x4a31, 0x4b64, 0x4a91, 0x4a2c, 0x4a1e, 0x4a97, 0x4ab3, 0x48a0, 0x49fd, 0x496d, 0x4a1e, 0x494e, 0x4a0e, 0x4960, 0x4b38, 0x4b1a, 0x49ae, 0x49f6, +0x4a7f, 0x4a51, 0x4a0d, 0x4a5f, 0x4a11, 0x4a4c, 0x4b44, 0x49aa, 0x4a60, 0x4a7e, 0x4a36, 0x4a0c, 0x4a27, 0x4a56, 0x4b50, 0x497d, 0x4a2b, 0x49f3, 0x4a2f, 0x4a21, 0x48db, 0x4914, 0x4a92, 0x49f7, 0x499d, 0x4a7d, 0x4a42, 0x49c4, 0x4ab0, 0x49f0, 0x4a17, 0x4ad2, 0x4a17, 0x4a65, 0x4a4a, 0x49bc, 0x49b2, 0x496c, 0x4acc, 0x4a01, 0x4a5e, 0x49f2, 0x4a87, 0x495d, 0x4af6, 0x4a7c, 0x4a0d, 0x4ac9, +0x4988, 0x4a5b, 0x4a71, 0x4a17, 0x4ae3, 0x4a1a, 0x4a00, 0x4a7e, 0x4a47, 0x49fd, 0x499f, 0x49dd, 0x4a83, 0x4a22, 0x4a19, 0x49c6, 0x4a0a, 0x4aa2, 0x4971, 0x49b1, 0x4890, 0x48a4, 0x4a89, 0x49a8, 0x49fa, 0x49bc, 0x4996, 0x49e2, 0x4b36, 0x49df, 0x4a58, 0x4b51, 0x4b09, 0x4a54, 0x4a87, 0x4a2d, 0x4a78, 0x493b, 0x49cd, 0x494d, 0x4983, 0x497a, 0x4a78, 0x4a50, 0x4a81, 0x4b0b, 0x4921, 0x4a41, +0x4aa6, 0x4aaf, 0x4ab0, 0x4ade, 0x4b5d, 0x4a80, 0x4bb8, 0x4a43, 0x4a9f, 0x4a73, 0x4ae0, 0x4a44, 0x4ae1, 0x4aef, 0x4b70, 0x4a7f, 0x4a1c, 0x4b07, 0x4a54, 0x4a29, 0x494e, 0x49d0, 0x4ac3, 0x4a59, 0x49ec, 0x4abe, 0x4abe, 0x4a7c, 0x4afe, 0x4b14, 0x4a27, 0x4bbc, 0x4ad0, 0x4adc, 0x4b72, 0x4b05, 0x4ae4, 0x4971, 0x4a4b, 0x4a7a, 0x4a8d, 0x4a08, 0x4ae2, 0x4a51, 0x4b1c, 0x4b01, 0x4a4a, 0x4b18, +0x4a35, 0x4a4b, 0x49cf, 0x4a17, 0x4a6e, 0x49dd, 0x4a79, 0x4a1d, 0x4ac7, 0x49ad, 0x4924, 0x49c4, 0x4a33, 0x4a9d, 0x4a98, 0x4a36, 0x49b6, 0x4a30, 0x498d, 0x4a15, 0x48da, 0x48ea, 0x4a14, 0x49e2, 0x49ab, 0x4a44, 0x4a2c, 0x4973, 0x4ba2, 0x4a2b, 0x4a29, 0x4afd, 0x4a81, 0x4994, 0x4a16, 0x4a50, 0x4a68, 0x4875, 0x4a25, 0x4953, 0x4a2e, 0x4a1f, 0x4ad3, 0x49d2, 0x49dc, 0x4b0e, 0x49e3, 0x4a64, +0x4a67, 0x4b45, 0x4a92, 0x4b16, 0x4b93, 0x4a7e, 0x4ae8, 0x4a8a, 0x4ade, 0x4b12, 0x4a76, 0x4a98, 0x4a57, 0x4b00, 0x4b10, 0x4a4f, 0x4a7b, 0x49fb, 0x4a48, 0x4ac3, 0x4998, 0x496b, 0x4b02, 0x4aa7, 0x4a63, 0x4af4, 0x4ad6, 0x4a25, 0x4b23, 0x4abe, 0x4af0, 0x4bdc, 0x4acb, 0x4a6f, 0x4a8a, 0x4ae7, 0x4a40, 0x49d6, 0x4a4e, 0x4a1b, 0x4ad3, 0x4b3e, 0x4b6e, 0x4ab8, 0x4b19, 0x4b85, 0x4a20, 0x4ad6, +0x4916, 0x492c, 0x48c6, 0x49a8, 0x48eb, 0x493d, 0x49e4, 0x4920, 0x497a, 0x490f, 0x48cd, 0x489f, 0x49b9, 0x497b, 0x4a0d, 0x490d, 0x4968, 0x490a, 0x48b5, 0x4902, 0x489d, 0x481d, 0x4933, 0x48fb, 0x489d, 0x491e, 0x49a4, 0x48fd, 0x49a8, 0x4976, 0x48ed, 0x49c0, 0x49d0, 0x4901, 0x497f, 0x495a, 0x48db, 0x489f, 0x490c, 0x4906, 0x48fd, 0x4912, 0x499c, 0x4908, 0x4922, 0x49b6, 0x4852, 0x49c7, +0x49eb, 0x4957, 0x49e9, 0x49f1, 0x4a79, 0x49dd, 0x4a74, 0x4982, 0x49c2, 0x49f4, 0x4937, 0x494f, 0x4a28, 0x49ac, 0x49cf, 0x48ad, 0x496a, 0x4a23, 0x4950, 0x4a83, 0x48bc, 0x4955, 0x4a60, 0x4992, 0x49a3, 0x499b, 0x4a31, 0x492d, 0x4aea, 0x4980, 0x499f, 0x4a7c, 0x49a9, 0x4904, 0x4a17, 0x4a34, 0x49d9, 0x48f7, 0x49a2, 0x49a6, 0x4a91, 0x4a04, 0x49ee, 0x4931, 0x4a4f, 0x4acc, 0x49a6, 0x4a01, +0x4a67, 0x4af7, 0x4a92, 0x4aca, 0x4b39, 0x4b14, 0x4b05, 0x4ac6, 0x4a53, 0x4a76, 0x4a41, 0x4a0a, 0x4a65, 0x4a21, 0x4ba7, 0x4a19, 0x49ea, 0x4a7d, 0x4a08, 0x4a2d, 0x4930, 0x494e, 0x4ab8, 0x49b6, 0x49b8, 0x4ab7, 0x4b4d, 0x4a30, 0x4b1c, 0x4a9b, 0x4abe, 0x4bbb, 0x4ada, 0x4a16, 0x4aeb, 0x4a79, 0x4aa2, 0x499b, 0x4afd, 0x49eb, 0x4a51, 0x4a65, 0x4b60, 0x49de, 0x4bad, 0x4ac0, 0x4a21, 0x4a7c, +0x4b17, 0x4b30, 0x4afa, 0x4bd3, 0x4b33, 0x4ae4, 0x4be9, 0x4bb6, 0x4b60, 0x4b7f, 0x4ad4, 0x4a0f, 0x4bd2, 0x4b4a, 0x4bdc, 0x4a49, 0x4a7d, 0x4b73, 0x4af5, 0x4a98, 0x4999, 0x49e0, 0x4b70, 0x4a91, 0x4abe, 0x4b44, 0x4b2b, 0x4adb, 0x4bf0, 0x4b22, 0x4a02, 0x4c3c, 0x4bdf, 0x4b2d, 0x4b1a, 0x4b3b, 0x4bec, 0x4a09, 0x4b54, 0x4a8d, 0x4b11, 0x4ae9, 0x4b63, 0x4a1b, 0x4beb, 0x4bb4, 0x4b1d, 0x4b1e, +0x49da, 0x4a5d, 0x4a46, 0x4ae3, 0x4a1f, 0x49ac, 0x4add, 0x4a06, 0x4b11, 0x4a4c, 0x4990, 0x49af, 0x4a0f, 0x4a16, 0x4b22, 0x496a, 0x4a1e, 0x4a0e, 0x4a3f, 0x4a15, 0x4921, 0x4962, 0x4a12, 0x49da, 0x49ed, 0x4a51, 0x4a7c, 0x49a9, 0x4b0c, 0x4a46, 0x49cb, 0x4b37, 0x4ace, 0x4a6d, 0x4a66, 0x4999, 0x4a3a, 0x495a, 0x4abf, 0x4921, 0x49da, 0x4992, 0x4a93, 0x495d, 0x4aa8, 0x4a96, 0x4a29, 0x4a25, +0x497d, 0x4a0a, 0x49bf, 0x49d2, 0x4a66, 0x4993, 0x4a2a, 0x49f3, 0x4a4c, 0x4a18, 0x49a3, 0x490c, 0x49b4, 0x4a32, 0x4a2d, 0x49f3, 0x4a06, 0x4a0c, 0x4936, 0x49ed, 0x48e1, 0x4936, 0x4a33, 0x4a05, 0x4914, 0x4a49, 0x4a30, 0x495e, 0x4a73, 0x49f1, 0x4966, 0x4ad7, 0x49fa, 0x49c0, 0x49f4, 0x4995, 0x4a12, 0x4918, 0x4a91, 0x49a3, 0x4a15, 0x493b, 0x4b13, 0x4945, 0x4a16, 0x4a49, 0x4979, 0x49cd, +0x4a5e, 0x4ad5, 0x4ad2, 0x4ac2, 0x4af9, 0x4a70, 0x4bb7, 0x4afb, 0x4ba0, 0x4ac8, 0x4a43, 0x4aa7, 0x4b03, 0x4b45, 0x4bd9, 0x4a08, 0x4a33, 0x4aea, 0x4a3f, 0x4a97, 0x49da, 0x4961, 0x4b20, 0x4ab9, 0x4a73, 0x4a8f, 0x4a2c, 0x4a6e, 0x4bda, 0x4a6d, 0x4a5a, 0x4bf0, 0x4b7b, 0x4af7, 0x4b3d, 0x4aba, 0x4b3f, 0x4961, 0x4ada, 0x4993, 0x4ae4, 0x49bf, 0x4b0a, 0x4a6d, 0x4ace, 0x4bd7, 0x4a61, 0x4aeb, +0x49cb, 0x49b6, 0x4996, 0x4a4d, 0x4a39, 0x497c, 0x4afa, 0x4a69, 0x4a2b, 0x4940, 0x49c0, 0x492d, 0x4a15, 0x49b4, 0x4a40, 0x49ae, 0x4969, 0x4968, 0x49ea, 0x4981, 0x48ca, 0x48b3, 0x4a18, 0x4960, 0x49ac, 0x4990, 0x4a17, 0x4958, 0x4b2a, 0x4a16, 0x4a3c, 0x4aa0, 0x49a7, 0x4953, 0x4996, 0x4a56, 0x49eb, 0x4918, 0x4948, 0x4951, 0x4982, 0x4936, 0x49b4, 0x4992, 0x4a9c, 0x4a17, 0x492e, 0x49ee, +0x4af4, 0x4aa5, 0x4a04, 0x4a8e, 0x4ad9, 0x4a14, 0x4b0e, 0x4b84, 0x4bb4, 0x4a66, 0x4a2a, 0x4a6b, 0x4a74, 0x4a59, 0x4af0, 0x49a5, 0x4a79, 0x4aea, 0x4a90, 0x4a90, 0x4961, 0x4982, 0x4aea, 0x4a8e, 0x49f1, 0x4af6, 0x4a63, 0x49e0, 0x4b74, 0x4a34, 0x4a68, 0x4b8d, 0x4aa4, 0x49fc, 0x4a60, 0x49b3, 0x4a4c, 0x4a11, 0x4a71, 0x4906, 0x4a47, 0x49c1, 0x4a81, 0x4976, 0x4b2d, 0x4adb, 0x49e1, 0x4a2d, +0x49a1, 0x49c0, 0x49b6, 0x498b, 0x49eb, 0x494d, 0x49fd, 0x49d4, 0x4931, 0x4a81, 0x4961, 0x4953, 0x49c9, 0x4989, 0x49cd, 0x4976, 0x48fb, 0x49a4, 0x48c5, 0x4969, 0x48d0, 0x48e3, 0x4a23, 0x495c, 0x48eb, 0x4a1b, 0x4a07, 0x48f9, 0x4a6d, 0x4982, 0x49c4, 0x4a3d, 0x498b, 0x495c, 0x4931, 0x4a10, 0x49ce, 0x48fe, 0x497b, 0x49a5, 0x4a09, 0x49a6, 0x4aa2, 0x4953, 0x49ff, 0x4a30, 0x48f5, 0x49c3, +0x4a01, 0x4968, 0x497d, 0x4951, 0x4a12, 0x48fd, 0x49d8, 0x49c8, 0x4987, 0x49c0, 0x48ab, 0x4981, 0x495e, 0x49d4, 0x49b8, 0x48dc, 0x490d, 0x491b, 0x48cd, 0x491f, 0x4840, 0x4881, 0x49f7, 0x4857, 0x493c, 0x495b, 0x495a, 0x497a, 0x4a34, 0x498c, 0x4900, 0x4a4e, 0x49bb, 0x49aa, 0x499f, 0x49bd, 0x493b, 0x48a4, 0x4977, 0x4945, 0x4945, 0x48ef, 0x499c, 0x4910, 0x49c4, 0x4aad, 0x48f9, 0x492e, +0x4b0c, 0x4b0c, 0x4b29, 0x4b70, 0x4b6c, 0x4a9a, 0x4bcb, 0x4af2, 0x4af1, 0x4b38, 0x4a0d, 0x4ac1, 0x4b1a, 0x4b25, 0x4be6, 0x4a26, 0x4b43, 0x4acc, 0x4a96, 0x4a6d, 0x4a40, 0x49f3, 0x4aea, 0x4adb, 0x4b0a, 0x4b3a, 0x4b1a, 0x4a97, 0x4bf5, 0x4acc, 0x4b64, 0x4c0b, 0x4adc, 0x4a4d, 0x4ab0, 0x4aaa, 0x4a75, 0x49ff, 0x4ad9, 0x4aa3, 0x4aed, 0x4ab8, 0x4b42, 0x4a62, 0x4b21, 0x4b61, 0x4a65, 0x4ad8, +0x4ac3, 0x4aae, 0x49e7, 0x4ac0, 0x4ab9, 0x4a2a, 0x4aeb, 0x4a99, 0x4add, 0x4ad4, 0x49e2, 0x49c4, 0x4af6, 0x4a94, 0x4aac, 0x4a3e, 0x4a53, 0x4ac0, 0x49a9, 0x4a78, 0x4901, 0x49ad, 0x4ac8, 0x4a04, 0x49e4, 0x4ac3, 0x4aa7, 0x4a0e, 0x4b92, 0x4a4d, 0x4a04, 0x4b27, 0x4ae6, 0x4a05, 0x4a60, 0x4a0c, 0x4a26, 0x498a, 0x4b16, 0x4a27, 0x4ab3, 0x4a6d, 0x4afa, 0x49bf, 0x4ad0, 0x4b14, 0x49c4, 0x4a9f, +0x4a9e, 0x4a45, 0x4a66, 0x4ae1, 0x4a7a, 0x4ad5, 0x4b8c, 0x4a8c, 0x4a75, 0x4b0d, 0x49cb, 0x49a4, 0x4b1a, 0x4a6f, 0x4ba5, 0x4a31, 0x4a24, 0x49f5, 0x4aa7, 0x4a82, 0x4913, 0x4957, 0x4a96, 0x4a02, 0x4a2c, 0x4a5f, 0x4b2b, 0x4a5d, 0x4c22, 0x4b44, 0x4a59, 0x4c06, 0x4b22, 0x4a3d, 0x4ada, 0x4af3, 0x4ad3, 0x48d7, 0x4af6, 0x4ab2, 0x4b11, 0x4ae3, 0x4bcc, 0x4a8a, 0x4b0a, 0x4b0a, 0x4a53, 0x4b42, +0x4a5f, 0x4a3a, 0x49be, 0x4abe, 0x4a91, 0x4a3c, 0x4b64, 0x49fc, 0x4a28, 0x4a5f, 0x49fe, 0x49c4, 0x4a75, 0x4a40, 0x4b24, 0x4a13, 0x49d0, 0x4a68, 0x4973, 0x4a3a, 0x492c, 0x495c, 0x4aa0, 0x49a3, 0x4978, 0x4a7d, 0x4afa, 0x4a21, 0x4b08, 0x4a6e, 0x4a45, 0x4b85, 0x4a4e, 0x49bd, 0x4aae, 0x4aa7, 0x4a0f, 0x48fd, 0x4a4f, 0x4a0c, 0x4a7a, 0x4a06, 0x4a62, 0x4992, 0x4b2c, 0x4aa0, 0x4a27, 0x4a8d, +0x4ad6, 0x4ad2, 0x4a41, 0x4b36, 0x4b2a, 0x49ce, 0x4b5d, 0x4a88, 0x4a5d, 0x4ab2, 0x4a18, 0x4a04, 0x4a93, 0x4a79, 0x4b1a, 0x49c5, 0x4a48, 0x4a2c, 0x4a40, 0x4a7e, 0x4972, 0x49c0, 0x4abc, 0x49dc, 0x4a64, 0x4a5d, 0x4b30, 0x4a58, 0x4be0, 0x4a5a, 0x4aae, 0x4bcb, 0x4a87, 0x4a4f, 0x4aa0, 0x4ace, 0x4a8b, 0x4970, 0x4ae7, 0x49a3, 0x4a91, 0x49cf, 0x4b21, 0x4a81, 0x4b30, 0x4b6b, 0x4a06, 0x49f9, +0x4a27, 0x4a1d, 0x4a0e, 0x4a34, 0x49de, 0x49af, 0x4a3a, 0x49ba, 0x4a05, 0x4a0b, 0x4994, 0x4994, 0x4a57, 0x495d, 0x4a8f, 0x48e5, 0x498e, 0x49bf, 0x4966, 0x499c, 0x48b0, 0x48fb, 0x4a33, 0x4992, 0x49aa, 0x49f4, 0x4a13, 0x49d0, 0x4aee, 0x4a34, 0x49fb, 0x4ac4, 0x4a08, 0x4951, 0x4a3d, 0x49e5, 0x49ba, 0x48c4, 0x4a19, 0x4945, 0x49f8, 0x4957, 0x4a47, 0x48d2, 0x4a4e, 0x4a14, 0x492f, 0x496d, +0x4a89, 0x4a3c, 0x49e3, 0x4ac4, 0x4a78, 0x4a8e, 0x4b2b, 0x4a2e, 0x4b0e, 0x4a62, 0x4a48, 0x49f6, 0x49eb, 0x4aa6, 0x4b4d, 0x49ec, 0x4a5f, 0x4afe, 0x4a79, 0x4a6c, 0x48cc, 0x49b4, 0x4a46, 0x4adb, 0x498f, 0x4a8b, 0x4a4c, 0x4989, 0x4b20, 0x4a7e, 0x4ada, 0x4b23, 0x4a8c, 0x49cb, 0x4a58, 0x4a51, 0x4a2a, 0x4989, 0x4a50, 0x4a21, 0x4a13, 0x49f8, 0x4ae8, 0x49c7, 0x4adc, 0x4ace, 0x4a18, 0x4a21, +0x48d2, 0x49d2, 0x4985, 0x49e9, 0x4a0f, 0x4960, 0x49c7, 0x498b, 0x497c, 0x4960, 0x4886, 0x48bb, 0x49c3, 0x48f2, 0x49fc, 0x48b2, 0x49ae, 0x49c5, 0x4891, 0x4936, 0x4849, 0x482b, 0x49ed, 0x493e, 0x4999, 0x492c, 0x4977, 0x493c, 0x4a50, 0x497a, 0x49f9, 0x4ae5, 0x49c3, 0x48c9, 0x4a5e, 0x49c7, 0x49a0, 0x48c0, 0x498d, 0x48d3, 0x4988, 0x4a09, 0x49e4, 0x48f1, 0x4930, 0x4a27, 0x4910, 0x4949, +0x4bad, 0x4be4, 0x4aac, 0x4b7a, 0x4b3f, 0x4aff, 0x4bfa, 0x4aef, 0x4b76, 0x4ba6, 0x4aed, 0x4a77, 0x4b38, 0x4b2b, 0x4bb9, 0x4aa0, 0x4b70, 0x4b37, 0x4ac1, 0x4b19, 0x49eb, 0x4a2f, 0x4bd3, 0x4ac5, 0x4a6f, 0x4b3a, 0x4b80, 0x4a73, 0x4c1f, 0x4aad, 0x4b16, 0x4c07, 0x4b16, 0x4aec, 0x4a7b, 0x4b0c, 0x4b33, 0x4acc, 0x4b76, 0x4a75, 0x4bd2, 0x4add, 0x4bbb, 0x4a43, 0x4bde, 0x4c06, 0x4b57, 0x4b09, +0x4a13, 0x4a47, 0x4a38, 0x4a94, 0x4a6f, 0x4a22, 0x4ab0, 0x499b, 0x4a1a, 0x49fc, 0x4986, 0x492e, 0x4a1e, 0x4a4a, 0x4afd, 0x49a6, 0x49f6, 0x49d9, 0x4a56, 0x4a64, 0x492d, 0x4902, 0x49df, 0x499a, 0x497e, 0x49c2, 0x4a8f, 0x49c8, 0x4af5, 0x4a7e, 0x4a23, 0x4a96, 0x4a49, 0x49f8, 0x4a11, 0x4a02, 0x4a5c, 0x490b, 0x4a5e, 0x4995, 0x4a0f, 0x49cf, 0x4ae7, 0x4a74, 0x4aca, 0x4a95, 0x49ad, 0x49f5, +0x4aaa, 0x4a49, 0x4a5b, 0x4a39, 0x4ad5, 0x49dd, 0x4af8, 0x4a95, 0x4a50, 0x4a3e, 0x49f6, 0x4a42, 0x4a8c, 0x4ade, 0x4ad3, 0x4a2b, 0x4a3e, 0x4a4e, 0x4a6b, 0x4aa0, 0x49a6, 0x498e, 0x4afb, 0x4a14, 0x4998, 0x4a45, 0x4a5f, 0x49df, 0x4b9e, 0x4a55, 0x4ada, 0x4b60, 0x4a61, 0x4a5d, 0x4ae5, 0x4acc, 0x4a44, 0x4932, 0x4a36, 0x4a2c, 0x49e8, 0x4a5c, 0x4a9b, 0x4a2b, 0x4ac0, 0x4b66, 0x49ff, 0x4ad6, +0x4ac2, 0x4b93, 0x4a9c, 0x4b17, 0x4ad9, 0x4ab1, 0x4b2e, 0x4b12, 0x4a89, 0x4a88, 0x4a85, 0x4ace, 0x4b8e, 0x4a5e, 0x4b3d, 0x4a6d, 0x49cf, 0x4a3c, 0x4a4f, 0x4a94, 0x49ce, 0x495f, 0x4af2, 0x4ac5, 0x4a56, 0x4ad0, 0x4b63, 0x4a1b, 0x4bd6, 0x4ac3, 0x4a51, 0x4b79, 0x4a8e, 0x4a9f, 0x4a0f, 0x4ae3, 0x4aae, 0x4914, 0x4a44, 0x49ed, 0x4a82, 0x4a97, 0x4b41, 0x4a88, 0x4bba, 0x4b16, 0x49d2, 0x4a7e, +0x49f2, 0x4a6e, 0x4a81, 0x4a5c, 0x4aeb, 0x4a0a, 0x4a73, 0x4ac2, 0x4a93, 0x4a6e, 0x4920, 0x49c8, 0x4a41, 0x4acd, 0x4b05, 0x499b, 0x4a4e, 0x49e2, 0x49a7, 0x4a34, 0x4929, 0x4969, 0x4a56, 0x4a62, 0x49b6, 0x4b3f, 0x4aec, 0x49fb, 0x4afa, 0x4a5e, 0x49f1, 0x4b99, 0x4a7e, 0x49a2, 0x4ad1, 0x4a00, 0x4a2a, 0x496b, 0x4a5e, 0x49b8, 0x4ace, 0x4b11, 0x4ae2, 0x49f6, 0x4a39, 0x4b00, 0x4a3c, 0x4a4a, +0x4a92, 0x4a62, 0x4a4e, 0x4a79, 0x4ab0, 0x4a21, 0x4b76, 0x4a4d, 0x4a1d, 0x4a5a, 0x49ce, 0x4a31, 0x4a51, 0x4a28, 0x4b1b, 0x4932, 0x491f, 0x4a1a, 0x4a33, 0x4a2e, 0x490f, 0x4a17, 0x4a43, 0x4aa2, 0x4a26, 0x4a91, 0x4a4e, 0x499c, 0x4b51, 0x4a5b, 0x4a4c, 0x4b79, 0x49f6, 0x4a37, 0x4a49, 0x4ab4, 0x49cd, 0x4906, 0x49f3, 0x49af, 0x4af1, 0x4a02, 0x4a4a, 0x4a91, 0x4aa5, 0x4ab3, 0x499f, 0x4a67, +0x4a3b, 0x4a3f, 0x49f3, 0x4aa5, 0x49cb, 0x4980, 0x49f7, 0x49dc, 0x4a70, 0x49bd, 0x48ff, 0x491b, 0x4932, 0x49d5, 0x4a8c, 0x49c5, 0x49bb, 0x490d, 0x49d9, 0x49d7, 0x48cf, 0x4865, 0x49cf, 0x492c, 0x4909, 0x49fd, 0x4a33, 0x49cf, 0x4aeb, 0x49e3, 0x4a32, 0x4a4a, 0x499a, 0x494d, 0x49a3, 0x4a38, 0x49d3, 0x494f, 0x4a43, 0x495d, 0x4ab2, 0x4a3b, 0x4a7d, 0x4991, 0x49c9, 0x4aeb, 0x499e, 0x4985, +0x4b7c, 0x4bb3, 0x4ac0, 0x4b41, 0x4afa, 0x4b3b, 0x4c33, 0x4b11, 0x4b6b, 0x4ada, 0x4b1c, 0x4b20, 0x4b91, 0x4b6b, 0x4c57, 0x4a26, 0x4a9b, 0x4b18, 0x4a93, 0x4aca, 0x4a1d, 0x4a50, 0x4afe, 0x4a30, 0x4a3c, 0x4b6a, 0x4b8d, 0x4a5f, 0x4b91, 0x4b76, 0x4acc, 0x4bc2, 0x4b2c, 0x4af4, 0x4aea, 0x4b3c, 0x4b5e, 0x49e5, 0x4b18, 0x4a44, 0x4b2f, 0x4a7a, 0x4a6b, 0x4a2f, 0x4bc0, 0x4be2, 0x4aaa, 0x4a7a, +0x4a84, 0x4ad3, 0x4a28, 0x4b2c, 0x4afb, 0x4a4d, 0x4c18, 0x4a96, 0x4abc, 0x4a8b, 0x4a34, 0x4a0a, 0x4b0c, 0x4aeb, 0x4b93, 0x4a67, 0x4af0, 0x4a98, 0x4a26, 0x4a5f, 0x49cc, 0x49c9, 0x4a4d, 0x4a63, 0x4a12, 0x4b3c, 0x4b03, 0x4a1c, 0x4b70, 0x4ad5, 0x4ac7, 0x4b2b, 0x4adf, 0x4a97, 0x4a39, 0x4a71, 0x4a92, 0x499c, 0x4a83, 0x4a03, 0x4ae5, 0x4a13, 0x4a6a, 0x4a36, 0x4b06, 0x4b45, 0x49f3, 0x4ad2, +0x49f7, 0x4a49, 0x4a91, 0x4ab1, 0x4b0f, 0x4a6f, 0x4b24, 0x4a6e, 0x4b0b, 0x4a78, 0x4a1e, 0x4a8e, 0x4a2d, 0x4ad5, 0x4b14, 0x4a69, 0x4a34, 0x49d9, 0x4a70, 0x4a7f, 0x4946, 0x4950, 0x4a89, 0x49e9, 0x49e3, 0x4b5c, 0x4ae0, 0x4a4e, 0x4af8, 0x4a30, 0x4a25, 0x4b04, 0x4a7e, 0x4ad1, 0x4ac7, 0x4a90, 0x4a2e, 0x4947, 0x4a9d, 0x4975, 0x4ac1, 0x4a89, 0x4ae8, 0x4a1e, 0x4b18, 0x4b48, 0x4a13, 0x49fc, +0x4aec, 0x4b39, 0x4a12, 0x4b39, 0x4ae8, 0x4aca, 0x4bdf, 0x4a6b, 0x4ad5, 0x4b66, 0x4a82, 0x4a1b, 0x4b03, 0x4ada, 0x4bde, 0x4a72, 0x4aef, 0x4ad8, 0x4a59, 0x4ac8, 0x49ba, 0x4a41, 0x4b73, 0x4a6c, 0x4a54, 0x4b27, 0x4b94, 0x4ac7, 0x4b64, 0x4acb, 0x4a2d, 0x4be2, 0x4ae6, 0x4a56, 0x4a62, 0x4b2c, 0x4b0f, 0x49db, 0x4afb, 0x4afd, 0x4b23, 0x4afe, 0x4bbc, 0x49cc, 0x4b54, 0x4b81, 0x4a8f, 0x4b3a, +0x4a6c, 0x4ac5, 0x4a37, 0x49f9, 0x4a91, 0x4ab9, 0x4bb2, 0x49f9, 0x4a8d, 0x4a3b, 0x4aab, 0x4a27, 0x4a9c, 0x4ad3, 0x4b24, 0x4a7f, 0x4aee, 0x4a78, 0x4ab4, 0x4a16, 0x49e3, 0x499b, 0x4ae9, 0x49fb, 0x496b, 0x4a36, 0x4a04, 0x49bd, 0x4b04, 0x4a08, 0x4a91, 0x4ae5, 0x4ab2, 0x49fe, 0x4a79, 0x4a48, 0x4a54, 0x48ec, 0x4acc, 0x49b2, 0x4ad1, 0x49cf, 0x4b09, 0x4a1a, 0x4b3f, 0x4aa6, 0x4979, 0x4a14, +0x4b1c, 0x4a5a, 0x4a71, 0x4adc, 0x4b35, 0x4a60, 0x4aeb, 0x4a2f, 0x4a3c, 0x4a9d, 0x49cd, 0x4a85, 0x4ad1, 0x4a8d, 0x4c07, 0x4972, 0x4a2c, 0x4a77, 0x4a55, 0x49aa, 0x4922, 0x4973, 0x4af1, 0x4a31, 0x4995, 0x4aae, 0x4a97, 0x4a50, 0x4b17, 0x4ac6, 0x4a35, 0x4b53, 0x4ad4, 0x49ce, 0x4af5, 0x4b8a, 0x4ad5, 0x4982, 0x4ad1, 0x4a23, 0x4a58, 0x4a90, 0x4afa, 0x49b1, 0x4b43, 0x4af3, 0x4968, 0x4a6a, +0x4a3c, 0x4a62, 0x4a08, 0x4a37, 0x4a1c, 0x49d4, 0x4aa9, 0x4a1a, 0x4a90, 0x4a4d, 0x49e3, 0x49b9, 0x4a1e, 0x49d1, 0x4a88, 0x49eb, 0x49ea, 0x49c3, 0x4a58, 0x4a2b, 0x48e7, 0x4917, 0x49b8, 0x4a0e, 0x49b1, 0x4a57, 0x4a9a, 0x496c, 0x4b0c, 0x49eb, 0x4a17, 0x4ae4, 0x4a90, 0x49cc, 0x49b6, 0x49b6, 0x4a15, 0x4949, 0x4a79, 0x495b, 0x4a43, 0x49e5, 0x4a84, 0x49fe, 0x4a91, 0x4a7c, 0x497a, 0x4a4f +}; \ No newline at end of file diff --git a/hwpe/redmule/inc/z_output.h b/hwpe/redmule/inc/z_output.h new file mode 100644 index 0000000..53f5525 --- /dev/null +++ b/hwpe/redmule/inc/z_output.h @@ -0,0 +1,51 @@ + /* Header file generated by RedMulE Golden Model */ +uint16_t z_oup [2304] = { +0x4c08, 0x4b52, 0x4c14, 0x4bed, 0x4c2d, 0x4ba6, 0x4ca5, 0x4c10, 0x4c37, 0x4b6d, 0x4af1, 0x4bd2, 0x4c16, 0x4c0f, 0x4ccd, 0x4b96, 0x4c23, 0x4b9a, 0x4c05, 0x4bc8, 0x4ac8, 0x4b1a, 0x4c24, 0x4b3f, 0x4b58, 0x4c01, 0x4bc1, 0x4b71, 0x4c8e, 0x4c37, 0x4c12, 0x4cb5, 0x4c0a, 0x4bae, 0x4c56, 0x4c0e, 0x4bec, 0x4a81, 0x4c14, 0x4b4e, 0x4bac, 0x4b55, 0x4c20, 0x4b22, 0x4c4e, 0x4c68, 0x4bba, 0x4c33, +0x49ed, 0x4a39, 0x49d5, 0x4ae2, 0x4a83, 0x4a02, 0x4aed, 0x49f6, 0x4a1e, 0x4a4c, 0x49a9, 0x4a10, 0x49fd, 0x49c5, 0x4b06, 0x493c, 0x4a76, 0x4a31, 0x496e, 0x49a7, 0x4842, 0x48fc, 0x4a22, 0x49a9, 0x498d, 0x4ade, 0x4aaa, 0x4972, 0x4a76, 0x4a2c, 0x4a1a, 0x4b37, 0x49b0, 0x4a2b, 0x4a37, 0x4a21, 0x4a4b, 0x4981, 0x4a4b, 0x49f0, 0x4a9f, 0x4a01, 0x4a15, 0x4940, 0x49f2, 0x4a83, 0x4a01, 0x4a27, +0x4b62, 0x4b79, 0x4b15, 0x4c00, 0x4b91, 0x4b2d, 0x4c1e, 0x4af0, 0x4aab, 0x4aed, 0x4af1, 0x4aaa, 0x4b65, 0x4adf, 0x4c04, 0x4a87, 0x4af3, 0x4b20, 0x4a7c, 0x4ada, 0x49e9, 0x4a37, 0x4b2d, 0x4b3f, 0x4a84, 0x4b03, 0x4b15, 0x4a9f, 0x4c34, 0x4b1d, 0x4b50, 0x4bf9, 0x4aed, 0x4afa, 0x4b39, 0x4b30, 0x4b22, 0x4a2a, 0x4bdf, 0x4a89, 0x4b97, 0x4ad6, 0x4b77, 0x4a81, 0x4b56, 0x4b92, 0x4adc, 0x4b54, +0x4b28, 0x4ada, 0x4a71, 0x4a7f, 0x4aca, 0x4a8f, 0x4b14, 0x4a0d, 0x4a41, 0x4ac1, 0x497f, 0x4a46, 0x4a27, 0x4ae2, 0x4b06, 0x4a2a, 0x49ef, 0x4a52, 0x49e1, 0x4a1d, 0x4964, 0x4995, 0x4a4a, 0x49b3, 0x497d, 0x4ac8, 0x4a0d, 0x4a1b, 0x4bc2, 0x4ab9, 0x49ba, 0x4b49, 0x4b0a, 0x4aa1, 0x4ae4, 0x4b13, 0x4aae, 0x48d5, 0x4b35, 0x49f0, 0x4ae6, 0x49cb, 0x4b49, 0x49ff, 0x4b14, 0x4b49, 0x4a01, 0x4a81, +0x4a40, 0x4a35, 0x4a90, 0x4aad, 0x4ada, 0x4ad1, 0x4a6c, 0x4b09, 0x4a96, 0x4a4d, 0x492f, 0x49e3, 0x4a74, 0x4a79, 0x4b59, 0x4a15, 0x49e7, 0x4a96, 0x49ea, 0x49bb, 0x4967, 0x4935, 0x4a18, 0x4a3c, 0x49c3, 0x4aeb, 0x4b1f, 0x4a8f, 0x4bee, 0x4b06, 0x4a18, 0x4b6c, 0x4adf, 0x49e2, 0x4aa7, 0x4aac, 0x4ab5, 0x48d4, 0x4ac8, 0x4a70, 0x49cd, 0x4a55, 0x4ae7, 0x4a39, 0x4af1, 0x4b3b, 0x49e9, 0x4abd, +0x49cc, 0x49f6, 0x49f2, 0x49d5, 0x4a75, 0x49cb, 0x4ae2, 0x49fd, 0x4a00, 0x49b7, 0x49d2, 0x4940, 0x49f4, 0x4a1e, 0x4a2b, 0x49ad, 0x4948, 0x4964, 0x499d, 0x4a2e, 0x4930, 0x48eb, 0x4a53, 0x498d, 0x497b, 0x4a10, 0x4a5f, 0x4925, 0x4b0b, 0x490e, 0x4a4a, 0x4a73, 0x49d4, 0x493a, 0x49a8, 0x49ee, 0x4a23, 0x48f5, 0x4a27, 0x4934, 0x49ab, 0x4a01, 0x49f0, 0x4975, 0x4a77, 0x4a75, 0x493c, 0x495f, +0x4ac3, 0x4ae2, 0x4a29, 0x4b42, 0x4ad9, 0x49fe, 0x4b00, 0x4b04, 0x4b30, 0x4b22, 0x49f6, 0x4a0e, 0x4ae3, 0x4abc, 0x4b47, 0x4a6a, 0x4a5b, 0x4a5e, 0x4a42, 0x4a80, 0x49a1, 0x49be, 0x4b36, 0x4a10, 0x4a2b, 0x4ae5, 0x4ad0, 0x4aa4, 0x4b3c, 0x4aad, 0x4a2a, 0x4c1a, 0x4b2c, 0x4b2f, 0x4aa0, 0x4a77, 0x4af6, 0x49e8, 0x4a4b, 0x4a0a, 0x4ae4, 0x4a14, 0x4aa8, 0x4a1d, 0x4ae0, 0x4bae, 0x49c9, 0x4b3a, +0x4af0, 0x4a85, 0x4a70, 0x4a91, 0x4a7c, 0x4aba, 0x4ae7, 0x4a9a, 0x4b17, 0x4ab5, 0x4a25, 0x4a54, 0x4ab5, 0x4b59, 0x4b5b, 0x4a64, 0x4a74, 0x49e1, 0x4ac6, 0x4a66, 0x49cb, 0x498f, 0x4b1f, 0x4ab7, 0x4a0a, 0x4af4, 0x4aab, 0x49fa, 0x4c05, 0x4abb, 0x4a46, 0x4bbe, 0x4a9f, 0x4a37, 0x4a8c, 0x4a69, 0x4a50, 0x492c, 0x4b10, 0x49c6, 0x4b26, 0x4a91, 0x4b2b, 0x4a67, 0x4b4f, 0x4bb2, 0x4a05, 0x4a86, +0x4b3a, 0x4a79, 0x4ac0, 0x4b1e, 0x4ac3, 0x4b05, 0x4c11, 0x49e1, 0x4aa4, 0x4a96, 0x4a06, 0x4aab, 0x4acc, 0x4a66, 0x4b27, 0x4aa7, 0x4a37, 0x4aeb, 0x4a98, 0x4aae, 0x4973, 0x492e, 0x4ad4, 0x4a1c, 0x49f9, 0x4aca, 0x4ac8, 0x4a51, 0x4ba4, 0x4a87, 0x4ac1, 0x4b3c, 0x4add, 0x4a8f, 0x4a7d, 0x4ad7, 0x4adc, 0x49b9, 0x4aca, 0x4a95, 0x4ada, 0x4a37, 0x4b55, 0x4ad0, 0x4b78, 0x4b1c, 0x4a29, 0x4b1f, +0x4a63, 0x4aca, 0x49b7, 0x4a92, 0x4ada, 0x49fe, 0x4ab5, 0x4a3d, 0x4a42, 0x49d9, 0x49fc, 0x4a00, 0x4ade, 0x4a34, 0x4b06, 0x4931, 0x4943, 0x4a63, 0x49e9, 0x4978, 0x4965, 0x48f2, 0x4a89, 0x49f5, 0x4a38, 0x49ac, 0x4a38, 0x49b1, 0x4b82, 0x4a09, 0x4a31, 0x4b64, 0x4a91, 0x4a2c, 0x4a1e, 0x4a97, 0x4ab3, 0x48a0, 0x49fd, 0x496d, 0x4a1e, 0x494e, 0x4a0e, 0x4960, 0x4b38, 0x4b1a, 0x49ae, 0x49f6, +0x4a7f, 0x4a51, 0x4a0d, 0x4a5f, 0x4a11, 0x4a4c, 0x4b44, 0x49aa, 0x4a60, 0x4a7e, 0x4a36, 0x4a0c, 0x4a27, 0x4a56, 0x4b50, 0x497d, 0x4a2b, 0x49f3, 0x4a2f, 0x4a21, 0x48db, 0x4914, 0x4a92, 0x49f7, 0x499d, 0x4a7d, 0x4a42, 0x49c4, 0x4ab0, 0x49f0, 0x4a17, 0x4ad2, 0x4a17, 0x4a65, 0x4a4a, 0x49bc, 0x49b2, 0x496c, 0x4acc, 0x4a01, 0x4a5e, 0x49f2, 0x4a87, 0x495d, 0x4af6, 0x4a7c, 0x4a0d, 0x4ac9, +0x4988, 0x4a5b, 0x4a71, 0x4a17, 0x4ae3, 0x4a1a, 0x4a00, 0x4a7e, 0x4a47, 0x49fd, 0x499f, 0x49dd, 0x4a83, 0x4a22, 0x4a19, 0x49c6, 0x4a0a, 0x4aa2, 0x4971, 0x49b1, 0x4890, 0x48a4, 0x4a89, 0x49a8, 0x49fa, 0x49bc, 0x4996, 0x49e2, 0x4b36, 0x49df, 0x4a58, 0x4b51, 0x4b09, 0x4a54, 0x4a87, 0x4a2d, 0x4a78, 0x493b, 0x49cd, 0x494d, 0x4983, 0x497a, 0x4a78, 0x4a50, 0x4a81, 0x4b0b, 0x4921, 0x4a41, +0x4aa6, 0x4aaf, 0x4ab0, 0x4ade, 0x4b5d, 0x4a80, 0x4bb8, 0x4a43, 0x4a9f, 0x4a73, 0x4ae0, 0x4a44, 0x4ae1, 0x4aef, 0x4b70, 0x4a7f, 0x4a1c, 0x4b07, 0x4a54, 0x4a29, 0x494e, 0x49d0, 0x4ac3, 0x4a59, 0x49ec, 0x4abe, 0x4abe, 0x4a7c, 0x4afe, 0x4b14, 0x4a27, 0x4bbc, 0x4ad0, 0x4adc, 0x4b72, 0x4b05, 0x4ae4, 0x4971, 0x4a4b, 0x4a7a, 0x4a8d, 0x4a08, 0x4ae2, 0x4a51, 0x4b1c, 0x4b01, 0x4a4a, 0x4b18, +0x4a35, 0x4a4b, 0x49cf, 0x4a17, 0x4a6e, 0x49dd, 0x4a79, 0x4a1d, 0x4ac7, 0x49ad, 0x4924, 0x49c4, 0x4a33, 0x4a9d, 0x4a98, 0x4a36, 0x49b6, 0x4a30, 0x498d, 0x4a15, 0x48da, 0x48ea, 0x4a14, 0x49e2, 0x49ab, 0x4a44, 0x4a2c, 0x4973, 0x4ba2, 0x4a2b, 0x4a29, 0x4afd, 0x4a81, 0x4994, 0x4a16, 0x4a50, 0x4a68, 0x4875, 0x4a25, 0x4953, 0x4a2e, 0x4a1f, 0x4ad3, 0x49d2, 0x49dc, 0x4b0e, 0x49e3, 0x4a64, +0x4a67, 0x4b45, 0x4a92, 0x4b16, 0x4b93, 0x4a7e, 0x4ae8, 0x4a8a, 0x4ade, 0x4b12, 0x4a76, 0x4a98, 0x4a57, 0x4b00, 0x4b10, 0x4a4f, 0x4a7b, 0x49fb, 0x4a48, 0x4ac3, 0x4998, 0x496b, 0x4b02, 0x4aa7, 0x4a63, 0x4af4, 0x4ad6, 0x4a25, 0x4b23, 0x4abe, 0x4af0, 0x4bdc, 0x4acb, 0x4a6f, 0x4a8a, 0x4ae7, 0x4a40, 0x49d6, 0x4a4e, 0x4a1b, 0x4ad3, 0x4b3e, 0x4b6e, 0x4ab8, 0x4b19, 0x4b85, 0x4a20, 0x4ad6, +0x4916, 0x492c, 0x48c6, 0x49a8, 0x48eb, 0x493d, 0x49e4, 0x4920, 0x497a, 0x490f, 0x48cd, 0x489f, 0x49b9, 0x497b, 0x4a0d, 0x490d, 0x4968, 0x490a, 0x48b5, 0x4902, 0x489d, 0x481d, 0x4933, 0x48fb, 0x489d, 0x491e, 0x49a4, 0x48fd, 0x49a8, 0x4976, 0x48ed, 0x49c0, 0x49d0, 0x4901, 0x497f, 0x495a, 0x48db, 0x489f, 0x490c, 0x4906, 0x48fd, 0x4912, 0x499c, 0x4908, 0x4922, 0x49b6, 0x4852, 0x49c7, +0x49eb, 0x4957, 0x49e9, 0x49f1, 0x4a79, 0x49dd, 0x4a74, 0x4982, 0x49c2, 0x49f4, 0x4937, 0x494f, 0x4a28, 0x49ac, 0x49cf, 0x48ad, 0x496a, 0x4a23, 0x4950, 0x4a83, 0x48bc, 0x4955, 0x4a60, 0x4992, 0x49a3, 0x499b, 0x4a31, 0x492d, 0x4aea, 0x4980, 0x499f, 0x4a7c, 0x49a9, 0x4904, 0x4a17, 0x4a34, 0x49d9, 0x48f7, 0x49a2, 0x49a6, 0x4a91, 0x4a04, 0x49ee, 0x4931, 0x4a4f, 0x4acc, 0x49a6, 0x4a01, +0x4a67, 0x4af7, 0x4a92, 0x4aca, 0x4b39, 0x4b14, 0x4b05, 0x4ac6, 0x4a53, 0x4a76, 0x4a41, 0x4a0a, 0x4a65, 0x4a21, 0x4ba7, 0x4a19, 0x49ea, 0x4a7d, 0x4a08, 0x4a2d, 0x4930, 0x494e, 0x4ab8, 0x49b6, 0x49b8, 0x4ab7, 0x4b4d, 0x4a30, 0x4b1c, 0x4a9b, 0x4abe, 0x4bbb, 0x4ada, 0x4a16, 0x4aeb, 0x4a79, 0x4aa2, 0x499b, 0x4afd, 0x49eb, 0x4a51, 0x4a65, 0x4b60, 0x49de, 0x4bad, 0x4ac0, 0x4a21, 0x4a7c, +0x4b17, 0x4b30, 0x4afa, 0x4bd3, 0x4b33, 0x4ae4, 0x4be9, 0x4bb6, 0x4b60, 0x4b7f, 0x4ad4, 0x4a0f, 0x4bd2, 0x4b4a, 0x4bdc, 0x4a49, 0x4a7d, 0x4b73, 0x4af5, 0x4a98, 0x4999, 0x49e0, 0x4b70, 0x4a91, 0x4abe, 0x4b44, 0x4b2b, 0x4adb, 0x4bf0, 0x4b22, 0x4a02, 0x4c3c, 0x4bdf, 0x4b2d, 0x4b1a, 0x4b3b, 0x4bec, 0x4a09, 0x4b54, 0x4a8d, 0x4b11, 0x4ae9, 0x4b63, 0x4a1b, 0x4beb, 0x4bb4, 0x4b1d, 0x4b1e, +0x49da, 0x4a5d, 0x4a46, 0x4ae3, 0x4a1f, 0x49ac, 0x4add, 0x4a06, 0x4b11, 0x4a4c, 0x4990, 0x49af, 0x4a0f, 0x4a16, 0x4b22, 0x496a, 0x4a1e, 0x4a0e, 0x4a3f, 0x4a15, 0x4921, 0x4962, 0x4a12, 0x49da, 0x49ed, 0x4a51, 0x4a7c, 0x49a9, 0x4b0c, 0x4a46, 0x49cb, 0x4b37, 0x4ace, 0x4a6d, 0x4a66, 0x4999, 0x4a3a, 0x495a, 0x4abf, 0x4921, 0x49da, 0x4992, 0x4a93, 0x495d, 0x4aa8, 0x4a96, 0x4a29, 0x4a25, +0x497d, 0x4a0a, 0x49bf, 0x49d2, 0x4a66, 0x4993, 0x4a2a, 0x49f3, 0x4a4c, 0x4a18, 0x49a3, 0x490c, 0x49b4, 0x4a32, 0x4a2d, 0x49f3, 0x4a06, 0x4a0c, 0x4936, 0x49ed, 0x48e1, 0x4936, 0x4a33, 0x4a05, 0x4914, 0x4a49, 0x4a30, 0x495e, 0x4a73, 0x49f1, 0x4966, 0x4ad7, 0x49fa, 0x49c0, 0x49f4, 0x4995, 0x4a12, 0x4918, 0x4a91, 0x49a3, 0x4a15, 0x493b, 0x4b13, 0x4945, 0x4a16, 0x4a49, 0x4979, 0x49cd, +0x4a5e, 0x4ad5, 0x4ad2, 0x4ac2, 0x4af9, 0x4a70, 0x4bb7, 0x4afb, 0x4ba0, 0x4ac8, 0x4a43, 0x4aa7, 0x4b03, 0x4b45, 0x4bd9, 0x4a08, 0x4a33, 0x4aea, 0x4a3f, 0x4a97, 0x49da, 0x4961, 0x4b20, 0x4ab9, 0x4a73, 0x4a8f, 0x4a2c, 0x4a6e, 0x4bda, 0x4a6d, 0x4a5a, 0x4bf0, 0x4b7b, 0x4af7, 0x4b3d, 0x4aba, 0x4b3f, 0x4961, 0x4ada, 0x4993, 0x4ae4, 0x49bf, 0x4b0a, 0x4a6d, 0x4ace, 0x4bd7, 0x4a61, 0x4aeb, +0x49cb, 0x49b6, 0x4996, 0x4a4d, 0x4a39, 0x497c, 0x4afa, 0x4a69, 0x4a2b, 0x4940, 0x49c0, 0x492d, 0x4a15, 0x49b4, 0x4a40, 0x49ae, 0x4969, 0x4968, 0x49ea, 0x4981, 0x48ca, 0x48b3, 0x4a18, 0x4960, 0x49ac, 0x4990, 0x4a17, 0x4958, 0x4b2a, 0x4a16, 0x4a3c, 0x4aa0, 0x49a7, 0x4953, 0x4996, 0x4a56, 0x49eb, 0x4918, 0x4948, 0x4951, 0x4982, 0x4936, 0x49b4, 0x4992, 0x4a9c, 0x4a17, 0x492e, 0x49ee, +0x4af4, 0x4aa5, 0x4a04, 0x4a8e, 0x4ad9, 0x4a14, 0x4b0e, 0x4b84, 0x4bb4, 0x4a66, 0x4a2a, 0x4a6b, 0x4a74, 0x4a59, 0x4af0, 0x49a5, 0x4a79, 0x4aea, 0x4a90, 0x4a90, 0x4961, 0x4982, 0x4aea, 0x4a8e, 0x49f1, 0x4af6, 0x4a63, 0x49e0, 0x4b74, 0x4a34, 0x4a68, 0x4b8d, 0x4aa4, 0x49fc, 0x4a60, 0x49b3, 0x4a4c, 0x4a11, 0x4a71, 0x4906, 0x4a47, 0x49c1, 0x4a81, 0x4976, 0x4b2d, 0x4adb, 0x49e1, 0x4a2d, +0x49a1, 0x49c0, 0x49b6, 0x498b, 0x49eb, 0x494d, 0x49fd, 0x49d4, 0x4931, 0x4a81, 0x4961, 0x4953, 0x49c9, 0x4989, 0x49cd, 0x4976, 0x48fb, 0x49a4, 0x48c5, 0x4969, 0x48d0, 0x48e3, 0x4a23, 0x495c, 0x48eb, 0x4a1b, 0x4a07, 0x48f9, 0x4a6d, 0x4982, 0x49c4, 0x4a3d, 0x498b, 0x495c, 0x4931, 0x4a10, 0x49ce, 0x48fe, 0x497b, 0x49a5, 0x4a09, 0x49a6, 0x4aa2, 0x4953, 0x49ff, 0x4a30, 0x48f5, 0x49c3, +0x4a01, 0x4968, 0x497d, 0x4951, 0x4a12, 0x48fd, 0x49d8, 0x49c8, 0x4987, 0x49c0, 0x48ab, 0x4981, 0x495e, 0x49d4, 0x49b8, 0x48dc, 0x490d, 0x491b, 0x48cd, 0x491f, 0x4840, 0x4881, 0x49f7, 0x4857, 0x493c, 0x495b, 0x495a, 0x497a, 0x4a34, 0x498c, 0x4900, 0x4a4e, 0x49bb, 0x49aa, 0x499f, 0x49bd, 0x493b, 0x48a4, 0x4977, 0x4945, 0x4945, 0x48ef, 0x499c, 0x4910, 0x49c4, 0x4aad, 0x48f9, 0x492e, +0x4b0c, 0x4b0c, 0x4b29, 0x4b70, 0x4b6c, 0x4a9a, 0x4bcb, 0x4af2, 0x4af1, 0x4b38, 0x4a0d, 0x4ac1, 0x4b1a, 0x4b25, 0x4be6, 0x4a26, 0x4b43, 0x4acc, 0x4a96, 0x4a6d, 0x4a40, 0x49f3, 0x4aea, 0x4adb, 0x4b0a, 0x4b3a, 0x4b1a, 0x4a97, 0x4bf5, 0x4acc, 0x4b64, 0x4c0b, 0x4adc, 0x4a4d, 0x4ab0, 0x4aaa, 0x4a75, 0x49ff, 0x4ad9, 0x4aa3, 0x4aed, 0x4ab8, 0x4b42, 0x4a62, 0x4b21, 0x4b61, 0x4a65, 0x4ad8, +0x4ac3, 0x4aae, 0x49e7, 0x4ac0, 0x4ab9, 0x4a2a, 0x4aeb, 0x4a99, 0x4add, 0x4ad4, 0x49e2, 0x49c4, 0x4af6, 0x4a94, 0x4aac, 0x4a3e, 0x4a53, 0x4ac0, 0x49a9, 0x4a78, 0x4901, 0x49ad, 0x4ac8, 0x4a04, 0x49e4, 0x4ac3, 0x4aa7, 0x4a0e, 0x4b92, 0x4a4d, 0x4a04, 0x4b27, 0x4ae6, 0x4a05, 0x4a60, 0x4a0c, 0x4a26, 0x498a, 0x4b16, 0x4a27, 0x4ab3, 0x4a6d, 0x4afa, 0x49bf, 0x4ad0, 0x4b14, 0x49c4, 0x4a9f, +0x4a9e, 0x4a45, 0x4a66, 0x4ae1, 0x4a7a, 0x4ad5, 0x4b8c, 0x4a8c, 0x4a75, 0x4b0d, 0x49cb, 0x49a4, 0x4b1a, 0x4a6f, 0x4ba5, 0x4a31, 0x4a24, 0x49f5, 0x4aa7, 0x4a82, 0x4913, 0x4957, 0x4a96, 0x4a02, 0x4a2c, 0x4a5f, 0x4b2b, 0x4a5d, 0x4c22, 0x4b44, 0x4a59, 0x4c06, 0x4b22, 0x4a3d, 0x4ada, 0x4af3, 0x4ad3, 0x48d7, 0x4af6, 0x4ab2, 0x4b11, 0x4ae3, 0x4bcc, 0x4a8a, 0x4b0a, 0x4b0a, 0x4a53, 0x4b42, +0x4a5f, 0x4a3a, 0x49be, 0x4abe, 0x4a91, 0x4a3c, 0x4b64, 0x49fc, 0x4a28, 0x4a5f, 0x49fe, 0x49c4, 0x4a75, 0x4a40, 0x4b24, 0x4a13, 0x49d0, 0x4a68, 0x4973, 0x4a3a, 0x492c, 0x495c, 0x4aa0, 0x49a3, 0x4978, 0x4a7d, 0x4afa, 0x4a21, 0x4b08, 0x4a6e, 0x4a45, 0x4b85, 0x4a4e, 0x49bd, 0x4aae, 0x4aa7, 0x4a0f, 0x48fd, 0x4a4f, 0x4a0c, 0x4a7a, 0x4a06, 0x4a62, 0x4992, 0x4b2c, 0x4aa0, 0x4a27, 0x4a8d, +0x4ad6, 0x4ad2, 0x4a41, 0x4b36, 0x4b2a, 0x49ce, 0x4b5d, 0x4a88, 0x4a5d, 0x4ab2, 0x4a18, 0x4a04, 0x4a93, 0x4a79, 0x4b1a, 0x49c5, 0x4a48, 0x4a2c, 0x4a40, 0x4a7e, 0x4972, 0x49c0, 0x4abc, 0x49dc, 0x4a64, 0x4a5d, 0x4b30, 0x4a58, 0x4be0, 0x4a5a, 0x4aae, 0x4bcb, 0x4a87, 0x4a4f, 0x4aa0, 0x4ace, 0x4a8b, 0x4970, 0x4ae7, 0x49a3, 0x4a91, 0x49cf, 0x4b21, 0x4a81, 0x4b30, 0x4b6b, 0x4a06, 0x49f9, +0x4a27, 0x4a1d, 0x4a0e, 0x4a34, 0x49de, 0x49af, 0x4a3a, 0x49ba, 0x4a05, 0x4a0b, 0x4994, 0x4994, 0x4a57, 0x495d, 0x4a8f, 0x48e5, 0x498e, 0x49bf, 0x4966, 0x499c, 0x48b0, 0x48fb, 0x4a33, 0x4992, 0x49aa, 0x49f4, 0x4a13, 0x49d0, 0x4aee, 0x4a34, 0x49fb, 0x4ac4, 0x4a08, 0x4951, 0x4a3d, 0x49e5, 0x49ba, 0x48c4, 0x4a19, 0x4945, 0x49f8, 0x4957, 0x4a47, 0x48d2, 0x4a4e, 0x4a14, 0x492f, 0x496d, +0x4a89, 0x4a3c, 0x49e3, 0x4ac4, 0x4a78, 0x4a8e, 0x4b2b, 0x4a2e, 0x4b0e, 0x4a62, 0x4a48, 0x49f6, 0x49eb, 0x4aa6, 0x4b4d, 0x49ec, 0x4a5f, 0x4afe, 0x4a79, 0x4a6c, 0x48cc, 0x49b4, 0x4a46, 0x4adb, 0x498f, 0x4a8b, 0x4a4c, 0x4989, 0x4b20, 0x4a7e, 0x4ada, 0x4b23, 0x4a8c, 0x49cb, 0x4a58, 0x4a51, 0x4a2a, 0x4989, 0x4a50, 0x4a21, 0x4a13, 0x49f8, 0x4ae8, 0x49c7, 0x4adc, 0x4ace, 0x4a18, 0x4a21, +0x48d2, 0x49d2, 0x4985, 0x49e9, 0x4a0f, 0x4960, 0x49c7, 0x498b, 0x497c, 0x4960, 0x4886, 0x48bb, 0x49c3, 0x48f2, 0x49fc, 0x48b2, 0x49ae, 0x49c5, 0x4891, 0x4936, 0x4849, 0x482b, 0x49ed, 0x493e, 0x4999, 0x492c, 0x4977, 0x493c, 0x4a50, 0x497a, 0x49f9, 0x4ae5, 0x49c3, 0x48c9, 0x4a5e, 0x49c7, 0x49a0, 0x48c0, 0x498d, 0x48d3, 0x4988, 0x4a09, 0x49e4, 0x48f1, 0x4930, 0x4a27, 0x4910, 0x4949, +0x4bad, 0x4be4, 0x4aac, 0x4b7a, 0x4b3f, 0x4aff, 0x4bfa, 0x4aef, 0x4b76, 0x4ba6, 0x4aed, 0x4a77, 0x4b38, 0x4b2b, 0x4bb9, 0x4aa0, 0x4b70, 0x4b37, 0x4ac1, 0x4b19, 0x49eb, 0x4a2f, 0x4bd3, 0x4ac5, 0x4a6f, 0x4b3a, 0x4b80, 0x4a73, 0x4c1f, 0x4aad, 0x4b16, 0x4c07, 0x4b16, 0x4aec, 0x4a7b, 0x4b0c, 0x4b33, 0x4acc, 0x4b76, 0x4a75, 0x4bd2, 0x4add, 0x4bbb, 0x4a43, 0x4bde, 0x4c06, 0x4b57, 0x4b09, +0x4a13, 0x4a47, 0x4a38, 0x4a94, 0x4a6f, 0x4a22, 0x4ab0, 0x499b, 0x4a1a, 0x49fc, 0x4986, 0x492e, 0x4a1e, 0x4a4a, 0x4afd, 0x49a6, 0x49f6, 0x49d9, 0x4a56, 0x4a64, 0x492d, 0x4902, 0x49df, 0x499a, 0x497e, 0x49c2, 0x4a8f, 0x49c8, 0x4af5, 0x4a7e, 0x4a23, 0x4a96, 0x4a49, 0x49f8, 0x4a11, 0x4a02, 0x4a5c, 0x490b, 0x4a5e, 0x4995, 0x4a0f, 0x49cf, 0x4ae7, 0x4a74, 0x4aca, 0x4a95, 0x49ad, 0x49f5, +0x4aaa, 0x4a49, 0x4a5b, 0x4a39, 0x4ad5, 0x49dd, 0x4af8, 0x4a95, 0x4a50, 0x4a3e, 0x49f6, 0x4a42, 0x4a8c, 0x4ade, 0x4ad3, 0x4a2b, 0x4a3e, 0x4a4e, 0x4a6b, 0x4aa0, 0x49a6, 0x498e, 0x4afb, 0x4a14, 0x4998, 0x4a45, 0x4a5f, 0x49df, 0x4b9e, 0x4a55, 0x4ada, 0x4b60, 0x4a61, 0x4a5d, 0x4ae5, 0x4acc, 0x4a44, 0x4932, 0x4a36, 0x4a2c, 0x49e8, 0x4a5c, 0x4a9b, 0x4a2b, 0x4ac0, 0x4b66, 0x49ff, 0x4ad6, +0x4ac2, 0x4b93, 0x4a9c, 0x4b17, 0x4ad9, 0x4ab1, 0x4b2e, 0x4b12, 0x4a89, 0x4a88, 0x4a85, 0x4ace, 0x4b8e, 0x4a5e, 0x4b3d, 0x4a6d, 0x49cf, 0x4a3c, 0x4a4f, 0x4a94, 0x49ce, 0x495f, 0x4af2, 0x4ac5, 0x4a56, 0x4ad0, 0x4b63, 0x4a1b, 0x4bd6, 0x4ac3, 0x4a51, 0x4b79, 0x4a8e, 0x4a9f, 0x4a0f, 0x4ae3, 0x4aae, 0x4914, 0x4a44, 0x49ed, 0x4a82, 0x4a97, 0x4b41, 0x4a88, 0x4bba, 0x4b16, 0x49d2, 0x4a7e, +0x49f2, 0x4a6e, 0x4a81, 0x4a5c, 0x4aeb, 0x4a0a, 0x4a73, 0x4ac2, 0x4a93, 0x4a6e, 0x4920, 0x49c8, 0x4a41, 0x4acd, 0x4b05, 0x499b, 0x4a4e, 0x49e2, 0x49a7, 0x4a34, 0x4929, 0x4969, 0x4a56, 0x4a62, 0x49b6, 0x4b3f, 0x4aec, 0x49fb, 0x4afa, 0x4a5e, 0x49f1, 0x4b99, 0x4a7e, 0x49a2, 0x4ad1, 0x4a00, 0x4a2a, 0x496b, 0x4a5e, 0x49b8, 0x4ace, 0x4b11, 0x4ae2, 0x49f6, 0x4a39, 0x4b00, 0x4a3c, 0x4a4a, +0x4a92, 0x4a62, 0x4a4e, 0x4a79, 0x4ab0, 0x4a21, 0x4b76, 0x4a4d, 0x4a1d, 0x4a5a, 0x49ce, 0x4a31, 0x4a51, 0x4a28, 0x4b1b, 0x4932, 0x491f, 0x4a1a, 0x4a33, 0x4a2e, 0x490f, 0x4a17, 0x4a43, 0x4aa2, 0x4a26, 0x4a91, 0x4a4e, 0x499c, 0x4b51, 0x4a5b, 0x4a4c, 0x4b79, 0x49f6, 0x4a37, 0x4a49, 0x4ab4, 0x49cd, 0x4906, 0x49f3, 0x49af, 0x4af1, 0x4a02, 0x4a4a, 0x4a91, 0x4aa5, 0x4ab3, 0x499f, 0x4a67, +0x4a3b, 0x4a3f, 0x49f3, 0x4aa5, 0x49cb, 0x4980, 0x49f7, 0x49dc, 0x4a70, 0x49bd, 0x48ff, 0x491b, 0x4932, 0x49d5, 0x4a8c, 0x49c5, 0x49bb, 0x490d, 0x49d9, 0x49d7, 0x48cf, 0x4865, 0x49cf, 0x492c, 0x4909, 0x49fd, 0x4a33, 0x49cf, 0x4aeb, 0x49e3, 0x4a32, 0x4a4a, 0x499a, 0x494d, 0x49a3, 0x4a38, 0x49d3, 0x494f, 0x4a43, 0x495d, 0x4ab2, 0x4a3b, 0x4a7d, 0x4991, 0x49c9, 0x4aeb, 0x499e, 0x4985, +0x4b7c, 0x4bb3, 0x4ac0, 0x4b41, 0x4afa, 0x4b3b, 0x4c33, 0x4b11, 0x4b6b, 0x4ada, 0x4b1c, 0x4b20, 0x4b91, 0x4b6b, 0x4c57, 0x4a26, 0x4a9b, 0x4b18, 0x4a93, 0x4aca, 0x4a1d, 0x4a50, 0x4afe, 0x4a30, 0x4a3c, 0x4b6a, 0x4b8d, 0x4a5f, 0x4b91, 0x4b76, 0x4acc, 0x4bc2, 0x4b2c, 0x4af4, 0x4aea, 0x4b3c, 0x4b5e, 0x49e5, 0x4b18, 0x4a44, 0x4b2f, 0x4a7a, 0x4a6b, 0x4a2f, 0x4bc0, 0x4be2, 0x4aaa, 0x4a7a, +0x4a84, 0x4ad3, 0x4a28, 0x4b2c, 0x4afb, 0x4a4d, 0x4c18, 0x4a96, 0x4abc, 0x4a8b, 0x4a34, 0x4a0a, 0x4b0c, 0x4aeb, 0x4b93, 0x4a67, 0x4af0, 0x4a98, 0x4a26, 0x4a5f, 0x49cc, 0x49c9, 0x4a4d, 0x4a63, 0x4a12, 0x4b3c, 0x4b03, 0x4a1c, 0x4b70, 0x4ad5, 0x4ac7, 0x4b2b, 0x4adf, 0x4a97, 0x4a39, 0x4a71, 0x4a92, 0x499c, 0x4a83, 0x4a03, 0x4ae5, 0x4a13, 0x4a6a, 0x4a36, 0x4b06, 0x4b45, 0x49f3, 0x4ad2, +0x49f7, 0x4a49, 0x4a91, 0x4ab1, 0x4b0f, 0x4a6f, 0x4b24, 0x4a6e, 0x4b0b, 0x4a78, 0x4a1e, 0x4a8e, 0x4a2d, 0x4ad5, 0x4b14, 0x4a69, 0x4a34, 0x49d9, 0x4a70, 0x4a7f, 0x4946, 0x4950, 0x4a89, 0x49e9, 0x49e3, 0x4b5c, 0x4ae0, 0x4a4e, 0x4af8, 0x4a30, 0x4a25, 0x4b04, 0x4a7e, 0x4ad1, 0x4ac7, 0x4a90, 0x4a2e, 0x4947, 0x4a9d, 0x4975, 0x4ac1, 0x4a89, 0x4ae8, 0x4a1e, 0x4b18, 0x4b48, 0x4a13, 0x49fc, +0x4aec, 0x4b39, 0x4a12, 0x4b39, 0x4ae8, 0x4aca, 0x4bdf, 0x4a6b, 0x4ad5, 0x4b66, 0x4a82, 0x4a1b, 0x4b03, 0x4ada, 0x4bde, 0x4a72, 0x4aef, 0x4ad8, 0x4a59, 0x4ac8, 0x49ba, 0x4a41, 0x4b73, 0x4a6c, 0x4a54, 0x4b27, 0x4b94, 0x4ac7, 0x4b64, 0x4acb, 0x4a2d, 0x4be2, 0x4ae6, 0x4a56, 0x4a62, 0x4b2c, 0x4b0f, 0x49db, 0x4afb, 0x4afd, 0x4b23, 0x4afe, 0x4bbc, 0x49cc, 0x4b54, 0x4b81, 0x4a8f, 0x4b3a, +0x4a6c, 0x4ac5, 0x4a37, 0x49f9, 0x4a91, 0x4ab9, 0x4bb2, 0x49f9, 0x4a8d, 0x4a3b, 0x4aab, 0x4a27, 0x4a9c, 0x4ad3, 0x4b24, 0x4a7f, 0x4aee, 0x4a78, 0x4ab4, 0x4a16, 0x49e3, 0x499b, 0x4ae9, 0x49fb, 0x496b, 0x4a36, 0x4a04, 0x49bd, 0x4b04, 0x4a08, 0x4a91, 0x4ae5, 0x4ab2, 0x49fe, 0x4a79, 0x4a48, 0x4a54, 0x48ec, 0x4acc, 0x49b2, 0x4ad1, 0x49cf, 0x4b09, 0x4a1a, 0x4b3f, 0x4aa6, 0x4979, 0x4a14, +0x4b1c, 0x4a5a, 0x4a71, 0x4adc, 0x4b35, 0x4a60, 0x4aeb, 0x4a2f, 0x4a3c, 0x4a9d, 0x49cd, 0x4a85, 0x4ad1, 0x4a8d, 0x4c07, 0x4972, 0x4a2c, 0x4a77, 0x4a55, 0x49aa, 0x4922, 0x4973, 0x4af1, 0x4a31, 0x4995, 0x4aae, 0x4a97, 0x4a50, 0x4b17, 0x4ac6, 0x4a35, 0x4b53, 0x4ad4, 0x49ce, 0x4af5, 0x4b8a, 0x4ad5, 0x4982, 0x4ad1, 0x4a23, 0x4a58, 0x4a90, 0x4afa, 0x49b1, 0x4b43, 0x4af3, 0x4968, 0x4a6a, +0x4a3c, 0x4a62, 0x4a08, 0x4a37, 0x4a1c, 0x49d4, 0x4aa9, 0x4a1a, 0x4a90, 0x4a4d, 0x49e3, 0x49b9, 0x4a1e, 0x49d1, 0x4a88, 0x49eb, 0x49ea, 0x49c3, 0x4a58, 0x4a2b, 0x48e7, 0x4917, 0x49b8, 0x4a0e, 0x49b1, 0x4a57, 0x4a9a, 0x496c, 0x4b0c, 0x49eb, 0x4a17, 0x4ae4, 0x4a90, 0x49cc, 0x49b6, 0x49b6, 0x4a15, 0x4949, 0x4a79, 0x495b, 0x4a43, 0x49e5, 0x4a84, 0x49fe, 0x4a91, 0x4a7c, 0x497a, 0x4a4f +}; \ No newline at end of file diff --git a/hwpe/redmule/pulp_inject_fault.tcl b/hwpe/redmule/pulp_inject_fault.tcl new file mode 100644 index 0000000..61ccadf --- /dev/null +++ b/hwpe/redmule/pulp_inject_fault.tcl @@ -0,0 +1,53 @@ +# Copyright 2023 ETH Zurich and University of Bologna. +# Solderpad Hardware License, Version 0.51, see LICENSE for details. +# SPDX-License-Identifier: SHL-0.51 +# +# Author: Michael Rogenmoser (michaero@iis.ee.ethz.ch) + +transcript quietly +if {! [info exists ::env(VSIM_PATH)]} {error "Define VSIM_PATH"} +set utils_base_path [file join $::env(VSIM_PATH) scripts fault_injection_utils] +set script_base_path [file join $::env(VSIM_PATH) fault_injection_sim scripts] + +set verbosity 2 +set log_injections 1 +# Easy way to generate a variable seed +# set seed [clock seconds] +# Default value +set seed 12345 +set print_statistics 1 + +set inject_start_time 550000000000ps +set inject_stop_time 750000000000ps +set injection_clock "pulp_cluster_tb/cluster_i/clk_i" +set injection_clock_trigger 0 +set fault_period 150 +set rand_initial_injection_phase 0 +# max_num set to 0 means until stop_time +set max_num_fault_inject 0 +set signal_fault_duration 20ns +set register_fault_duration 0ns + +set allow_multi_bit_upset $::env(MULTI_BIT_UPSET) +set use_bitwidth_as_weight 0 +set check_core_output_modification 0 +set check_core_next_state_modification 0 +set reg_to_sig_ratio 1 + +source [file join $utils_base_path pulp_extract_nets.tcl] + +set inject_signals_netlist [] +set inject_register_netlist [] +set output_netlist [] +set next_state_netlist [] +set assertion_disable_list [] + +# for {set idx 0} {$idx < 12} {incr idx} { +# set inject_signals_netlist [list {*}$inject_signals_netlist {*}[get_all_core_nets $idx]] +# set output_netlist [list {*}$output_netlist {*}[get_core_output_nets $idx]] +# } + +set inject_register_netlist [list {*}$inject_register_netlist {*}[get_memory_slice {0 16} {256 336}]] + +source [file join $script_base_path inject_fault.tcl] + diff --git a/hwpe/redmule/redmule-golden-model b/hwpe/redmule/redmule-golden-model new file mode 160000 index 0000000..512c780 --- /dev/null +++ b/hwpe/redmule/redmule-golden-model @@ -0,0 +1 @@ +Subproject commit 512c7809f630e0258ea89f652802bbaed5104138 diff --git a/hwpe/redmule/redmule.c b/hwpe/redmule/redmule.c new file mode 100644 index 0000000..878aafc --- /dev/null +++ b/hwpe/redmule/redmule.c @@ -0,0 +1,139 @@ +/* + * Copyright (C) 2022-2023 ETH Zurich and University of Bologna + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * SPDX-License-Identifier: Apache-2.0 + * + * Author: Yvan Tortorella + * + * RedMulE SW test + */ + +#include +#include "stdio.h" +#include "archi_redmule.h" +#include "hal_redmule.h" +#include "pulp.h" + +int main() { + + volatile int errors = 0; + unsigned int cluster_id = rt_cluster_id(); + #ifndef NO_ECC + unsigned int intc_data_correctable_cnt, redmule_data_correctable_cnt = 0; + unsigned int intc_meta_correctable_cnt = 0; + unsigned int intc_data_uncorrectable_cnt, redmule_data_uncorrectable_cnt = 0; + unsigned int intc_meta_uncorrectable_cnt = 0; + #endif + + if(get_core_id() == 0){ + + uint16_t m_size = M_SIZE; + uint16_t n_size = N_SIZE; + uint16_t k_size = K_SIZE; + + uint8_t *x_ext = x_inp; + uint8_t *w_ext = w_inp; + uint8_t *y_ext = y_inp; + uint8_t *z_ext = z_oup; + + uint8_t volatile *x = (uint8_t volatile *) pi_l1_malloc(0, (2*m_size*n_size)); + uint8_t volatile *w = (uint8_t volatile *) pi_l1_malloc(0, (2*n_size*k_size)); + uint8_t volatile *y = (uint8_t volatile *) pi_l1_malloc(0, (2*m_size*k_size)); + + #ifdef USE_DMA + volatile unsigned int dma_id = 0; + dma_id = mchan_alloc(); + mchan_transfer((unsigned int) 2*(2*m_size*n_size), + (unsigned int) x_ext, + (unsigned int) x ); + mchan_barrier(dma_id); + mchan_free(dma_id); + + dma_id = mchan_alloc(); + mchan_transfer((unsigned int) 2*(2*n_size*k_size), + (unsigned int) w_ext, + (unsigned int) w ); + mchan_barrier(dma_id); + mchan_free(dma_id); + + dma_id = mchan_alloc(); + mchan_transfer((unsigned int) 2*(2*m_size*k_size), + (unsigned int) y_ext, + (unsigned int) y ); + mchan_barrier(dma_id); + #else + generate_test_data16((int) x, (int) w, (int) y, (int) m_size, (int) n_size, (int) k_size); + #endif + + int gold_sum = 0, check_sum = 0; + int i,j; + + int offload_id_tmp, offload_id; + + // Enable RedMulE + hwpe_cg_enable(); + asm volatile("": : :"memory"); + + hwpe_soft_clear(); + asm volatile("": : :"memory"); + + redmule_cfg((unsigned int)x, (unsigned int)w, (unsigned int)y, m_size, n_size, k_size, (uint8_t)gemm_ops, (uint8_t)Float16); + + // Start RedMulE operation + hwpe_trigger_job(); + + // Wait for end of computation + redmule_evt_wait(); + + #ifndef NO_ECC + // Check number of detected errors by ECC modules inside RedMulE + redmule_data_correctable_cnt = redmule_get_data_correctable_count(); + redmule_data_uncorrectable_cnt = redmule_get_data_uncorrectable_count(); + #endif + + // Disable RedMulE + hwpe_cg_disable(); + + errors = redmule_compare16((int) y, (int) m_size, (int) k_size); + + *(int *) 0x1A1040A0 = errors; + + printf ("Terminated test with %d errors. See you!\n", errors); + + #ifndef NO_ECC + // Check number of detected errors by ECC modules inside interconnect + intc_data_correctable_cnt = hwpe_hci_ecc_get_data_correctable_count(cluster_id); + intc_meta_correctable_cnt = hwpe_hci_ecc_get_meta_correctable_count(cluster_id); + intc_data_uncorrectable_cnt = hwpe_hci_ecc_get_data_uncorrectable_count(cluster_id); + intc_meta_uncorrectable_cnt = hwpe_hci_ecc_get_meta_uncorrectable_count(cluster_id); + for (int i = 0; i < 16; i++) { + intc_meta_correctable_cnt += tcdm_scrubber_get_mismatch_count(cluster_id, i); + } + + printf ("Data errors corrected inside RedMulE: %d. Data errors uncorrectable inside RedMulE: %d \n", + redmule_data_correctable_cnt, redmule_data_uncorrectable_cnt); + printf("Data errors corrected inside intc: %d. Data errors uncorrectable inside intc: %d\n", + intc_data_correctable_cnt, intc_data_uncorrectable_cnt); + printf("Meta errors corrected inside intc: %d. Meta errors uncorrectable inside intc: %d\n", + intc_meta_correctable_cnt, intc_meta_uncorrectable_cnt); + #endif + + } + synch_barrier(); + #ifndef NO_ECC + return (errors != 0) && (redmule_data_uncorrectable_cnt==0 && intc_data_uncorrectable_cnt == 0 && intc_meta_uncorrectable_cnt == 0); + #else + return errors; + #endif +} diff --git a/hwpe/redmule_256iter/Makefile b/hwpe/redmule_256iter/Makefile new file mode 100644 index 0000000..88346b6 --- /dev/null +++ b/hwpe/redmule_256iter/Makefile @@ -0,0 +1,20 @@ +PULP_APP = test +PULP_APP_SRCS = redmule.c +PULP_CFLAGS = -O3 + +ifeq ($(use_dma),1) + PULP_CFLAGS += -DUSE_DMA +endif + +ifeq ($(fault_inject),1) + export FAULT_INJECTION=1 + export FAULT_INJECTION_SCRIPT=$(CURDIR)/pulp_inject_fault.tcl +endif + +ifeq ($(multi_bit_upset),1) + export MULTI_BIT_UPSET=1 +else + export MULTI_BIT_UPSET=0 +endif + +include $(PULP_SDK_HOME)/install/rules/pulp_rt.mk diff --git a/hwpe/redmule_256iter/archi_redmule.h b/hwpe/redmule_256iter/archi_redmule.h new file mode 100644 index 0000000..40eceee --- /dev/null +++ b/hwpe/redmule_256iter/archi_redmule.h @@ -0,0 +1,170 @@ +/* + * Copyright (C) 2022-2023 ETH Zurich and University of Bologna + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * SPDX-License-Identifier: Apache-2.0 + * + * Author: Yvan Tortorella + * + * High-level architecture of RedMulE + * + */ + +#ifndef __ARCHI_REDMULE_H__ +#define __ARCHI_REDMULE_H__ + +/* + * |========================================================================| + * || || + * ||Control and generic configuration register layout || + * |========================================================================| + * || # reg | offset | bits | bitmask || content || + * ||-------+----------+---------+--------------++-------------------------|| + * || 0 | 0x0000 | 31: 0 | 0xFFFFFFFF || TRIGGER || + * || 1 | 0x0004 | 31: 0 | 0xFFFFFFFF || ACQUIRE || + * || 2 | 0x0008 | 31: 0 | 0xFFFFFFFF || EVT_ENABLE || + * || 3 | 0x000c | 31: 0 | 0xFFFFFFFF || STATUS || + * || 4 | 0x0010 | 31: 0 | 0xFFFFFFFF || RUNNING_JOB || + * || 5 | 0x0014 | 31: 0 | 0xFFFFFFFF || SOFT_CLEAR || + * |========================================================================| + * || || + * ||Job-dependent registers layout || + * |========================================================================| + * || # reg | offset | bits | bitmask || content || + * ||-------+----------+---------+--------------++-------------------------|| + * || 0 | 0x0040 | 31: 0 | 0xFFFFFFFF || X_ADDR || + * ||-------+----------+---------+--------------++-------------------------|| + * || 1 | 0x0044 | 31: 0 | 0xFFFFFFFF || W_ADDR || + * ||-------+----------+---------+--------------++-------------------------|| + * || 2 | 0x0048 | 31: 0 | 0xFFFFFFFF || Z_ADDR || + * ||-------+----------+---------+--------------++-------------------------|| + * || 3 | 0x004C | | || Matrix Config 0 Reg || + * || | | 31:16 | 0xFFFF0000 || K Size (W Columns) || + * || | | 15: 0 | 0x0000FFFF || M Size (X Rows) || + * ||-------+----------+---------+--------------++-------------------------|| + * || 4 | 0x0050 | | || Matrix Config 1 Reg || + * || | | 31:16 | 0xFFFFFFFF || N Size (X Cols/W Rows) || + * ||-------+----------+---------+--------------++-------------------------|| + * || 5 | 0x0054 | | || Matrix Arithmetic Reg || + * || | | 12:10 | 0x00001C00 || Operation selection || + * || | | 9: 7 | 0x00000380 || Input/Output format || + * |========================================================================| + * + */ + +/* PULP Cluster Archi defines */ +#define ARCHI_CLUST_CTRL_BASE ARCHI_CLUSTER_CTRL_ADDR +#define ARCHI_CLUST_HWPE_BASE ARCHI_HWCE_ADDR +#define DMA_COMMAND_QUEUE ARCHI_MCHAN_DEMUX_ADDR +#define DMA_STATUS_REGISTER (ARCHI_MCHAN_DEMUX_ADDR + 4) +#define ARCHI_CL_HWPE_EVT0 12 +#define ARCHI_CL_HWPE_EVT1 13 +#define FC_DMA_EVENT 8 +#define CL_DMA_EVENT 22 +#define CLUST_CTRL_HWPE_EN 0x18 +#define CLUST_CTRL_HWPE_EN_MASK 0x800 +#define __builtin_bitinsert(a,b,c,d) (a | (((b << (32-c)) >> (32-c)) << d)) + +// RedMulE architecture +#define ADDR_WIDTH 32 +#define DATA_WIDTH 256 +#define REDMULE_FMT 16 +#define ARRAY_HEIGHT 4 +#define PIPE_REGS 3 +#define ARRAY_WIDTH 12 /* Superior limit is ARRAY_HEIGHT*PIPE_REGS */ + +// Commands +#define REDMULE_TRIGGER 0x00 +#define REDMULE_ACQUIRE 0x04 +#define REDMULE_FINISHED 0x08 +#define REDMULE_STATUS 0x0C +#define REDMULE_RUNNING_JOB 0x10 +#define REDMULE_SOFT_CLEAR 0x14 + +// Registers +#define REDMULE_REG_OFFS 0x40 +// #define REDMULE_REG_X_PTR 0x00 +// #define REDMULE_REG_W_PTR 0x04 +// #define REDMULE_REG_Z_PTR 0x08 +// #define REDMULE_MCFG0_PTR 0x0C +// #define REDMULE_MCFG1_PTR 0x10 +// #define REDMULE_ARITH_PTR 0x14 +#define REDMULE_REG_X_PTR 0x00 +#define REDMULE_REG_W_PTR 0x04 +#define REDMULE_REG_Y_PTR 0x08 +#define REDMULE_REG_Z_PTR 0x0C +#define REDMULE_REG_X_ITER_PTR 0x10 +#define REDMULE_REG_W_ITER_PTR 0x14 +#define REDMULE_REG_LEFTOVERS_PTR 0x18 +#define REDMULE_REG_LEFT_PARAMS_PTR 0x1C +#define REDMULE_REG_X_D1_STRIDE_PTR 0x20 +#define REDMULE_REG_W_TOT_LEN_PTR 0x24 +#define REDMULE_REG_TOT_X_READ_PTR 0x28 +#define REDMULE_REG_W_D0_STRIDE_PTR 0x2C +#define REDMULE_REG_YZ_TOT_LEN_PTR 0x30 +#define REDMULE_REG_YZ_D0_STRIDE_PTR 0x34 +#define REDMULE_REG_YZ_D2_STRIDE_PTR 0x38 +#define REDMULE_REG_X_ROWS_OFFS_PTR 0x3C +#define REDMULE_REG_X_BUFFER_SLOTS_PTR 0x40 +#define REDMULE_REG_X_TOT_LEN_PTR 0x44 +#define REDMULE_REG_OP_SELECTION 0x48 + +#define REDMULE_ECC_REG_OFFS 0x90 +#define DATA_CORR_ERR 0x00 +#define DATA_UNCORR_ERR 0x04 +#define METADATA_CORR_ERR 0x08 +#define METADATA_UNCORR_ERR 0x0c + +// OPs definition +#define MATMUL 0x0 +#define GEMM 0x1 +#define ADDMAX 0x2 +#define ADDMIN 0x3 +#define MULMAX 0x4 +#define MULMIN 0x5 +#define MAXMIN 0x6 +#define MINMAX 0x7 + +// GEMM formats +#define Float8 0x0 +#define Float16 0x1 +#define Float8Alt 0x2 +#define Float16Alt 0x3 + +#define RNE 0x0 +#define RTZ 0x1 +#define OP_FMADD 0x0 +#define OP_ADD 0x2 +#define OP_MUL 0x3 +#define OP_MINMAX 0x7 + +// FP Formats encoding +#define FP16 0x2 +#define FP8 0x3 +#define FP16ALT 0x4 +#define FP8ALT 0x5 + +/* DMA Archi */ +#define DMA_TX 0 +#define DMA_RX 1 +#define DMA_INC 1 + +#define PLP_DMA_TYPE_BIT 0x00000011 +#define PLP_DMA_INCR_BIT 0x00000012 +#define PLP_DMA_2D_BIT 0x00000013 +#define PLP_DMA_ELE_BIT 0x00000014 +#define PLP_DMA_ILE_BIT 0x00000015 +#define PLP_DMA_BLE_BIT 0x00000016 +#define PLP_DMA_2D_TCDM_BIT 0x0000017 + +#endif diff --git a/hwpe/redmule_256iter/hal_redmule.h b/hwpe/redmule_256iter/hal_redmule.h new file mode 100644 index 0000000..8fc5000 --- /dev/null +++ b/hwpe/redmule_256iter/hal_redmule.h @@ -0,0 +1,556 @@ +/* + * Copyright (C) 2022-2023 ETH Zurich and University of Bologna + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * SPDX-License-Identifier: Apache-2.0 + * + * Author: Yvan Tortorella + * + * RedMulE Hardware Abstraction Layer (HAL) + */ + +#ifndef __HAL_REDMULE_H__ +#define __HAL_REDMULE_H__ + +#include +#include "inc/x_input.h" +#include "inc/w_input.h" +#include "inc/y_input.h" +#include "inc/z_output.h" +#include "inc/golden.h" +#include "inc/tensor_dim.h" + +/* + * + * For control, generic configuration register layout, + * and job-dependent register map, look at redmule_archi.h + * + */ + +// For all the following functions we use __builtin_pulp_OffsetedWrite and __builtin_pulp_OffsetedRead +// instead of classic load/store because otherwise the compiler is not able to correctly factorize +// the HWPE base in case several accesses are done, ending up with twice more code + +#define HWPE_WRITE(value, offset) *(int *)(ARCHI_CLUST_HWPE_BASE + offset) = value +#define HWPE_READ(offset) *(int *)(ARCHI_CLUST_HWPE_BASE + offset) + +static inline void redmule_x_add_set (unsigned int value) { + HWPE_WRITE(value, REDMULE_REG_OFFS + REDMULE_REG_X_PTR); +} + +static inline void redmule_w_add_set (unsigned int value) { + HWPE_WRITE(value, REDMULE_REG_OFFS + REDMULE_REG_W_PTR); +} + +static inline void redmule_y_add_set (unsigned int value) { + HWPE_WRITE(value, REDMULE_REG_OFFS + REDMULE_REG_Y_PTR); +} + +static inline void redmule_z_add_set (unsigned int value) { + HWPE_WRITE(value, REDMULE_REG_OFFS + REDMULE_REG_Z_PTR); +} + +// static inline void redmule_mcfg_set (uint32_t mcfg0, uint32_t mcfg1) { +// HWPE_WRITE(mcfg0, REDMULE_REG_OFFS + REDMULE_MCFG0_PTR); +// HWPE_WRITE(mcfg1, REDMULE_REG_OFFS + REDMULE_MCFG1_PTR); +// } +// +// static inline void redmule_arith_set (uint32_t arith) { +// HWPE_WRITE(arith, REDMULE_REG_OFFS + REDMULE_ARITH_PTR); +// } + +static inline void hwpe_trigger_job() { + HWPE_WRITE(0, REDMULE_TRIGGER); +} + +static inline int hwpe_acquire_job() { + return HWPE_READ(REDMULE_ACQUIRE); +} + +static inline unsigned int hwpe_get_status() { + return HWPE_READ(REDMULE_STATUS); +} + +static inline unsigned int hwpe_get_running_job() { + return HWPE_READ(REDMULE_RUNNING_JOB); +} + +static inline void hwpe_soft_clear() { + HWPE_WRITE(0, REDMULE_SOFT_CLEAR); +} + +static inline void hwpe_cg_enable() { + *(volatile int*) (ARCHI_CLUST_CTRL_BASE + CLUST_CTRL_HWPE_EN) |= CLUST_CTRL_HWPE_EN_MASK; +} + +static inline void hwpe_cg_disable() { + *(volatile int*) (ARCHI_CLUST_CTRL_BASE + CLUST_CTRL_HWPE_EN) &= ~CLUST_CTRL_HWPE_EN_MASK; +} + +static inline void redmule_evt_wait() { + do { + eu_evt_maskWaitAndClr (1 << ARCHI_CL_HWPE_EVT0); + } while((*(int volatile *)(ARCHI_CLUST_HWPE_BASE + REDMULE_STATUS)) != 0); +} + +static inline int hwpe_wait_acquire() { + int job_id = hwpe_acquire_job(); + while(job_id < 0) { + eu_evt_maskWaitAndClr (1 << ARCHI_CL_HWPE_EVT0); + job_id = hwpe_acquire_job(); + } + return job_id; +} + +static inline unsigned int redmule_get_data_correctable_count () { + return HWPE_READ(REDMULE_ECC_REG_OFFS + DATA_CORR_ERR); +} + +static inline unsigned int redmule_get_data_uncorrectable_count () { + return HWPE_READ(REDMULE_ECC_REG_OFFS + DATA_UNCORR_ERR); +} + +static inline unsigned int redmule_get_meta_correctable_count () { + return HWPE_READ(REDMULE_ECC_REG_OFFS + METADATA_CORR_ERR); +} + +static inline unsigned int redmule_get_meta_uncorrectable_count () { + return HWPE_READ(REDMULE_ECC_REG_OFFS + METADATA_UNCORR_ERR); +} + +/* DMA APIs */ +static inline int mchan_alloc(){ + return *(volatile int*) DMA_COMMAND_QUEUE; +} + +static inline void mchan_transfer(unsigned int len, + unsigned int ext_addr, + unsigned int tcdm_addr) { + + *(volatile int*) DMA_COMMAND_QUEUE = len | + (DMA_RX << PLP_DMA_TYPE_BIT) | + (DMA_INC << PLP_DMA_INCR_BIT) | + (0 << PLP_DMA_2D_BIT) | + (1 << PLP_DMA_ELE_BIT) | + (1 << PLP_DMA_ILE_BIT) | + (0 << PLP_DMA_BLE_BIT) | + (0 << PLP_DMA_2D_TCDM_BIT); + *(volatile int*) DMA_COMMAND_QUEUE = tcdm_addr; + *(volatile int*) DMA_COMMAND_QUEUE = ext_addr; +} + +static inline void mchan_barrier(int id) { + while(((*(volatile int*)(DMA_STATUS_REGISTER)) >> id ) & 0x1 ) { + eu_evt_maskWaitAndClr(1 << FC_DMA_EVENT); + } +} + +static inline void mchan_free(int id) { + *(volatile int*) DMA_STATUS_REGISTER = 0x1 << id; +} + +// void redmule_cfg (unsigned int x, unsigned int w, unsigned int z, +// uint16_t m_size, uint16_t n_size, uint16_t k_size, +// uint8_t gemm_op, uint8_t gemm_fmt){ +// +// uint32_t mcfg_reg0 = 0; +// uint32_t mcfg_reg1 = 0; +// uint32_t arith_reg = 0; +// +// mcfg_reg0 = (k_size << 16) | +// (m_size << 0); +// mcfg_reg1 = n_size << 0; +// +// arith_reg = (gemm_op << 10) | +// (gemm_fmt << 7); +// +// redmule_x_add_set ((unsigned int) x); +// redmule_w_add_set ((unsigned int) w); +// redmule_z_add_set ((unsigned int) z); +// redmule_mcfg_set ((unsigned int) mcfg_reg0, +// (unsigned int) mcfg_reg1); +// redmule_arith_set ((unsigned int) arith_reg); +// +// } + +void redmule_cfg (uint16_t m_size, uint16_t n_size, uint16_t k_size, uint8_t gemm_ops){ + uint32_t x_iters = 0; + uint32_t w_iters = 0; + uint32_t leftovers = 0; + uint32_t left_params = 0; + uint32_t x_d1_stride = 0; + uint32_t x_rows_offs = 0; + uint32_t w_tot_len = 0; + uint32_t w_d1_len = 0; + uint32_t w_d0_stride = 0; + uint32_t yz_tot_len = 0; + uint32_t yz_d0_stride = 0; + uint32_t yz_d2_stride = 0; + uint32_t tot_x_read = 0; + uint32_t x_buffer_slots = 0; + uint32_t op_selection = 0; + uint16_t tot_stores = 0; + uint16_t w_rows = n_size; + uint16_t depth = DATA_WIDTH/(ARRAY_HEIGHT*FPFORMAT); + uint8_t tile = ARRAY_HEIGHT*(PIPE_REGS + 1); + _Bool x_rows_sub = 0; + _Bool x_cols_sub = 0; + _Bool w_cols_sub = 0; + uint16_t x_rows_iter, + x_rows_iter_tmp, + w_rows_iter, + w_rows_iter_tmp; + uint16_t x_cols_iter, + x_cols_iter_tmp, + w_cols_iter, + w_cols_iter_tmp; + uint8_t x_rows_lftovr, + x_cols_lftovr, + w_rows_lftovr, + w_cols_lftovr, + slots; + + // Calculating the number of iterations alng the two dimensions of the X matrix + x_rows_iter_tmp = m_size/ARRAY_WIDTH; + x_cols_iter_tmp = n_size/tile; + + // Calculating the number of iterations alng the two dimensions of the W matrix + w_rows_iter_tmp = w_rows; + w_cols_iter_tmp = k_size/tile; + + // Calculating the residuals along the input dimensions + x_rows_lftovr = m_size - (x_rows_iter_tmp*ARRAY_WIDTH); + x_cols_lftovr = n_size - (x_cols_iter_tmp*tile); + + // Calculating the residuals along the weight dimensions + w_rows_lftovr = n_size - (ARRAY_HEIGHT*(w_rows/ARRAY_HEIGHT)); + w_cols_lftovr = k_size - (w_cols_iter_tmp*tile); + + if (w_cols_lftovr != 0) + w_cols_iter = w_cols_iter_tmp + 1; + else + w_cols_iter = w_cols_iter_tmp; + + if (w_rows_lftovr != 0) + w_rows_iter = w_rows_iter_tmp + ARRAY_HEIGHT - w_rows_lftovr; + else + w_rows_iter = w_rows_iter_tmp; + + if (x_cols_lftovr != 0) + x_cols_iter = x_cols_iter_tmp + 1; + else + x_cols_iter = x_cols_iter_tmp; + + if (x_rows_lftovr != 0) + x_rows_iter = x_rows_iter_tmp + 1; + else + x_rows_iter = x_rows_iter_tmp; + + if (x_cols_lftovr%depth != 0) + x_buffer_slots = x_cols_lftovr/depth + 1; + else + x_buffer_slots = x_cols_lftovr/depth; + + // Calculating the number of total stores + tot_stores = x_rows_iter*w_cols_iter; + + // Determining if input matrixes are sub-matrixes + if (m_size < ARRAY_WIDTH) + x_rows_sub = 1; + if (n_size < ARRAY_HEIGHT) + x_cols_sub = 1; + if (k_size < tile) + w_cols_sub = 1; + + // Operation selection + switch (gemm_ops) { + case MATMUL: + op_selection |= (RNE << 29 | RNE << 26 | OP_FMADD << 22 | OP_MINMAX << 18 | SRC_FMT << 15 | DST_FMT << 12) | 0; + break; + + case GEMM: + op_selection |= (RNE << 29 | RNE << 26 | OP_FMADD << 22 | OP_MINMAX << 18 | SRC_FMT << 15 | DST_FMT << 12) | 1; + break; + + case ADDMAX: + op_selection |= (RNE << 29 | RTZ << 26 | OP_ADD << 22 | OP_MINMAX << 18 | SRC_FMT << 15 | DST_FMT << 12) | 1; + break; + + case ADDMIN: + op_selection |= (RNE << 29 | RNE << 26 | OP_ADD << 22 | OP_MINMAX << 18 | SRC_FMT << 15 | DST_FMT << 12) | 1; + break; + + case MULMAX: + op_selection |= (RNE << 29 | RTZ << 26 | OP_MUL << 22 | OP_MINMAX << 18 | SRC_FMT << 15 | DST_FMT << 12) | 1; + break; + + case MULMIN: + op_selection |= (RNE << 29 | RNE << 26 | OP_MUL << 22 | OP_MINMAX << 18 | SRC_FMT << 15 | DST_FMT << 12) | 1; + break; + + case MAXMIN: + op_selection |= (RTZ << 29 | RNE << 26 | OP_MINMAX << 22 | OP_MINMAX << 18 | SRC_FMT << 15 | DST_FMT << 12) | 1; + break; + + case MINMAX: + op_selection |= (RNE << 29 | RTZ << 26 | OP_MINMAX << 22 | OP_MINMAX << 18 | SRC_FMT << 15 | DST_FMT << 12) | 1; + break; + } + + // Storing iterations and residuals in registers + x_iters |= x_rows_iter << 16 | x_cols_iter << 0; + w_iters |= w_rows_iter << 16 | w_cols_iter << 0; + leftovers |= x_rows_lftovr << 24 | x_cols_lftovr << 16 | w_rows_lftovr << 8 | w_cols_lftovr << 0; + left_params |= tot_stores << 16 | x_rows_sub << 15 | x_cols_sub << 14 | w_cols_sub << 13; + x_d1_stride = ((4*FPFORMAT)/ADDR_WIDTH)*(((DATA_WIDTH/FPFORMAT)*x_cols_iter_tmp) + x_cols_lftovr); + x_rows_offs = ARRAY_WIDTH*x_d1_stride; + w_tot_len = w_rows_iter*w_cols_iter*x_rows_iter; + w_d0_stride = ((4*FPFORMAT)/ADDR_WIDTH)*(((DATA_WIDTH/FPFORMAT)*w_cols_iter_tmp) + w_cols_lftovr); + yz_tot_len = ARRAY_WIDTH*x_rows_iter*w_cols_iter; + yz_d0_stride = w_d0_stride; + yz_d2_stride = ARRAY_WIDTH*w_d0_stride; + tot_x_read = x_rows_iter*x_cols_iter*w_cols_iter; + + // Writing the computations in configuration register + HWPE_WRITE(x_iters , REDMULE_REG_OFFS + REDMULE_REG_X_ITER_PTR ); + HWPE_WRITE(w_iters , REDMULE_REG_OFFS + REDMULE_REG_W_ITER_PTR ); + HWPE_WRITE(leftovers , REDMULE_REG_OFFS + REDMULE_REG_LEFTOVERS_PTR ); + HWPE_WRITE(left_params , REDMULE_REG_OFFS + REDMULE_REG_LEFT_PARAMS_PTR ); + HWPE_WRITE(x_d1_stride , REDMULE_REG_OFFS + REDMULE_REG_X_D1_STRIDE_PTR ); + HWPE_WRITE(x_rows_offs , REDMULE_REG_OFFS + REDMULE_REG_X_ROWS_OFFS_PTR ); + HWPE_WRITE(tot_x_read , REDMULE_REG_OFFS + REDMULE_REG_TOT_X_READ_PTR ); + HWPE_WRITE(x_buffer_slots, REDMULE_REG_OFFS + REDMULE_REG_X_BUFFER_SLOTS_PTR ); + HWPE_WRITE(w_tot_len , REDMULE_REG_OFFS + REDMULE_REG_W_TOT_LEN_PTR ); + HWPE_WRITE(w_d0_stride , REDMULE_REG_OFFS + REDMULE_REG_W_D0_STRIDE_PTR ); + HWPE_WRITE(yz_tot_len , REDMULE_REG_OFFS + REDMULE_REG_YZ_TOT_LEN_PTR ); + HWPE_WRITE(yz_d0_stride , REDMULE_REG_OFFS + REDMULE_REG_YZ_D0_STRIDE_PTR ); + HWPE_WRITE(yz_d2_stride , REDMULE_REG_OFFS + REDMULE_REG_YZ_D2_STRIDE_PTR ); + HWPE_WRITE(op_selection , REDMULE_REG_OFFS + REDMULE_REG_OP_SELECTION ); +} + +void generate_test_data16(int x_start_addr, + int w_start_addr, + int y_start_addr, + int m_size, + int n_size, + int k_size) { + + int x_addr = x_start_addr; + int w_addr = w_start_addr; + int y_addr = y_start_addr; + int x_end_addr = x_start_addr + (2*m_size*n_size); + int w_end_addr = w_start_addr + (2*n_size*k_size); + int y_end_addr = y_start_addr + (2*m_size*k_size); + + // Generating input stimuli from golden model + for (x_addr = x_start_addr; x_addr < x_end_addr; x_addr += 2) { + int x = x_addr - x_start_addr; + *(uint32_t *)(x_addr) = x_inp[x/2]; + } + + // Generating Weight stimuli from golden model + for (w_addr = w_start_addr; w_addr < w_end_addr; w_addr += 2) { + int w = w_addr - w_start_addr; + *(uint32_t *)(w_addr) = w_inp[w/2]; + } + + for (y_addr = y_start_addr; y_addr < y_end_addr; y_addr += 2) { + int y = y_addr - y_start_addr; + *(uint32_t *)(y_addr) = y_inp[y/2]; + } +} + +int redmule_compare16 (int z_start_addr, int m_size, int k_size) { + int err = 0; + int z_end_addr = z_start_addr + 2*m_size*k_size; + uint16_t z_computed; + uint16_t diff, diff_1, diff_2; + + for (int z_addr = z_start_addr; z_addr < z_end_addr; z_addr += 2) { + int z = z_addr - z_start_addr; + z_computed = *(uint32_t *)(z_addr); + + if ( z_computed != z_oup[z/2] ) { + diff_1 = z_computed - z_oup[z/2]; + if (diff_1 > 3) { + diff_2 = z_oup[z/2] - z_computed; + if (diff_2 > 3) { + err++; + } + } + } + } + + return err; + +} + +int redmule16_compare_int(uint32_t *actual_z, uint32_t *golden_z, int len) { + #define ERR 0x0011 + uint32_t actual_word = 0; + uint16_t actual_MSHWord, actual_LSHWord; + uint32_t golden_word = 0; + uint16_t golden_MSHWord, golden_LSHWord; + uint32_t actual = 0; + uint32_t golden = 0; + + int errors = 0; + int error; + + for (int i=0; i golden_LSHWord) ? (actual_LSHWord - golden_LSHWord) : 0; + diff = (actual_LSHWord < golden_LSHWord) ? (golden_LSHWord - actual_LSHWord) : 0; + + if (diff > ERR) { + error = 1; + #ifdef VERBOSE + tfp_printf ("diff: 0x%08x\n", diff); + tfp_printf ("LSW: Error!\n"); + #endif + } + + // Checking Most Significant Half-Word + actual_MSHWord = (uint16_t)((actual_word >> 16) & 0x0000FFFF); + golden_MSHWord = (uint16_t)((golden_word >> 16) & 0x0000FFFF); + + diff = (actual_MSHWord > golden_MSHWord) ? (actual_MSHWord - golden_MSHWord) : 0; + diff = (actual_MSHWord < golden_MSHWord) ? (golden_MSHWord - actual_MSHWord) : 0; + + if (diff > ERR) { + error = 1; + #ifdef VERBOSE + tfp_printf ("diff: 0x%08x\n", diff); + tfp_printf ("MSW: Error!\n"); + #endif + } + + errors += error; + + #ifdef DEBUG + tfp_printf(" Golden: 0x%08x; Actual: 0x%08x,\n", golden_word, actual_word); + #endif + + #ifdef VERBOSE + if(error) { + if(errors==1) tfp_printf(" golden <- actual @ address @ index\n"); + tfp_printf(" 0x%08x <- 0x%08x @ 0x%08x @ 0x%08x\n", golden_word, actual_word, (actual_z+i), i*4); + } + #endif + } + return errors; +} + +int redmule8_compare_int(uint32_t *actual_z, uint32_t *golden_z, int len) { + #define ERR 0x0011 + uint32_t actual_word = 0; + uint8_t actual_Byte0, + actual_Byte1, + actual_Byte2, + actual_Byte3; + uint32_t golden_word = 0; + uint8_t golden_Byte0, + golden_Byte1, + golden_Byte2, + golden_Byte3; + uint32_t actual = 0; + uint32_t golden = 0; + + int errors = 0; + int error; + + for (int i=0; i golden_Byte0) ? (actual_Byte0 - golden_Byte0) : 0; + diff = (actual_Byte0 < golden_Byte0) ? (golden_Byte0 - actual_Byte0) : 0; + + if (diff > ERR) { + error = 1; + tfp_printf ("diff: 0x%08x\n", diff); + tfp_printf ("Byte0: Error!\n"); + } + + // Cheching Byte1 + actual_Byte1 = (uint8_t)( (actual_word >> 8 ) & 0x000000FF); + golden_Byte1 = (uint8_t)( (golden_word >> 8 ) & 0x000000FF); + + diff = (actual_Byte1 > golden_Byte1) ? (actual_Byte1 - golden_Byte1) : 0; + diff = (actual_Byte1 < golden_Byte1) ? (golden_Byte1 - actual_Byte1) : 0; + + if (diff > ERR) { + error = 1; + tfp_printf ("diff: 0x%08x\n", diff); + tfp_printf ("Byte1: Error!\n"); + } + + // Cheching Byte2 + actual_Byte2 = (uint8_t)( (actual_word >> 16 ) & 0x000000FF); + golden_Byte2 = (uint8_t)( (golden_word >> 16 ) & 0x000000FF); + + diff = (actual_Byte2 > golden_Byte2) ? (actual_Byte2 - golden_Byte2) : 0; + diff = (actual_Byte2 < golden_Byte2) ? (golden_Byte2 - actual_Byte2) : 0; + + if (diff > ERR) { + error = 1; + tfp_printf ("diff: 0x%08x\n", diff); + tfp_printf ("Byte2: Error!\n"); + } + + // Cheching Byte3 + actual_Byte3 = (uint8_t)( (actual_word >> 24 ) & 0x000000FF); + golden_Byte3 = (uint8_t)( (golden_word >> 24 ) & 0x000000FF); + + diff = (actual_Byte3 > golden_Byte3) ? (actual_Byte3 - golden_Byte3) : 0; + diff = (actual_Byte3 < golden_Byte3) ? (golden_Byte3 - actual_Byte3) : 0; + + if (diff > ERR) { + error = 1; + tfp_printf ("diff: 0x%08x\n", diff); + tfp_printf ("Byte3: Error!\n"); + } + + errors += error; + + #ifdef DEBUG + tfp_printf(" Golden: 0x%08x; Actual: 0x%08x,\n", golden_word, actual_word); + #endif + + #ifdef VERBOSE + if(error) { + if(errors==1) tfp_printf(" golden <- actual @ address @ index\n"); + tfp_printf(" 0x%08x <- 0x%08x @ 0x%08x @ 0x%08x\n", golden_word, actual_word, (actual_z+i), i*4); + } + #endif + } + return errors; +} + +#endif diff --git a/hwpe/redmule_256iter/inc/golden.h b/hwpe/redmule_256iter/inc/golden.h new file mode 100644 index 0000000..f664e47 --- /dev/null +++ b/hwpe/redmule_256iter/inc/golden.h @@ -0,0 +1,387 @@ + /* Header file generated by RedMulE Golden Model */ +uint32_t golden [384] = { +0x48974845, +0x48384608, +0x487b4855, +0x48804869, +0x48b046d1, +0x483f48db, +0x485f48c9, +0x483a4881, +0x472c484b, +0x492b4762, +0x48fd4822, +0x492e488e, +0x484f483e, +0x46d749e8, +0x489d484b, +0x47e9490b, +0x47d2484f, +0x474744be, +0x46c047c7, +0x48af4727, +0x482d46c5, +0x482e483d, +0x479f4897, +0x4749488b, +0x46a8489a, +0x488b46f2, +0x47e84891, +0x483d4872, +0x46fd4716, +0x46a049b5, +0x47a446e7, +0x476748a1, +0x49354939, +0x48c14703, +0x48bd4863, +0x48cf4913, +0x48b848b6, +0x49204946, +0x48e1495e, +0x48b24938, +0x4882493a, +0x49d5483b, +0x49724911, +0x49df496b, +0x488848f2, +0x48214a46, +0x490c48c1, +0x48a349b2, +0x47b0463a, +0x476244cb, +0x46b94765, +0x4814466a, +0x47964631, +0x474b4666, +0x47044798, +0x47614838, +0x459047d3, +0x48a245ea, +0x484447f1, +0x4776484b, +0x46d847d6, +0x44d348f3, +0x478d46fa, +0x466e481e, +0x481e4827, +0x479445a2, +0x48064727, +0x48d5475d, +0x48284708, +0x480d4862, +0x48324895, +0x47f148bd, +0x46a7482a, +0x492d47b1, +0x4884484d, +0x485f48dc, +0x480c476d, +0x46d348e9, +0x48844728, +0x480e48a0, +0x48134862, +0x485a4675, +0x473847e8, +0x48234836, +0x482146e7, +0x47b34822, +0x48554846, +0x47174863, +0x47c14872, +0x488e46d5, +0x485f47e2, +0x48b8487c, +0x4788481e, +0x467748bd, +0x47f846c9, +0x47fc48fe, +0x47b247a0, +0x467e4588, +0x46c74662, +0x481246e8, +0x474e4536, +0x468f46c0, +0x4679481f, +0x46e246a1, +0x45604809, +0x47eb4630, +0x475746b5, +0x477f4848, +0x46d846a6, +0x459a4870, +0x46784670, +0x468c47d2, +0x48c44762, +0x479146e3, +0x486d46b1, +0x486747d0, +0x47f6468d, +0x475648a5, +0x48544857, +0x48384866, +0x46ec484d, +0x48f647d2, +0x4879484a, +0x483c4848, +0x4806471d, +0x473048fa, +0x47b84768, +0x46f94865, +0x491848a8, +0x486746ca, +0x48624800, +0x491048d3, +0x4849474e, +0x486b48eb, +0x48c54966, +0x483048f4, +0x477848f9, +0x499e481e, +0x48f148cf, +0x49234982, +0x47cf487c, +0x464949ea, +0x495e4773, +0x483f48b2, +0x497548a7, +0x481e4616, +0x4866481f, +0x486448b6, +0x487347dc, +0x487f485c, +0x491f4938, +0x48b6490d, +0x48a148f8, +0x492d4859, +0x4915489c, +0x48874899, +0x4859486c, +0x471e49ca, +0x49184867, +0x482748d3, +0x4998488b, +0x481d4704, +0x488048b8, +0x49444876, +0x48f2470c, +0x489b48b9, +0x48e54956, +0x48a548d6, +0x485648dc, +0x49ab484e, +0x490e48e0, +0x494548dd, +0x48dd488b, +0x47ea4a32, +0x49114835, +0x48194965, +0x481e460e, +0x4673452c, +0x4717475c, +0x46d046f6, +0x46bc4696, +0x481e4726, +0x46ea4763, +0x475846fe, +0x4627478b, +0x483f4704, +0x47b146ad, +0x48164792, +0x468446f2, +0x45a84827, +0x47a4472f, +0x462b4797, +0x48ab483f, +0x4863468f, +0x4766485a, +0x48cb481d, +0x490347dc, +0x483048fc, +0x483e48cc, +0x486448ab, +0x47634966, +0x499d4794, +0x488b488e, +0x496048dc, +0x484c4854, +0x474c499c, +0x48bc4826, +0x48834949, +0x4905489d, +0x481e4718, +0x48f448e3, +0x490448c1, +0x48b347e8, +0x48d44892, +0x489448ff, +0x488648d5, +0x480348fa, +0x492e47d2, +0x48b24870, +0x492b48e5, +0x4785487b, +0x471d49e3, +0x48bf4837, +0x48c4489b, +0x4871475c, +0x4811464a, +0x471c47af, +0x48174817, +0x484e463b, +0x464f477f, +0x487c4704, +0x472547a3, +0x462a4853, +0x4860465a, +0x48804736, +0x482b47e1, +0x46c04811, +0x475d48dc, +0x48064668, +0x46f44893, +0x49594858, +0x487b463d, +0x484e480f, +0x48a648c0, +0x48944847, +0x484a48a0, +0x48f4491e, +0x48b548fc, +0x47d248ce, +0x497f47db, +0x49394955, +0x48ce48a7, +0x48844890, +0x476349d6, +0x4922486e, +0x48c348f4, +0x491c47ec, +0x47834698, +0x47544715, +0x47524745, +0x4832472f, +0x48094817, +0x48c347f8, +0x480047e6, +0x473048b6, +0x48cb480a, +0x488e479e, +0x488e47c2, +0x47ee472f, +0x4744489d, +0x48514755, +0x47d34846, +0x48a04838, +0x47624634, +0x48064786, +0x482d47e3, +0x486c4726, +0x480347b7, +0x481448ac, +0x483948e0, +0x47504827, +0x48c546f2, +0x4886483f, +0x485648ad, +0x47a947e8, +0x47434937, +0x481f46d0, +0x4804484c, +0x481f47fd, +0x4813456d, +0x4807474d, +0x480e4688, +0x481046e8, +0x4799469f, +0x478f4853, +0x482447f2, +0x471f47d0, +0x485f46da, +0x481c4813, +0x4863482e, +0x480b4786, +0x46b848c9, +0x46e2475a, +0x46c54852, +0x480245af, +0x46c24466, +0x4743465d, +0x47ba46b7, +0x46c34636, +0x47844677, +0x47c2485a, +0x46ac46dc, +0x460e47de, +0x4834465f, +0x476947f4, +0x481046fc, +0x45ea45fd, +0x45b548d0, +0x47834704, +0x46c44830, +0x47c74759, +0x45b0453d, +0x47024741, +0x47934736, +0x47ba461b, +0x46dd470b, +0x470b4657, +0x4710470d, +0x468f486c, +0x46ba45c3, +0x483b479d, +0x477446c9, +0x46a746a9, +0x46064833, +0x46a94690, +0x46a746f5, +0x48bb47ac, +0x4803452c, +0x4824470f, +0x48cb47d5, +0x484a4707, +0x47974832, +0x482c4851, +0x4877487a, +0x465d4891, +0x48ce47f4, +0x48994898, +0x486a484e, +0x47f047ac, +0x4611493e, +0x489e47e2, +0x46af488c, +0x48364665, +0x46b645e4, +0x46b946a1, +0x46dd46c8, +0x474b4658, +0x4777467b, +0x47984769, +0x475e4785, +0x4656472a, +0x488145fb, +0x472d46fc, +0x47a3476e, +0x46ca465d, +0x45004855, +0x479a464f, +0x473846c3, +0x486c481e, +0x48014659, +0x477a4756, +0x487b47d5, +0x48084706, +0x4838484f, +0x48634870, +0x480648d3, +0x47714865, +0x494c46be, +0x484c4915, +0x48624900, +0x46e8481a, +0x46a04974, +0x483d4775, +0x480e487c, +}; \ No newline at end of file diff --git a/hwpe/redmule_256iter/inc/tensor_dim.h b/hwpe/redmule_256iter/inc/tensor_dim.h new file mode 100644 index 0000000..21bd0d8 --- /dev/null +++ b/hwpe/redmule_256iter/inc/tensor_dim.h @@ -0,0 +1,13 @@ + /* Header file generated by RedMulE Golden Model */ +#ifndef __TENSOR_DIM__ +#define __TENSOR_DIM__ + +#define M_SIZE 24 +#define N_SIZE 32 +#define K_SIZE 32 +#define SRC_FMT FP16 +#define DST_FMT FP16 +#define FPFORMAT 16 +uint8_t gemm_ops = GEMM; + +#endif diff --git a/hwpe/redmule_256iter/inc/w_2D.h b/hwpe/redmule_256iter/inc/w_2D.h new file mode 100644 index 0000000..9409c64 --- /dev/null +++ b/hwpe/redmule_256iter/inc/w_2D.h @@ -0,0 +1,35 @@ + /* Header file generated by RedMulE Golden Model */ +uint16_t w_inp_2D [32][32] = { +0x311a, 0x39e0, 0x387d, 0x3a4a, 0x386f, 0x3ada, 0x392f, 0x3854, 0x3014, 0x2fd2, 0x31c9, 0x2fca, 0x2e55, 0x3bc8, 0x396d, 0x3b1d, 0x39f6, 0x333a, 0x3908, 0x3628, 0x3bab, 0x3b8b, 0x3b4a, 0x322d, 0x3925, 0x317a, 0x3725, 0x31c2, 0x3066, 0x38f3, 0x3a17, 0x3476, +0x3bda, 0x3196, 0x3922, 0x3680, 0x396a, 0x3021, 0x3761, 0x374d, 0x2fc2, 0x3967, 0x3b94, 0x33b5, 0x3797, 0x34d6, 0x3655, 0x2176, 0x39bc, 0x3999, 0x3658, 0x3904, 0x3759, 0x2ade, 0x3a5a, 0x3b78, 0x36c7, 0x2d01, 0x3b58, 0x2d9a, 0x373d, 0x3952, 0x38e8, 0x3887, +0x37b6, 0x3a88, 0x2f8a, 0x2d79, 0x3413, 0x3421, 0x3976, 0x32b2, 0x3446, 0x2d99, 0x3a56, 0x3322, 0x3b49, 0x39fa, 0x3acd, 0x3af6, 0x304c, 0x3abb, 0x3a83, 0x38b2, 0x3ab9, 0x363e, 0x389f, 0x31bb, 0x38e1, 0x3bc4, 0x3b9b, 0x2984, 0x3a43, 0x3b2f, 0x35d6, 0x3bda, +0x2df3, 0x3bf8, 0x2acc, 0x378b, 0x3555, 0x2e59, 0x31d4, 0x34ec, 0x3a46, 0x3bab, 0x3214, 0x3161, 0x3470, 0x3a03, 0x368e, 0x31ad, 0x27cb, 0x2ecb, 0x3422, 0x39f7, 0x3644, 0x3a77, 0x313f, 0x34f2, 0x39b3, 0x3bf2, 0x379a, 0x3456, 0x35fe, 0x3ae7, 0x3964, 0x385f, +0x3b16, 0x3999, 0x3833, 0x2eda, 0x3afd, 0x3a4a, 0x3ba2, 0x2bd4, 0x3b38, 0x31a2, 0x32dd, 0x353c, 0x366f, 0x375e, 0x3821, 0x367a, 0x3b44, 0x39e6, 0x3787, 0x339e, 0x39d7, 0x38c6, 0x37d5, 0x342f, 0x3984, 0x319b, 0x33b5, 0x35ab, 0x398a, 0x374e, 0x36b6, 0x3b21, +0x3bbb, 0x2ab3, 0x2ad5, 0x33bc, 0x2bef, 0x3780, 0x3738, 0x3a0b, 0x3b09, 0x30ca, 0x384e, 0x3ab3, 0x39bd, 0x3453, 0x3a6d, 0x3957, 0x2c10, 0x30e9, 0x35d4, 0x3aef, 0x3be9, 0x39ad, 0x3a74, 0x3af9, 0x3739, 0x2d4d, 0x39fe, 0x3b72, 0x2c57, 0x398c, 0x381f, 0x3930, +0x3820, 0x321b, 0x3964, 0x2964, 0x33a0, 0x2d00, 0x2490, 0x336b, 0x3465, 0x3b2e, 0x3aa0, 0x371f, 0x300e, 0x3a09, 0x3bf1, 0x25cc, 0x3b6f, 0x3384, 0x3a88, 0x3acb, 0x3814, 0x36d0, 0x3081, 0x3a2c, 0x3353, 0x39cb, 0x31ed, 0x3af6, 0x3721, 0x36c7, 0x2ce2, 0x390d, +0x3698, 0x3ab2, 0x3b3e, 0x2eb4, 0x3998, 0x39e3, 0x3a77, 0x3632, 0x2c12, 0x3bd5, 0x3ba3, 0x3bba, 0x323c, 0x367b, 0x3557, 0x39c8, 0x37db, 0x3b45, 0x3b6e, 0x3931, 0x3121, 0x3a8d, 0x3a55, 0x3b9b, 0x358a, 0x3925, 0x3491, 0x3912, 0x3b6b, 0x3584, 0x32df, 0x3120, +0x32b2, 0x3b0a, 0x2cad, 0x3465, 0x3ad3, 0x3bcd, 0x363b, 0x3afe, 0x354b, 0x3374, 0x39af, 0x3b7f, 0x308c, 0x2e72, 0x3380, 0x3b70, 0x3902, 0x38d8, 0x39f3, 0x3a4b, 0x3853, 0x397b, 0x2ebe, 0x387f, 0x2845, 0x37e2, 0x360f, 0x370b, 0x3acb, 0x35d4, 0x36e6, 0x3262, +0x2e88, 0x3a54, 0x2ee3, 0x3575, 0x3afe, 0x2aee, 0x39a0, 0x3aae, 0x3693, 0x3432, 0x3834, 0x3b9b, 0x3bcb, 0x2e3a, 0x356d, 0x374e, 0x3924, 0x383c, 0x311e, 0x3ac5, 0x352d, 0x311e, 0x38ca, 0x34d4, 0x36ca, 0x34ed, 0x3a13, 0x33eb, 0x3639, 0x3828, 0x3b3c, 0x3939, +0x3837, 0x3521, 0x2cb5, 0x3629, 0x3924, 0x384c, 0x366a, 0x3bbf, 0x2e9e, 0x3ba8, 0x33ad, 0x38c8, 0x3934, 0x3907, 0x249a, 0x3690, 0x3a09, 0x3215, 0x3898, 0x325d, 0x37d5, 0x3195, 0x361c, 0x3ae4, 0x351f, 0x3452, 0x3bc0, 0x375c, 0x39bf, 0x317a, 0x3aae, 0x283a, +0x3476, 0x3b92, 0x3472, 0x383e, 0x280f, 0x39d6, 0x2fd1, 0x31f4, 0x2ffb, 0x3b97, 0x3692, 0x36c0, 0x3989, 0x33cf, 0x3ba6, 0x3239, 0x35d7, 0x33ab, 0x31eb, 0x3b47, 0x389b, 0x3b88, 0x3580, 0x354c, 0x3802, 0x3b9a, 0x3b94, 0x2a92, 0x2db1, 0x38bd, 0x2dfb, 0x3900, +0x344f, 0x3739, 0x27a5, 0x3b2e, 0x342b, 0x34bb, 0x30c8, 0x3ae8, 0x3b26, 0x3982, 0x38c0, 0x3408, 0x38c8, 0x36ef, 0x3bf0, 0x3acf, 0x3a3c, 0x3825, 0x31a5, 0x3ada, 0x3b5b, 0x37db, 0x3a01, 0x3663, 0x3a7d, 0x327b, 0x3a1f, 0x3862, 0x38af, 0x3204, 0x372e, 0x3b19, +0x3708, 0x3622, 0x2e62, 0x39ab, 0x2d4d, 0x31b4, 0x3552, 0x3bbc, 0x36f2, 0x36eb, 0x38ef, 0x3755, 0x3bbe, 0x2c17, 0x3815, 0x2f53, 0x363f, 0x38c1, 0x3246, 0x386b, 0x34de, 0x34e4, 0x3baa, 0x349e, 0x32ce, 0x3a68, 0x373f, 0x2cce, 0x3b36, 0x28ba, 0x3b50, 0x3232, +0x1f34, 0x3928, 0x35cd, 0x3b38, 0x30ce, 0x35a1, 0x3a06, 0x3a32, 0x3a53, 0x3489, 0x3241, 0x372f, 0x390c, 0x3a1b, 0x378a, 0x3713, 0x3769, 0x37a8, 0x3418, 0x3ad4, 0x3a4e, 0x3bf7, 0x37a5, 0x34dc, 0x39b2, 0x351b, 0x3372, 0x349f, 0x2f50, 0x3ab1, 0x3795, 0x2db7, +0x3864, 0x3157, 0x3900, 0x323e, 0x389e, 0x3880, 0x3b1f, 0x37a1, 0x396c, 0x2e43, 0x2c2a, 0x3b78, 0x3988, 0x3a14, 0x39c1, 0x3b51, 0x3780, 0x3bf2, 0x2d19, 0x3815, 0x3a5f, 0x3641, 0x2f62, 0x37d5, 0x3564, 0x139a, 0x3ab8, 0x28f7, 0x3785, 0x34e1, 0x3097, 0x3768, +0x3971, 0x3ae2, 0x32ae, 0x2fd5, 0x382a, 0x346c, 0x3133, 0x3167, 0x3940, 0x2d12, 0x389a, 0x3bd0, 0x3943, 0x391c, 0x3a75, 0x2a11, 0x391e, 0x372d, 0x3a79, 0x3b72, 0x3373, 0x39b7, 0x35d7, 0x372b, 0x3a6d, 0x38a1, 0x3279, 0x3434, 0x3694, 0x3b45, 0x3abb, 0x392d, +0x34a8, 0x3757, 0x32ca, 0x345d, 0x36a5, 0x3854, 0x2dcd, 0x30af, 0x38dd, 0x3067, 0x3411, 0x3997, 0x397a, 0x3a64, 0x38b8, 0x3962, 0x3509, 0x3bb6, 0x3a66, 0x339f, 0x372a, 0x31a8, 0x37da, 0x36ff, 0x33c6, 0x31da, 0x3977, 0x3b72, 0x3841, 0x3567, 0x3433, 0x33b8, +0x39fe, 0x3a10, 0x3bf2, 0x35e7, 0x3a4a, 0x3b3e, 0x2ec7, 0x3aa4, 0x3846, 0x3af9, 0x38a9, 0x2c1f, 0x39ab, 0x349f, 0x31d6, 0x39ae, 0x3b79, 0x352d, 0x3516, 0x347c, 0x2f33, 0x35ad, 0x31c4, 0x3b52, 0x354b, 0x3786, 0x3ab7, 0x3896, 0x34ac, 0x352f, 0x37e6, 0x326a, +0x2e44, 0x34c7, 0x388d, 0x3bf4, 0x363f, 0x3b3d, 0x33b1, 0x3b8b, 0x3340, 0x37f7, 0x3b07, 0x25bf, 0x398e, 0x3505, 0x3bd7, 0x366d, 0x388a, 0x2cc0, 0x359a, 0x3b9a, 0x3b99, 0x379d, 0x3b6b, 0x39b8, 0x3223, 0x2703, 0x3ba9, 0x2ecb, 0x3759, 0x39d8, 0x37ac, 0x32cf, +0x35f2, 0x38a3, 0x399e, 0x3bd2, 0x3780, 0x3af3, 0x3b5e, 0x337b, 0x3a08, 0x35da, 0x3446, 0x3b25, 0x3ad0, 0x3bee, 0x3141, 0x32d8, 0x34ce, 0x2ac9, 0x3800, 0x3a8a, 0x2d53, 0x368a, 0x3561, 0x3998, 0x35a3, 0x3677, 0x3ab2, 0x3269, 0x3236, 0x3b3e, 0x3aba, 0x3bac, +0x395d, 0x3820, 0x1df6, 0x3bb5, 0x35b5, 0x3675, 0x3b74, 0x360f, 0x34de, 0x3a0c, 0x3aeb, 0x299d, 0x3207, 0x3bd8, 0x2178, 0x3995, 0x3948, 0x3908, 0x3843, 0x2ea5, 0x3045, 0x3989, 0x345d, 0x39c5, 0x3a89, 0x3863, 0x3be0, 0x397a, 0x38f1, 0x39e2, 0x3b08, 0x352e, +0x385f, 0x28f2, 0x3bc3, 0x35e0, 0x380c, 0x3b9c, 0x3afc, 0x390a, 0x3689, 0x34fd, 0x2cf5, 0x308e, 0x342b, 0x3921, 0x3a67, 0x3ad6, 0x2986, 0x32fc, 0x35aa, 0x3507, 0x3608, 0x33fd, 0x3bf3, 0x39e2, 0x3b0f, 0x30b7, 0x3896, 0x3ae4, 0x2145, 0x35b6, 0x2e1d, 0x3ad1, +0x333d, 0x3afb, 0x2703, 0x3413, 0x1d7d, 0x3b7f, 0x3ae1, 0x303c, 0x3004, 0x39d3, 0x3554, 0x31a4, 0x354e, 0x3662, 0x39c5, 0x2eb7, 0x2c6e, 0x397f, 0x31d8, 0x1f0c, 0x38e3, 0x35f0, 0x2714, 0x28d1, 0x375e, 0x3a75, 0x3830, 0x3578, 0x397d, 0x3b18, 0x383c, 0x3498, +0x39ad, 0x3598, 0x23c4, 0x34ea, 0x3a61, 0x2b00, 0x3707, 0x3ae1, 0x37ae, 0x389d, 0x37fa, 0x3673, 0x3278, 0xf3e, 0x3809, 0x33c6, 0x3bf5, 0x3279, 0x3816, 0x360c, 0x39c8, 0x381f, 0x3741, 0x2d66, 0x38c0, 0x37d3, 0x377a, 0x3621, 0x2faf, 0x392e, 0x2de6, 0x33c5, +0x3803, 0x2600, 0x32e9, 0x39b4, 0x38d2, 0x34e8, 0x2fe6, 0x3199, 0x3643, 0x3a77, 0x27cc, 0x39d7, 0x34c6, 0x2ea8, 0x364e, 0x3b07, 0x31c7, 0x30a1, 0x31b1, 0x3b8f, 0x3571, 0x3b75, 0x3989, 0x3805, 0x39fb, 0x3945, 0x352b, 0x31d8, 0x3904, 0x3440, 0x3a57, 0x2cf7, +0x3b39, 0x2fcd, 0x2b89, 0x2edd, 0x3682, 0x36a9, 0x32c8, 0x37ac, 0x32a5, 0x3311, 0x394b, 0x3b84, 0x3aec, 0x3601, 0x2765, 0x3b69, 0x396b, 0x3727, 0x3bfe, 0x3907, 0x376f, 0x3674, 0x3973, 0x3671, 0x3491, 0x3993, 0x383f, 0x3335, 0x3989, 0x3550, 0x3077, 0x35f5, +0x3a59, 0x3950, 0x380c, 0x37cd, 0x30bf, 0x3607, 0x3afa, 0x3b5d, 0x32b9, 0x386b, 0x35bd, 0x3aca, 0x3ba5, 0x3b2d, 0x3b19, 0x3b8b, 0x345e, 0x2845, 0x34aa, 0x372a, 0x3448, 0x34f5, 0x3ae2, 0x3637, 0x2cb5, 0x354b, 0x3b15, 0x2ca8, 0x2641, 0x3178, 0x2cfe, 0x39b4, +0x3bdd, 0x3acb, 0x3a05, 0x38a2, 0x3b4a, 0x34e5, 0x395f, 0x394b, 0x34c4, 0x3aa5, 0x29bb, 0x2d96, 0x339d, 0x387c, 0x382e, 0x385a, 0x396b, 0x3aa9, 0x2f1e, 0x33a7, 0x3b90, 0x3b7b, 0x3b5f, 0x39d3, 0x3b18, 0x354f, 0x2cdb, 0x3a6f, 0x3434, 0x34ff, 0x3a5b, 0x3b84, +0x3a33, 0x384b, 0x2e67, 0x3b85, 0x3853, 0x380c, 0x346a, 0x3aaa, 0x3492, 0x33e8, 0x3bf2, 0x38ae, 0x3a29, 0x3830, 0x3221, 0x35b1, 0x3a48, 0x2c68, 0x2ced, 0x3a7e, 0x3539, 0x3922, 0x374c, 0x3aaa, 0x2dae, 0x395d, 0x3b3d, 0x3890, 0x2cfe, 0x2dd6, 0x3bad, 0x33c5, +0x2c07, 0x3a2c, 0x37a8, 0x390f, 0x2fc8, 0x35ae, 0x388c, 0x30ee, 0x3674, 0x391d, 0x3bfc, 0x36bf, 0x322d, 0x3a78, 0x35c0, 0x3492, 0x3ac8, 0x3504, 0x3315, 0x381d, 0x3a7a, 0x3a08, 0x343c, 0x3bda, 0x341b, 0x39f0, 0x3b9e, 0x395d, 0x3c00, 0x38ab, 0x3bcf, 0x3564, +0x33c4, 0x3b0d, 0x3623, 0x33b9, 0x3b92, 0x1e71, 0x2c57, 0x36d0, 0x314b, 0x3a16, 0x3372, 0x341b, 0x3aaa, 0x3444, 0x396b, 0x2dd7, 0x3b30, 0x3559, 0x3b5b, 0x3a29, 0x2d19, 0x38b7, 0x3b01, 0x3afa, 0x398a, 0x3839, 0x3ac9, 0x2e31, 0x3924, 0x39f2, 0x3a7f, 0x3285 +}; \ No newline at end of file diff --git a/hwpe/redmule_256iter/inc/w_input.h b/hwpe/redmule_256iter/inc/w_input.h new file mode 100644 index 0000000..dc4d3be --- /dev/null +++ b/hwpe/redmule_256iter/inc/w_input.h @@ -0,0 +1,35 @@ + /* Header file generated by RedMulE Golden Model */ +uint16_t w_inp [1024] = { +0x311a, 0x39e0, 0x387d, 0x3a4a, 0x386f, 0x3ada, 0x392f, 0x3854, 0x3014, 0x2fd2, 0x31c9, 0x2fca, 0x2e55, 0x3bc8, 0x396d, 0x3b1d, 0x39f6, 0x333a, 0x3908, 0x3628, 0x3bab, 0x3b8b, 0x3b4a, 0x322d, 0x3925, 0x317a, 0x3725, 0x31c2, 0x3066, 0x38f3, 0x3a17, 0x3476, +0x3bda, 0x3196, 0x3922, 0x3680, 0x396a, 0x3021, 0x3761, 0x374d, 0x2fc2, 0x3967, 0x3b94, 0x33b5, 0x3797, 0x34d6, 0x3655, 0x2176, 0x39bc, 0x3999, 0x3658, 0x3904, 0x3759, 0x2ade, 0x3a5a, 0x3b78, 0x36c7, 0x2d01, 0x3b58, 0x2d9a, 0x373d, 0x3952, 0x38e8, 0x3887, +0x37b6, 0x3a88, 0x2f8a, 0x2d79, 0x3413, 0x3421, 0x3976, 0x32b2, 0x3446, 0x2d99, 0x3a56, 0x3322, 0x3b49, 0x39fa, 0x3acd, 0x3af6, 0x304c, 0x3abb, 0x3a83, 0x38b2, 0x3ab9, 0x363e, 0x389f, 0x31bb, 0x38e1, 0x3bc4, 0x3b9b, 0x2984, 0x3a43, 0x3b2f, 0x35d6, 0x3bda, +0x2df3, 0x3bf8, 0x2acc, 0x378b, 0x3555, 0x2e59, 0x31d4, 0x34ec, 0x3a46, 0x3bab, 0x3214, 0x3161, 0x3470, 0x3a03, 0x368e, 0x31ad, 0x27cb, 0x2ecb, 0x3422, 0x39f7, 0x3644, 0x3a77, 0x313f, 0x34f2, 0x39b3, 0x3bf2, 0x379a, 0x3456, 0x35fe, 0x3ae7, 0x3964, 0x385f, +0x3b16, 0x3999, 0x3833, 0x2eda, 0x3afd, 0x3a4a, 0x3ba2, 0x2bd4, 0x3b38, 0x31a2, 0x32dd, 0x353c, 0x366f, 0x375e, 0x3821, 0x367a, 0x3b44, 0x39e6, 0x3787, 0x339e, 0x39d7, 0x38c6, 0x37d5, 0x342f, 0x3984, 0x319b, 0x33b5, 0x35ab, 0x398a, 0x374e, 0x36b6, 0x3b21, +0x3bbb, 0x2ab3, 0x2ad5, 0x33bc, 0x2bef, 0x3780, 0x3738, 0x3a0b, 0x3b09, 0x30ca, 0x384e, 0x3ab3, 0x39bd, 0x3453, 0x3a6d, 0x3957, 0x2c10, 0x30e9, 0x35d4, 0x3aef, 0x3be9, 0x39ad, 0x3a74, 0x3af9, 0x3739, 0x2d4d, 0x39fe, 0x3b72, 0x2c57, 0x398c, 0x381f, 0x3930, +0x3820, 0x321b, 0x3964, 0x2964, 0x33a0, 0x2d00, 0x2490, 0x336b, 0x3465, 0x3b2e, 0x3aa0, 0x371f, 0x300e, 0x3a09, 0x3bf1, 0x25cc, 0x3b6f, 0x3384, 0x3a88, 0x3acb, 0x3814, 0x36d0, 0x3081, 0x3a2c, 0x3353, 0x39cb, 0x31ed, 0x3af6, 0x3721, 0x36c7, 0x2ce2, 0x390d, +0x3698, 0x3ab2, 0x3b3e, 0x2eb4, 0x3998, 0x39e3, 0x3a77, 0x3632, 0x2c12, 0x3bd5, 0x3ba3, 0x3bba, 0x323c, 0x367b, 0x3557, 0x39c8, 0x37db, 0x3b45, 0x3b6e, 0x3931, 0x3121, 0x3a8d, 0x3a55, 0x3b9b, 0x358a, 0x3925, 0x3491, 0x3912, 0x3b6b, 0x3584, 0x32df, 0x3120, +0x32b2, 0x3b0a, 0x2cad, 0x3465, 0x3ad3, 0x3bcd, 0x363b, 0x3afe, 0x354b, 0x3374, 0x39af, 0x3b7f, 0x308c, 0x2e72, 0x3380, 0x3b70, 0x3902, 0x38d8, 0x39f3, 0x3a4b, 0x3853, 0x397b, 0x2ebe, 0x387f, 0x2845, 0x37e2, 0x360f, 0x370b, 0x3acb, 0x35d4, 0x36e6, 0x3262, +0x2e88, 0x3a54, 0x2ee3, 0x3575, 0x3afe, 0x2aee, 0x39a0, 0x3aae, 0x3693, 0x3432, 0x3834, 0x3b9b, 0x3bcb, 0x2e3a, 0x356d, 0x374e, 0x3924, 0x383c, 0x311e, 0x3ac5, 0x352d, 0x311e, 0x38ca, 0x34d4, 0x36ca, 0x34ed, 0x3a13, 0x33eb, 0x3639, 0x3828, 0x3b3c, 0x3939, +0x3837, 0x3521, 0x2cb5, 0x3629, 0x3924, 0x384c, 0x366a, 0x3bbf, 0x2e9e, 0x3ba8, 0x33ad, 0x38c8, 0x3934, 0x3907, 0x249a, 0x3690, 0x3a09, 0x3215, 0x3898, 0x325d, 0x37d5, 0x3195, 0x361c, 0x3ae4, 0x351f, 0x3452, 0x3bc0, 0x375c, 0x39bf, 0x317a, 0x3aae, 0x283a, +0x3476, 0x3b92, 0x3472, 0x383e, 0x280f, 0x39d6, 0x2fd1, 0x31f4, 0x2ffb, 0x3b97, 0x3692, 0x36c0, 0x3989, 0x33cf, 0x3ba6, 0x3239, 0x35d7, 0x33ab, 0x31eb, 0x3b47, 0x389b, 0x3b88, 0x3580, 0x354c, 0x3802, 0x3b9a, 0x3b94, 0x2a92, 0x2db1, 0x38bd, 0x2dfb, 0x3900, +0x344f, 0x3739, 0x27a5, 0x3b2e, 0x342b, 0x34bb, 0x30c8, 0x3ae8, 0x3b26, 0x3982, 0x38c0, 0x3408, 0x38c8, 0x36ef, 0x3bf0, 0x3acf, 0x3a3c, 0x3825, 0x31a5, 0x3ada, 0x3b5b, 0x37db, 0x3a01, 0x3663, 0x3a7d, 0x327b, 0x3a1f, 0x3862, 0x38af, 0x3204, 0x372e, 0x3b19, +0x3708, 0x3622, 0x2e62, 0x39ab, 0x2d4d, 0x31b4, 0x3552, 0x3bbc, 0x36f2, 0x36eb, 0x38ef, 0x3755, 0x3bbe, 0x2c17, 0x3815, 0x2f53, 0x363f, 0x38c1, 0x3246, 0x386b, 0x34de, 0x34e4, 0x3baa, 0x349e, 0x32ce, 0x3a68, 0x373f, 0x2cce, 0x3b36, 0x28ba, 0x3b50, 0x3232, +0x1f34, 0x3928, 0x35cd, 0x3b38, 0x30ce, 0x35a1, 0x3a06, 0x3a32, 0x3a53, 0x3489, 0x3241, 0x372f, 0x390c, 0x3a1b, 0x378a, 0x3713, 0x3769, 0x37a8, 0x3418, 0x3ad4, 0x3a4e, 0x3bf7, 0x37a5, 0x34dc, 0x39b2, 0x351b, 0x3372, 0x349f, 0x2f50, 0x3ab1, 0x3795, 0x2db7, +0x3864, 0x3157, 0x3900, 0x323e, 0x389e, 0x3880, 0x3b1f, 0x37a1, 0x396c, 0x2e43, 0x2c2a, 0x3b78, 0x3988, 0x3a14, 0x39c1, 0x3b51, 0x3780, 0x3bf2, 0x2d19, 0x3815, 0x3a5f, 0x3641, 0x2f62, 0x37d5, 0x3564, 0x139a, 0x3ab8, 0x28f7, 0x3785, 0x34e1, 0x3097, 0x3768, +0x3971, 0x3ae2, 0x32ae, 0x2fd5, 0x382a, 0x346c, 0x3133, 0x3167, 0x3940, 0x2d12, 0x389a, 0x3bd0, 0x3943, 0x391c, 0x3a75, 0x2a11, 0x391e, 0x372d, 0x3a79, 0x3b72, 0x3373, 0x39b7, 0x35d7, 0x372b, 0x3a6d, 0x38a1, 0x3279, 0x3434, 0x3694, 0x3b45, 0x3abb, 0x392d, +0x34a8, 0x3757, 0x32ca, 0x345d, 0x36a5, 0x3854, 0x2dcd, 0x30af, 0x38dd, 0x3067, 0x3411, 0x3997, 0x397a, 0x3a64, 0x38b8, 0x3962, 0x3509, 0x3bb6, 0x3a66, 0x339f, 0x372a, 0x31a8, 0x37da, 0x36ff, 0x33c6, 0x31da, 0x3977, 0x3b72, 0x3841, 0x3567, 0x3433, 0x33b8, +0x39fe, 0x3a10, 0x3bf2, 0x35e7, 0x3a4a, 0x3b3e, 0x2ec7, 0x3aa4, 0x3846, 0x3af9, 0x38a9, 0x2c1f, 0x39ab, 0x349f, 0x31d6, 0x39ae, 0x3b79, 0x352d, 0x3516, 0x347c, 0x2f33, 0x35ad, 0x31c4, 0x3b52, 0x354b, 0x3786, 0x3ab7, 0x3896, 0x34ac, 0x352f, 0x37e6, 0x326a, +0x2e44, 0x34c7, 0x388d, 0x3bf4, 0x363f, 0x3b3d, 0x33b1, 0x3b8b, 0x3340, 0x37f7, 0x3b07, 0x25bf, 0x398e, 0x3505, 0x3bd7, 0x366d, 0x388a, 0x2cc0, 0x359a, 0x3b9a, 0x3b99, 0x379d, 0x3b6b, 0x39b8, 0x3223, 0x2703, 0x3ba9, 0x2ecb, 0x3759, 0x39d8, 0x37ac, 0x32cf, +0x35f2, 0x38a3, 0x399e, 0x3bd2, 0x3780, 0x3af3, 0x3b5e, 0x337b, 0x3a08, 0x35da, 0x3446, 0x3b25, 0x3ad0, 0x3bee, 0x3141, 0x32d8, 0x34ce, 0x2ac9, 0x3800, 0x3a8a, 0x2d53, 0x368a, 0x3561, 0x3998, 0x35a3, 0x3677, 0x3ab2, 0x3269, 0x3236, 0x3b3e, 0x3aba, 0x3bac, +0x395d, 0x3820, 0x1df6, 0x3bb5, 0x35b5, 0x3675, 0x3b74, 0x360f, 0x34de, 0x3a0c, 0x3aeb, 0x299d, 0x3207, 0x3bd8, 0x2178, 0x3995, 0x3948, 0x3908, 0x3843, 0x2ea5, 0x3045, 0x3989, 0x345d, 0x39c5, 0x3a89, 0x3863, 0x3be0, 0x397a, 0x38f1, 0x39e2, 0x3b08, 0x352e, +0x385f, 0x28f2, 0x3bc3, 0x35e0, 0x380c, 0x3b9c, 0x3afc, 0x390a, 0x3689, 0x34fd, 0x2cf5, 0x308e, 0x342b, 0x3921, 0x3a67, 0x3ad6, 0x2986, 0x32fc, 0x35aa, 0x3507, 0x3608, 0x33fd, 0x3bf3, 0x39e2, 0x3b0f, 0x30b7, 0x3896, 0x3ae4, 0x2145, 0x35b6, 0x2e1d, 0x3ad1, +0x333d, 0x3afb, 0x2703, 0x3413, 0x1d7d, 0x3b7f, 0x3ae1, 0x303c, 0x3004, 0x39d3, 0x3554, 0x31a4, 0x354e, 0x3662, 0x39c5, 0x2eb7, 0x2c6e, 0x397f, 0x31d8, 0x1f0c, 0x38e3, 0x35f0, 0x2714, 0x28d1, 0x375e, 0x3a75, 0x3830, 0x3578, 0x397d, 0x3b18, 0x383c, 0x3498, +0x39ad, 0x3598, 0x23c4, 0x34ea, 0x3a61, 0x2b00, 0x3707, 0x3ae1, 0x37ae, 0x389d, 0x37fa, 0x3673, 0x3278, 0xf3e, 0x3809, 0x33c6, 0x3bf5, 0x3279, 0x3816, 0x360c, 0x39c8, 0x381f, 0x3741, 0x2d66, 0x38c0, 0x37d3, 0x377a, 0x3621, 0x2faf, 0x392e, 0x2de6, 0x33c5, +0x3803, 0x2600, 0x32e9, 0x39b4, 0x38d2, 0x34e8, 0x2fe6, 0x3199, 0x3643, 0x3a77, 0x27cc, 0x39d7, 0x34c6, 0x2ea8, 0x364e, 0x3b07, 0x31c7, 0x30a1, 0x31b1, 0x3b8f, 0x3571, 0x3b75, 0x3989, 0x3805, 0x39fb, 0x3945, 0x352b, 0x31d8, 0x3904, 0x3440, 0x3a57, 0x2cf7, +0x3b39, 0x2fcd, 0x2b89, 0x2edd, 0x3682, 0x36a9, 0x32c8, 0x37ac, 0x32a5, 0x3311, 0x394b, 0x3b84, 0x3aec, 0x3601, 0x2765, 0x3b69, 0x396b, 0x3727, 0x3bfe, 0x3907, 0x376f, 0x3674, 0x3973, 0x3671, 0x3491, 0x3993, 0x383f, 0x3335, 0x3989, 0x3550, 0x3077, 0x35f5, +0x3a59, 0x3950, 0x380c, 0x37cd, 0x30bf, 0x3607, 0x3afa, 0x3b5d, 0x32b9, 0x386b, 0x35bd, 0x3aca, 0x3ba5, 0x3b2d, 0x3b19, 0x3b8b, 0x345e, 0x2845, 0x34aa, 0x372a, 0x3448, 0x34f5, 0x3ae2, 0x3637, 0x2cb5, 0x354b, 0x3b15, 0x2ca8, 0x2641, 0x3178, 0x2cfe, 0x39b4, +0x3bdd, 0x3acb, 0x3a05, 0x38a2, 0x3b4a, 0x34e5, 0x395f, 0x394b, 0x34c4, 0x3aa5, 0x29bb, 0x2d96, 0x339d, 0x387c, 0x382e, 0x385a, 0x396b, 0x3aa9, 0x2f1e, 0x33a7, 0x3b90, 0x3b7b, 0x3b5f, 0x39d3, 0x3b18, 0x354f, 0x2cdb, 0x3a6f, 0x3434, 0x34ff, 0x3a5b, 0x3b84, +0x3a33, 0x384b, 0x2e67, 0x3b85, 0x3853, 0x380c, 0x346a, 0x3aaa, 0x3492, 0x33e8, 0x3bf2, 0x38ae, 0x3a29, 0x3830, 0x3221, 0x35b1, 0x3a48, 0x2c68, 0x2ced, 0x3a7e, 0x3539, 0x3922, 0x374c, 0x3aaa, 0x2dae, 0x395d, 0x3b3d, 0x3890, 0x2cfe, 0x2dd6, 0x3bad, 0x33c5, +0x2c07, 0x3a2c, 0x37a8, 0x390f, 0x2fc8, 0x35ae, 0x388c, 0x30ee, 0x3674, 0x391d, 0x3bfc, 0x36bf, 0x322d, 0x3a78, 0x35c0, 0x3492, 0x3ac8, 0x3504, 0x3315, 0x381d, 0x3a7a, 0x3a08, 0x343c, 0x3bda, 0x341b, 0x39f0, 0x3b9e, 0x395d, 0x3c00, 0x38ab, 0x3bcf, 0x3564, +0x33c4, 0x3b0d, 0x3623, 0x33b9, 0x3b92, 0x1e71, 0x2c57, 0x36d0, 0x314b, 0x3a16, 0x3372, 0x341b, 0x3aaa, 0x3444, 0x396b, 0x2dd7, 0x3b30, 0x3559, 0x3b5b, 0x3a29, 0x2d19, 0x38b7, 0x3b01, 0x3afa, 0x398a, 0x3839, 0x3ac9, 0x2e31, 0x3924, 0x39f2, 0x3a7f, 0x3285 +}; \ No newline at end of file diff --git a/hwpe/redmule_256iter/inc/x_2D.h b/hwpe/redmule_256iter/inc/x_2D.h new file mode 100644 index 0000000..0b589f8 --- /dev/null +++ b/hwpe/redmule_256iter/inc/x_2D.h @@ -0,0 +1,27 @@ + /* Header file generated by RedMulE Golden Model */ +uint16_t x_inp_2D [24][32] = { +0x2153, 0x3bb5, 0x3896, 0x365f, 0x2483, 0x3518, 0x2dd1, 0x3bca, 0x397b, 0x29b1, 0x3705, 0x36c8, 0x398b, 0x3661, 0x2f05, 0x365a, 0x3bf9, 0x34df, 0x363b, 0x38d9, 0x39c6, 0x3abb, 0x3952, 0x38f2, 0x392d, 0x3b3e, 0x2afb, 0x3a9d, 0x353b, 0x3b73, 0x3a01, 0x3679, +0x3934, 0x397d, 0x2904, 0x3822, 0x3462, 0x3b44, 0x39e9, 0x28be, 0x331e, 0x3a1d, 0x39e5, 0x34da, 0x3a19, 0x3906, 0x1d35, 0x3871, 0x31e7, 0x3b29, 0x325d, 0x3797, 0x2b2f, 0x38b4, 0x232f, 0x38aa, 0x3aca, 0x316f, 0x3811, 0x3950, 0x32ea, 0x3bc7, 0x382c, 0x38a2, +0x29ce, 0x3afa, 0x3a39, 0x2ccc, 0x39fd, 0x3b3d, 0x384a, 0x3a35, 0x3802, 0x366a, 0x37ec, 0x3598, 0x3bf8, 0x3a85, 0x3a1b, 0x386e, 0x3b4c, 0x39de, 0x38c2, 0x2f93, 0x3b4c, 0x39c4, 0x3b9e, 0x3844, 0x346d, 0x3bff, 0x32ce, 0x296d, 0x3130, 0x3b3d, 0x3b44, 0x369d, +0x3b13, 0x31ed, 0x330a, 0x3831, 0x34e7, 0x37b3, 0x331a, 0x3918, 0x32d3, 0x3995, 0x3991, 0x3919, 0x3a26, 0x385b, 0x2b76, 0x3a3b, 0x37f2, 0x26a7, 0x3225, 0x3b64, 0x28f0, 0x3456, 0x3822, 0x341e, 0x381a, 0x38d8, 0x2c11, 0x33be, 0x33ac, 0x353f, 0x3476, 0x3abc, +0x36ec, 0x3a1d, 0x39d3, 0x3821, 0x36ac, 0x3bce, 0x3ad2, 0x3616, 0x36a1, 0x2cb3, 0x38d2, 0x314f, 0x385c, 0x3b63, 0x3bb6, 0x2951, 0x372d, 0x2c42, 0x3823, 0x3883, 0x3872, 0x31ee, 0x36c5, 0x399a, 0x31b0, 0x3887, 0x3884, 0x3865, 0x3896, 0x36c3, 0x32e3, 0x346c, +0x3935, 0x3b50, 0x2b6d, 0x38cd, 0x388f, 0x3389, 0x395d, 0x31cd, 0x2efd, 0x3154, 0x2f35, 0x3444, 0x3293, 0x3b6b, 0x1bec, 0x3b69, 0x3bf3, 0x3611, 0x3508, 0x3742, 0x3a50, 0x3ab7, 0x3457, 0x38d3, 0x3344, 0x38e8, 0x33c0, 0x3668, 0x3bee, 0x3b21, 0x3727, 0x3121, +0x316c, 0x3288, 0x2d50, 0x2e74, 0x35d5, 0x37e2, 0x303d, 0x36af, 0x341f, 0x3436, 0x2df7, 0x399d, 0x30f4, 0x3aaf, 0x34e4, 0x2c2a, 0x3116, 0x34d3, 0x36ac, 0x35e3, 0x3760, 0x36e1, 0x3ad2, 0x3547, 0x38f4, 0x369c, 0x3ba9, 0x34f0, 0x3a39, 0x3b19, 0x36e6, 0x395d, +0x3be8, 0x3293, 0x3bfc, 0x3435, 0x2eb3, 0x3360, 0x3919, 0x3bed, 0x396a, 0x37fc, 0x3242, 0x384b, 0x38cb, 0x3b2c, 0x3b28, 0x28cf, 0x3828, 0x3855, 0x3ba9, 0x2fa7, 0x340b, 0x32f1, 0x3ada, 0x36fa, 0x31f5, 0x3436, 0x29d0, 0x33e6, 0x3232, 0x3bec, 0x3904, 0x2797, +0x3b81, 0x3bac, 0x38d2, 0x343d, 0x31af, 0x3b1e, 0x33fc, 0x3864, 0x3624, 0x3905, 0x2945, 0x3b52, 0x2d08, 0x3a17, 0x3b84, 0x3804, 0x3a24, 0x38a3, 0x3562, 0x3ae6, 0x3bba, 0x3a45, 0x3679, 0x31fa, 0x3994, 0x2c3d, 0x383f, 0x399d, 0x34f7, 0x360e, 0x35f3, 0x38f0, +0x38d4, 0x399a, 0x3a48, 0x3987, 0x3b54, 0x382c, 0x3210, 0x35ef, 0x36ca, 0x31b4, 0x3625, 0x371f, 0x37bd, 0x3680, 0x3a3a, 0x3ac0, 0x3bbf, 0x3bf5, 0x39f2, 0x29c2, 0x363e, 0x3a4e, 0x3596, 0x3b1b, 0x3459, 0x3669, 0x3aa1, 0x39c3, 0x3376, 0x390d, 0x2456, 0x39b5, +0x3a66, 0x3ad8, 0x3b51, 0x36aa, 0x32be, 0x3ac8, 0x392b, 0x3740, 0x3a48, 0x38f5, 0x3b2d, 0x3a5f, 0x2ff3, 0x366f, 0x39d3, 0x35e5, 0x3822, 0x38db, 0x3b8a, 0x34be, 0x2d33, 0x36dd, 0x3578, 0x3bdf, 0x2c7e, 0x39cf, 0x32ff, 0x35c9, 0x3970, 0x3bcb, 0x351e, 0x3956, +0x2c42, 0x3308, 0x377a, 0x361c, 0x39a0, 0x36c9, 0x2dcb, 0x3bf2, 0x3b5f, 0x33ee, 0x24c1, 0x2ce9, 0x3927, 0x305d, 0x3702, 0x3119, 0x35f9, 0x3855, 0x3374, 0x349b, 0x3bcf, 0x2dea, 0x34f0, 0x363f, 0x37da, 0x3a74, 0x35fc, 0x35fa, 0x316b, 0x3804, 0x37a7, 0x3986, +0x3073, 0x3aed, 0x31c7, 0x3844, 0x34a4, 0x387d, 0x3a20, 0x3037, 0x3a00, 0x3b70, 0x377f, 0x3686, 0x3b7e, 0x38b3, 0x32e3, 0x3323, 0x391e, 0x3228, 0x3930, 0x3997, 0x3a5e, 0x398b, 0x3512, 0x35b0, 0x365c, 0x325d, 0x3b61, 0x38b8, 0x39a4, 0x3423, 0x3bd7, 0x38af, +0x2d3d, 0x382d, 0x38ac, 0x26ca, 0x395e, 0x21a8, 0x3520, 0x386f, 0x3b95, 0x32c0, 0x3b84, 0x3a51, 0x3b4b, 0x31d2, 0x3747, 0x3b96, 0x3b40, 0x3535, 0x38d1, 0x3899, 0x3b00, 0x3827, 0x3ae3, 0x38c8, 0x3a07, 0x338d, 0x2e96, 0x3a46, 0x394a, 0x39de, 0x2951, 0x3a02, +0x3838, 0x2d45, 0x28c0, 0x3958, 0x3070, 0x2aa2, 0x3510, 0x38ce, 0x271c, 0x3440, 0x3954, 0x30bc, 0x3b35, 0x2f1d, 0x3afb, 0x2dae, 0x356f, 0x2e13, 0x3981, 0x326d, 0x3a28, 0x3a36, 0x3a95, 0x38cb, 0x38db, 0x3150, 0x2c9e, 0x34c5, 0x3adb, 0x3bdf, 0x38f2, 0x3994, +0x36f8, 0x31c0, 0x3a4f, 0x3825, 0x394b, 0x3a8b, 0x38ac, 0x3167, 0x2e2d, 0x3a93, 0x34f3, 0x37bd, 0x3b63, 0x2f2f, 0x3ae0, 0x3ad8, 0x34a8, 0x2e1c, 0x3890, 0x3705, 0x3b69, 0x3bc1, 0x28af, 0x3b36, 0x348b, 0x3111, 0x3a8d, 0x389c, 0x3916, 0x36dc, 0x3bae, 0x3874, +0x3593, 0x3638, 0x3018, 0x3a56, 0x38a3, 0x2ad4, 0x3a25, 0x38d7, 0x3864, 0x31c1, 0x28d1, 0x39c8, 0x37d6, 0x2c7f, 0x3ba5, 0x34b8, 0x3bef, 0x3b83, 0x3ab5, 0x3062, 0x38bc, 0x399c, 0x2ce4, 0x2f2c, 0x39bf, 0x2ed1, 0x385f, 0x37e0, 0x35ee, 0x397d, 0x3b0c, 0x3049, +0x39d5, 0x322e, 0x3936, 0x3747, 0x2e15, 0x3b41, 0x3874, 0x3bd0, 0x2c04, 0x3800, 0x375b, 0x3b2d, 0x38d8, 0x3a51, 0x3406, 0x38da, 0x38ba, 0x3497, 0x382e, 0x35fc, 0x39d4, 0x3775, 0x3b1e, 0x3813, 0x3649, 0x31af, 0x37bb, 0x334a, 0x3a6e, 0x3284, 0x26e0, 0x2e01, +0x2ebb, 0x344b, 0x3821, 0x381a, 0x385a, 0x2534, 0x3635, 0x2a92, 0x3b8c, 0x31f0, 0x3947, 0x3ac7, 0x3743, 0x3924, 0x39e4, 0x358f, 0x2b62, 0x392c, 0x3955, 0x3341, 0x3676, 0x38ac, 0x3957, 0x335b, 0x2ca2, 0x39ff, 0x37cb, 0x341f, 0x3ac9, 0x3b6c, 0x2f14, 0x34c3, +0x3018, 0x3169, 0x355b, 0x3624, 0x31ed, 0x379e, 0x3268, 0x309b, 0x35db, 0x3872, 0x3bdb, 0x34c7, 0x3408, 0x3359, 0x3920, 0x331f, 0x3866, 0x3af0, 0x2a1a, 0x39e0, 0x3b14, 0x34fa, 0x2d18, 0x3963, 0x35e8, 0x2539, 0x38f5, 0x37b3, 0x378f, 0x31b5, 0x3a6c, 0x3685, +0x3a06, 0x318a, 0x2934, 0x33c1, 0x3be8, 0x375b, 0x3860, 0x3543, 0x3702, 0x3951, 0x3677, 0x37ff, 0x2e27, 0x2e3a, 0x340f, 0x3817, 0x2f04, 0x357e, 0x3a1d, 0x2dd6, 0x252a, 0x3945, 0x162a, 0x3b19, 0x3a53, 0x35d2, 0x3a5d, 0x3474, 0x38e9, 0x374b, 0x387c, 0x1f1a, +0x38ac, 0x3291, 0x3393, 0x3b53, 0x3169, 0x3bca, 0x2f1a, 0x3551, 0x38a3, 0x28e3, 0x369d, 0x34a1, 0x38a8, 0x34c3, 0x3841, 0x390d, 0x3b13, 0x3282, 0x3a29, 0x3a78, 0x2df3, 0x3a37, 0x35f4, 0x35a6, 0x38e8, 0x3328, 0x3beb, 0x390b, 0x32dc, 0x34dc, 0x396d, 0x3a78, +0x39ba, 0x3a06, 0x2cdd, 0x3bc3, 0x2d43, 0x2992, 0x3663, 0x3a68, 0x2c3e, 0x394e, 0x2c9f, 0x380e, 0x37f5, 0x3557, 0x2873, 0x390f, 0x39e7, 0x3939, 0x3669, 0x385c, 0x3a68, 0x32c4, 0x2b04, 0x2d6d, 0x39d3, 0x3895, 0x331d, 0x3b59, 0x3463, 0x2b6a, 0x31de, 0x3296, +0x3aae, 0x3bcd, 0x345a, 0x3897, 0x374b, 0x3bd4, 0x38a2, 0x357f, 0x3402, 0x3a0c, 0x3507, 0x3865, 0x3a54, 0x3878, 0x3859, 0x383e, 0x32b5, 0x34ea, 0x328d, 0x38b6, 0x3464, 0x2f5b, 0x35ff, 0x3817, 0x2f24, 0x3533, 0x3b21, 0x37ba, 0x3837, 0x2e34, 0x3bad, 0x34bc +}; \ No newline at end of file diff --git a/hwpe/redmule_256iter/inc/x_input.h b/hwpe/redmule_256iter/inc/x_input.h new file mode 100644 index 0000000..1e38d23 --- /dev/null +++ b/hwpe/redmule_256iter/inc/x_input.h @@ -0,0 +1,27 @@ + /* Header file generated by RedMulE Golden Model */ +uint16_t x_inp [768] = { +0x2153, 0x3bb5, 0x3896, 0x365f, 0x2483, 0x3518, 0x2dd1, 0x3bca, 0x397b, 0x29b1, 0x3705, 0x36c8, 0x398b, 0x3661, 0x2f05, 0x365a, 0x3bf9, 0x34df, 0x363b, 0x38d9, 0x39c6, 0x3abb, 0x3952, 0x38f2, 0x392d, 0x3b3e, 0x2afb, 0x3a9d, 0x353b, 0x3b73, 0x3a01, 0x3679, +0x3934, 0x397d, 0x2904, 0x3822, 0x3462, 0x3b44, 0x39e9, 0x28be, 0x331e, 0x3a1d, 0x39e5, 0x34da, 0x3a19, 0x3906, 0x1d35, 0x3871, 0x31e7, 0x3b29, 0x325d, 0x3797, 0x2b2f, 0x38b4, 0x232f, 0x38aa, 0x3aca, 0x316f, 0x3811, 0x3950, 0x32ea, 0x3bc7, 0x382c, 0x38a2, +0x29ce, 0x3afa, 0x3a39, 0x2ccc, 0x39fd, 0x3b3d, 0x384a, 0x3a35, 0x3802, 0x366a, 0x37ec, 0x3598, 0x3bf8, 0x3a85, 0x3a1b, 0x386e, 0x3b4c, 0x39de, 0x38c2, 0x2f93, 0x3b4c, 0x39c4, 0x3b9e, 0x3844, 0x346d, 0x3bff, 0x32ce, 0x296d, 0x3130, 0x3b3d, 0x3b44, 0x369d, +0x3b13, 0x31ed, 0x330a, 0x3831, 0x34e7, 0x37b3, 0x331a, 0x3918, 0x32d3, 0x3995, 0x3991, 0x3919, 0x3a26, 0x385b, 0x2b76, 0x3a3b, 0x37f2, 0x26a7, 0x3225, 0x3b64, 0x28f0, 0x3456, 0x3822, 0x341e, 0x381a, 0x38d8, 0x2c11, 0x33be, 0x33ac, 0x353f, 0x3476, 0x3abc, +0x36ec, 0x3a1d, 0x39d3, 0x3821, 0x36ac, 0x3bce, 0x3ad2, 0x3616, 0x36a1, 0x2cb3, 0x38d2, 0x314f, 0x385c, 0x3b63, 0x3bb6, 0x2951, 0x372d, 0x2c42, 0x3823, 0x3883, 0x3872, 0x31ee, 0x36c5, 0x399a, 0x31b0, 0x3887, 0x3884, 0x3865, 0x3896, 0x36c3, 0x32e3, 0x346c, +0x3935, 0x3b50, 0x2b6d, 0x38cd, 0x388f, 0x3389, 0x395d, 0x31cd, 0x2efd, 0x3154, 0x2f35, 0x3444, 0x3293, 0x3b6b, 0x1bec, 0x3b69, 0x3bf3, 0x3611, 0x3508, 0x3742, 0x3a50, 0x3ab7, 0x3457, 0x38d3, 0x3344, 0x38e8, 0x33c0, 0x3668, 0x3bee, 0x3b21, 0x3727, 0x3121, +0x316c, 0x3288, 0x2d50, 0x2e74, 0x35d5, 0x37e2, 0x303d, 0x36af, 0x341f, 0x3436, 0x2df7, 0x399d, 0x30f4, 0x3aaf, 0x34e4, 0x2c2a, 0x3116, 0x34d3, 0x36ac, 0x35e3, 0x3760, 0x36e1, 0x3ad2, 0x3547, 0x38f4, 0x369c, 0x3ba9, 0x34f0, 0x3a39, 0x3b19, 0x36e6, 0x395d, +0x3be8, 0x3293, 0x3bfc, 0x3435, 0x2eb3, 0x3360, 0x3919, 0x3bed, 0x396a, 0x37fc, 0x3242, 0x384b, 0x38cb, 0x3b2c, 0x3b28, 0x28cf, 0x3828, 0x3855, 0x3ba9, 0x2fa7, 0x340b, 0x32f1, 0x3ada, 0x36fa, 0x31f5, 0x3436, 0x29d0, 0x33e6, 0x3232, 0x3bec, 0x3904, 0x2797, +0x3b81, 0x3bac, 0x38d2, 0x343d, 0x31af, 0x3b1e, 0x33fc, 0x3864, 0x3624, 0x3905, 0x2945, 0x3b52, 0x2d08, 0x3a17, 0x3b84, 0x3804, 0x3a24, 0x38a3, 0x3562, 0x3ae6, 0x3bba, 0x3a45, 0x3679, 0x31fa, 0x3994, 0x2c3d, 0x383f, 0x399d, 0x34f7, 0x360e, 0x35f3, 0x38f0, +0x38d4, 0x399a, 0x3a48, 0x3987, 0x3b54, 0x382c, 0x3210, 0x35ef, 0x36ca, 0x31b4, 0x3625, 0x371f, 0x37bd, 0x3680, 0x3a3a, 0x3ac0, 0x3bbf, 0x3bf5, 0x39f2, 0x29c2, 0x363e, 0x3a4e, 0x3596, 0x3b1b, 0x3459, 0x3669, 0x3aa1, 0x39c3, 0x3376, 0x390d, 0x2456, 0x39b5, +0x3a66, 0x3ad8, 0x3b51, 0x36aa, 0x32be, 0x3ac8, 0x392b, 0x3740, 0x3a48, 0x38f5, 0x3b2d, 0x3a5f, 0x2ff3, 0x366f, 0x39d3, 0x35e5, 0x3822, 0x38db, 0x3b8a, 0x34be, 0x2d33, 0x36dd, 0x3578, 0x3bdf, 0x2c7e, 0x39cf, 0x32ff, 0x35c9, 0x3970, 0x3bcb, 0x351e, 0x3956, +0x2c42, 0x3308, 0x377a, 0x361c, 0x39a0, 0x36c9, 0x2dcb, 0x3bf2, 0x3b5f, 0x33ee, 0x24c1, 0x2ce9, 0x3927, 0x305d, 0x3702, 0x3119, 0x35f9, 0x3855, 0x3374, 0x349b, 0x3bcf, 0x2dea, 0x34f0, 0x363f, 0x37da, 0x3a74, 0x35fc, 0x35fa, 0x316b, 0x3804, 0x37a7, 0x3986, +0x3073, 0x3aed, 0x31c7, 0x3844, 0x34a4, 0x387d, 0x3a20, 0x3037, 0x3a00, 0x3b70, 0x377f, 0x3686, 0x3b7e, 0x38b3, 0x32e3, 0x3323, 0x391e, 0x3228, 0x3930, 0x3997, 0x3a5e, 0x398b, 0x3512, 0x35b0, 0x365c, 0x325d, 0x3b61, 0x38b8, 0x39a4, 0x3423, 0x3bd7, 0x38af, +0x2d3d, 0x382d, 0x38ac, 0x26ca, 0x395e, 0x21a8, 0x3520, 0x386f, 0x3b95, 0x32c0, 0x3b84, 0x3a51, 0x3b4b, 0x31d2, 0x3747, 0x3b96, 0x3b40, 0x3535, 0x38d1, 0x3899, 0x3b00, 0x3827, 0x3ae3, 0x38c8, 0x3a07, 0x338d, 0x2e96, 0x3a46, 0x394a, 0x39de, 0x2951, 0x3a02, +0x3838, 0x2d45, 0x28c0, 0x3958, 0x3070, 0x2aa2, 0x3510, 0x38ce, 0x271c, 0x3440, 0x3954, 0x30bc, 0x3b35, 0x2f1d, 0x3afb, 0x2dae, 0x356f, 0x2e13, 0x3981, 0x326d, 0x3a28, 0x3a36, 0x3a95, 0x38cb, 0x38db, 0x3150, 0x2c9e, 0x34c5, 0x3adb, 0x3bdf, 0x38f2, 0x3994, +0x36f8, 0x31c0, 0x3a4f, 0x3825, 0x394b, 0x3a8b, 0x38ac, 0x3167, 0x2e2d, 0x3a93, 0x34f3, 0x37bd, 0x3b63, 0x2f2f, 0x3ae0, 0x3ad8, 0x34a8, 0x2e1c, 0x3890, 0x3705, 0x3b69, 0x3bc1, 0x28af, 0x3b36, 0x348b, 0x3111, 0x3a8d, 0x389c, 0x3916, 0x36dc, 0x3bae, 0x3874, +0x3593, 0x3638, 0x3018, 0x3a56, 0x38a3, 0x2ad4, 0x3a25, 0x38d7, 0x3864, 0x31c1, 0x28d1, 0x39c8, 0x37d6, 0x2c7f, 0x3ba5, 0x34b8, 0x3bef, 0x3b83, 0x3ab5, 0x3062, 0x38bc, 0x399c, 0x2ce4, 0x2f2c, 0x39bf, 0x2ed1, 0x385f, 0x37e0, 0x35ee, 0x397d, 0x3b0c, 0x3049, +0x39d5, 0x322e, 0x3936, 0x3747, 0x2e15, 0x3b41, 0x3874, 0x3bd0, 0x2c04, 0x3800, 0x375b, 0x3b2d, 0x38d8, 0x3a51, 0x3406, 0x38da, 0x38ba, 0x3497, 0x382e, 0x35fc, 0x39d4, 0x3775, 0x3b1e, 0x3813, 0x3649, 0x31af, 0x37bb, 0x334a, 0x3a6e, 0x3284, 0x26e0, 0x2e01, +0x2ebb, 0x344b, 0x3821, 0x381a, 0x385a, 0x2534, 0x3635, 0x2a92, 0x3b8c, 0x31f0, 0x3947, 0x3ac7, 0x3743, 0x3924, 0x39e4, 0x358f, 0x2b62, 0x392c, 0x3955, 0x3341, 0x3676, 0x38ac, 0x3957, 0x335b, 0x2ca2, 0x39ff, 0x37cb, 0x341f, 0x3ac9, 0x3b6c, 0x2f14, 0x34c3, +0x3018, 0x3169, 0x355b, 0x3624, 0x31ed, 0x379e, 0x3268, 0x309b, 0x35db, 0x3872, 0x3bdb, 0x34c7, 0x3408, 0x3359, 0x3920, 0x331f, 0x3866, 0x3af0, 0x2a1a, 0x39e0, 0x3b14, 0x34fa, 0x2d18, 0x3963, 0x35e8, 0x2539, 0x38f5, 0x37b3, 0x378f, 0x31b5, 0x3a6c, 0x3685, +0x3a06, 0x318a, 0x2934, 0x33c1, 0x3be8, 0x375b, 0x3860, 0x3543, 0x3702, 0x3951, 0x3677, 0x37ff, 0x2e27, 0x2e3a, 0x340f, 0x3817, 0x2f04, 0x357e, 0x3a1d, 0x2dd6, 0x252a, 0x3945, 0x162a, 0x3b19, 0x3a53, 0x35d2, 0x3a5d, 0x3474, 0x38e9, 0x374b, 0x387c, 0x1f1a, +0x38ac, 0x3291, 0x3393, 0x3b53, 0x3169, 0x3bca, 0x2f1a, 0x3551, 0x38a3, 0x28e3, 0x369d, 0x34a1, 0x38a8, 0x34c3, 0x3841, 0x390d, 0x3b13, 0x3282, 0x3a29, 0x3a78, 0x2df3, 0x3a37, 0x35f4, 0x35a6, 0x38e8, 0x3328, 0x3beb, 0x390b, 0x32dc, 0x34dc, 0x396d, 0x3a78, +0x39ba, 0x3a06, 0x2cdd, 0x3bc3, 0x2d43, 0x2992, 0x3663, 0x3a68, 0x2c3e, 0x394e, 0x2c9f, 0x380e, 0x37f5, 0x3557, 0x2873, 0x390f, 0x39e7, 0x3939, 0x3669, 0x385c, 0x3a68, 0x32c4, 0x2b04, 0x2d6d, 0x39d3, 0x3895, 0x331d, 0x3b59, 0x3463, 0x2b6a, 0x31de, 0x3296, +0x3aae, 0x3bcd, 0x345a, 0x3897, 0x374b, 0x3bd4, 0x38a2, 0x357f, 0x3402, 0x3a0c, 0x3507, 0x3865, 0x3a54, 0x3878, 0x3859, 0x383e, 0x32b5, 0x34ea, 0x328d, 0x38b6, 0x3464, 0x2f5b, 0x35ff, 0x3817, 0x2f24, 0x3533, 0x3b21, 0x37ba, 0x3837, 0x2e34, 0x3bad, 0x34bc +}; \ No newline at end of file diff --git a/hwpe/redmule_256iter/inc/y_2D.h b/hwpe/redmule_256iter/inc/y_2D.h new file mode 100644 index 0000000..9484a10 --- /dev/null +++ b/hwpe/redmule_256iter/inc/y_2D.h @@ -0,0 +1,27 @@ + /* Header file generated by RedMulE Golden Model */ +uint16_t y_inp_2D [32][32] = { +0x3150, 0x2dc1, 0x3033, 0x31f5, 0x3bb6, 0x3bff, 0x39f9, 0x3662, 0x3720, 0x351d, 0x384b, 0x3093, 0x3b9d, 0x35ad, 0x3695, 0x3466, 0x2300, 0x3445, 0x33ae, 0x3586, 0x38a3, 0x3bdb, 0x33a2, 0x379b, 0x3a0e, 0x38b0, 0x39ba, 0x379b, 0x39d3, 0x3a51, 0x3b30, 0x3794, +0x3b76, 0x3042, 0x38cc, 0x2dfc, 0x3b1a, 0x37fb, 0x38f7, 0x3824, 0x386f, 0x38c7, 0x36ee, 0x3a9c, 0x38d3, 0x2c67, 0x3a80, 0x2f30, 0x3328, 0x3721, 0x3790, 0x34e5, 0x3a6c, 0x3643, 0x3934, 0x3034, 0x38d4, 0x362e, 0x3b4b, 0x3408, 0x30c2, 0x370e, 0x3b31, 0x3b16, +0x3b6b, 0x39d4, 0x339c, 0x381e, 0x313e, 0x3671, 0x3ae2, 0x3479, 0x3940, 0x342d, 0x3925, 0x370a, 0x35d8, 0x2dad, 0x3888, 0x24b9, 0x375d, 0x34bd, 0x3243, 0x2ebb, 0x3970, 0x3a21, 0x3a07, 0x3877, 0x3888, 0x3569, 0x372d, 0x2ac1, 0x331e, 0x384d, 0x3996, 0x34a4, +0x35c1, 0x33a9, 0x21ed, 0x3a42, 0x388d, 0x34e4, 0x33c3, 0x34f9, 0x3a7b, 0x33fb, 0x2cdd, 0x3b0e, 0x333b, 0x3973, 0x34fc, 0x3771, 0x32ea, 0x2de4, 0x31a8, 0x3946, 0x3657, 0x3a4e, 0x36f6, 0x2829, 0x3ba2, 0x3bdc, 0x3bb3, 0x306c, 0x398d, 0x3a1f, 0x3991, 0x3846, +0x3547, 0x3292, 0x2e85, 0x31ed, 0x3979, 0x3a90, 0x28a4, 0x3bed, 0x36d8, 0x340e, 0x3b6a, 0x3ab6, 0x3824, 0x382b, 0x3ac3, 0x3811, 0x36d7, 0x3519, 0x3a92, 0x3a42, 0x29d1, 0x383a, 0x3a9b, 0x300e, 0x2cd3, 0x39cd, 0x3874, 0x3a07, 0x2eb1, 0x3b86, 0x3ad8, 0x3a5d, +0x3712, 0x284a, 0x38c1, 0x3bec, 0x39c0, 0x32cd, 0x3ad8, 0x3bce, 0x3817, 0x3896, 0x3aa7, 0x3870, 0x3996, 0x32cc, 0x3a4c, 0x3757, 0x3814, 0x3b65, 0x3acb, 0x376e, 0x34c0, 0x3609, 0x3bf0, 0x3b24, 0x3b29, 0x3848, 0x34b7, 0x398a, 0x220c, 0x3498, 0x3a8c, 0x3883, +0x38c4, 0x3af6, 0x3a42, 0x2dd6, 0x3147, 0x3717, 0x3a8e, 0x3af9, 0x3296, 0x38ef, 0x34fa, 0x3555, 0x3b29, 0x38de, 0x315e, 0x3773, 0x3b67, 0x3116, 0x38ec, 0x357c, 0x35d0, 0x2518, 0x3958, 0x2a03, 0x37d9, 0x3699, 0x3a1e, 0x3230, 0x3b13, 0x36d4, 0x3b2a, 0x39ad, +0x3b10, 0x351a, 0x3b97, 0x3326, 0x2b54, 0x3b7d, 0x386f, 0x373e, 0x37fa, 0x389b, 0x3b90, 0x3292, 0x3975, 0x38f3, 0x37f1, 0x3590, 0x3810, 0x2fd7, 0x3bf7, 0x3a5a, 0x3a1c, 0x34dd, 0x354c, 0x32f8, 0x3095, 0x321e, 0x39e0, 0x395c, 0x3717, 0x357f, 0x394a, 0x34b1, +0x3ba4, 0x380c, 0x3604, 0x2f50, 0x348d, 0x3828, 0x3a9f, 0x39ce, 0x32ca, 0x3906, 0x3ab2, 0x2ca5, 0x38c9, 0x362a, 0x34b2, 0x29dc, 0x3a36, 0x3052, 0x31b7, 0x3589, 0x387c, 0x3401, 0x3b22, 0x3ad6, 0x3ae8, 0x3238, 0x3494, 0x3502, 0x3717, 0x3a6c, 0x3229, 0x368c, +0x3056, 0x3a56, 0x3498, 0x39eb, 0x2864, 0x342d, 0x39e0, 0x34a1, 0x2b99, 0x3a04, 0x38ff, 0x328c, 0x34d9, 0x387d, 0x3a3c, 0x32e5, 0x39eb, 0x3984, 0x34dd, 0x38a7, 0x373f, 0x39b4, 0x3235, 0x2f58, 0x2f39, 0x3800, 0x3758, 0x3939, 0x39fc, 0x3a4b, 0x38bf, 0x30ee, +0x345e, 0x39c8, 0x3a6d, 0x3262, 0x3b81, 0x31dc, 0x3a15, 0x3bd0, 0x36af, 0x36de, 0x37d5, 0x39d7, 0x3ad3, 0x3ac1, 0x3109, 0x35ea, 0x31c6, 0x398d, 0x3987, 0x3a4a, 0x34d2, 0x2ed2, 0x35e6, 0x352c, 0x39eb, 0x3bd6, 0x3a5b, 0x39d1, 0x34aa, 0x3ade, 0x394b, 0x38a1, +0x2bed, 0x38de, 0x3811, 0x3813, 0x391a, 0x374b, 0x3829, 0x3725, 0x38f0, 0x3583, 0x3966, 0x3a7d, 0x375a, 0x38fe, 0x3696, 0x361c, 0x39a8, 0x35f0, 0x38e1, 0x3003, 0x3595, 0x316e, 0x3862, 0x3af8, 0x3af2, 0x34c8, 0x381d, 0x37d8, 0x3893, 0x3a9c, 0x3989, 0x308c, +0x30cc, 0x2538, 0x399d, 0x3919, 0x399e, 0x21cc, 0x38e9, 0x30f8, 0x3a20, 0x3b3c, 0x3990, 0x259c, 0x3143, 0x3080, 0x3967, 0x3afb, 0x3a1b, 0x3779, 0x2eeb, 0x39f3, 0x379a, 0x369c, 0x3985, 0x3a1b, 0x3ba6, 0x3a53, 0x28d5, 0x3881, 0x31d9, 0x3a34, 0x3bd9, 0x393a, +0x3601, 0x2c6e, 0x3636, 0x3298, 0x39bb, 0x3a08, 0x38db, 0x35ad, 0x3a09, 0x36a6, 0x3bc7, 0x3bac, 0x34ae, 0x3291, 0x290b, 0x3250, 0x2648, 0x333d, 0x2bf3, 0x34b1, 0x30e0, 0x351f, 0x3a74, 0x38dc, 0x3883, 0x2841, 0x35e1, 0x390d, 0x3a50, 0x3abd, 0x386d, 0x3bb7, +0x3b94, 0x36b7, 0x3a49, 0x332f, 0x3a1d, 0x354b, 0x3bab, 0x3346, 0x3417, 0x351e, 0x3b6d, 0x391a, 0x2db3, 0x3b1c, 0x3a4a, 0x37b7, 0x36cf, 0x3a56, 0x39c4, 0x3be9, 0x34f0, 0x39be, 0x3691, 0x1ba5, 0x3888, 0x3040, 0x3ae1, 0x3b9b, 0x398f, 0x3a49, 0x3a16, 0x38c0, +0x386c, 0x39ab, 0x37fa, 0x382c, 0x3a6f, 0x393f, 0x340d, 0x38ef, 0x39d1, 0x3845, 0x398f, 0x363e, 0x3687, 0x3052, 0x3a2b, 0x392c, 0x2f5c, 0x3412, 0x3a1f, 0x3b2f, 0x3bcc, 0x3a63, 0x3a89, 0x36e9, 0x3921, 0x3b80, 0x2dc0, 0x3a03, 0x3beb, 0x38d3, 0x36cb, 0x39a3, +0x3978, 0x3a88, 0x3ba4, 0x3561, 0x28c5, 0x33a0, 0x37be, 0x2c39, 0x30ee, 0x3782, 0x2c07, 0x354e, 0x3491, 0x3a92, 0x331a, 0x3b15, 0x32e1, 0x3839, 0x3afb, 0x36c2, 0x2fd0, 0x29ad, 0x3b2e, 0x39c1, 0x2a8c, 0x341a, 0x2f90, 0x395a, 0x3969, 0x37ea, 0x3a5c, 0x3b6d, +0x3971, 0x3a93, 0x304e, 0x3623, 0x3a22, 0x31ee, 0x29df, 0x2c93, 0x3a01, 0x3a62, 0x366c, 0x371d, 0x3af3, 0x2e08, 0x3ac0, 0x3642, 0x3a28, 0x368d, 0x2d3d, 0x36d9, 0x32c3, 0x373f, 0x36fe, 0x3487, 0x2c81, 0x3623, 0x3b59, 0x3a91, 0x350a, 0x34f4, 0x3b09, 0x2c25, +0x3b13, 0x325a, 0x379e, 0x3a7d, 0x34b1, 0x39d5, 0x2ba8, 0x322b, 0x3b5e, 0x37ab, 0x2e24, 0x3ba9, 0x3a3d, 0x34f7, 0x3ba1, 0x3877, 0x3071, 0x39fb, 0x3bbd, 0x3633, 0x3b36, 0x2daa, 0x3b9b, 0x3aa0, 0x395c, 0x3b8f, 0x38d5, 0x3ab0, 0x3a8f, 0x36c2, 0x3b1f, 0x3489, +0x2acc, 0x3845, 0x3715, 0x37d8, 0x3992, 0x3bff, 0x350e, 0x3ad7, 0x39b0, 0x35ac, 0x3287, 0x385f, 0x3bd4, 0x37a3, 0x3438, 0x39a5, 0x3bcf, 0x38c3, 0x34f6, 0x3ae3, 0x3b57, 0x39af, 0x35eb, 0x3bed, 0x34d4, 0x2a95, 0x3b13, 0x384e, 0x3a3b, 0x33da, 0x3bce, 0x3b99, +0x3559, 0x3335, 0x3a2e, 0x3123, 0x38db, 0x33d0, 0x3638, 0x3b17, 0x3a72, 0x3afc, 0x3936, 0x3838, 0x2b69, 0x3895, 0x3a1a, 0x3192, 0x39d5, 0x37a5, 0x2eb0, 0x2e8b, 0x329a, 0x3b90, 0x390a, 0x3a1e, 0x3847, 0x375d, 0x3873, 0x35e2, 0x3771, 0x30f5, 0x3231, 0x3bd7, +0x2bbc, 0x3ace, 0x31ad, 0x3a6b, 0x28a4, 0x3b48, 0x3ba3, 0x3a84, 0x3353, 0x39f6, 0x381f, 0x2dd6, 0x314c, 0x34af, 0x3929, 0x3921, 0x383b, 0x34b0, 0x3923, 0x32c9, 0x3ae7, 0x318f, 0x3480, 0x2ad8, 0x3042, 0x3a4c, 0x349d, 0x2c12, 0x3abb, 0x3a57, 0x3b0d, 0x3111, +0x3359, 0x3a84, 0x38f2, 0x368d, 0x2f4b, 0x3ba0, 0x395c, 0x3026, 0x3a15, 0x2a04, 0x326e, 0x3522, 0x31a2, 0x382f, 0x2ada, 0x3b7c, 0x2f80, 0x3af5, 0x2d35, 0x38fa, 0x39ab, 0x2c6d, 0x2e7a, 0x39f6, 0x31a4, 0x3a53, 0x358c, 0x3951, 0x3a4e, 0x3916, 0x2a3f, 0x3ae9, +0x3b03, 0x39f8, 0x39fe, 0x3a61, 0x39fb, 0x3704, 0x360d, 0x39a7, 0x37a9, 0x348f, 0x3a30, 0x3af5, 0x366f, 0x3b29, 0x3a6a, 0x33d5, 0x370a, 0x39cd, 0x3444, 0x3bea, 0x3b2b, 0x312e, 0x3b8e, 0x32cf, 0x3b79, 0x3302, 0x3bba, 0x3962, 0x3413, 0x37a1, 0x39e0, 0x3805 +}; \ No newline at end of file diff --git a/hwpe/redmule_256iter/inc/y_input.h b/hwpe/redmule_256iter/inc/y_input.h new file mode 100644 index 0000000..45a2375 --- /dev/null +++ b/hwpe/redmule_256iter/inc/y_input.h @@ -0,0 +1,27 @@ + /* Header file generated by RedMulE Golden Model */ +uint16_t y_inp [768] = { +0x3150, 0x2dc1, 0x3033, 0x31f5, 0x3bb6, 0x3bff, 0x39f9, 0x3662, 0x3720, 0x351d, 0x384b, 0x3093, 0x3b9d, 0x35ad, 0x3695, 0x3466, 0x2300, 0x3445, 0x33ae, 0x3586, 0x38a3, 0x3bdb, 0x33a2, 0x379b, 0x3a0e, 0x38b0, 0x39ba, 0x379b, 0x39d3, 0x3a51, 0x3b30, 0x3794, +0x3b76, 0x3042, 0x38cc, 0x2dfc, 0x3b1a, 0x37fb, 0x38f7, 0x3824, 0x386f, 0x38c7, 0x36ee, 0x3a9c, 0x38d3, 0x2c67, 0x3a80, 0x2f30, 0x3328, 0x3721, 0x3790, 0x34e5, 0x3a6c, 0x3643, 0x3934, 0x3034, 0x38d4, 0x362e, 0x3b4b, 0x3408, 0x30c2, 0x370e, 0x3b31, 0x3b16, +0x3b6b, 0x39d4, 0x339c, 0x381e, 0x313e, 0x3671, 0x3ae2, 0x3479, 0x3940, 0x342d, 0x3925, 0x370a, 0x35d8, 0x2dad, 0x3888, 0x24b9, 0x375d, 0x34bd, 0x3243, 0x2ebb, 0x3970, 0x3a21, 0x3a07, 0x3877, 0x3888, 0x3569, 0x372d, 0x2ac1, 0x331e, 0x384d, 0x3996, 0x34a4, +0x35c1, 0x33a9, 0x21ed, 0x3a42, 0x388d, 0x34e4, 0x33c3, 0x34f9, 0x3a7b, 0x33fb, 0x2cdd, 0x3b0e, 0x333b, 0x3973, 0x34fc, 0x3771, 0x32ea, 0x2de4, 0x31a8, 0x3946, 0x3657, 0x3a4e, 0x36f6, 0x2829, 0x3ba2, 0x3bdc, 0x3bb3, 0x306c, 0x398d, 0x3a1f, 0x3991, 0x3846, +0x3547, 0x3292, 0x2e85, 0x31ed, 0x3979, 0x3a90, 0x28a4, 0x3bed, 0x36d8, 0x340e, 0x3b6a, 0x3ab6, 0x3824, 0x382b, 0x3ac3, 0x3811, 0x36d7, 0x3519, 0x3a92, 0x3a42, 0x29d1, 0x383a, 0x3a9b, 0x300e, 0x2cd3, 0x39cd, 0x3874, 0x3a07, 0x2eb1, 0x3b86, 0x3ad8, 0x3a5d, +0x3712, 0x284a, 0x38c1, 0x3bec, 0x39c0, 0x32cd, 0x3ad8, 0x3bce, 0x3817, 0x3896, 0x3aa7, 0x3870, 0x3996, 0x32cc, 0x3a4c, 0x3757, 0x3814, 0x3b65, 0x3acb, 0x376e, 0x34c0, 0x3609, 0x3bf0, 0x3b24, 0x3b29, 0x3848, 0x34b7, 0x398a, 0x220c, 0x3498, 0x3a8c, 0x3883, +0x38c4, 0x3af6, 0x3a42, 0x2dd6, 0x3147, 0x3717, 0x3a8e, 0x3af9, 0x3296, 0x38ef, 0x34fa, 0x3555, 0x3b29, 0x38de, 0x315e, 0x3773, 0x3b67, 0x3116, 0x38ec, 0x357c, 0x35d0, 0x2518, 0x3958, 0x2a03, 0x37d9, 0x3699, 0x3a1e, 0x3230, 0x3b13, 0x36d4, 0x3b2a, 0x39ad, +0x3b10, 0x351a, 0x3b97, 0x3326, 0x2b54, 0x3b7d, 0x386f, 0x373e, 0x37fa, 0x389b, 0x3b90, 0x3292, 0x3975, 0x38f3, 0x37f1, 0x3590, 0x3810, 0x2fd7, 0x3bf7, 0x3a5a, 0x3a1c, 0x34dd, 0x354c, 0x32f8, 0x3095, 0x321e, 0x39e0, 0x395c, 0x3717, 0x357f, 0x394a, 0x34b1, +0x3ba4, 0x380c, 0x3604, 0x2f50, 0x348d, 0x3828, 0x3a9f, 0x39ce, 0x32ca, 0x3906, 0x3ab2, 0x2ca5, 0x38c9, 0x362a, 0x34b2, 0x29dc, 0x3a36, 0x3052, 0x31b7, 0x3589, 0x387c, 0x3401, 0x3b22, 0x3ad6, 0x3ae8, 0x3238, 0x3494, 0x3502, 0x3717, 0x3a6c, 0x3229, 0x368c, +0x3056, 0x3a56, 0x3498, 0x39eb, 0x2864, 0x342d, 0x39e0, 0x34a1, 0x2b99, 0x3a04, 0x38ff, 0x328c, 0x34d9, 0x387d, 0x3a3c, 0x32e5, 0x39eb, 0x3984, 0x34dd, 0x38a7, 0x373f, 0x39b4, 0x3235, 0x2f58, 0x2f39, 0x3800, 0x3758, 0x3939, 0x39fc, 0x3a4b, 0x38bf, 0x30ee, +0x345e, 0x39c8, 0x3a6d, 0x3262, 0x3b81, 0x31dc, 0x3a15, 0x3bd0, 0x36af, 0x36de, 0x37d5, 0x39d7, 0x3ad3, 0x3ac1, 0x3109, 0x35ea, 0x31c6, 0x398d, 0x3987, 0x3a4a, 0x34d2, 0x2ed2, 0x35e6, 0x352c, 0x39eb, 0x3bd6, 0x3a5b, 0x39d1, 0x34aa, 0x3ade, 0x394b, 0x38a1, +0x2bed, 0x38de, 0x3811, 0x3813, 0x391a, 0x374b, 0x3829, 0x3725, 0x38f0, 0x3583, 0x3966, 0x3a7d, 0x375a, 0x38fe, 0x3696, 0x361c, 0x39a8, 0x35f0, 0x38e1, 0x3003, 0x3595, 0x316e, 0x3862, 0x3af8, 0x3af2, 0x34c8, 0x381d, 0x37d8, 0x3893, 0x3a9c, 0x3989, 0x308c, +0x30cc, 0x2538, 0x399d, 0x3919, 0x399e, 0x21cc, 0x38e9, 0x30f8, 0x3a20, 0x3b3c, 0x3990, 0x259c, 0x3143, 0x3080, 0x3967, 0x3afb, 0x3a1b, 0x3779, 0x2eeb, 0x39f3, 0x379a, 0x369c, 0x3985, 0x3a1b, 0x3ba6, 0x3a53, 0x28d5, 0x3881, 0x31d9, 0x3a34, 0x3bd9, 0x393a, +0x3601, 0x2c6e, 0x3636, 0x3298, 0x39bb, 0x3a08, 0x38db, 0x35ad, 0x3a09, 0x36a6, 0x3bc7, 0x3bac, 0x34ae, 0x3291, 0x290b, 0x3250, 0x2648, 0x333d, 0x2bf3, 0x34b1, 0x30e0, 0x351f, 0x3a74, 0x38dc, 0x3883, 0x2841, 0x35e1, 0x390d, 0x3a50, 0x3abd, 0x386d, 0x3bb7, +0x3b94, 0x36b7, 0x3a49, 0x332f, 0x3a1d, 0x354b, 0x3bab, 0x3346, 0x3417, 0x351e, 0x3b6d, 0x391a, 0x2db3, 0x3b1c, 0x3a4a, 0x37b7, 0x36cf, 0x3a56, 0x39c4, 0x3be9, 0x34f0, 0x39be, 0x3691, 0x1ba5, 0x3888, 0x3040, 0x3ae1, 0x3b9b, 0x398f, 0x3a49, 0x3a16, 0x38c0, +0x386c, 0x39ab, 0x37fa, 0x382c, 0x3a6f, 0x393f, 0x340d, 0x38ef, 0x39d1, 0x3845, 0x398f, 0x363e, 0x3687, 0x3052, 0x3a2b, 0x392c, 0x2f5c, 0x3412, 0x3a1f, 0x3b2f, 0x3bcc, 0x3a63, 0x3a89, 0x36e9, 0x3921, 0x3b80, 0x2dc0, 0x3a03, 0x3beb, 0x38d3, 0x36cb, 0x39a3, +0x3978, 0x3a88, 0x3ba4, 0x3561, 0x28c5, 0x33a0, 0x37be, 0x2c39, 0x30ee, 0x3782, 0x2c07, 0x354e, 0x3491, 0x3a92, 0x331a, 0x3b15, 0x32e1, 0x3839, 0x3afb, 0x36c2, 0x2fd0, 0x29ad, 0x3b2e, 0x39c1, 0x2a8c, 0x341a, 0x2f90, 0x395a, 0x3969, 0x37ea, 0x3a5c, 0x3b6d, +0x3971, 0x3a93, 0x304e, 0x3623, 0x3a22, 0x31ee, 0x29df, 0x2c93, 0x3a01, 0x3a62, 0x366c, 0x371d, 0x3af3, 0x2e08, 0x3ac0, 0x3642, 0x3a28, 0x368d, 0x2d3d, 0x36d9, 0x32c3, 0x373f, 0x36fe, 0x3487, 0x2c81, 0x3623, 0x3b59, 0x3a91, 0x350a, 0x34f4, 0x3b09, 0x2c25, +0x3b13, 0x325a, 0x379e, 0x3a7d, 0x34b1, 0x39d5, 0x2ba8, 0x322b, 0x3b5e, 0x37ab, 0x2e24, 0x3ba9, 0x3a3d, 0x34f7, 0x3ba1, 0x3877, 0x3071, 0x39fb, 0x3bbd, 0x3633, 0x3b36, 0x2daa, 0x3b9b, 0x3aa0, 0x395c, 0x3b8f, 0x38d5, 0x3ab0, 0x3a8f, 0x36c2, 0x3b1f, 0x3489, +0x2acc, 0x3845, 0x3715, 0x37d8, 0x3992, 0x3bff, 0x350e, 0x3ad7, 0x39b0, 0x35ac, 0x3287, 0x385f, 0x3bd4, 0x37a3, 0x3438, 0x39a5, 0x3bcf, 0x38c3, 0x34f6, 0x3ae3, 0x3b57, 0x39af, 0x35eb, 0x3bed, 0x34d4, 0x2a95, 0x3b13, 0x384e, 0x3a3b, 0x33da, 0x3bce, 0x3b99, +0x3559, 0x3335, 0x3a2e, 0x3123, 0x38db, 0x33d0, 0x3638, 0x3b17, 0x3a72, 0x3afc, 0x3936, 0x3838, 0x2b69, 0x3895, 0x3a1a, 0x3192, 0x39d5, 0x37a5, 0x2eb0, 0x2e8b, 0x329a, 0x3b90, 0x390a, 0x3a1e, 0x3847, 0x375d, 0x3873, 0x35e2, 0x3771, 0x30f5, 0x3231, 0x3bd7, +0x2bbc, 0x3ace, 0x31ad, 0x3a6b, 0x28a4, 0x3b48, 0x3ba3, 0x3a84, 0x3353, 0x39f6, 0x381f, 0x2dd6, 0x314c, 0x34af, 0x3929, 0x3921, 0x383b, 0x34b0, 0x3923, 0x32c9, 0x3ae7, 0x318f, 0x3480, 0x2ad8, 0x3042, 0x3a4c, 0x349d, 0x2c12, 0x3abb, 0x3a57, 0x3b0d, 0x3111, +0x3359, 0x3a84, 0x38f2, 0x368d, 0x2f4b, 0x3ba0, 0x395c, 0x3026, 0x3a15, 0x2a04, 0x326e, 0x3522, 0x31a2, 0x382f, 0x2ada, 0x3b7c, 0x2f80, 0x3af5, 0x2d35, 0x38fa, 0x39ab, 0x2c6d, 0x2e7a, 0x39f6, 0x31a4, 0x3a53, 0x358c, 0x3951, 0x3a4e, 0x3916, 0x2a3f, 0x3ae9, +0x3b03, 0x39f8, 0x39fe, 0x3a61, 0x39fb, 0x3704, 0x360d, 0x39a7, 0x37a9, 0x348f, 0x3a30, 0x3af5, 0x366f, 0x3b29, 0x3a6a, 0x33d5, 0x370a, 0x39cd, 0x3444, 0x3bea, 0x3b2b, 0x312e, 0x3b8e, 0x32cf, 0x3b79, 0x3302, 0x3bba, 0x3962, 0x3413, 0x37a1, 0x39e0, 0x3805 +}; \ No newline at end of file diff --git a/hwpe/redmule_256iter/inc/z_2D.h b/hwpe/redmule_256iter/inc/z_2D.h new file mode 100644 index 0000000..aff808a --- /dev/null +++ b/hwpe/redmule_256iter/inc/z_2D.h @@ -0,0 +1,27 @@ + /* Header file generated by RedMulE Golden Model */ +uint16_t z_oup_2D [24][32] = { +0x4845, 0x4897, 0x4608, 0x4838, 0x4855, 0x487b, 0x4869, 0x4880, 0x46d1, 0x48b0, 0x48db, 0x483f, 0x48c9, 0x485f, 0x4881, 0x483a, 0x484b, 0x472c, 0x4762, 0x492b, 0x4822, 0x48fd, 0x488e, 0x492e, 0x483e, 0x484f, 0x49e8, 0x46d7, 0x484b, 0x489d, 0x490b, 0x47e9, +0x484f, 0x47d2, 0x44be, 0x4747, 0x47c7, 0x46c0, 0x4727, 0x48af, 0x46c5, 0x482d, 0x483d, 0x482e, 0x4897, 0x479f, 0x488b, 0x4749, 0x489a, 0x46a8, 0x46f2, 0x488b, 0x4891, 0x47e8, 0x4872, 0x483d, 0x4716, 0x46fd, 0x49b5, 0x46a0, 0x46e7, 0x47a4, 0x48a1, 0x4767, +0x4939, 0x4935, 0x4703, 0x48c1, 0x4863, 0x48bd, 0x4913, 0x48cf, 0x48b6, 0x48b8, 0x4946, 0x4920, 0x495e, 0x48e1, 0x4938, 0x48b2, 0x493a, 0x4882, 0x483b, 0x49d5, 0x4911, 0x4972, 0x496b, 0x49df, 0x48f2, 0x4888, 0x4a46, 0x4821, 0x48c1, 0x490c, 0x49b2, 0x48a3, +0x463a, 0x47b0, 0x44cb, 0x4762, 0x4765, 0x46b9, 0x466a, 0x4814, 0x4631, 0x4796, 0x4666, 0x474b, 0x4798, 0x4704, 0x4838, 0x4761, 0x47d3, 0x4590, 0x45ea, 0x48a2, 0x47f1, 0x4844, 0x484b, 0x4776, 0x47d6, 0x46d8, 0x48f3, 0x44d3, 0x46fa, 0x478d, 0x481e, 0x466e, +0x4827, 0x481e, 0x45a2, 0x4794, 0x4727, 0x4806, 0x475d, 0x48d5, 0x4708, 0x4828, 0x4862, 0x480d, 0x4895, 0x4832, 0x48bd, 0x47f1, 0x482a, 0x46a7, 0x47b1, 0x492d, 0x484d, 0x4884, 0x48dc, 0x485f, 0x476d, 0x480c, 0x48e9, 0x46d3, 0x4728, 0x4884, 0x48a0, 0x480e, +0x4862, 0x4813, 0x4675, 0x485a, 0x47e8, 0x4738, 0x4836, 0x4823, 0x46e7, 0x4821, 0x4822, 0x47b3, 0x4846, 0x4855, 0x4863, 0x4717, 0x4872, 0x47c1, 0x46d5, 0x488e, 0x47e2, 0x485f, 0x487c, 0x48b8, 0x481e, 0x4788, 0x48bd, 0x4677, 0x46c9, 0x47f8, 0x48fe, 0x47fc, +0x47a0, 0x47b2, 0x4588, 0x467e, 0x4662, 0x46c7, 0x46e8, 0x4812, 0x4536, 0x474e, 0x46c0, 0x468f, 0x481f, 0x4679, 0x46a1, 0x46e2, 0x4809, 0x4560, 0x4630, 0x47eb, 0x46b5, 0x4757, 0x4848, 0x477f, 0x46a6, 0x46d8, 0x4870, 0x459a, 0x4670, 0x4678, 0x47d2, 0x468c, +0x4762, 0x48c4, 0x46e3, 0x4791, 0x46b1, 0x486d, 0x47d0, 0x4867, 0x468d, 0x47f6, 0x48a5, 0x4756, 0x4857, 0x4854, 0x4866, 0x4838, 0x484d, 0x46ec, 0x47d2, 0x48f6, 0x484a, 0x4879, 0x4848, 0x483c, 0x471d, 0x4806, 0x48fa, 0x4730, 0x4768, 0x47b8, 0x4865, 0x46f9, +0x48a8, 0x4918, 0x46ca, 0x4867, 0x4800, 0x4862, 0x48d3, 0x4910, 0x474e, 0x4849, 0x48eb, 0x486b, 0x4966, 0x48c5, 0x48f4, 0x4830, 0x48f9, 0x4778, 0x481e, 0x499e, 0x48cf, 0x48f1, 0x4982, 0x4923, 0x487c, 0x47cf, 0x49ea, 0x4649, 0x4773, 0x495e, 0x48b2, 0x483f, +0x48a7, 0x4975, 0x4616, 0x481e, 0x481f, 0x4866, 0x48b6, 0x4864, 0x47dc, 0x4873, 0x485c, 0x487f, 0x4938, 0x491f, 0x490d, 0x48b6, 0x48f8, 0x48a1, 0x4859, 0x492d, 0x489c, 0x4915, 0x4899, 0x4887, 0x486c, 0x4859, 0x49ca, 0x471e, 0x4867, 0x4918, 0x48d3, 0x4827, +0x488b, 0x4998, 0x4704, 0x481d, 0x48b8, 0x4880, 0x4876, 0x4944, 0x470c, 0x48f2, 0x48b9, 0x489b, 0x4956, 0x48e5, 0x48d6, 0x48a5, 0x48dc, 0x4856, 0x484e, 0x49ab, 0x48e0, 0x490e, 0x48dd, 0x4945, 0x488b, 0x48dd, 0x4a32, 0x47ea, 0x4835, 0x4911, 0x4965, 0x4819, +0x460e, 0x481e, 0x452c, 0x4673, 0x475c, 0x4717, 0x46f6, 0x46d0, 0x4696, 0x46bc, 0x4726, 0x481e, 0x4763, 0x46ea, 0x46fe, 0x4758, 0x478b, 0x4627, 0x4704, 0x483f, 0x46ad, 0x47b1, 0x4792, 0x4816, 0x46f2, 0x4684, 0x4827, 0x45a8, 0x472f, 0x47a4, 0x4797, 0x462b, +0x483f, 0x48ab, 0x468f, 0x4863, 0x485a, 0x4766, 0x481d, 0x48cb, 0x47dc, 0x4903, 0x48fc, 0x4830, 0x48cc, 0x483e, 0x48ab, 0x4864, 0x4966, 0x4763, 0x4794, 0x499d, 0x488e, 0x488b, 0x48dc, 0x4960, 0x4854, 0x484c, 0x499c, 0x474c, 0x4826, 0x48bc, 0x4949, 0x4883, +0x489d, 0x4905, 0x4718, 0x481e, 0x48e3, 0x48f4, 0x48c1, 0x4904, 0x47e8, 0x48b3, 0x4892, 0x48d4, 0x48ff, 0x4894, 0x48d5, 0x4886, 0x48fa, 0x4803, 0x47d2, 0x492e, 0x4870, 0x48b2, 0x48e5, 0x492b, 0x487b, 0x4785, 0x49e3, 0x471d, 0x4837, 0x48bf, 0x489b, 0x48c4, +0x475c, 0x4871, 0x464a, 0x4811, 0x47af, 0x471c, 0x4817, 0x4817, 0x463b, 0x484e, 0x477f, 0x464f, 0x4704, 0x487c, 0x47a3, 0x4725, 0x4853, 0x462a, 0x465a, 0x4860, 0x4736, 0x4880, 0x47e1, 0x482b, 0x4811, 0x46c0, 0x48dc, 0x475d, 0x4668, 0x4806, 0x4893, 0x46f4, +0x4858, 0x4959, 0x463d, 0x487b, 0x480f, 0x484e, 0x48c0, 0x48a6, 0x4847, 0x4894, 0x48a0, 0x484a, 0x491e, 0x48f4, 0x48fc, 0x48b5, 0x48ce, 0x47d2, 0x47db, 0x497f, 0x4955, 0x4939, 0x48a7, 0x48ce, 0x4890, 0x4884, 0x49d6, 0x4763, 0x486e, 0x4922, 0x48f4, 0x48c3, +0x47ec, 0x491c, 0x4698, 0x4783, 0x4715, 0x4754, 0x4745, 0x4752, 0x472f, 0x4832, 0x4817, 0x4809, 0x47f8, 0x48c3, 0x47e6, 0x4800, 0x48b6, 0x4730, 0x480a, 0x48cb, 0x479e, 0x488e, 0x47c2, 0x488e, 0x472f, 0x47ee, 0x489d, 0x4744, 0x4755, 0x4851, 0x4846, 0x47d3, +0x4838, 0x48a0, 0x4634, 0x4762, 0x4786, 0x4806, 0x47e3, 0x482d, 0x4726, 0x486c, 0x47b7, 0x4803, 0x48ac, 0x4814, 0x48e0, 0x4839, 0x4827, 0x4750, 0x46f2, 0x48c5, 0x483f, 0x4886, 0x48ad, 0x4856, 0x47e8, 0x47a9, 0x4937, 0x4743, 0x46d0, 0x481f, 0x484c, 0x4804, +0x47fd, 0x481f, 0x456d, 0x4813, 0x474d, 0x4807, 0x4688, 0x480e, 0x46e8, 0x4810, 0x469f, 0x4799, 0x4853, 0x478f, 0x47f2, 0x4824, 0x47d0, 0x471f, 0x46da, 0x485f, 0x4813, 0x481c, 0x482e, 0x4863, 0x4786, 0x480b, 0x48c9, 0x46b8, 0x475a, 0x46e2, 0x4852, 0x46c5, +0x45af, 0x4802, 0x4466, 0x46c2, 0x465d, 0x4743, 0x46b7, 0x47ba, 0x4636, 0x46c3, 0x4677, 0x4784, 0x485a, 0x47c2, 0x46dc, 0x46ac, 0x47de, 0x460e, 0x465f, 0x4834, 0x47f4, 0x4769, 0x46fc, 0x4810, 0x45fd, 0x45ea, 0x48d0, 0x45b5, 0x4704, 0x4783, 0x4830, 0x46c4, +0x4759, 0x47c7, 0x453d, 0x45b0, 0x4741, 0x4702, 0x4736, 0x4793, 0x461b, 0x47ba, 0x470b, 0x46dd, 0x4657, 0x470b, 0x470d, 0x4710, 0x486c, 0x468f, 0x45c3, 0x46ba, 0x479d, 0x483b, 0x46c9, 0x4774, 0x46a9, 0x46a7, 0x4833, 0x4606, 0x4690, 0x46a9, 0x46f5, 0x46a7, +0x47ac, 0x48bb, 0x452c, 0x4803, 0x470f, 0x4824, 0x47d5, 0x48cb, 0x4707, 0x484a, 0x4832, 0x4797, 0x4851, 0x482c, 0x487a, 0x4877, 0x4891, 0x465d, 0x47f4, 0x48ce, 0x4898, 0x4899, 0x484e, 0x486a, 0x47ac, 0x47f0, 0x493e, 0x4611, 0x47e2, 0x489e, 0x488c, 0x46af, +0x4665, 0x4836, 0x45e4, 0x46b6, 0x46a1, 0x46b9, 0x46c8, 0x46dd, 0x4658, 0x474b, 0x467b, 0x4777, 0x4769, 0x4798, 0x4785, 0x475e, 0x472a, 0x4656, 0x45fb, 0x4881, 0x46fc, 0x472d, 0x476e, 0x47a3, 0x465d, 0x46ca, 0x4855, 0x4500, 0x464f, 0x479a, 0x46c3, 0x4738, +0x481e, 0x486c, 0x4659, 0x4801, 0x4756, 0x477a, 0x47d5, 0x487b, 0x4706, 0x4808, 0x484f, 0x4838, 0x4870, 0x4863, 0x48d3, 0x4806, 0x4865, 0x4771, 0x46be, 0x494c, 0x4915, 0x484c, 0x4900, 0x4862, 0x481a, 0x46e8, 0x4974, 0x46a0, 0x4775, 0x483d, 0x487c, 0x480e +}; \ No newline at end of file diff --git a/hwpe/redmule_256iter/inc/z_output.h b/hwpe/redmule_256iter/inc/z_output.h new file mode 100644 index 0000000..96c7e5f --- /dev/null +++ b/hwpe/redmule_256iter/inc/z_output.h @@ -0,0 +1,27 @@ + /* Header file generated by RedMulE Golden Model */ +uint16_t z_oup [768] = { +0x4845, 0x4897, 0x4608, 0x4838, 0x4855, 0x487b, 0x4869, 0x4880, 0x46d1, 0x48b0, 0x48db, 0x483f, 0x48c9, 0x485f, 0x4881, 0x483a, 0x484b, 0x472c, 0x4762, 0x492b, 0x4822, 0x48fd, 0x488e, 0x492e, 0x483e, 0x484f, 0x49e8, 0x46d7, 0x484b, 0x489d, 0x490b, 0x47e9, +0x484f, 0x47d2, 0x44be, 0x4747, 0x47c7, 0x46c0, 0x4727, 0x48af, 0x46c5, 0x482d, 0x483d, 0x482e, 0x4897, 0x479f, 0x488b, 0x4749, 0x489a, 0x46a8, 0x46f2, 0x488b, 0x4891, 0x47e8, 0x4872, 0x483d, 0x4716, 0x46fd, 0x49b5, 0x46a0, 0x46e7, 0x47a4, 0x48a1, 0x4767, +0x4939, 0x4935, 0x4703, 0x48c1, 0x4863, 0x48bd, 0x4913, 0x48cf, 0x48b6, 0x48b8, 0x4946, 0x4920, 0x495e, 0x48e1, 0x4938, 0x48b2, 0x493a, 0x4882, 0x483b, 0x49d5, 0x4911, 0x4972, 0x496b, 0x49df, 0x48f2, 0x4888, 0x4a46, 0x4821, 0x48c1, 0x490c, 0x49b2, 0x48a3, +0x463a, 0x47b0, 0x44cb, 0x4762, 0x4765, 0x46b9, 0x466a, 0x4814, 0x4631, 0x4796, 0x4666, 0x474b, 0x4798, 0x4704, 0x4838, 0x4761, 0x47d3, 0x4590, 0x45ea, 0x48a2, 0x47f1, 0x4844, 0x484b, 0x4776, 0x47d6, 0x46d8, 0x48f3, 0x44d3, 0x46fa, 0x478d, 0x481e, 0x466e, +0x4827, 0x481e, 0x45a2, 0x4794, 0x4727, 0x4806, 0x475d, 0x48d5, 0x4708, 0x4828, 0x4862, 0x480d, 0x4895, 0x4832, 0x48bd, 0x47f1, 0x482a, 0x46a7, 0x47b1, 0x492d, 0x484d, 0x4884, 0x48dc, 0x485f, 0x476d, 0x480c, 0x48e9, 0x46d3, 0x4728, 0x4884, 0x48a0, 0x480e, +0x4862, 0x4813, 0x4675, 0x485a, 0x47e8, 0x4738, 0x4836, 0x4823, 0x46e7, 0x4821, 0x4822, 0x47b3, 0x4846, 0x4855, 0x4863, 0x4717, 0x4872, 0x47c1, 0x46d5, 0x488e, 0x47e2, 0x485f, 0x487c, 0x48b8, 0x481e, 0x4788, 0x48bd, 0x4677, 0x46c9, 0x47f8, 0x48fe, 0x47fc, +0x47a0, 0x47b2, 0x4588, 0x467e, 0x4662, 0x46c7, 0x46e8, 0x4812, 0x4536, 0x474e, 0x46c0, 0x468f, 0x481f, 0x4679, 0x46a1, 0x46e2, 0x4809, 0x4560, 0x4630, 0x47eb, 0x46b5, 0x4757, 0x4848, 0x477f, 0x46a6, 0x46d8, 0x4870, 0x459a, 0x4670, 0x4678, 0x47d2, 0x468c, +0x4762, 0x48c4, 0x46e3, 0x4791, 0x46b1, 0x486d, 0x47d0, 0x4867, 0x468d, 0x47f6, 0x48a5, 0x4756, 0x4857, 0x4854, 0x4866, 0x4838, 0x484d, 0x46ec, 0x47d2, 0x48f6, 0x484a, 0x4879, 0x4848, 0x483c, 0x471d, 0x4806, 0x48fa, 0x4730, 0x4768, 0x47b8, 0x4865, 0x46f9, +0x48a8, 0x4918, 0x46ca, 0x4867, 0x4800, 0x4862, 0x48d3, 0x4910, 0x474e, 0x4849, 0x48eb, 0x486b, 0x4966, 0x48c5, 0x48f4, 0x4830, 0x48f9, 0x4778, 0x481e, 0x499e, 0x48cf, 0x48f1, 0x4982, 0x4923, 0x487c, 0x47cf, 0x49ea, 0x4649, 0x4773, 0x495e, 0x48b2, 0x483f, +0x48a7, 0x4975, 0x4616, 0x481e, 0x481f, 0x4866, 0x48b6, 0x4864, 0x47dc, 0x4873, 0x485c, 0x487f, 0x4938, 0x491f, 0x490d, 0x48b6, 0x48f8, 0x48a1, 0x4859, 0x492d, 0x489c, 0x4915, 0x4899, 0x4887, 0x486c, 0x4859, 0x49ca, 0x471e, 0x4867, 0x4918, 0x48d3, 0x4827, +0x488b, 0x4998, 0x4704, 0x481d, 0x48b8, 0x4880, 0x4876, 0x4944, 0x470c, 0x48f2, 0x48b9, 0x489b, 0x4956, 0x48e5, 0x48d6, 0x48a5, 0x48dc, 0x4856, 0x484e, 0x49ab, 0x48e0, 0x490e, 0x48dd, 0x4945, 0x488b, 0x48dd, 0x4a32, 0x47ea, 0x4835, 0x4911, 0x4965, 0x4819, +0x460e, 0x481e, 0x452c, 0x4673, 0x475c, 0x4717, 0x46f6, 0x46d0, 0x4696, 0x46bc, 0x4726, 0x481e, 0x4763, 0x46ea, 0x46fe, 0x4758, 0x478b, 0x4627, 0x4704, 0x483f, 0x46ad, 0x47b1, 0x4792, 0x4816, 0x46f2, 0x4684, 0x4827, 0x45a8, 0x472f, 0x47a4, 0x4797, 0x462b, +0x483f, 0x48ab, 0x468f, 0x4863, 0x485a, 0x4766, 0x481d, 0x48cb, 0x47dc, 0x4903, 0x48fc, 0x4830, 0x48cc, 0x483e, 0x48ab, 0x4864, 0x4966, 0x4763, 0x4794, 0x499d, 0x488e, 0x488b, 0x48dc, 0x4960, 0x4854, 0x484c, 0x499c, 0x474c, 0x4826, 0x48bc, 0x4949, 0x4883, +0x489d, 0x4905, 0x4718, 0x481e, 0x48e3, 0x48f4, 0x48c1, 0x4904, 0x47e8, 0x48b3, 0x4892, 0x48d4, 0x48ff, 0x4894, 0x48d5, 0x4886, 0x48fa, 0x4803, 0x47d2, 0x492e, 0x4870, 0x48b2, 0x48e5, 0x492b, 0x487b, 0x4785, 0x49e3, 0x471d, 0x4837, 0x48bf, 0x489b, 0x48c4, +0x475c, 0x4871, 0x464a, 0x4811, 0x47af, 0x471c, 0x4817, 0x4817, 0x463b, 0x484e, 0x477f, 0x464f, 0x4704, 0x487c, 0x47a3, 0x4725, 0x4853, 0x462a, 0x465a, 0x4860, 0x4736, 0x4880, 0x47e1, 0x482b, 0x4811, 0x46c0, 0x48dc, 0x475d, 0x4668, 0x4806, 0x4893, 0x46f4, +0x4858, 0x4959, 0x463d, 0x487b, 0x480f, 0x484e, 0x48c0, 0x48a6, 0x4847, 0x4894, 0x48a0, 0x484a, 0x491e, 0x48f4, 0x48fc, 0x48b5, 0x48ce, 0x47d2, 0x47db, 0x497f, 0x4955, 0x4939, 0x48a7, 0x48ce, 0x4890, 0x4884, 0x49d6, 0x4763, 0x486e, 0x4922, 0x48f4, 0x48c3, +0x47ec, 0x491c, 0x4698, 0x4783, 0x4715, 0x4754, 0x4745, 0x4752, 0x472f, 0x4832, 0x4817, 0x4809, 0x47f8, 0x48c3, 0x47e6, 0x4800, 0x48b6, 0x4730, 0x480a, 0x48cb, 0x479e, 0x488e, 0x47c2, 0x488e, 0x472f, 0x47ee, 0x489d, 0x4744, 0x4755, 0x4851, 0x4846, 0x47d3, +0x4838, 0x48a0, 0x4634, 0x4762, 0x4786, 0x4806, 0x47e3, 0x482d, 0x4726, 0x486c, 0x47b7, 0x4803, 0x48ac, 0x4814, 0x48e0, 0x4839, 0x4827, 0x4750, 0x46f2, 0x48c5, 0x483f, 0x4886, 0x48ad, 0x4856, 0x47e8, 0x47a9, 0x4937, 0x4743, 0x46d0, 0x481f, 0x484c, 0x4804, +0x47fd, 0x481f, 0x456d, 0x4813, 0x474d, 0x4807, 0x4688, 0x480e, 0x46e8, 0x4810, 0x469f, 0x4799, 0x4853, 0x478f, 0x47f2, 0x4824, 0x47d0, 0x471f, 0x46da, 0x485f, 0x4813, 0x481c, 0x482e, 0x4863, 0x4786, 0x480b, 0x48c9, 0x46b8, 0x475a, 0x46e2, 0x4852, 0x46c5, +0x45af, 0x4802, 0x4466, 0x46c2, 0x465d, 0x4743, 0x46b7, 0x47ba, 0x4636, 0x46c3, 0x4677, 0x4784, 0x485a, 0x47c2, 0x46dc, 0x46ac, 0x47de, 0x460e, 0x465f, 0x4834, 0x47f4, 0x4769, 0x46fc, 0x4810, 0x45fd, 0x45ea, 0x48d0, 0x45b5, 0x4704, 0x4783, 0x4830, 0x46c4, +0x4759, 0x47c7, 0x453d, 0x45b0, 0x4741, 0x4702, 0x4736, 0x4793, 0x461b, 0x47ba, 0x470b, 0x46dd, 0x4657, 0x470b, 0x470d, 0x4710, 0x486c, 0x468f, 0x45c3, 0x46ba, 0x479d, 0x483b, 0x46c9, 0x4774, 0x46a9, 0x46a7, 0x4833, 0x4606, 0x4690, 0x46a9, 0x46f5, 0x46a7, +0x47ac, 0x48bb, 0x452c, 0x4803, 0x470f, 0x4824, 0x47d5, 0x48cb, 0x4707, 0x484a, 0x4832, 0x4797, 0x4851, 0x482c, 0x487a, 0x4877, 0x4891, 0x465d, 0x47f4, 0x48ce, 0x4898, 0x4899, 0x484e, 0x486a, 0x47ac, 0x47f0, 0x493e, 0x4611, 0x47e2, 0x489e, 0x488c, 0x46af, +0x4665, 0x4836, 0x45e4, 0x46b6, 0x46a1, 0x46b9, 0x46c8, 0x46dd, 0x4658, 0x474b, 0x467b, 0x4777, 0x4769, 0x4798, 0x4785, 0x475e, 0x472a, 0x4656, 0x45fb, 0x4881, 0x46fc, 0x472d, 0x476e, 0x47a3, 0x465d, 0x46ca, 0x4855, 0x4500, 0x464f, 0x479a, 0x46c3, 0x4738, +0x481e, 0x486c, 0x4659, 0x4801, 0x4756, 0x477a, 0x47d5, 0x487b, 0x4706, 0x4808, 0x484f, 0x4838, 0x4870, 0x4863, 0x48d3, 0x4806, 0x4865, 0x4771, 0x46be, 0x494c, 0x4915, 0x484c, 0x4900, 0x4862, 0x481a, 0x46e8, 0x4974, 0x46a0, 0x4775, 0x483d, 0x487c, 0x480e +}; \ No newline at end of file diff --git a/hwpe/redmule_256iter/pulp_inject_fault.tcl b/hwpe/redmule_256iter/pulp_inject_fault.tcl new file mode 100644 index 0000000..61ccadf --- /dev/null +++ b/hwpe/redmule_256iter/pulp_inject_fault.tcl @@ -0,0 +1,53 @@ +# Copyright 2023 ETH Zurich and University of Bologna. +# Solderpad Hardware License, Version 0.51, see LICENSE for details. +# SPDX-License-Identifier: SHL-0.51 +# +# Author: Michael Rogenmoser (michaero@iis.ee.ethz.ch) + +transcript quietly +if {! [info exists ::env(VSIM_PATH)]} {error "Define VSIM_PATH"} +set utils_base_path [file join $::env(VSIM_PATH) scripts fault_injection_utils] +set script_base_path [file join $::env(VSIM_PATH) fault_injection_sim scripts] + +set verbosity 2 +set log_injections 1 +# Easy way to generate a variable seed +# set seed [clock seconds] +# Default value +set seed 12345 +set print_statistics 1 + +set inject_start_time 550000000000ps +set inject_stop_time 750000000000ps +set injection_clock "pulp_cluster_tb/cluster_i/clk_i" +set injection_clock_trigger 0 +set fault_period 150 +set rand_initial_injection_phase 0 +# max_num set to 0 means until stop_time +set max_num_fault_inject 0 +set signal_fault_duration 20ns +set register_fault_duration 0ns + +set allow_multi_bit_upset $::env(MULTI_BIT_UPSET) +set use_bitwidth_as_weight 0 +set check_core_output_modification 0 +set check_core_next_state_modification 0 +set reg_to_sig_ratio 1 + +source [file join $utils_base_path pulp_extract_nets.tcl] + +set inject_signals_netlist [] +set inject_register_netlist [] +set output_netlist [] +set next_state_netlist [] +set assertion_disable_list [] + +# for {set idx 0} {$idx < 12} {incr idx} { +# set inject_signals_netlist [list {*}$inject_signals_netlist {*}[get_all_core_nets $idx]] +# set output_netlist [list {*}$output_netlist {*}[get_core_output_nets $idx]] +# } + +set inject_register_netlist [list {*}$inject_register_netlist {*}[get_memory_slice {0 16} {256 336}]] + +source [file join $script_base_path inject_fault.tcl] + diff --git a/hwpe/redmule_256iter/redmule.c b/hwpe/redmule_256iter/redmule.c new file mode 100644 index 0000000..77019ae --- /dev/null +++ b/hwpe/redmule_256iter/redmule.c @@ -0,0 +1,141 @@ +/* + * Copyright (C) 2022-2023 ETH Zurich and University of Bologna + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * SPDX-License-Identifier: Apache-2.0 + * + * Author: Yvan Tortorella + * + * RedMulE SW test + */ + +#include +#include "stdio.h" +#include "archi_redmule.h" +#include "hal_redmule.h" +#include "pulp.h" + +#define NB_ITER 255 + +int main() { + + volatile int errors = 0; + unsigned int cluster_id = rt_cluster_id(); + unsigned int intc_data_correctable_cnt, redmule_data_correctable_cnt = 0; + unsigned int intc_meta_correctable_cnt = 0; + unsigned int intc_data_uncorrectable_cnt, redmule_data_uncorrectable_cnt = 0; + unsigned int intc_meta_uncorrectable_cnt = 0; + + if(get_core_id() == 0){ + + uint16_t m_size = M_SIZE; + uint16_t n_size = N_SIZE; + uint16_t k_size = K_SIZE; + + uint8_t *x_ext = x_inp; + uint8_t *w_ext = w_inp; + uint8_t *y_ext = y_inp; + uint8_t *z_ext = z_oup; + + uint8_t volatile *x = (uint8_t volatile *) pi_l1_malloc(0, (2*m_size*n_size)); + uint8_t volatile *w = (uint8_t volatile *) pi_l1_malloc(0, (2*n_size*k_size)); + uint8_t volatile *y = (uint8_t volatile *) pi_l1_malloc(0, (2*m_size*k_size)); + uint8_t volatile *z = (uint8_t volatile *) pi_l1_malloc(0, (2*m_size*k_size)); + + #ifdef USE_DMA + volatile unsigned int dma_id = 0; + dma_id = mchan_alloc(); + mchan_transfer((unsigned int) 2*(2*m_size*n_size), + (unsigned int) x_ext, + (unsigned int) x ); + mchan_barrier(dma_id); + mchan_free(dma_id); + + dma_id = mchan_alloc(); + mchan_transfer((unsigned int) 2*(2*n_size*k_size), + (unsigned int) w_ext, + (unsigned int) w ); + mchan_barrier(dma_id); + mchan_free(dma_id); + + dma_id = mchan_alloc(); + mchan_transfer((unsigned int) 2*(2*m_size*k_size), + (unsigned int) y_ext, + (unsigned int) y ); + mchan_barrier(dma_id); + #else + generate_test_data16((int) x, (int) w, (int) y, (int) m_size, (int) n_size, (int) k_size); + #endif + + int gold_sum = 0, check_sum = 0; + int i,j; + + int offload_id_tmp, offload_id; + + // Enable RedMulE + hwpe_cg_enable(); + asm volatile("": : :"memory"); + + hwpe_soft_clear(); + asm volatile("": : :"memory"); + + volatile int job_id = -1; + + // job 0 + job_id = hwpe_wait_acquire(); + asm volatile("": : :"memory"); + redmule_x_add_set ((unsigned int) x); + redmule_w_add_set ((unsigned int) w); + redmule_y_add_set ((unsigned int) y); + redmule_z_add_set ((unsigned int) z); + redmule_cfg (m_size, n_size, k_size, gemm_ops); + asm volatile("": : :"memory"); + hwpe_trigger_job(); + asm volatile("": : :"memory"); + + // job 1 + job_id = hwpe_wait_acquire(); + asm volatile("": : :"memory"); + redmule_x_add_set ((unsigned int) x); + redmule_w_add_set ((unsigned int) w); + redmule_y_add_set ((unsigned int) y); + redmule_z_add_set ((unsigned int) z); + redmule_cfg (m_size, n_size, k_size, gemm_ops); + asm volatile("": : :"memory"); + hwpe_trigger_job(); + asm volatile("": : :"memory"); + + // jobs 2-255 + do { + job_id = hwpe_wait_acquire(); + asm volatile("": : :"memory"); + hwpe_trigger_job(); + asm volatile("": : :"memory"); + } while(job_id < NB_ITER); + + // Wait for end of computation + redmule_evt_wait(); + + // Disable RedMulE + hwpe_cg_disable(); + + errors = redmule_compare16((int) z, (int) m_size, (int) k_size); + + *(int *) 0x1A1040A0 = errors; + + printf ("Terminated test with %d errors. See you!\n", errors); + + } + synch_barrier(); + return (errors != 0); +} diff --git a/hwpe/redmule_softclear/Makefile b/hwpe/redmule_softclear/Makefile new file mode 100644 index 0000000..88346b6 --- /dev/null +++ b/hwpe/redmule_softclear/Makefile @@ -0,0 +1,20 @@ +PULP_APP = test +PULP_APP_SRCS = redmule.c +PULP_CFLAGS = -O3 + +ifeq ($(use_dma),1) + PULP_CFLAGS += -DUSE_DMA +endif + +ifeq ($(fault_inject),1) + export FAULT_INJECTION=1 + export FAULT_INJECTION_SCRIPT=$(CURDIR)/pulp_inject_fault.tcl +endif + +ifeq ($(multi_bit_upset),1) + export MULTI_BIT_UPSET=1 +else + export MULTI_BIT_UPSET=0 +endif + +include $(PULP_SDK_HOME)/install/rules/pulp_rt.mk diff --git a/hwpe/redmule_softclear/archi_redmule.h b/hwpe/redmule_softclear/archi_redmule.h new file mode 100644 index 0000000..40eceee --- /dev/null +++ b/hwpe/redmule_softclear/archi_redmule.h @@ -0,0 +1,170 @@ +/* + * Copyright (C) 2022-2023 ETH Zurich and University of Bologna + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * SPDX-License-Identifier: Apache-2.0 + * + * Author: Yvan Tortorella + * + * High-level architecture of RedMulE + * + */ + +#ifndef __ARCHI_REDMULE_H__ +#define __ARCHI_REDMULE_H__ + +/* + * |========================================================================| + * || || + * ||Control and generic configuration register layout || + * |========================================================================| + * || # reg | offset | bits | bitmask || content || + * ||-------+----------+---------+--------------++-------------------------|| + * || 0 | 0x0000 | 31: 0 | 0xFFFFFFFF || TRIGGER || + * || 1 | 0x0004 | 31: 0 | 0xFFFFFFFF || ACQUIRE || + * || 2 | 0x0008 | 31: 0 | 0xFFFFFFFF || EVT_ENABLE || + * || 3 | 0x000c | 31: 0 | 0xFFFFFFFF || STATUS || + * || 4 | 0x0010 | 31: 0 | 0xFFFFFFFF || RUNNING_JOB || + * || 5 | 0x0014 | 31: 0 | 0xFFFFFFFF || SOFT_CLEAR || + * |========================================================================| + * || || + * ||Job-dependent registers layout || + * |========================================================================| + * || # reg | offset | bits | bitmask || content || + * ||-------+----------+---------+--------------++-------------------------|| + * || 0 | 0x0040 | 31: 0 | 0xFFFFFFFF || X_ADDR || + * ||-------+----------+---------+--------------++-------------------------|| + * || 1 | 0x0044 | 31: 0 | 0xFFFFFFFF || W_ADDR || + * ||-------+----------+---------+--------------++-------------------------|| + * || 2 | 0x0048 | 31: 0 | 0xFFFFFFFF || Z_ADDR || + * ||-------+----------+---------+--------------++-------------------------|| + * || 3 | 0x004C | | || Matrix Config 0 Reg || + * || | | 31:16 | 0xFFFF0000 || K Size (W Columns) || + * || | | 15: 0 | 0x0000FFFF || M Size (X Rows) || + * ||-------+----------+---------+--------------++-------------------------|| + * || 4 | 0x0050 | | || Matrix Config 1 Reg || + * || | | 31:16 | 0xFFFFFFFF || N Size (X Cols/W Rows) || + * ||-------+----------+---------+--------------++-------------------------|| + * || 5 | 0x0054 | | || Matrix Arithmetic Reg || + * || | | 12:10 | 0x00001C00 || Operation selection || + * || | | 9: 7 | 0x00000380 || Input/Output format || + * |========================================================================| + * + */ + +/* PULP Cluster Archi defines */ +#define ARCHI_CLUST_CTRL_BASE ARCHI_CLUSTER_CTRL_ADDR +#define ARCHI_CLUST_HWPE_BASE ARCHI_HWCE_ADDR +#define DMA_COMMAND_QUEUE ARCHI_MCHAN_DEMUX_ADDR +#define DMA_STATUS_REGISTER (ARCHI_MCHAN_DEMUX_ADDR + 4) +#define ARCHI_CL_HWPE_EVT0 12 +#define ARCHI_CL_HWPE_EVT1 13 +#define FC_DMA_EVENT 8 +#define CL_DMA_EVENT 22 +#define CLUST_CTRL_HWPE_EN 0x18 +#define CLUST_CTRL_HWPE_EN_MASK 0x800 +#define __builtin_bitinsert(a,b,c,d) (a | (((b << (32-c)) >> (32-c)) << d)) + +// RedMulE architecture +#define ADDR_WIDTH 32 +#define DATA_WIDTH 256 +#define REDMULE_FMT 16 +#define ARRAY_HEIGHT 4 +#define PIPE_REGS 3 +#define ARRAY_WIDTH 12 /* Superior limit is ARRAY_HEIGHT*PIPE_REGS */ + +// Commands +#define REDMULE_TRIGGER 0x00 +#define REDMULE_ACQUIRE 0x04 +#define REDMULE_FINISHED 0x08 +#define REDMULE_STATUS 0x0C +#define REDMULE_RUNNING_JOB 0x10 +#define REDMULE_SOFT_CLEAR 0x14 + +// Registers +#define REDMULE_REG_OFFS 0x40 +// #define REDMULE_REG_X_PTR 0x00 +// #define REDMULE_REG_W_PTR 0x04 +// #define REDMULE_REG_Z_PTR 0x08 +// #define REDMULE_MCFG0_PTR 0x0C +// #define REDMULE_MCFG1_PTR 0x10 +// #define REDMULE_ARITH_PTR 0x14 +#define REDMULE_REG_X_PTR 0x00 +#define REDMULE_REG_W_PTR 0x04 +#define REDMULE_REG_Y_PTR 0x08 +#define REDMULE_REG_Z_PTR 0x0C +#define REDMULE_REG_X_ITER_PTR 0x10 +#define REDMULE_REG_W_ITER_PTR 0x14 +#define REDMULE_REG_LEFTOVERS_PTR 0x18 +#define REDMULE_REG_LEFT_PARAMS_PTR 0x1C +#define REDMULE_REG_X_D1_STRIDE_PTR 0x20 +#define REDMULE_REG_W_TOT_LEN_PTR 0x24 +#define REDMULE_REG_TOT_X_READ_PTR 0x28 +#define REDMULE_REG_W_D0_STRIDE_PTR 0x2C +#define REDMULE_REG_YZ_TOT_LEN_PTR 0x30 +#define REDMULE_REG_YZ_D0_STRIDE_PTR 0x34 +#define REDMULE_REG_YZ_D2_STRIDE_PTR 0x38 +#define REDMULE_REG_X_ROWS_OFFS_PTR 0x3C +#define REDMULE_REG_X_BUFFER_SLOTS_PTR 0x40 +#define REDMULE_REG_X_TOT_LEN_PTR 0x44 +#define REDMULE_REG_OP_SELECTION 0x48 + +#define REDMULE_ECC_REG_OFFS 0x90 +#define DATA_CORR_ERR 0x00 +#define DATA_UNCORR_ERR 0x04 +#define METADATA_CORR_ERR 0x08 +#define METADATA_UNCORR_ERR 0x0c + +// OPs definition +#define MATMUL 0x0 +#define GEMM 0x1 +#define ADDMAX 0x2 +#define ADDMIN 0x3 +#define MULMAX 0x4 +#define MULMIN 0x5 +#define MAXMIN 0x6 +#define MINMAX 0x7 + +// GEMM formats +#define Float8 0x0 +#define Float16 0x1 +#define Float8Alt 0x2 +#define Float16Alt 0x3 + +#define RNE 0x0 +#define RTZ 0x1 +#define OP_FMADD 0x0 +#define OP_ADD 0x2 +#define OP_MUL 0x3 +#define OP_MINMAX 0x7 + +// FP Formats encoding +#define FP16 0x2 +#define FP8 0x3 +#define FP16ALT 0x4 +#define FP8ALT 0x5 + +/* DMA Archi */ +#define DMA_TX 0 +#define DMA_RX 1 +#define DMA_INC 1 + +#define PLP_DMA_TYPE_BIT 0x00000011 +#define PLP_DMA_INCR_BIT 0x00000012 +#define PLP_DMA_2D_BIT 0x00000013 +#define PLP_DMA_ELE_BIT 0x00000014 +#define PLP_DMA_ILE_BIT 0x00000015 +#define PLP_DMA_BLE_BIT 0x00000016 +#define PLP_DMA_2D_TCDM_BIT 0x0000017 + +#endif diff --git a/hwpe/redmule_softclear/hal_redmule.h b/hwpe/redmule_softclear/hal_redmule.h new file mode 100644 index 0000000..8fc5000 --- /dev/null +++ b/hwpe/redmule_softclear/hal_redmule.h @@ -0,0 +1,556 @@ +/* + * Copyright (C) 2022-2023 ETH Zurich and University of Bologna + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * SPDX-License-Identifier: Apache-2.0 + * + * Author: Yvan Tortorella + * + * RedMulE Hardware Abstraction Layer (HAL) + */ + +#ifndef __HAL_REDMULE_H__ +#define __HAL_REDMULE_H__ + +#include +#include "inc/x_input.h" +#include "inc/w_input.h" +#include "inc/y_input.h" +#include "inc/z_output.h" +#include "inc/golden.h" +#include "inc/tensor_dim.h" + +/* + * + * For control, generic configuration register layout, + * and job-dependent register map, look at redmule_archi.h + * + */ + +// For all the following functions we use __builtin_pulp_OffsetedWrite and __builtin_pulp_OffsetedRead +// instead of classic load/store because otherwise the compiler is not able to correctly factorize +// the HWPE base in case several accesses are done, ending up with twice more code + +#define HWPE_WRITE(value, offset) *(int *)(ARCHI_CLUST_HWPE_BASE + offset) = value +#define HWPE_READ(offset) *(int *)(ARCHI_CLUST_HWPE_BASE + offset) + +static inline void redmule_x_add_set (unsigned int value) { + HWPE_WRITE(value, REDMULE_REG_OFFS + REDMULE_REG_X_PTR); +} + +static inline void redmule_w_add_set (unsigned int value) { + HWPE_WRITE(value, REDMULE_REG_OFFS + REDMULE_REG_W_PTR); +} + +static inline void redmule_y_add_set (unsigned int value) { + HWPE_WRITE(value, REDMULE_REG_OFFS + REDMULE_REG_Y_PTR); +} + +static inline void redmule_z_add_set (unsigned int value) { + HWPE_WRITE(value, REDMULE_REG_OFFS + REDMULE_REG_Z_PTR); +} + +// static inline void redmule_mcfg_set (uint32_t mcfg0, uint32_t mcfg1) { +// HWPE_WRITE(mcfg0, REDMULE_REG_OFFS + REDMULE_MCFG0_PTR); +// HWPE_WRITE(mcfg1, REDMULE_REG_OFFS + REDMULE_MCFG1_PTR); +// } +// +// static inline void redmule_arith_set (uint32_t arith) { +// HWPE_WRITE(arith, REDMULE_REG_OFFS + REDMULE_ARITH_PTR); +// } + +static inline void hwpe_trigger_job() { + HWPE_WRITE(0, REDMULE_TRIGGER); +} + +static inline int hwpe_acquire_job() { + return HWPE_READ(REDMULE_ACQUIRE); +} + +static inline unsigned int hwpe_get_status() { + return HWPE_READ(REDMULE_STATUS); +} + +static inline unsigned int hwpe_get_running_job() { + return HWPE_READ(REDMULE_RUNNING_JOB); +} + +static inline void hwpe_soft_clear() { + HWPE_WRITE(0, REDMULE_SOFT_CLEAR); +} + +static inline void hwpe_cg_enable() { + *(volatile int*) (ARCHI_CLUST_CTRL_BASE + CLUST_CTRL_HWPE_EN) |= CLUST_CTRL_HWPE_EN_MASK; +} + +static inline void hwpe_cg_disable() { + *(volatile int*) (ARCHI_CLUST_CTRL_BASE + CLUST_CTRL_HWPE_EN) &= ~CLUST_CTRL_HWPE_EN_MASK; +} + +static inline void redmule_evt_wait() { + do { + eu_evt_maskWaitAndClr (1 << ARCHI_CL_HWPE_EVT0); + } while((*(int volatile *)(ARCHI_CLUST_HWPE_BASE + REDMULE_STATUS)) != 0); +} + +static inline int hwpe_wait_acquire() { + int job_id = hwpe_acquire_job(); + while(job_id < 0) { + eu_evt_maskWaitAndClr (1 << ARCHI_CL_HWPE_EVT0); + job_id = hwpe_acquire_job(); + } + return job_id; +} + +static inline unsigned int redmule_get_data_correctable_count () { + return HWPE_READ(REDMULE_ECC_REG_OFFS + DATA_CORR_ERR); +} + +static inline unsigned int redmule_get_data_uncorrectable_count () { + return HWPE_READ(REDMULE_ECC_REG_OFFS + DATA_UNCORR_ERR); +} + +static inline unsigned int redmule_get_meta_correctable_count () { + return HWPE_READ(REDMULE_ECC_REG_OFFS + METADATA_CORR_ERR); +} + +static inline unsigned int redmule_get_meta_uncorrectable_count () { + return HWPE_READ(REDMULE_ECC_REG_OFFS + METADATA_UNCORR_ERR); +} + +/* DMA APIs */ +static inline int mchan_alloc(){ + return *(volatile int*) DMA_COMMAND_QUEUE; +} + +static inline void mchan_transfer(unsigned int len, + unsigned int ext_addr, + unsigned int tcdm_addr) { + + *(volatile int*) DMA_COMMAND_QUEUE = len | + (DMA_RX << PLP_DMA_TYPE_BIT) | + (DMA_INC << PLP_DMA_INCR_BIT) | + (0 << PLP_DMA_2D_BIT) | + (1 << PLP_DMA_ELE_BIT) | + (1 << PLP_DMA_ILE_BIT) | + (0 << PLP_DMA_BLE_BIT) | + (0 << PLP_DMA_2D_TCDM_BIT); + *(volatile int*) DMA_COMMAND_QUEUE = tcdm_addr; + *(volatile int*) DMA_COMMAND_QUEUE = ext_addr; +} + +static inline void mchan_barrier(int id) { + while(((*(volatile int*)(DMA_STATUS_REGISTER)) >> id ) & 0x1 ) { + eu_evt_maskWaitAndClr(1 << FC_DMA_EVENT); + } +} + +static inline void mchan_free(int id) { + *(volatile int*) DMA_STATUS_REGISTER = 0x1 << id; +} + +// void redmule_cfg (unsigned int x, unsigned int w, unsigned int z, +// uint16_t m_size, uint16_t n_size, uint16_t k_size, +// uint8_t gemm_op, uint8_t gemm_fmt){ +// +// uint32_t mcfg_reg0 = 0; +// uint32_t mcfg_reg1 = 0; +// uint32_t arith_reg = 0; +// +// mcfg_reg0 = (k_size << 16) | +// (m_size << 0); +// mcfg_reg1 = n_size << 0; +// +// arith_reg = (gemm_op << 10) | +// (gemm_fmt << 7); +// +// redmule_x_add_set ((unsigned int) x); +// redmule_w_add_set ((unsigned int) w); +// redmule_z_add_set ((unsigned int) z); +// redmule_mcfg_set ((unsigned int) mcfg_reg0, +// (unsigned int) mcfg_reg1); +// redmule_arith_set ((unsigned int) arith_reg); +// +// } + +void redmule_cfg (uint16_t m_size, uint16_t n_size, uint16_t k_size, uint8_t gemm_ops){ + uint32_t x_iters = 0; + uint32_t w_iters = 0; + uint32_t leftovers = 0; + uint32_t left_params = 0; + uint32_t x_d1_stride = 0; + uint32_t x_rows_offs = 0; + uint32_t w_tot_len = 0; + uint32_t w_d1_len = 0; + uint32_t w_d0_stride = 0; + uint32_t yz_tot_len = 0; + uint32_t yz_d0_stride = 0; + uint32_t yz_d2_stride = 0; + uint32_t tot_x_read = 0; + uint32_t x_buffer_slots = 0; + uint32_t op_selection = 0; + uint16_t tot_stores = 0; + uint16_t w_rows = n_size; + uint16_t depth = DATA_WIDTH/(ARRAY_HEIGHT*FPFORMAT); + uint8_t tile = ARRAY_HEIGHT*(PIPE_REGS + 1); + _Bool x_rows_sub = 0; + _Bool x_cols_sub = 0; + _Bool w_cols_sub = 0; + uint16_t x_rows_iter, + x_rows_iter_tmp, + w_rows_iter, + w_rows_iter_tmp; + uint16_t x_cols_iter, + x_cols_iter_tmp, + w_cols_iter, + w_cols_iter_tmp; + uint8_t x_rows_lftovr, + x_cols_lftovr, + w_rows_lftovr, + w_cols_lftovr, + slots; + + // Calculating the number of iterations alng the two dimensions of the X matrix + x_rows_iter_tmp = m_size/ARRAY_WIDTH; + x_cols_iter_tmp = n_size/tile; + + // Calculating the number of iterations alng the two dimensions of the W matrix + w_rows_iter_tmp = w_rows; + w_cols_iter_tmp = k_size/tile; + + // Calculating the residuals along the input dimensions + x_rows_lftovr = m_size - (x_rows_iter_tmp*ARRAY_WIDTH); + x_cols_lftovr = n_size - (x_cols_iter_tmp*tile); + + // Calculating the residuals along the weight dimensions + w_rows_lftovr = n_size - (ARRAY_HEIGHT*(w_rows/ARRAY_HEIGHT)); + w_cols_lftovr = k_size - (w_cols_iter_tmp*tile); + + if (w_cols_lftovr != 0) + w_cols_iter = w_cols_iter_tmp + 1; + else + w_cols_iter = w_cols_iter_tmp; + + if (w_rows_lftovr != 0) + w_rows_iter = w_rows_iter_tmp + ARRAY_HEIGHT - w_rows_lftovr; + else + w_rows_iter = w_rows_iter_tmp; + + if (x_cols_lftovr != 0) + x_cols_iter = x_cols_iter_tmp + 1; + else + x_cols_iter = x_cols_iter_tmp; + + if (x_rows_lftovr != 0) + x_rows_iter = x_rows_iter_tmp + 1; + else + x_rows_iter = x_rows_iter_tmp; + + if (x_cols_lftovr%depth != 0) + x_buffer_slots = x_cols_lftovr/depth + 1; + else + x_buffer_slots = x_cols_lftovr/depth; + + // Calculating the number of total stores + tot_stores = x_rows_iter*w_cols_iter; + + // Determining if input matrixes are sub-matrixes + if (m_size < ARRAY_WIDTH) + x_rows_sub = 1; + if (n_size < ARRAY_HEIGHT) + x_cols_sub = 1; + if (k_size < tile) + w_cols_sub = 1; + + // Operation selection + switch (gemm_ops) { + case MATMUL: + op_selection |= (RNE << 29 | RNE << 26 | OP_FMADD << 22 | OP_MINMAX << 18 | SRC_FMT << 15 | DST_FMT << 12) | 0; + break; + + case GEMM: + op_selection |= (RNE << 29 | RNE << 26 | OP_FMADD << 22 | OP_MINMAX << 18 | SRC_FMT << 15 | DST_FMT << 12) | 1; + break; + + case ADDMAX: + op_selection |= (RNE << 29 | RTZ << 26 | OP_ADD << 22 | OP_MINMAX << 18 | SRC_FMT << 15 | DST_FMT << 12) | 1; + break; + + case ADDMIN: + op_selection |= (RNE << 29 | RNE << 26 | OP_ADD << 22 | OP_MINMAX << 18 | SRC_FMT << 15 | DST_FMT << 12) | 1; + break; + + case MULMAX: + op_selection |= (RNE << 29 | RTZ << 26 | OP_MUL << 22 | OP_MINMAX << 18 | SRC_FMT << 15 | DST_FMT << 12) | 1; + break; + + case MULMIN: + op_selection |= (RNE << 29 | RNE << 26 | OP_MUL << 22 | OP_MINMAX << 18 | SRC_FMT << 15 | DST_FMT << 12) | 1; + break; + + case MAXMIN: + op_selection |= (RTZ << 29 | RNE << 26 | OP_MINMAX << 22 | OP_MINMAX << 18 | SRC_FMT << 15 | DST_FMT << 12) | 1; + break; + + case MINMAX: + op_selection |= (RNE << 29 | RTZ << 26 | OP_MINMAX << 22 | OP_MINMAX << 18 | SRC_FMT << 15 | DST_FMT << 12) | 1; + break; + } + + // Storing iterations and residuals in registers + x_iters |= x_rows_iter << 16 | x_cols_iter << 0; + w_iters |= w_rows_iter << 16 | w_cols_iter << 0; + leftovers |= x_rows_lftovr << 24 | x_cols_lftovr << 16 | w_rows_lftovr << 8 | w_cols_lftovr << 0; + left_params |= tot_stores << 16 | x_rows_sub << 15 | x_cols_sub << 14 | w_cols_sub << 13; + x_d1_stride = ((4*FPFORMAT)/ADDR_WIDTH)*(((DATA_WIDTH/FPFORMAT)*x_cols_iter_tmp) + x_cols_lftovr); + x_rows_offs = ARRAY_WIDTH*x_d1_stride; + w_tot_len = w_rows_iter*w_cols_iter*x_rows_iter; + w_d0_stride = ((4*FPFORMAT)/ADDR_WIDTH)*(((DATA_WIDTH/FPFORMAT)*w_cols_iter_tmp) + w_cols_lftovr); + yz_tot_len = ARRAY_WIDTH*x_rows_iter*w_cols_iter; + yz_d0_stride = w_d0_stride; + yz_d2_stride = ARRAY_WIDTH*w_d0_stride; + tot_x_read = x_rows_iter*x_cols_iter*w_cols_iter; + + // Writing the computations in configuration register + HWPE_WRITE(x_iters , REDMULE_REG_OFFS + REDMULE_REG_X_ITER_PTR ); + HWPE_WRITE(w_iters , REDMULE_REG_OFFS + REDMULE_REG_W_ITER_PTR ); + HWPE_WRITE(leftovers , REDMULE_REG_OFFS + REDMULE_REG_LEFTOVERS_PTR ); + HWPE_WRITE(left_params , REDMULE_REG_OFFS + REDMULE_REG_LEFT_PARAMS_PTR ); + HWPE_WRITE(x_d1_stride , REDMULE_REG_OFFS + REDMULE_REG_X_D1_STRIDE_PTR ); + HWPE_WRITE(x_rows_offs , REDMULE_REG_OFFS + REDMULE_REG_X_ROWS_OFFS_PTR ); + HWPE_WRITE(tot_x_read , REDMULE_REG_OFFS + REDMULE_REG_TOT_X_READ_PTR ); + HWPE_WRITE(x_buffer_slots, REDMULE_REG_OFFS + REDMULE_REG_X_BUFFER_SLOTS_PTR ); + HWPE_WRITE(w_tot_len , REDMULE_REG_OFFS + REDMULE_REG_W_TOT_LEN_PTR ); + HWPE_WRITE(w_d0_stride , REDMULE_REG_OFFS + REDMULE_REG_W_D0_STRIDE_PTR ); + HWPE_WRITE(yz_tot_len , REDMULE_REG_OFFS + REDMULE_REG_YZ_TOT_LEN_PTR ); + HWPE_WRITE(yz_d0_stride , REDMULE_REG_OFFS + REDMULE_REG_YZ_D0_STRIDE_PTR ); + HWPE_WRITE(yz_d2_stride , REDMULE_REG_OFFS + REDMULE_REG_YZ_D2_STRIDE_PTR ); + HWPE_WRITE(op_selection , REDMULE_REG_OFFS + REDMULE_REG_OP_SELECTION ); +} + +void generate_test_data16(int x_start_addr, + int w_start_addr, + int y_start_addr, + int m_size, + int n_size, + int k_size) { + + int x_addr = x_start_addr; + int w_addr = w_start_addr; + int y_addr = y_start_addr; + int x_end_addr = x_start_addr + (2*m_size*n_size); + int w_end_addr = w_start_addr + (2*n_size*k_size); + int y_end_addr = y_start_addr + (2*m_size*k_size); + + // Generating input stimuli from golden model + for (x_addr = x_start_addr; x_addr < x_end_addr; x_addr += 2) { + int x = x_addr - x_start_addr; + *(uint32_t *)(x_addr) = x_inp[x/2]; + } + + // Generating Weight stimuli from golden model + for (w_addr = w_start_addr; w_addr < w_end_addr; w_addr += 2) { + int w = w_addr - w_start_addr; + *(uint32_t *)(w_addr) = w_inp[w/2]; + } + + for (y_addr = y_start_addr; y_addr < y_end_addr; y_addr += 2) { + int y = y_addr - y_start_addr; + *(uint32_t *)(y_addr) = y_inp[y/2]; + } +} + +int redmule_compare16 (int z_start_addr, int m_size, int k_size) { + int err = 0; + int z_end_addr = z_start_addr + 2*m_size*k_size; + uint16_t z_computed; + uint16_t diff, diff_1, diff_2; + + for (int z_addr = z_start_addr; z_addr < z_end_addr; z_addr += 2) { + int z = z_addr - z_start_addr; + z_computed = *(uint32_t *)(z_addr); + + if ( z_computed != z_oup[z/2] ) { + diff_1 = z_computed - z_oup[z/2]; + if (diff_1 > 3) { + diff_2 = z_oup[z/2] - z_computed; + if (diff_2 > 3) { + err++; + } + } + } + } + + return err; + +} + +int redmule16_compare_int(uint32_t *actual_z, uint32_t *golden_z, int len) { + #define ERR 0x0011 + uint32_t actual_word = 0; + uint16_t actual_MSHWord, actual_LSHWord; + uint32_t golden_word = 0; + uint16_t golden_MSHWord, golden_LSHWord; + uint32_t actual = 0; + uint32_t golden = 0; + + int errors = 0; + int error; + + for (int i=0; i golden_LSHWord) ? (actual_LSHWord - golden_LSHWord) : 0; + diff = (actual_LSHWord < golden_LSHWord) ? (golden_LSHWord - actual_LSHWord) : 0; + + if (diff > ERR) { + error = 1; + #ifdef VERBOSE + tfp_printf ("diff: 0x%08x\n", diff); + tfp_printf ("LSW: Error!\n"); + #endif + } + + // Checking Most Significant Half-Word + actual_MSHWord = (uint16_t)((actual_word >> 16) & 0x0000FFFF); + golden_MSHWord = (uint16_t)((golden_word >> 16) & 0x0000FFFF); + + diff = (actual_MSHWord > golden_MSHWord) ? (actual_MSHWord - golden_MSHWord) : 0; + diff = (actual_MSHWord < golden_MSHWord) ? (golden_MSHWord - actual_MSHWord) : 0; + + if (diff > ERR) { + error = 1; + #ifdef VERBOSE + tfp_printf ("diff: 0x%08x\n", diff); + tfp_printf ("MSW: Error!\n"); + #endif + } + + errors += error; + + #ifdef DEBUG + tfp_printf(" Golden: 0x%08x; Actual: 0x%08x,\n", golden_word, actual_word); + #endif + + #ifdef VERBOSE + if(error) { + if(errors==1) tfp_printf(" golden <- actual @ address @ index\n"); + tfp_printf(" 0x%08x <- 0x%08x @ 0x%08x @ 0x%08x\n", golden_word, actual_word, (actual_z+i), i*4); + } + #endif + } + return errors; +} + +int redmule8_compare_int(uint32_t *actual_z, uint32_t *golden_z, int len) { + #define ERR 0x0011 + uint32_t actual_word = 0; + uint8_t actual_Byte0, + actual_Byte1, + actual_Byte2, + actual_Byte3; + uint32_t golden_word = 0; + uint8_t golden_Byte0, + golden_Byte1, + golden_Byte2, + golden_Byte3; + uint32_t actual = 0; + uint32_t golden = 0; + + int errors = 0; + int error; + + for (int i=0; i golden_Byte0) ? (actual_Byte0 - golden_Byte0) : 0; + diff = (actual_Byte0 < golden_Byte0) ? (golden_Byte0 - actual_Byte0) : 0; + + if (diff > ERR) { + error = 1; + tfp_printf ("diff: 0x%08x\n", diff); + tfp_printf ("Byte0: Error!\n"); + } + + // Cheching Byte1 + actual_Byte1 = (uint8_t)( (actual_word >> 8 ) & 0x000000FF); + golden_Byte1 = (uint8_t)( (golden_word >> 8 ) & 0x000000FF); + + diff = (actual_Byte1 > golden_Byte1) ? (actual_Byte1 - golden_Byte1) : 0; + diff = (actual_Byte1 < golden_Byte1) ? (golden_Byte1 - actual_Byte1) : 0; + + if (diff > ERR) { + error = 1; + tfp_printf ("diff: 0x%08x\n", diff); + tfp_printf ("Byte1: Error!\n"); + } + + // Cheching Byte2 + actual_Byte2 = (uint8_t)( (actual_word >> 16 ) & 0x000000FF); + golden_Byte2 = (uint8_t)( (golden_word >> 16 ) & 0x000000FF); + + diff = (actual_Byte2 > golden_Byte2) ? (actual_Byte2 - golden_Byte2) : 0; + diff = (actual_Byte2 < golden_Byte2) ? (golden_Byte2 - actual_Byte2) : 0; + + if (diff > ERR) { + error = 1; + tfp_printf ("diff: 0x%08x\n", diff); + tfp_printf ("Byte2: Error!\n"); + } + + // Cheching Byte3 + actual_Byte3 = (uint8_t)( (actual_word >> 24 ) & 0x000000FF); + golden_Byte3 = (uint8_t)( (golden_word >> 24 ) & 0x000000FF); + + diff = (actual_Byte3 > golden_Byte3) ? (actual_Byte3 - golden_Byte3) : 0; + diff = (actual_Byte3 < golden_Byte3) ? (golden_Byte3 - actual_Byte3) : 0; + + if (diff > ERR) { + error = 1; + tfp_printf ("diff: 0x%08x\n", diff); + tfp_printf ("Byte3: Error!\n"); + } + + errors += error; + + #ifdef DEBUG + tfp_printf(" Golden: 0x%08x; Actual: 0x%08x,\n", golden_word, actual_word); + #endif + + #ifdef VERBOSE + if(error) { + if(errors==1) tfp_printf(" golden <- actual @ address @ index\n"); + tfp_printf(" 0x%08x <- 0x%08x @ 0x%08x @ 0x%08x\n", golden_word, actual_word, (actual_z+i), i*4); + } + #endif + } + return errors; +} + +#endif diff --git a/hwpe/redmule_softclear/inc/golden.h b/hwpe/redmule_softclear/inc/golden.h new file mode 100644 index 0000000..f664e47 --- /dev/null +++ b/hwpe/redmule_softclear/inc/golden.h @@ -0,0 +1,387 @@ + /* Header file generated by RedMulE Golden Model */ +uint32_t golden [384] = { +0x48974845, +0x48384608, +0x487b4855, +0x48804869, +0x48b046d1, +0x483f48db, +0x485f48c9, +0x483a4881, +0x472c484b, +0x492b4762, +0x48fd4822, +0x492e488e, +0x484f483e, +0x46d749e8, +0x489d484b, +0x47e9490b, +0x47d2484f, +0x474744be, +0x46c047c7, +0x48af4727, +0x482d46c5, +0x482e483d, +0x479f4897, +0x4749488b, +0x46a8489a, +0x488b46f2, +0x47e84891, +0x483d4872, +0x46fd4716, +0x46a049b5, +0x47a446e7, +0x476748a1, +0x49354939, +0x48c14703, +0x48bd4863, +0x48cf4913, +0x48b848b6, +0x49204946, +0x48e1495e, +0x48b24938, +0x4882493a, +0x49d5483b, +0x49724911, +0x49df496b, +0x488848f2, +0x48214a46, +0x490c48c1, +0x48a349b2, +0x47b0463a, +0x476244cb, +0x46b94765, +0x4814466a, +0x47964631, +0x474b4666, +0x47044798, +0x47614838, +0x459047d3, +0x48a245ea, +0x484447f1, +0x4776484b, +0x46d847d6, +0x44d348f3, +0x478d46fa, +0x466e481e, +0x481e4827, +0x479445a2, +0x48064727, +0x48d5475d, +0x48284708, +0x480d4862, +0x48324895, +0x47f148bd, +0x46a7482a, +0x492d47b1, +0x4884484d, +0x485f48dc, +0x480c476d, +0x46d348e9, +0x48844728, +0x480e48a0, +0x48134862, +0x485a4675, +0x473847e8, +0x48234836, +0x482146e7, +0x47b34822, +0x48554846, +0x47174863, +0x47c14872, +0x488e46d5, +0x485f47e2, +0x48b8487c, +0x4788481e, +0x467748bd, +0x47f846c9, +0x47fc48fe, +0x47b247a0, +0x467e4588, +0x46c74662, +0x481246e8, +0x474e4536, +0x468f46c0, +0x4679481f, +0x46e246a1, +0x45604809, +0x47eb4630, +0x475746b5, +0x477f4848, +0x46d846a6, +0x459a4870, +0x46784670, +0x468c47d2, +0x48c44762, +0x479146e3, +0x486d46b1, +0x486747d0, +0x47f6468d, +0x475648a5, +0x48544857, +0x48384866, +0x46ec484d, +0x48f647d2, +0x4879484a, +0x483c4848, +0x4806471d, +0x473048fa, +0x47b84768, +0x46f94865, +0x491848a8, +0x486746ca, +0x48624800, +0x491048d3, +0x4849474e, +0x486b48eb, +0x48c54966, +0x483048f4, +0x477848f9, +0x499e481e, +0x48f148cf, +0x49234982, +0x47cf487c, +0x464949ea, +0x495e4773, +0x483f48b2, +0x497548a7, +0x481e4616, +0x4866481f, +0x486448b6, +0x487347dc, +0x487f485c, +0x491f4938, +0x48b6490d, +0x48a148f8, +0x492d4859, +0x4915489c, +0x48874899, +0x4859486c, +0x471e49ca, +0x49184867, +0x482748d3, +0x4998488b, +0x481d4704, +0x488048b8, +0x49444876, +0x48f2470c, +0x489b48b9, +0x48e54956, +0x48a548d6, +0x485648dc, +0x49ab484e, +0x490e48e0, +0x494548dd, +0x48dd488b, +0x47ea4a32, +0x49114835, +0x48194965, +0x481e460e, +0x4673452c, +0x4717475c, +0x46d046f6, +0x46bc4696, +0x481e4726, +0x46ea4763, +0x475846fe, +0x4627478b, +0x483f4704, +0x47b146ad, +0x48164792, +0x468446f2, +0x45a84827, +0x47a4472f, +0x462b4797, +0x48ab483f, +0x4863468f, +0x4766485a, +0x48cb481d, +0x490347dc, +0x483048fc, +0x483e48cc, +0x486448ab, +0x47634966, +0x499d4794, +0x488b488e, +0x496048dc, +0x484c4854, +0x474c499c, +0x48bc4826, +0x48834949, +0x4905489d, +0x481e4718, +0x48f448e3, +0x490448c1, +0x48b347e8, +0x48d44892, +0x489448ff, +0x488648d5, +0x480348fa, +0x492e47d2, +0x48b24870, +0x492b48e5, +0x4785487b, +0x471d49e3, +0x48bf4837, +0x48c4489b, +0x4871475c, +0x4811464a, +0x471c47af, +0x48174817, +0x484e463b, +0x464f477f, +0x487c4704, +0x472547a3, +0x462a4853, +0x4860465a, +0x48804736, +0x482b47e1, +0x46c04811, +0x475d48dc, +0x48064668, +0x46f44893, +0x49594858, +0x487b463d, +0x484e480f, +0x48a648c0, +0x48944847, +0x484a48a0, +0x48f4491e, +0x48b548fc, +0x47d248ce, +0x497f47db, +0x49394955, +0x48ce48a7, +0x48844890, +0x476349d6, +0x4922486e, +0x48c348f4, +0x491c47ec, +0x47834698, +0x47544715, +0x47524745, +0x4832472f, +0x48094817, +0x48c347f8, +0x480047e6, +0x473048b6, +0x48cb480a, +0x488e479e, +0x488e47c2, +0x47ee472f, +0x4744489d, +0x48514755, +0x47d34846, +0x48a04838, +0x47624634, +0x48064786, +0x482d47e3, +0x486c4726, +0x480347b7, +0x481448ac, +0x483948e0, +0x47504827, +0x48c546f2, +0x4886483f, +0x485648ad, +0x47a947e8, +0x47434937, +0x481f46d0, +0x4804484c, +0x481f47fd, +0x4813456d, +0x4807474d, +0x480e4688, +0x481046e8, +0x4799469f, +0x478f4853, +0x482447f2, +0x471f47d0, +0x485f46da, +0x481c4813, +0x4863482e, +0x480b4786, +0x46b848c9, +0x46e2475a, +0x46c54852, +0x480245af, +0x46c24466, +0x4743465d, +0x47ba46b7, +0x46c34636, +0x47844677, +0x47c2485a, +0x46ac46dc, +0x460e47de, +0x4834465f, +0x476947f4, +0x481046fc, +0x45ea45fd, +0x45b548d0, +0x47834704, +0x46c44830, +0x47c74759, +0x45b0453d, +0x47024741, +0x47934736, +0x47ba461b, +0x46dd470b, +0x470b4657, +0x4710470d, +0x468f486c, +0x46ba45c3, +0x483b479d, +0x477446c9, +0x46a746a9, +0x46064833, +0x46a94690, +0x46a746f5, +0x48bb47ac, +0x4803452c, +0x4824470f, +0x48cb47d5, +0x484a4707, +0x47974832, +0x482c4851, +0x4877487a, +0x465d4891, +0x48ce47f4, +0x48994898, +0x486a484e, +0x47f047ac, +0x4611493e, +0x489e47e2, +0x46af488c, +0x48364665, +0x46b645e4, +0x46b946a1, +0x46dd46c8, +0x474b4658, +0x4777467b, +0x47984769, +0x475e4785, +0x4656472a, +0x488145fb, +0x472d46fc, +0x47a3476e, +0x46ca465d, +0x45004855, +0x479a464f, +0x473846c3, +0x486c481e, +0x48014659, +0x477a4756, +0x487b47d5, +0x48084706, +0x4838484f, +0x48634870, +0x480648d3, +0x47714865, +0x494c46be, +0x484c4915, +0x48624900, +0x46e8481a, +0x46a04974, +0x483d4775, +0x480e487c, +}; \ No newline at end of file diff --git a/hwpe/redmule_softclear/inc/tensor_dim.h b/hwpe/redmule_softclear/inc/tensor_dim.h new file mode 100644 index 0000000..21bd0d8 --- /dev/null +++ b/hwpe/redmule_softclear/inc/tensor_dim.h @@ -0,0 +1,13 @@ + /* Header file generated by RedMulE Golden Model */ +#ifndef __TENSOR_DIM__ +#define __TENSOR_DIM__ + +#define M_SIZE 24 +#define N_SIZE 32 +#define K_SIZE 32 +#define SRC_FMT FP16 +#define DST_FMT FP16 +#define FPFORMAT 16 +uint8_t gemm_ops = GEMM; + +#endif diff --git a/hwpe/redmule_softclear/inc/w_2D.h b/hwpe/redmule_softclear/inc/w_2D.h new file mode 100644 index 0000000..9409c64 --- /dev/null +++ b/hwpe/redmule_softclear/inc/w_2D.h @@ -0,0 +1,35 @@ + /* Header file generated by RedMulE Golden Model */ +uint16_t w_inp_2D [32][32] = { +0x311a, 0x39e0, 0x387d, 0x3a4a, 0x386f, 0x3ada, 0x392f, 0x3854, 0x3014, 0x2fd2, 0x31c9, 0x2fca, 0x2e55, 0x3bc8, 0x396d, 0x3b1d, 0x39f6, 0x333a, 0x3908, 0x3628, 0x3bab, 0x3b8b, 0x3b4a, 0x322d, 0x3925, 0x317a, 0x3725, 0x31c2, 0x3066, 0x38f3, 0x3a17, 0x3476, +0x3bda, 0x3196, 0x3922, 0x3680, 0x396a, 0x3021, 0x3761, 0x374d, 0x2fc2, 0x3967, 0x3b94, 0x33b5, 0x3797, 0x34d6, 0x3655, 0x2176, 0x39bc, 0x3999, 0x3658, 0x3904, 0x3759, 0x2ade, 0x3a5a, 0x3b78, 0x36c7, 0x2d01, 0x3b58, 0x2d9a, 0x373d, 0x3952, 0x38e8, 0x3887, +0x37b6, 0x3a88, 0x2f8a, 0x2d79, 0x3413, 0x3421, 0x3976, 0x32b2, 0x3446, 0x2d99, 0x3a56, 0x3322, 0x3b49, 0x39fa, 0x3acd, 0x3af6, 0x304c, 0x3abb, 0x3a83, 0x38b2, 0x3ab9, 0x363e, 0x389f, 0x31bb, 0x38e1, 0x3bc4, 0x3b9b, 0x2984, 0x3a43, 0x3b2f, 0x35d6, 0x3bda, +0x2df3, 0x3bf8, 0x2acc, 0x378b, 0x3555, 0x2e59, 0x31d4, 0x34ec, 0x3a46, 0x3bab, 0x3214, 0x3161, 0x3470, 0x3a03, 0x368e, 0x31ad, 0x27cb, 0x2ecb, 0x3422, 0x39f7, 0x3644, 0x3a77, 0x313f, 0x34f2, 0x39b3, 0x3bf2, 0x379a, 0x3456, 0x35fe, 0x3ae7, 0x3964, 0x385f, +0x3b16, 0x3999, 0x3833, 0x2eda, 0x3afd, 0x3a4a, 0x3ba2, 0x2bd4, 0x3b38, 0x31a2, 0x32dd, 0x353c, 0x366f, 0x375e, 0x3821, 0x367a, 0x3b44, 0x39e6, 0x3787, 0x339e, 0x39d7, 0x38c6, 0x37d5, 0x342f, 0x3984, 0x319b, 0x33b5, 0x35ab, 0x398a, 0x374e, 0x36b6, 0x3b21, +0x3bbb, 0x2ab3, 0x2ad5, 0x33bc, 0x2bef, 0x3780, 0x3738, 0x3a0b, 0x3b09, 0x30ca, 0x384e, 0x3ab3, 0x39bd, 0x3453, 0x3a6d, 0x3957, 0x2c10, 0x30e9, 0x35d4, 0x3aef, 0x3be9, 0x39ad, 0x3a74, 0x3af9, 0x3739, 0x2d4d, 0x39fe, 0x3b72, 0x2c57, 0x398c, 0x381f, 0x3930, +0x3820, 0x321b, 0x3964, 0x2964, 0x33a0, 0x2d00, 0x2490, 0x336b, 0x3465, 0x3b2e, 0x3aa0, 0x371f, 0x300e, 0x3a09, 0x3bf1, 0x25cc, 0x3b6f, 0x3384, 0x3a88, 0x3acb, 0x3814, 0x36d0, 0x3081, 0x3a2c, 0x3353, 0x39cb, 0x31ed, 0x3af6, 0x3721, 0x36c7, 0x2ce2, 0x390d, +0x3698, 0x3ab2, 0x3b3e, 0x2eb4, 0x3998, 0x39e3, 0x3a77, 0x3632, 0x2c12, 0x3bd5, 0x3ba3, 0x3bba, 0x323c, 0x367b, 0x3557, 0x39c8, 0x37db, 0x3b45, 0x3b6e, 0x3931, 0x3121, 0x3a8d, 0x3a55, 0x3b9b, 0x358a, 0x3925, 0x3491, 0x3912, 0x3b6b, 0x3584, 0x32df, 0x3120, +0x32b2, 0x3b0a, 0x2cad, 0x3465, 0x3ad3, 0x3bcd, 0x363b, 0x3afe, 0x354b, 0x3374, 0x39af, 0x3b7f, 0x308c, 0x2e72, 0x3380, 0x3b70, 0x3902, 0x38d8, 0x39f3, 0x3a4b, 0x3853, 0x397b, 0x2ebe, 0x387f, 0x2845, 0x37e2, 0x360f, 0x370b, 0x3acb, 0x35d4, 0x36e6, 0x3262, +0x2e88, 0x3a54, 0x2ee3, 0x3575, 0x3afe, 0x2aee, 0x39a0, 0x3aae, 0x3693, 0x3432, 0x3834, 0x3b9b, 0x3bcb, 0x2e3a, 0x356d, 0x374e, 0x3924, 0x383c, 0x311e, 0x3ac5, 0x352d, 0x311e, 0x38ca, 0x34d4, 0x36ca, 0x34ed, 0x3a13, 0x33eb, 0x3639, 0x3828, 0x3b3c, 0x3939, +0x3837, 0x3521, 0x2cb5, 0x3629, 0x3924, 0x384c, 0x366a, 0x3bbf, 0x2e9e, 0x3ba8, 0x33ad, 0x38c8, 0x3934, 0x3907, 0x249a, 0x3690, 0x3a09, 0x3215, 0x3898, 0x325d, 0x37d5, 0x3195, 0x361c, 0x3ae4, 0x351f, 0x3452, 0x3bc0, 0x375c, 0x39bf, 0x317a, 0x3aae, 0x283a, +0x3476, 0x3b92, 0x3472, 0x383e, 0x280f, 0x39d6, 0x2fd1, 0x31f4, 0x2ffb, 0x3b97, 0x3692, 0x36c0, 0x3989, 0x33cf, 0x3ba6, 0x3239, 0x35d7, 0x33ab, 0x31eb, 0x3b47, 0x389b, 0x3b88, 0x3580, 0x354c, 0x3802, 0x3b9a, 0x3b94, 0x2a92, 0x2db1, 0x38bd, 0x2dfb, 0x3900, +0x344f, 0x3739, 0x27a5, 0x3b2e, 0x342b, 0x34bb, 0x30c8, 0x3ae8, 0x3b26, 0x3982, 0x38c0, 0x3408, 0x38c8, 0x36ef, 0x3bf0, 0x3acf, 0x3a3c, 0x3825, 0x31a5, 0x3ada, 0x3b5b, 0x37db, 0x3a01, 0x3663, 0x3a7d, 0x327b, 0x3a1f, 0x3862, 0x38af, 0x3204, 0x372e, 0x3b19, +0x3708, 0x3622, 0x2e62, 0x39ab, 0x2d4d, 0x31b4, 0x3552, 0x3bbc, 0x36f2, 0x36eb, 0x38ef, 0x3755, 0x3bbe, 0x2c17, 0x3815, 0x2f53, 0x363f, 0x38c1, 0x3246, 0x386b, 0x34de, 0x34e4, 0x3baa, 0x349e, 0x32ce, 0x3a68, 0x373f, 0x2cce, 0x3b36, 0x28ba, 0x3b50, 0x3232, +0x1f34, 0x3928, 0x35cd, 0x3b38, 0x30ce, 0x35a1, 0x3a06, 0x3a32, 0x3a53, 0x3489, 0x3241, 0x372f, 0x390c, 0x3a1b, 0x378a, 0x3713, 0x3769, 0x37a8, 0x3418, 0x3ad4, 0x3a4e, 0x3bf7, 0x37a5, 0x34dc, 0x39b2, 0x351b, 0x3372, 0x349f, 0x2f50, 0x3ab1, 0x3795, 0x2db7, +0x3864, 0x3157, 0x3900, 0x323e, 0x389e, 0x3880, 0x3b1f, 0x37a1, 0x396c, 0x2e43, 0x2c2a, 0x3b78, 0x3988, 0x3a14, 0x39c1, 0x3b51, 0x3780, 0x3bf2, 0x2d19, 0x3815, 0x3a5f, 0x3641, 0x2f62, 0x37d5, 0x3564, 0x139a, 0x3ab8, 0x28f7, 0x3785, 0x34e1, 0x3097, 0x3768, +0x3971, 0x3ae2, 0x32ae, 0x2fd5, 0x382a, 0x346c, 0x3133, 0x3167, 0x3940, 0x2d12, 0x389a, 0x3bd0, 0x3943, 0x391c, 0x3a75, 0x2a11, 0x391e, 0x372d, 0x3a79, 0x3b72, 0x3373, 0x39b7, 0x35d7, 0x372b, 0x3a6d, 0x38a1, 0x3279, 0x3434, 0x3694, 0x3b45, 0x3abb, 0x392d, +0x34a8, 0x3757, 0x32ca, 0x345d, 0x36a5, 0x3854, 0x2dcd, 0x30af, 0x38dd, 0x3067, 0x3411, 0x3997, 0x397a, 0x3a64, 0x38b8, 0x3962, 0x3509, 0x3bb6, 0x3a66, 0x339f, 0x372a, 0x31a8, 0x37da, 0x36ff, 0x33c6, 0x31da, 0x3977, 0x3b72, 0x3841, 0x3567, 0x3433, 0x33b8, +0x39fe, 0x3a10, 0x3bf2, 0x35e7, 0x3a4a, 0x3b3e, 0x2ec7, 0x3aa4, 0x3846, 0x3af9, 0x38a9, 0x2c1f, 0x39ab, 0x349f, 0x31d6, 0x39ae, 0x3b79, 0x352d, 0x3516, 0x347c, 0x2f33, 0x35ad, 0x31c4, 0x3b52, 0x354b, 0x3786, 0x3ab7, 0x3896, 0x34ac, 0x352f, 0x37e6, 0x326a, +0x2e44, 0x34c7, 0x388d, 0x3bf4, 0x363f, 0x3b3d, 0x33b1, 0x3b8b, 0x3340, 0x37f7, 0x3b07, 0x25bf, 0x398e, 0x3505, 0x3bd7, 0x366d, 0x388a, 0x2cc0, 0x359a, 0x3b9a, 0x3b99, 0x379d, 0x3b6b, 0x39b8, 0x3223, 0x2703, 0x3ba9, 0x2ecb, 0x3759, 0x39d8, 0x37ac, 0x32cf, +0x35f2, 0x38a3, 0x399e, 0x3bd2, 0x3780, 0x3af3, 0x3b5e, 0x337b, 0x3a08, 0x35da, 0x3446, 0x3b25, 0x3ad0, 0x3bee, 0x3141, 0x32d8, 0x34ce, 0x2ac9, 0x3800, 0x3a8a, 0x2d53, 0x368a, 0x3561, 0x3998, 0x35a3, 0x3677, 0x3ab2, 0x3269, 0x3236, 0x3b3e, 0x3aba, 0x3bac, +0x395d, 0x3820, 0x1df6, 0x3bb5, 0x35b5, 0x3675, 0x3b74, 0x360f, 0x34de, 0x3a0c, 0x3aeb, 0x299d, 0x3207, 0x3bd8, 0x2178, 0x3995, 0x3948, 0x3908, 0x3843, 0x2ea5, 0x3045, 0x3989, 0x345d, 0x39c5, 0x3a89, 0x3863, 0x3be0, 0x397a, 0x38f1, 0x39e2, 0x3b08, 0x352e, +0x385f, 0x28f2, 0x3bc3, 0x35e0, 0x380c, 0x3b9c, 0x3afc, 0x390a, 0x3689, 0x34fd, 0x2cf5, 0x308e, 0x342b, 0x3921, 0x3a67, 0x3ad6, 0x2986, 0x32fc, 0x35aa, 0x3507, 0x3608, 0x33fd, 0x3bf3, 0x39e2, 0x3b0f, 0x30b7, 0x3896, 0x3ae4, 0x2145, 0x35b6, 0x2e1d, 0x3ad1, +0x333d, 0x3afb, 0x2703, 0x3413, 0x1d7d, 0x3b7f, 0x3ae1, 0x303c, 0x3004, 0x39d3, 0x3554, 0x31a4, 0x354e, 0x3662, 0x39c5, 0x2eb7, 0x2c6e, 0x397f, 0x31d8, 0x1f0c, 0x38e3, 0x35f0, 0x2714, 0x28d1, 0x375e, 0x3a75, 0x3830, 0x3578, 0x397d, 0x3b18, 0x383c, 0x3498, +0x39ad, 0x3598, 0x23c4, 0x34ea, 0x3a61, 0x2b00, 0x3707, 0x3ae1, 0x37ae, 0x389d, 0x37fa, 0x3673, 0x3278, 0xf3e, 0x3809, 0x33c6, 0x3bf5, 0x3279, 0x3816, 0x360c, 0x39c8, 0x381f, 0x3741, 0x2d66, 0x38c0, 0x37d3, 0x377a, 0x3621, 0x2faf, 0x392e, 0x2de6, 0x33c5, +0x3803, 0x2600, 0x32e9, 0x39b4, 0x38d2, 0x34e8, 0x2fe6, 0x3199, 0x3643, 0x3a77, 0x27cc, 0x39d7, 0x34c6, 0x2ea8, 0x364e, 0x3b07, 0x31c7, 0x30a1, 0x31b1, 0x3b8f, 0x3571, 0x3b75, 0x3989, 0x3805, 0x39fb, 0x3945, 0x352b, 0x31d8, 0x3904, 0x3440, 0x3a57, 0x2cf7, +0x3b39, 0x2fcd, 0x2b89, 0x2edd, 0x3682, 0x36a9, 0x32c8, 0x37ac, 0x32a5, 0x3311, 0x394b, 0x3b84, 0x3aec, 0x3601, 0x2765, 0x3b69, 0x396b, 0x3727, 0x3bfe, 0x3907, 0x376f, 0x3674, 0x3973, 0x3671, 0x3491, 0x3993, 0x383f, 0x3335, 0x3989, 0x3550, 0x3077, 0x35f5, +0x3a59, 0x3950, 0x380c, 0x37cd, 0x30bf, 0x3607, 0x3afa, 0x3b5d, 0x32b9, 0x386b, 0x35bd, 0x3aca, 0x3ba5, 0x3b2d, 0x3b19, 0x3b8b, 0x345e, 0x2845, 0x34aa, 0x372a, 0x3448, 0x34f5, 0x3ae2, 0x3637, 0x2cb5, 0x354b, 0x3b15, 0x2ca8, 0x2641, 0x3178, 0x2cfe, 0x39b4, +0x3bdd, 0x3acb, 0x3a05, 0x38a2, 0x3b4a, 0x34e5, 0x395f, 0x394b, 0x34c4, 0x3aa5, 0x29bb, 0x2d96, 0x339d, 0x387c, 0x382e, 0x385a, 0x396b, 0x3aa9, 0x2f1e, 0x33a7, 0x3b90, 0x3b7b, 0x3b5f, 0x39d3, 0x3b18, 0x354f, 0x2cdb, 0x3a6f, 0x3434, 0x34ff, 0x3a5b, 0x3b84, +0x3a33, 0x384b, 0x2e67, 0x3b85, 0x3853, 0x380c, 0x346a, 0x3aaa, 0x3492, 0x33e8, 0x3bf2, 0x38ae, 0x3a29, 0x3830, 0x3221, 0x35b1, 0x3a48, 0x2c68, 0x2ced, 0x3a7e, 0x3539, 0x3922, 0x374c, 0x3aaa, 0x2dae, 0x395d, 0x3b3d, 0x3890, 0x2cfe, 0x2dd6, 0x3bad, 0x33c5, +0x2c07, 0x3a2c, 0x37a8, 0x390f, 0x2fc8, 0x35ae, 0x388c, 0x30ee, 0x3674, 0x391d, 0x3bfc, 0x36bf, 0x322d, 0x3a78, 0x35c0, 0x3492, 0x3ac8, 0x3504, 0x3315, 0x381d, 0x3a7a, 0x3a08, 0x343c, 0x3bda, 0x341b, 0x39f0, 0x3b9e, 0x395d, 0x3c00, 0x38ab, 0x3bcf, 0x3564, +0x33c4, 0x3b0d, 0x3623, 0x33b9, 0x3b92, 0x1e71, 0x2c57, 0x36d0, 0x314b, 0x3a16, 0x3372, 0x341b, 0x3aaa, 0x3444, 0x396b, 0x2dd7, 0x3b30, 0x3559, 0x3b5b, 0x3a29, 0x2d19, 0x38b7, 0x3b01, 0x3afa, 0x398a, 0x3839, 0x3ac9, 0x2e31, 0x3924, 0x39f2, 0x3a7f, 0x3285 +}; \ No newline at end of file diff --git a/hwpe/redmule_softclear/inc/w_input.h b/hwpe/redmule_softclear/inc/w_input.h new file mode 100644 index 0000000..dc4d3be --- /dev/null +++ b/hwpe/redmule_softclear/inc/w_input.h @@ -0,0 +1,35 @@ + /* Header file generated by RedMulE Golden Model */ +uint16_t w_inp [1024] = { +0x311a, 0x39e0, 0x387d, 0x3a4a, 0x386f, 0x3ada, 0x392f, 0x3854, 0x3014, 0x2fd2, 0x31c9, 0x2fca, 0x2e55, 0x3bc8, 0x396d, 0x3b1d, 0x39f6, 0x333a, 0x3908, 0x3628, 0x3bab, 0x3b8b, 0x3b4a, 0x322d, 0x3925, 0x317a, 0x3725, 0x31c2, 0x3066, 0x38f3, 0x3a17, 0x3476, +0x3bda, 0x3196, 0x3922, 0x3680, 0x396a, 0x3021, 0x3761, 0x374d, 0x2fc2, 0x3967, 0x3b94, 0x33b5, 0x3797, 0x34d6, 0x3655, 0x2176, 0x39bc, 0x3999, 0x3658, 0x3904, 0x3759, 0x2ade, 0x3a5a, 0x3b78, 0x36c7, 0x2d01, 0x3b58, 0x2d9a, 0x373d, 0x3952, 0x38e8, 0x3887, +0x37b6, 0x3a88, 0x2f8a, 0x2d79, 0x3413, 0x3421, 0x3976, 0x32b2, 0x3446, 0x2d99, 0x3a56, 0x3322, 0x3b49, 0x39fa, 0x3acd, 0x3af6, 0x304c, 0x3abb, 0x3a83, 0x38b2, 0x3ab9, 0x363e, 0x389f, 0x31bb, 0x38e1, 0x3bc4, 0x3b9b, 0x2984, 0x3a43, 0x3b2f, 0x35d6, 0x3bda, +0x2df3, 0x3bf8, 0x2acc, 0x378b, 0x3555, 0x2e59, 0x31d4, 0x34ec, 0x3a46, 0x3bab, 0x3214, 0x3161, 0x3470, 0x3a03, 0x368e, 0x31ad, 0x27cb, 0x2ecb, 0x3422, 0x39f7, 0x3644, 0x3a77, 0x313f, 0x34f2, 0x39b3, 0x3bf2, 0x379a, 0x3456, 0x35fe, 0x3ae7, 0x3964, 0x385f, +0x3b16, 0x3999, 0x3833, 0x2eda, 0x3afd, 0x3a4a, 0x3ba2, 0x2bd4, 0x3b38, 0x31a2, 0x32dd, 0x353c, 0x366f, 0x375e, 0x3821, 0x367a, 0x3b44, 0x39e6, 0x3787, 0x339e, 0x39d7, 0x38c6, 0x37d5, 0x342f, 0x3984, 0x319b, 0x33b5, 0x35ab, 0x398a, 0x374e, 0x36b6, 0x3b21, +0x3bbb, 0x2ab3, 0x2ad5, 0x33bc, 0x2bef, 0x3780, 0x3738, 0x3a0b, 0x3b09, 0x30ca, 0x384e, 0x3ab3, 0x39bd, 0x3453, 0x3a6d, 0x3957, 0x2c10, 0x30e9, 0x35d4, 0x3aef, 0x3be9, 0x39ad, 0x3a74, 0x3af9, 0x3739, 0x2d4d, 0x39fe, 0x3b72, 0x2c57, 0x398c, 0x381f, 0x3930, +0x3820, 0x321b, 0x3964, 0x2964, 0x33a0, 0x2d00, 0x2490, 0x336b, 0x3465, 0x3b2e, 0x3aa0, 0x371f, 0x300e, 0x3a09, 0x3bf1, 0x25cc, 0x3b6f, 0x3384, 0x3a88, 0x3acb, 0x3814, 0x36d0, 0x3081, 0x3a2c, 0x3353, 0x39cb, 0x31ed, 0x3af6, 0x3721, 0x36c7, 0x2ce2, 0x390d, +0x3698, 0x3ab2, 0x3b3e, 0x2eb4, 0x3998, 0x39e3, 0x3a77, 0x3632, 0x2c12, 0x3bd5, 0x3ba3, 0x3bba, 0x323c, 0x367b, 0x3557, 0x39c8, 0x37db, 0x3b45, 0x3b6e, 0x3931, 0x3121, 0x3a8d, 0x3a55, 0x3b9b, 0x358a, 0x3925, 0x3491, 0x3912, 0x3b6b, 0x3584, 0x32df, 0x3120, +0x32b2, 0x3b0a, 0x2cad, 0x3465, 0x3ad3, 0x3bcd, 0x363b, 0x3afe, 0x354b, 0x3374, 0x39af, 0x3b7f, 0x308c, 0x2e72, 0x3380, 0x3b70, 0x3902, 0x38d8, 0x39f3, 0x3a4b, 0x3853, 0x397b, 0x2ebe, 0x387f, 0x2845, 0x37e2, 0x360f, 0x370b, 0x3acb, 0x35d4, 0x36e6, 0x3262, +0x2e88, 0x3a54, 0x2ee3, 0x3575, 0x3afe, 0x2aee, 0x39a0, 0x3aae, 0x3693, 0x3432, 0x3834, 0x3b9b, 0x3bcb, 0x2e3a, 0x356d, 0x374e, 0x3924, 0x383c, 0x311e, 0x3ac5, 0x352d, 0x311e, 0x38ca, 0x34d4, 0x36ca, 0x34ed, 0x3a13, 0x33eb, 0x3639, 0x3828, 0x3b3c, 0x3939, +0x3837, 0x3521, 0x2cb5, 0x3629, 0x3924, 0x384c, 0x366a, 0x3bbf, 0x2e9e, 0x3ba8, 0x33ad, 0x38c8, 0x3934, 0x3907, 0x249a, 0x3690, 0x3a09, 0x3215, 0x3898, 0x325d, 0x37d5, 0x3195, 0x361c, 0x3ae4, 0x351f, 0x3452, 0x3bc0, 0x375c, 0x39bf, 0x317a, 0x3aae, 0x283a, +0x3476, 0x3b92, 0x3472, 0x383e, 0x280f, 0x39d6, 0x2fd1, 0x31f4, 0x2ffb, 0x3b97, 0x3692, 0x36c0, 0x3989, 0x33cf, 0x3ba6, 0x3239, 0x35d7, 0x33ab, 0x31eb, 0x3b47, 0x389b, 0x3b88, 0x3580, 0x354c, 0x3802, 0x3b9a, 0x3b94, 0x2a92, 0x2db1, 0x38bd, 0x2dfb, 0x3900, +0x344f, 0x3739, 0x27a5, 0x3b2e, 0x342b, 0x34bb, 0x30c8, 0x3ae8, 0x3b26, 0x3982, 0x38c0, 0x3408, 0x38c8, 0x36ef, 0x3bf0, 0x3acf, 0x3a3c, 0x3825, 0x31a5, 0x3ada, 0x3b5b, 0x37db, 0x3a01, 0x3663, 0x3a7d, 0x327b, 0x3a1f, 0x3862, 0x38af, 0x3204, 0x372e, 0x3b19, +0x3708, 0x3622, 0x2e62, 0x39ab, 0x2d4d, 0x31b4, 0x3552, 0x3bbc, 0x36f2, 0x36eb, 0x38ef, 0x3755, 0x3bbe, 0x2c17, 0x3815, 0x2f53, 0x363f, 0x38c1, 0x3246, 0x386b, 0x34de, 0x34e4, 0x3baa, 0x349e, 0x32ce, 0x3a68, 0x373f, 0x2cce, 0x3b36, 0x28ba, 0x3b50, 0x3232, +0x1f34, 0x3928, 0x35cd, 0x3b38, 0x30ce, 0x35a1, 0x3a06, 0x3a32, 0x3a53, 0x3489, 0x3241, 0x372f, 0x390c, 0x3a1b, 0x378a, 0x3713, 0x3769, 0x37a8, 0x3418, 0x3ad4, 0x3a4e, 0x3bf7, 0x37a5, 0x34dc, 0x39b2, 0x351b, 0x3372, 0x349f, 0x2f50, 0x3ab1, 0x3795, 0x2db7, +0x3864, 0x3157, 0x3900, 0x323e, 0x389e, 0x3880, 0x3b1f, 0x37a1, 0x396c, 0x2e43, 0x2c2a, 0x3b78, 0x3988, 0x3a14, 0x39c1, 0x3b51, 0x3780, 0x3bf2, 0x2d19, 0x3815, 0x3a5f, 0x3641, 0x2f62, 0x37d5, 0x3564, 0x139a, 0x3ab8, 0x28f7, 0x3785, 0x34e1, 0x3097, 0x3768, +0x3971, 0x3ae2, 0x32ae, 0x2fd5, 0x382a, 0x346c, 0x3133, 0x3167, 0x3940, 0x2d12, 0x389a, 0x3bd0, 0x3943, 0x391c, 0x3a75, 0x2a11, 0x391e, 0x372d, 0x3a79, 0x3b72, 0x3373, 0x39b7, 0x35d7, 0x372b, 0x3a6d, 0x38a1, 0x3279, 0x3434, 0x3694, 0x3b45, 0x3abb, 0x392d, +0x34a8, 0x3757, 0x32ca, 0x345d, 0x36a5, 0x3854, 0x2dcd, 0x30af, 0x38dd, 0x3067, 0x3411, 0x3997, 0x397a, 0x3a64, 0x38b8, 0x3962, 0x3509, 0x3bb6, 0x3a66, 0x339f, 0x372a, 0x31a8, 0x37da, 0x36ff, 0x33c6, 0x31da, 0x3977, 0x3b72, 0x3841, 0x3567, 0x3433, 0x33b8, +0x39fe, 0x3a10, 0x3bf2, 0x35e7, 0x3a4a, 0x3b3e, 0x2ec7, 0x3aa4, 0x3846, 0x3af9, 0x38a9, 0x2c1f, 0x39ab, 0x349f, 0x31d6, 0x39ae, 0x3b79, 0x352d, 0x3516, 0x347c, 0x2f33, 0x35ad, 0x31c4, 0x3b52, 0x354b, 0x3786, 0x3ab7, 0x3896, 0x34ac, 0x352f, 0x37e6, 0x326a, +0x2e44, 0x34c7, 0x388d, 0x3bf4, 0x363f, 0x3b3d, 0x33b1, 0x3b8b, 0x3340, 0x37f7, 0x3b07, 0x25bf, 0x398e, 0x3505, 0x3bd7, 0x366d, 0x388a, 0x2cc0, 0x359a, 0x3b9a, 0x3b99, 0x379d, 0x3b6b, 0x39b8, 0x3223, 0x2703, 0x3ba9, 0x2ecb, 0x3759, 0x39d8, 0x37ac, 0x32cf, +0x35f2, 0x38a3, 0x399e, 0x3bd2, 0x3780, 0x3af3, 0x3b5e, 0x337b, 0x3a08, 0x35da, 0x3446, 0x3b25, 0x3ad0, 0x3bee, 0x3141, 0x32d8, 0x34ce, 0x2ac9, 0x3800, 0x3a8a, 0x2d53, 0x368a, 0x3561, 0x3998, 0x35a3, 0x3677, 0x3ab2, 0x3269, 0x3236, 0x3b3e, 0x3aba, 0x3bac, +0x395d, 0x3820, 0x1df6, 0x3bb5, 0x35b5, 0x3675, 0x3b74, 0x360f, 0x34de, 0x3a0c, 0x3aeb, 0x299d, 0x3207, 0x3bd8, 0x2178, 0x3995, 0x3948, 0x3908, 0x3843, 0x2ea5, 0x3045, 0x3989, 0x345d, 0x39c5, 0x3a89, 0x3863, 0x3be0, 0x397a, 0x38f1, 0x39e2, 0x3b08, 0x352e, +0x385f, 0x28f2, 0x3bc3, 0x35e0, 0x380c, 0x3b9c, 0x3afc, 0x390a, 0x3689, 0x34fd, 0x2cf5, 0x308e, 0x342b, 0x3921, 0x3a67, 0x3ad6, 0x2986, 0x32fc, 0x35aa, 0x3507, 0x3608, 0x33fd, 0x3bf3, 0x39e2, 0x3b0f, 0x30b7, 0x3896, 0x3ae4, 0x2145, 0x35b6, 0x2e1d, 0x3ad1, +0x333d, 0x3afb, 0x2703, 0x3413, 0x1d7d, 0x3b7f, 0x3ae1, 0x303c, 0x3004, 0x39d3, 0x3554, 0x31a4, 0x354e, 0x3662, 0x39c5, 0x2eb7, 0x2c6e, 0x397f, 0x31d8, 0x1f0c, 0x38e3, 0x35f0, 0x2714, 0x28d1, 0x375e, 0x3a75, 0x3830, 0x3578, 0x397d, 0x3b18, 0x383c, 0x3498, +0x39ad, 0x3598, 0x23c4, 0x34ea, 0x3a61, 0x2b00, 0x3707, 0x3ae1, 0x37ae, 0x389d, 0x37fa, 0x3673, 0x3278, 0xf3e, 0x3809, 0x33c6, 0x3bf5, 0x3279, 0x3816, 0x360c, 0x39c8, 0x381f, 0x3741, 0x2d66, 0x38c0, 0x37d3, 0x377a, 0x3621, 0x2faf, 0x392e, 0x2de6, 0x33c5, +0x3803, 0x2600, 0x32e9, 0x39b4, 0x38d2, 0x34e8, 0x2fe6, 0x3199, 0x3643, 0x3a77, 0x27cc, 0x39d7, 0x34c6, 0x2ea8, 0x364e, 0x3b07, 0x31c7, 0x30a1, 0x31b1, 0x3b8f, 0x3571, 0x3b75, 0x3989, 0x3805, 0x39fb, 0x3945, 0x352b, 0x31d8, 0x3904, 0x3440, 0x3a57, 0x2cf7, +0x3b39, 0x2fcd, 0x2b89, 0x2edd, 0x3682, 0x36a9, 0x32c8, 0x37ac, 0x32a5, 0x3311, 0x394b, 0x3b84, 0x3aec, 0x3601, 0x2765, 0x3b69, 0x396b, 0x3727, 0x3bfe, 0x3907, 0x376f, 0x3674, 0x3973, 0x3671, 0x3491, 0x3993, 0x383f, 0x3335, 0x3989, 0x3550, 0x3077, 0x35f5, +0x3a59, 0x3950, 0x380c, 0x37cd, 0x30bf, 0x3607, 0x3afa, 0x3b5d, 0x32b9, 0x386b, 0x35bd, 0x3aca, 0x3ba5, 0x3b2d, 0x3b19, 0x3b8b, 0x345e, 0x2845, 0x34aa, 0x372a, 0x3448, 0x34f5, 0x3ae2, 0x3637, 0x2cb5, 0x354b, 0x3b15, 0x2ca8, 0x2641, 0x3178, 0x2cfe, 0x39b4, +0x3bdd, 0x3acb, 0x3a05, 0x38a2, 0x3b4a, 0x34e5, 0x395f, 0x394b, 0x34c4, 0x3aa5, 0x29bb, 0x2d96, 0x339d, 0x387c, 0x382e, 0x385a, 0x396b, 0x3aa9, 0x2f1e, 0x33a7, 0x3b90, 0x3b7b, 0x3b5f, 0x39d3, 0x3b18, 0x354f, 0x2cdb, 0x3a6f, 0x3434, 0x34ff, 0x3a5b, 0x3b84, +0x3a33, 0x384b, 0x2e67, 0x3b85, 0x3853, 0x380c, 0x346a, 0x3aaa, 0x3492, 0x33e8, 0x3bf2, 0x38ae, 0x3a29, 0x3830, 0x3221, 0x35b1, 0x3a48, 0x2c68, 0x2ced, 0x3a7e, 0x3539, 0x3922, 0x374c, 0x3aaa, 0x2dae, 0x395d, 0x3b3d, 0x3890, 0x2cfe, 0x2dd6, 0x3bad, 0x33c5, +0x2c07, 0x3a2c, 0x37a8, 0x390f, 0x2fc8, 0x35ae, 0x388c, 0x30ee, 0x3674, 0x391d, 0x3bfc, 0x36bf, 0x322d, 0x3a78, 0x35c0, 0x3492, 0x3ac8, 0x3504, 0x3315, 0x381d, 0x3a7a, 0x3a08, 0x343c, 0x3bda, 0x341b, 0x39f0, 0x3b9e, 0x395d, 0x3c00, 0x38ab, 0x3bcf, 0x3564, +0x33c4, 0x3b0d, 0x3623, 0x33b9, 0x3b92, 0x1e71, 0x2c57, 0x36d0, 0x314b, 0x3a16, 0x3372, 0x341b, 0x3aaa, 0x3444, 0x396b, 0x2dd7, 0x3b30, 0x3559, 0x3b5b, 0x3a29, 0x2d19, 0x38b7, 0x3b01, 0x3afa, 0x398a, 0x3839, 0x3ac9, 0x2e31, 0x3924, 0x39f2, 0x3a7f, 0x3285 +}; \ No newline at end of file diff --git a/hwpe/redmule_softclear/inc/x_2D.h b/hwpe/redmule_softclear/inc/x_2D.h new file mode 100644 index 0000000..0b589f8 --- /dev/null +++ b/hwpe/redmule_softclear/inc/x_2D.h @@ -0,0 +1,27 @@ + /* Header file generated by RedMulE Golden Model */ +uint16_t x_inp_2D [24][32] = { +0x2153, 0x3bb5, 0x3896, 0x365f, 0x2483, 0x3518, 0x2dd1, 0x3bca, 0x397b, 0x29b1, 0x3705, 0x36c8, 0x398b, 0x3661, 0x2f05, 0x365a, 0x3bf9, 0x34df, 0x363b, 0x38d9, 0x39c6, 0x3abb, 0x3952, 0x38f2, 0x392d, 0x3b3e, 0x2afb, 0x3a9d, 0x353b, 0x3b73, 0x3a01, 0x3679, +0x3934, 0x397d, 0x2904, 0x3822, 0x3462, 0x3b44, 0x39e9, 0x28be, 0x331e, 0x3a1d, 0x39e5, 0x34da, 0x3a19, 0x3906, 0x1d35, 0x3871, 0x31e7, 0x3b29, 0x325d, 0x3797, 0x2b2f, 0x38b4, 0x232f, 0x38aa, 0x3aca, 0x316f, 0x3811, 0x3950, 0x32ea, 0x3bc7, 0x382c, 0x38a2, +0x29ce, 0x3afa, 0x3a39, 0x2ccc, 0x39fd, 0x3b3d, 0x384a, 0x3a35, 0x3802, 0x366a, 0x37ec, 0x3598, 0x3bf8, 0x3a85, 0x3a1b, 0x386e, 0x3b4c, 0x39de, 0x38c2, 0x2f93, 0x3b4c, 0x39c4, 0x3b9e, 0x3844, 0x346d, 0x3bff, 0x32ce, 0x296d, 0x3130, 0x3b3d, 0x3b44, 0x369d, +0x3b13, 0x31ed, 0x330a, 0x3831, 0x34e7, 0x37b3, 0x331a, 0x3918, 0x32d3, 0x3995, 0x3991, 0x3919, 0x3a26, 0x385b, 0x2b76, 0x3a3b, 0x37f2, 0x26a7, 0x3225, 0x3b64, 0x28f0, 0x3456, 0x3822, 0x341e, 0x381a, 0x38d8, 0x2c11, 0x33be, 0x33ac, 0x353f, 0x3476, 0x3abc, +0x36ec, 0x3a1d, 0x39d3, 0x3821, 0x36ac, 0x3bce, 0x3ad2, 0x3616, 0x36a1, 0x2cb3, 0x38d2, 0x314f, 0x385c, 0x3b63, 0x3bb6, 0x2951, 0x372d, 0x2c42, 0x3823, 0x3883, 0x3872, 0x31ee, 0x36c5, 0x399a, 0x31b0, 0x3887, 0x3884, 0x3865, 0x3896, 0x36c3, 0x32e3, 0x346c, +0x3935, 0x3b50, 0x2b6d, 0x38cd, 0x388f, 0x3389, 0x395d, 0x31cd, 0x2efd, 0x3154, 0x2f35, 0x3444, 0x3293, 0x3b6b, 0x1bec, 0x3b69, 0x3bf3, 0x3611, 0x3508, 0x3742, 0x3a50, 0x3ab7, 0x3457, 0x38d3, 0x3344, 0x38e8, 0x33c0, 0x3668, 0x3bee, 0x3b21, 0x3727, 0x3121, +0x316c, 0x3288, 0x2d50, 0x2e74, 0x35d5, 0x37e2, 0x303d, 0x36af, 0x341f, 0x3436, 0x2df7, 0x399d, 0x30f4, 0x3aaf, 0x34e4, 0x2c2a, 0x3116, 0x34d3, 0x36ac, 0x35e3, 0x3760, 0x36e1, 0x3ad2, 0x3547, 0x38f4, 0x369c, 0x3ba9, 0x34f0, 0x3a39, 0x3b19, 0x36e6, 0x395d, +0x3be8, 0x3293, 0x3bfc, 0x3435, 0x2eb3, 0x3360, 0x3919, 0x3bed, 0x396a, 0x37fc, 0x3242, 0x384b, 0x38cb, 0x3b2c, 0x3b28, 0x28cf, 0x3828, 0x3855, 0x3ba9, 0x2fa7, 0x340b, 0x32f1, 0x3ada, 0x36fa, 0x31f5, 0x3436, 0x29d0, 0x33e6, 0x3232, 0x3bec, 0x3904, 0x2797, +0x3b81, 0x3bac, 0x38d2, 0x343d, 0x31af, 0x3b1e, 0x33fc, 0x3864, 0x3624, 0x3905, 0x2945, 0x3b52, 0x2d08, 0x3a17, 0x3b84, 0x3804, 0x3a24, 0x38a3, 0x3562, 0x3ae6, 0x3bba, 0x3a45, 0x3679, 0x31fa, 0x3994, 0x2c3d, 0x383f, 0x399d, 0x34f7, 0x360e, 0x35f3, 0x38f0, +0x38d4, 0x399a, 0x3a48, 0x3987, 0x3b54, 0x382c, 0x3210, 0x35ef, 0x36ca, 0x31b4, 0x3625, 0x371f, 0x37bd, 0x3680, 0x3a3a, 0x3ac0, 0x3bbf, 0x3bf5, 0x39f2, 0x29c2, 0x363e, 0x3a4e, 0x3596, 0x3b1b, 0x3459, 0x3669, 0x3aa1, 0x39c3, 0x3376, 0x390d, 0x2456, 0x39b5, +0x3a66, 0x3ad8, 0x3b51, 0x36aa, 0x32be, 0x3ac8, 0x392b, 0x3740, 0x3a48, 0x38f5, 0x3b2d, 0x3a5f, 0x2ff3, 0x366f, 0x39d3, 0x35e5, 0x3822, 0x38db, 0x3b8a, 0x34be, 0x2d33, 0x36dd, 0x3578, 0x3bdf, 0x2c7e, 0x39cf, 0x32ff, 0x35c9, 0x3970, 0x3bcb, 0x351e, 0x3956, +0x2c42, 0x3308, 0x377a, 0x361c, 0x39a0, 0x36c9, 0x2dcb, 0x3bf2, 0x3b5f, 0x33ee, 0x24c1, 0x2ce9, 0x3927, 0x305d, 0x3702, 0x3119, 0x35f9, 0x3855, 0x3374, 0x349b, 0x3bcf, 0x2dea, 0x34f0, 0x363f, 0x37da, 0x3a74, 0x35fc, 0x35fa, 0x316b, 0x3804, 0x37a7, 0x3986, +0x3073, 0x3aed, 0x31c7, 0x3844, 0x34a4, 0x387d, 0x3a20, 0x3037, 0x3a00, 0x3b70, 0x377f, 0x3686, 0x3b7e, 0x38b3, 0x32e3, 0x3323, 0x391e, 0x3228, 0x3930, 0x3997, 0x3a5e, 0x398b, 0x3512, 0x35b0, 0x365c, 0x325d, 0x3b61, 0x38b8, 0x39a4, 0x3423, 0x3bd7, 0x38af, +0x2d3d, 0x382d, 0x38ac, 0x26ca, 0x395e, 0x21a8, 0x3520, 0x386f, 0x3b95, 0x32c0, 0x3b84, 0x3a51, 0x3b4b, 0x31d2, 0x3747, 0x3b96, 0x3b40, 0x3535, 0x38d1, 0x3899, 0x3b00, 0x3827, 0x3ae3, 0x38c8, 0x3a07, 0x338d, 0x2e96, 0x3a46, 0x394a, 0x39de, 0x2951, 0x3a02, +0x3838, 0x2d45, 0x28c0, 0x3958, 0x3070, 0x2aa2, 0x3510, 0x38ce, 0x271c, 0x3440, 0x3954, 0x30bc, 0x3b35, 0x2f1d, 0x3afb, 0x2dae, 0x356f, 0x2e13, 0x3981, 0x326d, 0x3a28, 0x3a36, 0x3a95, 0x38cb, 0x38db, 0x3150, 0x2c9e, 0x34c5, 0x3adb, 0x3bdf, 0x38f2, 0x3994, +0x36f8, 0x31c0, 0x3a4f, 0x3825, 0x394b, 0x3a8b, 0x38ac, 0x3167, 0x2e2d, 0x3a93, 0x34f3, 0x37bd, 0x3b63, 0x2f2f, 0x3ae0, 0x3ad8, 0x34a8, 0x2e1c, 0x3890, 0x3705, 0x3b69, 0x3bc1, 0x28af, 0x3b36, 0x348b, 0x3111, 0x3a8d, 0x389c, 0x3916, 0x36dc, 0x3bae, 0x3874, +0x3593, 0x3638, 0x3018, 0x3a56, 0x38a3, 0x2ad4, 0x3a25, 0x38d7, 0x3864, 0x31c1, 0x28d1, 0x39c8, 0x37d6, 0x2c7f, 0x3ba5, 0x34b8, 0x3bef, 0x3b83, 0x3ab5, 0x3062, 0x38bc, 0x399c, 0x2ce4, 0x2f2c, 0x39bf, 0x2ed1, 0x385f, 0x37e0, 0x35ee, 0x397d, 0x3b0c, 0x3049, +0x39d5, 0x322e, 0x3936, 0x3747, 0x2e15, 0x3b41, 0x3874, 0x3bd0, 0x2c04, 0x3800, 0x375b, 0x3b2d, 0x38d8, 0x3a51, 0x3406, 0x38da, 0x38ba, 0x3497, 0x382e, 0x35fc, 0x39d4, 0x3775, 0x3b1e, 0x3813, 0x3649, 0x31af, 0x37bb, 0x334a, 0x3a6e, 0x3284, 0x26e0, 0x2e01, +0x2ebb, 0x344b, 0x3821, 0x381a, 0x385a, 0x2534, 0x3635, 0x2a92, 0x3b8c, 0x31f0, 0x3947, 0x3ac7, 0x3743, 0x3924, 0x39e4, 0x358f, 0x2b62, 0x392c, 0x3955, 0x3341, 0x3676, 0x38ac, 0x3957, 0x335b, 0x2ca2, 0x39ff, 0x37cb, 0x341f, 0x3ac9, 0x3b6c, 0x2f14, 0x34c3, +0x3018, 0x3169, 0x355b, 0x3624, 0x31ed, 0x379e, 0x3268, 0x309b, 0x35db, 0x3872, 0x3bdb, 0x34c7, 0x3408, 0x3359, 0x3920, 0x331f, 0x3866, 0x3af0, 0x2a1a, 0x39e0, 0x3b14, 0x34fa, 0x2d18, 0x3963, 0x35e8, 0x2539, 0x38f5, 0x37b3, 0x378f, 0x31b5, 0x3a6c, 0x3685, +0x3a06, 0x318a, 0x2934, 0x33c1, 0x3be8, 0x375b, 0x3860, 0x3543, 0x3702, 0x3951, 0x3677, 0x37ff, 0x2e27, 0x2e3a, 0x340f, 0x3817, 0x2f04, 0x357e, 0x3a1d, 0x2dd6, 0x252a, 0x3945, 0x162a, 0x3b19, 0x3a53, 0x35d2, 0x3a5d, 0x3474, 0x38e9, 0x374b, 0x387c, 0x1f1a, +0x38ac, 0x3291, 0x3393, 0x3b53, 0x3169, 0x3bca, 0x2f1a, 0x3551, 0x38a3, 0x28e3, 0x369d, 0x34a1, 0x38a8, 0x34c3, 0x3841, 0x390d, 0x3b13, 0x3282, 0x3a29, 0x3a78, 0x2df3, 0x3a37, 0x35f4, 0x35a6, 0x38e8, 0x3328, 0x3beb, 0x390b, 0x32dc, 0x34dc, 0x396d, 0x3a78, +0x39ba, 0x3a06, 0x2cdd, 0x3bc3, 0x2d43, 0x2992, 0x3663, 0x3a68, 0x2c3e, 0x394e, 0x2c9f, 0x380e, 0x37f5, 0x3557, 0x2873, 0x390f, 0x39e7, 0x3939, 0x3669, 0x385c, 0x3a68, 0x32c4, 0x2b04, 0x2d6d, 0x39d3, 0x3895, 0x331d, 0x3b59, 0x3463, 0x2b6a, 0x31de, 0x3296, +0x3aae, 0x3bcd, 0x345a, 0x3897, 0x374b, 0x3bd4, 0x38a2, 0x357f, 0x3402, 0x3a0c, 0x3507, 0x3865, 0x3a54, 0x3878, 0x3859, 0x383e, 0x32b5, 0x34ea, 0x328d, 0x38b6, 0x3464, 0x2f5b, 0x35ff, 0x3817, 0x2f24, 0x3533, 0x3b21, 0x37ba, 0x3837, 0x2e34, 0x3bad, 0x34bc +}; \ No newline at end of file diff --git a/hwpe/redmule_softclear/inc/x_input.h b/hwpe/redmule_softclear/inc/x_input.h new file mode 100644 index 0000000..1e38d23 --- /dev/null +++ b/hwpe/redmule_softclear/inc/x_input.h @@ -0,0 +1,27 @@ + /* Header file generated by RedMulE Golden Model */ +uint16_t x_inp [768] = { +0x2153, 0x3bb5, 0x3896, 0x365f, 0x2483, 0x3518, 0x2dd1, 0x3bca, 0x397b, 0x29b1, 0x3705, 0x36c8, 0x398b, 0x3661, 0x2f05, 0x365a, 0x3bf9, 0x34df, 0x363b, 0x38d9, 0x39c6, 0x3abb, 0x3952, 0x38f2, 0x392d, 0x3b3e, 0x2afb, 0x3a9d, 0x353b, 0x3b73, 0x3a01, 0x3679, +0x3934, 0x397d, 0x2904, 0x3822, 0x3462, 0x3b44, 0x39e9, 0x28be, 0x331e, 0x3a1d, 0x39e5, 0x34da, 0x3a19, 0x3906, 0x1d35, 0x3871, 0x31e7, 0x3b29, 0x325d, 0x3797, 0x2b2f, 0x38b4, 0x232f, 0x38aa, 0x3aca, 0x316f, 0x3811, 0x3950, 0x32ea, 0x3bc7, 0x382c, 0x38a2, +0x29ce, 0x3afa, 0x3a39, 0x2ccc, 0x39fd, 0x3b3d, 0x384a, 0x3a35, 0x3802, 0x366a, 0x37ec, 0x3598, 0x3bf8, 0x3a85, 0x3a1b, 0x386e, 0x3b4c, 0x39de, 0x38c2, 0x2f93, 0x3b4c, 0x39c4, 0x3b9e, 0x3844, 0x346d, 0x3bff, 0x32ce, 0x296d, 0x3130, 0x3b3d, 0x3b44, 0x369d, +0x3b13, 0x31ed, 0x330a, 0x3831, 0x34e7, 0x37b3, 0x331a, 0x3918, 0x32d3, 0x3995, 0x3991, 0x3919, 0x3a26, 0x385b, 0x2b76, 0x3a3b, 0x37f2, 0x26a7, 0x3225, 0x3b64, 0x28f0, 0x3456, 0x3822, 0x341e, 0x381a, 0x38d8, 0x2c11, 0x33be, 0x33ac, 0x353f, 0x3476, 0x3abc, +0x36ec, 0x3a1d, 0x39d3, 0x3821, 0x36ac, 0x3bce, 0x3ad2, 0x3616, 0x36a1, 0x2cb3, 0x38d2, 0x314f, 0x385c, 0x3b63, 0x3bb6, 0x2951, 0x372d, 0x2c42, 0x3823, 0x3883, 0x3872, 0x31ee, 0x36c5, 0x399a, 0x31b0, 0x3887, 0x3884, 0x3865, 0x3896, 0x36c3, 0x32e3, 0x346c, +0x3935, 0x3b50, 0x2b6d, 0x38cd, 0x388f, 0x3389, 0x395d, 0x31cd, 0x2efd, 0x3154, 0x2f35, 0x3444, 0x3293, 0x3b6b, 0x1bec, 0x3b69, 0x3bf3, 0x3611, 0x3508, 0x3742, 0x3a50, 0x3ab7, 0x3457, 0x38d3, 0x3344, 0x38e8, 0x33c0, 0x3668, 0x3bee, 0x3b21, 0x3727, 0x3121, +0x316c, 0x3288, 0x2d50, 0x2e74, 0x35d5, 0x37e2, 0x303d, 0x36af, 0x341f, 0x3436, 0x2df7, 0x399d, 0x30f4, 0x3aaf, 0x34e4, 0x2c2a, 0x3116, 0x34d3, 0x36ac, 0x35e3, 0x3760, 0x36e1, 0x3ad2, 0x3547, 0x38f4, 0x369c, 0x3ba9, 0x34f0, 0x3a39, 0x3b19, 0x36e6, 0x395d, +0x3be8, 0x3293, 0x3bfc, 0x3435, 0x2eb3, 0x3360, 0x3919, 0x3bed, 0x396a, 0x37fc, 0x3242, 0x384b, 0x38cb, 0x3b2c, 0x3b28, 0x28cf, 0x3828, 0x3855, 0x3ba9, 0x2fa7, 0x340b, 0x32f1, 0x3ada, 0x36fa, 0x31f5, 0x3436, 0x29d0, 0x33e6, 0x3232, 0x3bec, 0x3904, 0x2797, +0x3b81, 0x3bac, 0x38d2, 0x343d, 0x31af, 0x3b1e, 0x33fc, 0x3864, 0x3624, 0x3905, 0x2945, 0x3b52, 0x2d08, 0x3a17, 0x3b84, 0x3804, 0x3a24, 0x38a3, 0x3562, 0x3ae6, 0x3bba, 0x3a45, 0x3679, 0x31fa, 0x3994, 0x2c3d, 0x383f, 0x399d, 0x34f7, 0x360e, 0x35f3, 0x38f0, +0x38d4, 0x399a, 0x3a48, 0x3987, 0x3b54, 0x382c, 0x3210, 0x35ef, 0x36ca, 0x31b4, 0x3625, 0x371f, 0x37bd, 0x3680, 0x3a3a, 0x3ac0, 0x3bbf, 0x3bf5, 0x39f2, 0x29c2, 0x363e, 0x3a4e, 0x3596, 0x3b1b, 0x3459, 0x3669, 0x3aa1, 0x39c3, 0x3376, 0x390d, 0x2456, 0x39b5, +0x3a66, 0x3ad8, 0x3b51, 0x36aa, 0x32be, 0x3ac8, 0x392b, 0x3740, 0x3a48, 0x38f5, 0x3b2d, 0x3a5f, 0x2ff3, 0x366f, 0x39d3, 0x35e5, 0x3822, 0x38db, 0x3b8a, 0x34be, 0x2d33, 0x36dd, 0x3578, 0x3bdf, 0x2c7e, 0x39cf, 0x32ff, 0x35c9, 0x3970, 0x3bcb, 0x351e, 0x3956, +0x2c42, 0x3308, 0x377a, 0x361c, 0x39a0, 0x36c9, 0x2dcb, 0x3bf2, 0x3b5f, 0x33ee, 0x24c1, 0x2ce9, 0x3927, 0x305d, 0x3702, 0x3119, 0x35f9, 0x3855, 0x3374, 0x349b, 0x3bcf, 0x2dea, 0x34f0, 0x363f, 0x37da, 0x3a74, 0x35fc, 0x35fa, 0x316b, 0x3804, 0x37a7, 0x3986, +0x3073, 0x3aed, 0x31c7, 0x3844, 0x34a4, 0x387d, 0x3a20, 0x3037, 0x3a00, 0x3b70, 0x377f, 0x3686, 0x3b7e, 0x38b3, 0x32e3, 0x3323, 0x391e, 0x3228, 0x3930, 0x3997, 0x3a5e, 0x398b, 0x3512, 0x35b0, 0x365c, 0x325d, 0x3b61, 0x38b8, 0x39a4, 0x3423, 0x3bd7, 0x38af, +0x2d3d, 0x382d, 0x38ac, 0x26ca, 0x395e, 0x21a8, 0x3520, 0x386f, 0x3b95, 0x32c0, 0x3b84, 0x3a51, 0x3b4b, 0x31d2, 0x3747, 0x3b96, 0x3b40, 0x3535, 0x38d1, 0x3899, 0x3b00, 0x3827, 0x3ae3, 0x38c8, 0x3a07, 0x338d, 0x2e96, 0x3a46, 0x394a, 0x39de, 0x2951, 0x3a02, +0x3838, 0x2d45, 0x28c0, 0x3958, 0x3070, 0x2aa2, 0x3510, 0x38ce, 0x271c, 0x3440, 0x3954, 0x30bc, 0x3b35, 0x2f1d, 0x3afb, 0x2dae, 0x356f, 0x2e13, 0x3981, 0x326d, 0x3a28, 0x3a36, 0x3a95, 0x38cb, 0x38db, 0x3150, 0x2c9e, 0x34c5, 0x3adb, 0x3bdf, 0x38f2, 0x3994, +0x36f8, 0x31c0, 0x3a4f, 0x3825, 0x394b, 0x3a8b, 0x38ac, 0x3167, 0x2e2d, 0x3a93, 0x34f3, 0x37bd, 0x3b63, 0x2f2f, 0x3ae0, 0x3ad8, 0x34a8, 0x2e1c, 0x3890, 0x3705, 0x3b69, 0x3bc1, 0x28af, 0x3b36, 0x348b, 0x3111, 0x3a8d, 0x389c, 0x3916, 0x36dc, 0x3bae, 0x3874, +0x3593, 0x3638, 0x3018, 0x3a56, 0x38a3, 0x2ad4, 0x3a25, 0x38d7, 0x3864, 0x31c1, 0x28d1, 0x39c8, 0x37d6, 0x2c7f, 0x3ba5, 0x34b8, 0x3bef, 0x3b83, 0x3ab5, 0x3062, 0x38bc, 0x399c, 0x2ce4, 0x2f2c, 0x39bf, 0x2ed1, 0x385f, 0x37e0, 0x35ee, 0x397d, 0x3b0c, 0x3049, +0x39d5, 0x322e, 0x3936, 0x3747, 0x2e15, 0x3b41, 0x3874, 0x3bd0, 0x2c04, 0x3800, 0x375b, 0x3b2d, 0x38d8, 0x3a51, 0x3406, 0x38da, 0x38ba, 0x3497, 0x382e, 0x35fc, 0x39d4, 0x3775, 0x3b1e, 0x3813, 0x3649, 0x31af, 0x37bb, 0x334a, 0x3a6e, 0x3284, 0x26e0, 0x2e01, +0x2ebb, 0x344b, 0x3821, 0x381a, 0x385a, 0x2534, 0x3635, 0x2a92, 0x3b8c, 0x31f0, 0x3947, 0x3ac7, 0x3743, 0x3924, 0x39e4, 0x358f, 0x2b62, 0x392c, 0x3955, 0x3341, 0x3676, 0x38ac, 0x3957, 0x335b, 0x2ca2, 0x39ff, 0x37cb, 0x341f, 0x3ac9, 0x3b6c, 0x2f14, 0x34c3, +0x3018, 0x3169, 0x355b, 0x3624, 0x31ed, 0x379e, 0x3268, 0x309b, 0x35db, 0x3872, 0x3bdb, 0x34c7, 0x3408, 0x3359, 0x3920, 0x331f, 0x3866, 0x3af0, 0x2a1a, 0x39e0, 0x3b14, 0x34fa, 0x2d18, 0x3963, 0x35e8, 0x2539, 0x38f5, 0x37b3, 0x378f, 0x31b5, 0x3a6c, 0x3685, +0x3a06, 0x318a, 0x2934, 0x33c1, 0x3be8, 0x375b, 0x3860, 0x3543, 0x3702, 0x3951, 0x3677, 0x37ff, 0x2e27, 0x2e3a, 0x340f, 0x3817, 0x2f04, 0x357e, 0x3a1d, 0x2dd6, 0x252a, 0x3945, 0x162a, 0x3b19, 0x3a53, 0x35d2, 0x3a5d, 0x3474, 0x38e9, 0x374b, 0x387c, 0x1f1a, +0x38ac, 0x3291, 0x3393, 0x3b53, 0x3169, 0x3bca, 0x2f1a, 0x3551, 0x38a3, 0x28e3, 0x369d, 0x34a1, 0x38a8, 0x34c3, 0x3841, 0x390d, 0x3b13, 0x3282, 0x3a29, 0x3a78, 0x2df3, 0x3a37, 0x35f4, 0x35a6, 0x38e8, 0x3328, 0x3beb, 0x390b, 0x32dc, 0x34dc, 0x396d, 0x3a78, +0x39ba, 0x3a06, 0x2cdd, 0x3bc3, 0x2d43, 0x2992, 0x3663, 0x3a68, 0x2c3e, 0x394e, 0x2c9f, 0x380e, 0x37f5, 0x3557, 0x2873, 0x390f, 0x39e7, 0x3939, 0x3669, 0x385c, 0x3a68, 0x32c4, 0x2b04, 0x2d6d, 0x39d3, 0x3895, 0x331d, 0x3b59, 0x3463, 0x2b6a, 0x31de, 0x3296, +0x3aae, 0x3bcd, 0x345a, 0x3897, 0x374b, 0x3bd4, 0x38a2, 0x357f, 0x3402, 0x3a0c, 0x3507, 0x3865, 0x3a54, 0x3878, 0x3859, 0x383e, 0x32b5, 0x34ea, 0x328d, 0x38b6, 0x3464, 0x2f5b, 0x35ff, 0x3817, 0x2f24, 0x3533, 0x3b21, 0x37ba, 0x3837, 0x2e34, 0x3bad, 0x34bc +}; \ No newline at end of file diff --git a/hwpe/redmule_softclear/inc/y_2D.h b/hwpe/redmule_softclear/inc/y_2D.h new file mode 100644 index 0000000..9484a10 --- /dev/null +++ b/hwpe/redmule_softclear/inc/y_2D.h @@ -0,0 +1,27 @@ + /* Header file generated by RedMulE Golden Model */ +uint16_t y_inp_2D [32][32] = { +0x3150, 0x2dc1, 0x3033, 0x31f5, 0x3bb6, 0x3bff, 0x39f9, 0x3662, 0x3720, 0x351d, 0x384b, 0x3093, 0x3b9d, 0x35ad, 0x3695, 0x3466, 0x2300, 0x3445, 0x33ae, 0x3586, 0x38a3, 0x3bdb, 0x33a2, 0x379b, 0x3a0e, 0x38b0, 0x39ba, 0x379b, 0x39d3, 0x3a51, 0x3b30, 0x3794, +0x3b76, 0x3042, 0x38cc, 0x2dfc, 0x3b1a, 0x37fb, 0x38f7, 0x3824, 0x386f, 0x38c7, 0x36ee, 0x3a9c, 0x38d3, 0x2c67, 0x3a80, 0x2f30, 0x3328, 0x3721, 0x3790, 0x34e5, 0x3a6c, 0x3643, 0x3934, 0x3034, 0x38d4, 0x362e, 0x3b4b, 0x3408, 0x30c2, 0x370e, 0x3b31, 0x3b16, +0x3b6b, 0x39d4, 0x339c, 0x381e, 0x313e, 0x3671, 0x3ae2, 0x3479, 0x3940, 0x342d, 0x3925, 0x370a, 0x35d8, 0x2dad, 0x3888, 0x24b9, 0x375d, 0x34bd, 0x3243, 0x2ebb, 0x3970, 0x3a21, 0x3a07, 0x3877, 0x3888, 0x3569, 0x372d, 0x2ac1, 0x331e, 0x384d, 0x3996, 0x34a4, +0x35c1, 0x33a9, 0x21ed, 0x3a42, 0x388d, 0x34e4, 0x33c3, 0x34f9, 0x3a7b, 0x33fb, 0x2cdd, 0x3b0e, 0x333b, 0x3973, 0x34fc, 0x3771, 0x32ea, 0x2de4, 0x31a8, 0x3946, 0x3657, 0x3a4e, 0x36f6, 0x2829, 0x3ba2, 0x3bdc, 0x3bb3, 0x306c, 0x398d, 0x3a1f, 0x3991, 0x3846, +0x3547, 0x3292, 0x2e85, 0x31ed, 0x3979, 0x3a90, 0x28a4, 0x3bed, 0x36d8, 0x340e, 0x3b6a, 0x3ab6, 0x3824, 0x382b, 0x3ac3, 0x3811, 0x36d7, 0x3519, 0x3a92, 0x3a42, 0x29d1, 0x383a, 0x3a9b, 0x300e, 0x2cd3, 0x39cd, 0x3874, 0x3a07, 0x2eb1, 0x3b86, 0x3ad8, 0x3a5d, +0x3712, 0x284a, 0x38c1, 0x3bec, 0x39c0, 0x32cd, 0x3ad8, 0x3bce, 0x3817, 0x3896, 0x3aa7, 0x3870, 0x3996, 0x32cc, 0x3a4c, 0x3757, 0x3814, 0x3b65, 0x3acb, 0x376e, 0x34c0, 0x3609, 0x3bf0, 0x3b24, 0x3b29, 0x3848, 0x34b7, 0x398a, 0x220c, 0x3498, 0x3a8c, 0x3883, +0x38c4, 0x3af6, 0x3a42, 0x2dd6, 0x3147, 0x3717, 0x3a8e, 0x3af9, 0x3296, 0x38ef, 0x34fa, 0x3555, 0x3b29, 0x38de, 0x315e, 0x3773, 0x3b67, 0x3116, 0x38ec, 0x357c, 0x35d0, 0x2518, 0x3958, 0x2a03, 0x37d9, 0x3699, 0x3a1e, 0x3230, 0x3b13, 0x36d4, 0x3b2a, 0x39ad, +0x3b10, 0x351a, 0x3b97, 0x3326, 0x2b54, 0x3b7d, 0x386f, 0x373e, 0x37fa, 0x389b, 0x3b90, 0x3292, 0x3975, 0x38f3, 0x37f1, 0x3590, 0x3810, 0x2fd7, 0x3bf7, 0x3a5a, 0x3a1c, 0x34dd, 0x354c, 0x32f8, 0x3095, 0x321e, 0x39e0, 0x395c, 0x3717, 0x357f, 0x394a, 0x34b1, +0x3ba4, 0x380c, 0x3604, 0x2f50, 0x348d, 0x3828, 0x3a9f, 0x39ce, 0x32ca, 0x3906, 0x3ab2, 0x2ca5, 0x38c9, 0x362a, 0x34b2, 0x29dc, 0x3a36, 0x3052, 0x31b7, 0x3589, 0x387c, 0x3401, 0x3b22, 0x3ad6, 0x3ae8, 0x3238, 0x3494, 0x3502, 0x3717, 0x3a6c, 0x3229, 0x368c, +0x3056, 0x3a56, 0x3498, 0x39eb, 0x2864, 0x342d, 0x39e0, 0x34a1, 0x2b99, 0x3a04, 0x38ff, 0x328c, 0x34d9, 0x387d, 0x3a3c, 0x32e5, 0x39eb, 0x3984, 0x34dd, 0x38a7, 0x373f, 0x39b4, 0x3235, 0x2f58, 0x2f39, 0x3800, 0x3758, 0x3939, 0x39fc, 0x3a4b, 0x38bf, 0x30ee, +0x345e, 0x39c8, 0x3a6d, 0x3262, 0x3b81, 0x31dc, 0x3a15, 0x3bd0, 0x36af, 0x36de, 0x37d5, 0x39d7, 0x3ad3, 0x3ac1, 0x3109, 0x35ea, 0x31c6, 0x398d, 0x3987, 0x3a4a, 0x34d2, 0x2ed2, 0x35e6, 0x352c, 0x39eb, 0x3bd6, 0x3a5b, 0x39d1, 0x34aa, 0x3ade, 0x394b, 0x38a1, +0x2bed, 0x38de, 0x3811, 0x3813, 0x391a, 0x374b, 0x3829, 0x3725, 0x38f0, 0x3583, 0x3966, 0x3a7d, 0x375a, 0x38fe, 0x3696, 0x361c, 0x39a8, 0x35f0, 0x38e1, 0x3003, 0x3595, 0x316e, 0x3862, 0x3af8, 0x3af2, 0x34c8, 0x381d, 0x37d8, 0x3893, 0x3a9c, 0x3989, 0x308c, +0x30cc, 0x2538, 0x399d, 0x3919, 0x399e, 0x21cc, 0x38e9, 0x30f8, 0x3a20, 0x3b3c, 0x3990, 0x259c, 0x3143, 0x3080, 0x3967, 0x3afb, 0x3a1b, 0x3779, 0x2eeb, 0x39f3, 0x379a, 0x369c, 0x3985, 0x3a1b, 0x3ba6, 0x3a53, 0x28d5, 0x3881, 0x31d9, 0x3a34, 0x3bd9, 0x393a, +0x3601, 0x2c6e, 0x3636, 0x3298, 0x39bb, 0x3a08, 0x38db, 0x35ad, 0x3a09, 0x36a6, 0x3bc7, 0x3bac, 0x34ae, 0x3291, 0x290b, 0x3250, 0x2648, 0x333d, 0x2bf3, 0x34b1, 0x30e0, 0x351f, 0x3a74, 0x38dc, 0x3883, 0x2841, 0x35e1, 0x390d, 0x3a50, 0x3abd, 0x386d, 0x3bb7, +0x3b94, 0x36b7, 0x3a49, 0x332f, 0x3a1d, 0x354b, 0x3bab, 0x3346, 0x3417, 0x351e, 0x3b6d, 0x391a, 0x2db3, 0x3b1c, 0x3a4a, 0x37b7, 0x36cf, 0x3a56, 0x39c4, 0x3be9, 0x34f0, 0x39be, 0x3691, 0x1ba5, 0x3888, 0x3040, 0x3ae1, 0x3b9b, 0x398f, 0x3a49, 0x3a16, 0x38c0, +0x386c, 0x39ab, 0x37fa, 0x382c, 0x3a6f, 0x393f, 0x340d, 0x38ef, 0x39d1, 0x3845, 0x398f, 0x363e, 0x3687, 0x3052, 0x3a2b, 0x392c, 0x2f5c, 0x3412, 0x3a1f, 0x3b2f, 0x3bcc, 0x3a63, 0x3a89, 0x36e9, 0x3921, 0x3b80, 0x2dc0, 0x3a03, 0x3beb, 0x38d3, 0x36cb, 0x39a3, +0x3978, 0x3a88, 0x3ba4, 0x3561, 0x28c5, 0x33a0, 0x37be, 0x2c39, 0x30ee, 0x3782, 0x2c07, 0x354e, 0x3491, 0x3a92, 0x331a, 0x3b15, 0x32e1, 0x3839, 0x3afb, 0x36c2, 0x2fd0, 0x29ad, 0x3b2e, 0x39c1, 0x2a8c, 0x341a, 0x2f90, 0x395a, 0x3969, 0x37ea, 0x3a5c, 0x3b6d, +0x3971, 0x3a93, 0x304e, 0x3623, 0x3a22, 0x31ee, 0x29df, 0x2c93, 0x3a01, 0x3a62, 0x366c, 0x371d, 0x3af3, 0x2e08, 0x3ac0, 0x3642, 0x3a28, 0x368d, 0x2d3d, 0x36d9, 0x32c3, 0x373f, 0x36fe, 0x3487, 0x2c81, 0x3623, 0x3b59, 0x3a91, 0x350a, 0x34f4, 0x3b09, 0x2c25, +0x3b13, 0x325a, 0x379e, 0x3a7d, 0x34b1, 0x39d5, 0x2ba8, 0x322b, 0x3b5e, 0x37ab, 0x2e24, 0x3ba9, 0x3a3d, 0x34f7, 0x3ba1, 0x3877, 0x3071, 0x39fb, 0x3bbd, 0x3633, 0x3b36, 0x2daa, 0x3b9b, 0x3aa0, 0x395c, 0x3b8f, 0x38d5, 0x3ab0, 0x3a8f, 0x36c2, 0x3b1f, 0x3489, +0x2acc, 0x3845, 0x3715, 0x37d8, 0x3992, 0x3bff, 0x350e, 0x3ad7, 0x39b0, 0x35ac, 0x3287, 0x385f, 0x3bd4, 0x37a3, 0x3438, 0x39a5, 0x3bcf, 0x38c3, 0x34f6, 0x3ae3, 0x3b57, 0x39af, 0x35eb, 0x3bed, 0x34d4, 0x2a95, 0x3b13, 0x384e, 0x3a3b, 0x33da, 0x3bce, 0x3b99, +0x3559, 0x3335, 0x3a2e, 0x3123, 0x38db, 0x33d0, 0x3638, 0x3b17, 0x3a72, 0x3afc, 0x3936, 0x3838, 0x2b69, 0x3895, 0x3a1a, 0x3192, 0x39d5, 0x37a5, 0x2eb0, 0x2e8b, 0x329a, 0x3b90, 0x390a, 0x3a1e, 0x3847, 0x375d, 0x3873, 0x35e2, 0x3771, 0x30f5, 0x3231, 0x3bd7, +0x2bbc, 0x3ace, 0x31ad, 0x3a6b, 0x28a4, 0x3b48, 0x3ba3, 0x3a84, 0x3353, 0x39f6, 0x381f, 0x2dd6, 0x314c, 0x34af, 0x3929, 0x3921, 0x383b, 0x34b0, 0x3923, 0x32c9, 0x3ae7, 0x318f, 0x3480, 0x2ad8, 0x3042, 0x3a4c, 0x349d, 0x2c12, 0x3abb, 0x3a57, 0x3b0d, 0x3111, +0x3359, 0x3a84, 0x38f2, 0x368d, 0x2f4b, 0x3ba0, 0x395c, 0x3026, 0x3a15, 0x2a04, 0x326e, 0x3522, 0x31a2, 0x382f, 0x2ada, 0x3b7c, 0x2f80, 0x3af5, 0x2d35, 0x38fa, 0x39ab, 0x2c6d, 0x2e7a, 0x39f6, 0x31a4, 0x3a53, 0x358c, 0x3951, 0x3a4e, 0x3916, 0x2a3f, 0x3ae9, +0x3b03, 0x39f8, 0x39fe, 0x3a61, 0x39fb, 0x3704, 0x360d, 0x39a7, 0x37a9, 0x348f, 0x3a30, 0x3af5, 0x366f, 0x3b29, 0x3a6a, 0x33d5, 0x370a, 0x39cd, 0x3444, 0x3bea, 0x3b2b, 0x312e, 0x3b8e, 0x32cf, 0x3b79, 0x3302, 0x3bba, 0x3962, 0x3413, 0x37a1, 0x39e0, 0x3805 +}; \ No newline at end of file diff --git a/hwpe/redmule_softclear/inc/y_input.h b/hwpe/redmule_softclear/inc/y_input.h new file mode 100644 index 0000000..45a2375 --- /dev/null +++ b/hwpe/redmule_softclear/inc/y_input.h @@ -0,0 +1,27 @@ + /* Header file generated by RedMulE Golden Model */ +uint16_t y_inp [768] = { +0x3150, 0x2dc1, 0x3033, 0x31f5, 0x3bb6, 0x3bff, 0x39f9, 0x3662, 0x3720, 0x351d, 0x384b, 0x3093, 0x3b9d, 0x35ad, 0x3695, 0x3466, 0x2300, 0x3445, 0x33ae, 0x3586, 0x38a3, 0x3bdb, 0x33a2, 0x379b, 0x3a0e, 0x38b0, 0x39ba, 0x379b, 0x39d3, 0x3a51, 0x3b30, 0x3794, +0x3b76, 0x3042, 0x38cc, 0x2dfc, 0x3b1a, 0x37fb, 0x38f7, 0x3824, 0x386f, 0x38c7, 0x36ee, 0x3a9c, 0x38d3, 0x2c67, 0x3a80, 0x2f30, 0x3328, 0x3721, 0x3790, 0x34e5, 0x3a6c, 0x3643, 0x3934, 0x3034, 0x38d4, 0x362e, 0x3b4b, 0x3408, 0x30c2, 0x370e, 0x3b31, 0x3b16, +0x3b6b, 0x39d4, 0x339c, 0x381e, 0x313e, 0x3671, 0x3ae2, 0x3479, 0x3940, 0x342d, 0x3925, 0x370a, 0x35d8, 0x2dad, 0x3888, 0x24b9, 0x375d, 0x34bd, 0x3243, 0x2ebb, 0x3970, 0x3a21, 0x3a07, 0x3877, 0x3888, 0x3569, 0x372d, 0x2ac1, 0x331e, 0x384d, 0x3996, 0x34a4, +0x35c1, 0x33a9, 0x21ed, 0x3a42, 0x388d, 0x34e4, 0x33c3, 0x34f9, 0x3a7b, 0x33fb, 0x2cdd, 0x3b0e, 0x333b, 0x3973, 0x34fc, 0x3771, 0x32ea, 0x2de4, 0x31a8, 0x3946, 0x3657, 0x3a4e, 0x36f6, 0x2829, 0x3ba2, 0x3bdc, 0x3bb3, 0x306c, 0x398d, 0x3a1f, 0x3991, 0x3846, +0x3547, 0x3292, 0x2e85, 0x31ed, 0x3979, 0x3a90, 0x28a4, 0x3bed, 0x36d8, 0x340e, 0x3b6a, 0x3ab6, 0x3824, 0x382b, 0x3ac3, 0x3811, 0x36d7, 0x3519, 0x3a92, 0x3a42, 0x29d1, 0x383a, 0x3a9b, 0x300e, 0x2cd3, 0x39cd, 0x3874, 0x3a07, 0x2eb1, 0x3b86, 0x3ad8, 0x3a5d, +0x3712, 0x284a, 0x38c1, 0x3bec, 0x39c0, 0x32cd, 0x3ad8, 0x3bce, 0x3817, 0x3896, 0x3aa7, 0x3870, 0x3996, 0x32cc, 0x3a4c, 0x3757, 0x3814, 0x3b65, 0x3acb, 0x376e, 0x34c0, 0x3609, 0x3bf0, 0x3b24, 0x3b29, 0x3848, 0x34b7, 0x398a, 0x220c, 0x3498, 0x3a8c, 0x3883, +0x38c4, 0x3af6, 0x3a42, 0x2dd6, 0x3147, 0x3717, 0x3a8e, 0x3af9, 0x3296, 0x38ef, 0x34fa, 0x3555, 0x3b29, 0x38de, 0x315e, 0x3773, 0x3b67, 0x3116, 0x38ec, 0x357c, 0x35d0, 0x2518, 0x3958, 0x2a03, 0x37d9, 0x3699, 0x3a1e, 0x3230, 0x3b13, 0x36d4, 0x3b2a, 0x39ad, +0x3b10, 0x351a, 0x3b97, 0x3326, 0x2b54, 0x3b7d, 0x386f, 0x373e, 0x37fa, 0x389b, 0x3b90, 0x3292, 0x3975, 0x38f3, 0x37f1, 0x3590, 0x3810, 0x2fd7, 0x3bf7, 0x3a5a, 0x3a1c, 0x34dd, 0x354c, 0x32f8, 0x3095, 0x321e, 0x39e0, 0x395c, 0x3717, 0x357f, 0x394a, 0x34b1, +0x3ba4, 0x380c, 0x3604, 0x2f50, 0x348d, 0x3828, 0x3a9f, 0x39ce, 0x32ca, 0x3906, 0x3ab2, 0x2ca5, 0x38c9, 0x362a, 0x34b2, 0x29dc, 0x3a36, 0x3052, 0x31b7, 0x3589, 0x387c, 0x3401, 0x3b22, 0x3ad6, 0x3ae8, 0x3238, 0x3494, 0x3502, 0x3717, 0x3a6c, 0x3229, 0x368c, +0x3056, 0x3a56, 0x3498, 0x39eb, 0x2864, 0x342d, 0x39e0, 0x34a1, 0x2b99, 0x3a04, 0x38ff, 0x328c, 0x34d9, 0x387d, 0x3a3c, 0x32e5, 0x39eb, 0x3984, 0x34dd, 0x38a7, 0x373f, 0x39b4, 0x3235, 0x2f58, 0x2f39, 0x3800, 0x3758, 0x3939, 0x39fc, 0x3a4b, 0x38bf, 0x30ee, +0x345e, 0x39c8, 0x3a6d, 0x3262, 0x3b81, 0x31dc, 0x3a15, 0x3bd0, 0x36af, 0x36de, 0x37d5, 0x39d7, 0x3ad3, 0x3ac1, 0x3109, 0x35ea, 0x31c6, 0x398d, 0x3987, 0x3a4a, 0x34d2, 0x2ed2, 0x35e6, 0x352c, 0x39eb, 0x3bd6, 0x3a5b, 0x39d1, 0x34aa, 0x3ade, 0x394b, 0x38a1, +0x2bed, 0x38de, 0x3811, 0x3813, 0x391a, 0x374b, 0x3829, 0x3725, 0x38f0, 0x3583, 0x3966, 0x3a7d, 0x375a, 0x38fe, 0x3696, 0x361c, 0x39a8, 0x35f0, 0x38e1, 0x3003, 0x3595, 0x316e, 0x3862, 0x3af8, 0x3af2, 0x34c8, 0x381d, 0x37d8, 0x3893, 0x3a9c, 0x3989, 0x308c, +0x30cc, 0x2538, 0x399d, 0x3919, 0x399e, 0x21cc, 0x38e9, 0x30f8, 0x3a20, 0x3b3c, 0x3990, 0x259c, 0x3143, 0x3080, 0x3967, 0x3afb, 0x3a1b, 0x3779, 0x2eeb, 0x39f3, 0x379a, 0x369c, 0x3985, 0x3a1b, 0x3ba6, 0x3a53, 0x28d5, 0x3881, 0x31d9, 0x3a34, 0x3bd9, 0x393a, +0x3601, 0x2c6e, 0x3636, 0x3298, 0x39bb, 0x3a08, 0x38db, 0x35ad, 0x3a09, 0x36a6, 0x3bc7, 0x3bac, 0x34ae, 0x3291, 0x290b, 0x3250, 0x2648, 0x333d, 0x2bf3, 0x34b1, 0x30e0, 0x351f, 0x3a74, 0x38dc, 0x3883, 0x2841, 0x35e1, 0x390d, 0x3a50, 0x3abd, 0x386d, 0x3bb7, +0x3b94, 0x36b7, 0x3a49, 0x332f, 0x3a1d, 0x354b, 0x3bab, 0x3346, 0x3417, 0x351e, 0x3b6d, 0x391a, 0x2db3, 0x3b1c, 0x3a4a, 0x37b7, 0x36cf, 0x3a56, 0x39c4, 0x3be9, 0x34f0, 0x39be, 0x3691, 0x1ba5, 0x3888, 0x3040, 0x3ae1, 0x3b9b, 0x398f, 0x3a49, 0x3a16, 0x38c0, +0x386c, 0x39ab, 0x37fa, 0x382c, 0x3a6f, 0x393f, 0x340d, 0x38ef, 0x39d1, 0x3845, 0x398f, 0x363e, 0x3687, 0x3052, 0x3a2b, 0x392c, 0x2f5c, 0x3412, 0x3a1f, 0x3b2f, 0x3bcc, 0x3a63, 0x3a89, 0x36e9, 0x3921, 0x3b80, 0x2dc0, 0x3a03, 0x3beb, 0x38d3, 0x36cb, 0x39a3, +0x3978, 0x3a88, 0x3ba4, 0x3561, 0x28c5, 0x33a0, 0x37be, 0x2c39, 0x30ee, 0x3782, 0x2c07, 0x354e, 0x3491, 0x3a92, 0x331a, 0x3b15, 0x32e1, 0x3839, 0x3afb, 0x36c2, 0x2fd0, 0x29ad, 0x3b2e, 0x39c1, 0x2a8c, 0x341a, 0x2f90, 0x395a, 0x3969, 0x37ea, 0x3a5c, 0x3b6d, +0x3971, 0x3a93, 0x304e, 0x3623, 0x3a22, 0x31ee, 0x29df, 0x2c93, 0x3a01, 0x3a62, 0x366c, 0x371d, 0x3af3, 0x2e08, 0x3ac0, 0x3642, 0x3a28, 0x368d, 0x2d3d, 0x36d9, 0x32c3, 0x373f, 0x36fe, 0x3487, 0x2c81, 0x3623, 0x3b59, 0x3a91, 0x350a, 0x34f4, 0x3b09, 0x2c25, +0x3b13, 0x325a, 0x379e, 0x3a7d, 0x34b1, 0x39d5, 0x2ba8, 0x322b, 0x3b5e, 0x37ab, 0x2e24, 0x3ba9, 0x3a3d, 0x34f7, 0x3ba1, 0x3877, 0x3071, 0x39fb, 0x3bbd, 0x3633, 0x3b36, 0x2daa, 0x3b9b, 0x3aa0, 0x395c, 0x3b8f, 0x38d5, 0x3ab0, 0x3a8f, 0x36c2, 0x3b1f, 0x3489, +0x2acc, 0x3845, 0x3715, 0x37d8, 0x3992, 0x3bff, 0x350e, 0x3ad7, 0x39b0, 0x35ac, 0x3287, 0x385f, 0x3bd4, 0x37a3, 0x3438, 0x39a5, 0x3bcf, 0x38c3, 0x34f6, 0x3ae3, 0x3b57, 0x39af, 0x35eb, 0x3bed, 0x34d4, 0x2a95, 0x3b13, 0x384e, 0x3a3b, 0x33da, 0x3bce, 0x3b99, +0x3559, 0x3335, 0x3a2e, 0x3123, 0x38db, 0x33d0, 0x3638, 0x3b17, 0x3a72, 0x3afc, 0x3936, 0x3838, 0x2b69, 0x3895, 0x3a1a, 0x3192, 0x39d5, 0x37a5, 0x2eb0, 0x2e8b, 0x329a, 0x3b90, 0x390a, 0x3a1e, 0x3847, 0x375d, 0x3873, 0x35e2, 0x3771, 0x30f5, 0x3231, 0x3bd7, +0x2bbc, 0x3ace, 0x31ad, 0x3a6b, 0x28a4, 0x3b48, 0x3ba3, 0x3a84, 0x3353, 0x39f6, 0x381f, 0x2dd6, 0x314c, 0x34af, 0x3929, 0x3921, 0x383b, 0x34b0, 0x3923, 0x32c9, 0x3ae7, 0x318f, 0x3480, 0x2ad8, 0x3042, 0x3a4c, 0x349d, 0x2c12, 0x3abb, 0x3a57, 0x3b0d, 0x3111, +0x3359, 0x3a84, 0x38f2, 0x368d, 0x2f4b, 0x3ba0, 0x395c, 0x3026, 0x3a15, 0x2a04, 0x326e, 0x3522, 0x31a2, 0x382f, 0x2ada, 0x3b7c, 0x2f80, 0x3af5, 0x2d35, 0x38fa, 0x39ab, 0x2c6d, 0x2e7a, 0x39f6, 0x31a4, 0x3a53, 0x358c, 0x3951, 0x3a4e, 0x3916, 0x2a3f, 0x3ae9, +0x3b03, 0x39f8, 0x39fe, 0x3a61, 0x39fb, 0x3704, 0x360d, 0x39a7, 0x37a9, 0x348f, 0x3a30, 0x3af5, 0x366f, 0x3b29, 0x3a6a, 0x33d5, 0x370a, 0x39cd, 0x3444, 0x3bea, 0x3b2b, 0x312e, 0x3b8e, 0x32cf, 0x3b79, 0x3302, 0x3bba, 0x3962, 0x3413, 0x37a1, 0x39e0, 0x3805 +}; \ No newline at end of file diff --git a/hwpe/redmule_softclear/inc/z_2D.h b/hwpe/redmule_softclear/inc/z_2D.h new file mode 100644 index 0000000..aff808a --- /dev/null +++ b/hwpe/redmule_softclear/inc/z_2D.h @@ -0,0 +1,27 @@ + /* Header file generated by RedMulE Golden Model */ +uint16_t z_oup_2D [24][32] = { +0x4845, 0x4897, 0x4608, 0x4838, 0x4855, 0x487b, 0x4869, 0x4880, 0x46d1, 0x48b0, 0x48db, 0x483f, 0x48c9, 0x485f, 0x4881, 0x483a, 0x484b, 0x472c, 0x4762, 0x492b, 0x4822, 0x48fd, 0x488e, 0x492e, 0x483e, 0x484f, 0x49e8, 0x46d7, 0x484b, 0x489d, 0x490b, 0x47e9, +0x484f, 0x47d2, 0x44be, 0x4747, 0x47c7, 0x46c0, 0x4727, 0x48af, 0x46c5, 0x482d, 0x483d, 0x482e, 0x4897, 0x479f, 0x488b, 0x4749, 0x489a, 0x46a8, 0x46f2, 0x488b, 0x4891, 0x47e8, 0x4872, 0x483d, 0x4716, 0x46fd, 0x49b5, 0x46a0, 0x46e7, 0x47a4, 0x48a1, 0x4767, +0x4939, 0x4935, 0x4703, 0x48c1, 0x4863, 0x48bd, 0x4913, 0x48cf, 0x48b6, 0x48b8, 0x4946, 0x4920, 0x495e, 0x48e1, 0x4938, 0x48b2, 0x493a, 0x4882, 0x483b, 0x49d5, 0x4911, 0x4972, 0x496b, 0x49df, 0x48f2, 0x4888, 0x4a46, 0x4821, 0x48c1, 0x490c, 0x49b2, 0x48a3, +0x463a, 0x47b0, 0x44cb, 0x4762, 0x4765, 0x46b9, 0x466a, 0x4814, 0x4631, 0x4796, 0x4666, 0x474b, 0x4798, 0x4704, 0x4838, 0x4761, 0x47d3, 0x4590, 0x45ea, 0x48a2, 0x47f1, 0x4844, 0x484b, 0x4776, 0x47d6, 0x46d8, 0x48f3, 0x44d3, 0x46fa, 0x478d, 0x481e, 0x466e, +0x4827, 0x481e, 0x45a2, 0x4794, 0x4727, 0x4806, 0x475d, 0x48d5, 0x4708, 0x4828, 0x4862, 0x480d, 0x4895, 0x4832, 0x48bd, 0x47f1, 0x482a, 0x46a7, 0x47b1, 0x492d, 0x484d, 0x4884, 0x48dc, 0x485f, 0x476d, 0x480c, 0x48e9, 0x46d3, 0x4728, 0x4884, 0x48a0, 0x480e, +0x4862, 0x4813, 0x4675, 0x485a, 0x47e8, 0x4738, 0x4836, 0x4823, 0x46e7, 0x4821, 0x4822, 0x47b3, 0x4846, 0x4855, 0x4863, 0x4717, 0x4872, 0x47c1, 0x46d5, 0x488e, 0x47e2, 0x485f, 0x487c, 0x48b8, 0x481e, 0x4788, 0x48bd, 0x4677, 0x46c9, 0x47f8, 0x48fe, 0x47fc, +0x47a0, 0x47b2, 0x4588, 0x467e, 0x4662, 0x46c7, 0x46e8, 0x4812, 0x4536, 0x474e, 0x46c0, 0x468f, 0x481f, 0x4679, 0x46a1, 0x46e2, 0x4809, 0x4560, 0x4630, 0x47eb, 0x46b5, 0x4757, 0x4848, 0x477f, 0x46a6, 0x46d8, 0x4870, 0x459a, 0x4670, 0x4678, 0x47d2, 0x468c, +0x4762, 0x48c4, 0x46e3, 0x4791, 0x46b1, 0x486d, 0x47d0, 0x4867, 0x468d, 0x47f6, 0x48a5, 0x4756, 0x4857, 0x4854, 0x4866, 0x4838, 0x484d, 0x46ec, 0x47d2, 0x48f6, 0x484a, 0x4879, 0x4848, 0x483c, 0x471d, 0x4806, 0x48fa, 0x4730, 0x4768, 0x47b8, 0x4865, 0x46f9, +0x48a8, 0x4918, 0x46ca, 0x4867, 0x4800, 0x4862, 0x48d3, 0x4910, 0x474e, 0x4849, 0x48eb, 0x486b, 0x4966, 0x48c5, 0x48f4, 0x4830, 0x48f9, 0x4778, 0x481e, 0x499e, 0x48cf, 0x48f1, 0x4982, 0x4923, 0x487c, 0x47cf, 0x49ea, 0x4649, 0x4773, 0x495e, 0x48b2, 0x483f, +0x48a7, 0x4975, 0x4616, 0x481e, 0x481f, 0x4866, 0x48b6, 0x4864, 0x47dc, 0x4873, 0x485c, 0x487f, 0x4938, 0x491f, 0x490d, 0x48b6, 0x48f8, 0x48a1, 0x4859, 0x492d, 0x489c, 0x4915, 0x4899, 0x4887, 0x486c, 0x4859, 0x49ca, 0x471e, 0x4867, 0x4918, 0x48d3, 0x4827, +0x488b, 0x4998, 0x4704, 0x481d, 0x48b8, 0x4880, 0x4876, 0x4944, 0x470c, 0x48f2, 0x48b9, 0x489b, 0x4956, 0x48e5, 0x48d6, 0x48a5, 0x48dc, 0x4856, 0x484e, 0x49ab, 0x48e0, 0x490e, 0x48dd, 0x4945, 0x488b, 0x48dd, 0x4a32, 0x47ea, 0x4835, 0x4911, 0x4965, 0x4819, +0x460e, 0x481e, 0x452c, 0x4673, 0x475c, 0x4717, 0x46f6, 0x46d0, 0x4696, 0x46bc, 0x4726, 0x481e, 0x4763, 0x46ea, 0x46fe, 0x4758, 0x478b, 0x4627, 0x4704, 0x483f, 0x46ad, 0x47b1, 0x4792, 0x4816, 0x46f2, 0x4684, 0x4827, 0x45a8, 0x472f, 0x47a4, 0x4797, 0x462b, +0x483f, 0x48ab, 0x468f, 0x4863, 0x485a, 0x4766, 0x481d, 0x48cb, 0x47dc, 0x4903, 0x48fc, 0x4830, 0x48cc, 0x483e, 0x48ab, 0x4864, 0x4966, 0x4763, 0x4794, 0x499d, 0x488e, 0x488b, 0x48dc, 0x4960, 0x4854, 0x484c, 0x499c, 0x474c, 0x4826, 0x48bc, 0x4949, 0x4883, +0x489d, 0x4905, 0x4718, 0x481e, 0x48e3, 0x48f4, 0x48c1, 0x4904, 0x47e8, 0x48b3, 0x4892, 0x48d4, 0x48ff, 0x4894, 0x48d5, 0x4886, 0x48fa, 0x4803, 0x47d2, 0x492e, 0x4870, 0x48b2, 0x48e5, 0x492b, 0x487b, 0x4785, 0x49e3, 0x471d, 0x4837, 0x48bf, 0x489b, 0x48c4, +0x475c, 0x4871, 0x464a, 0x4811, 0x47af, 0x471c, 0x4817, 0x4817, 0x463b, 0x484e, 0x477f, 0x464f, 0x4704, 0x487c, 0x47a3, 0x4725, 0x4853, 0x462a, 0x465a, 0x4860, 0x4736, 0x4880, 0x47e1, 0x482b, 0x4811, 0x46c0, 0x48dc, 0x475d, 0x4668, 0x4806, 0x4893, 0x46f4, +0x4858, 0x4959, 0x463d, 0x487b, 0x480f, 0x484e, 0x48c0, 0x48a6, 0x4847, 0x4894, 0x48a0, 0x484a, 0x491e, 0x48f4, 0x48fc, 0x48b5, 0x48ce, 0x47d2, 0x47db, 0x497f, 0x4955, 0x4939, 0x48a7, 0x48ce, 0x4890, 0x4884, 0x49d6, 0x4763, 0x486e, 0x4922, 0x48f4, 0x48c3, +0x47ec, 0x491c, 0x4698, 0x4783, 0x4715, 0x4754, 0x4745, 0x4752, 0x472f, 0x4832, 0x4817, 0x4809, 0x47f8, 0x48c3, 0x47e6, 0x4800, 0x48b6, 0x4730, 0x480a, 0x48cb, 0x479e, 0x488e, 0x47c2, 0x488e, 0x472f, 0x47ee, 0x489d, 0x4744, 0x4755, 0x4851, 0x4846, 0x47d3, +0x4838, 0x48a0, 0x4634, 0x4762, 0x4786, 0x4806, 0x47e3, 0x482d, 0x4726, 0x486c, 0x47b7, 0x4803, 0x48ac, 0x4814, 0x48e0, 0x4839, 0x4827, 0x4750, 0x46f2, 0x48c5, 0x483f, 0x4886, 0x48ad, 0x4856, 0x47e8, 0x47a9, 0x4937, 0x4743, 0x46d0, 0x481f, 0x484c, 0x4804, +0x47fd, 0x481f, 0x456d, 0x4813, 0x474d, 0x4807, 0x4688, 0x480e, 0x46e8, 0x4810, 0x469f, 0x4799, 0x4853, 0x478f, 0x47f2, 0x4824, 0x47d0, 0x471f, 0x46da, 0x485f, 0x4813, 0x481c, 0x482e, 0x4863, 0x4786, 0x480b, 0x48c9, 0x46b8, 0x475a, 0x46e2, 0x4852, 0x46c5, +0x45af, 0x4802, 0x4466, 0x46c2, 0x465d, 0x4743, 0x46b7, 0x47ba, 0x4636, 0x46c3, 0x4677, 0x4784, 0x485a, 0x47c2, 0x46dc, 0x46ac, 0x47de, 0x460e, 0x465f, 0x4834, 0x47f4, 0x4769, 0x46fc, 0x4810, 0x45fd, 0x45ea, 0x48d0, 0x45b5, 0x4704, 0x4783, 0x4830, 0x46c4, +0x4759, 0x47c7, 0x453d, 0x45b0, 0x4741, 0x4702, 0x4736, 0x4793, 0x461b, 0x47ba, 0x470b, 0x46dd, 0x4657, 0x470b, 0x470d, 0x4710, 0x486c, 0x468f, 0x45c3, 0x46ba, 0x479d, 0x483b, 0x46c9, 0x4774, 0x46a9, 0x46a7, 0x4833, 0x4606, 0x4690, 0x46a9, 0x46f5, 0x46a7, +0x47ac, 0x48bb, 0x452c, 0x4803, 0x470f, 0x4824, 0x47d5, 0x48cb, 0x4707, 0x484a, 0x4832, 0x4797, 0x4851, 0x482c, 0x487a, 0x4877, 0x4891, 0x465d, 0x47f4, 0x48ce, 0x4898, 0x4899, 0x484e, 0x486a, 0x47ac, 0x47f0, 0x493e, 0x4611, 0x47e2, 0x489e, 0x488c, 0x46af, +0x4665, 0x4836, 0x45e4, 0x46b6, 0x46a1, 0x46b9, 0x46c8, 0x46dd, 0x4658, 0x474b, 0x467b, 0x4777, 0x4769, 0x4798, 0x4785, 0x475e, 0x472a, 0x4656, 0x45fb, 0x4881, 0x46fc, 0x472d, 0x476e, 0x47a3, 0x465d, 0x46ca, 0x4855, 0x4500, 0x464f, 0x479a, 0x46c3, 0x4738, +0x481e, 0x486c, 0x4659, 0x4801, 0x4756, 0x477a, 0x47d5, 0x487b, 0x4706, 0x4808, 0x484f, 0x4838, 0x4870, 0x4863, 0x48d3, 0x4806, 0x4865, 0x4771, 0x46be, 0x494c, 0x4915, 0x484c, 0x4900, 0x4862, 0x481a, 0x46e8, 0x4974, 0x46a0, 0x4775, 0x483d, 0x487c, 0x480e +}; \ No newline at end of file diff --git a/hwpe/redmule_softclear/inc/z_output.h b/hwpe/redmule_softclear/inc/z_output.h new file mode 100644 index 0000000..96c7e5f --- /dev/null +++ b/hwpe/redmule_softclear/inc/z_output.h @@ -0,0 +1,27 @@ + /* Header file generated by RedMulE Golden Model */ +uint16_t z_oup [768] = { +0x4845, 0x4897, 0x4608, 0x4838, 0x4855, 0x487b, 0x4869, 0x4880, 0x46d1, 0x48b0, 0x48db, 0x483f, 0x48c9, 0x485f, 0x4881, 0x483a, 0x484b, 0x472c, 0x4762, 0x492b, 0x4822, 0x48fd, 0x488e, 0x492e, 0x483e, 0x484f, 0x49e8, 0x46d7, 0x484b, 0x489d, 0x490b, 0x47e9, +0x484f, 0x47d2, 0x44be, 0x4747, 0x47c7, 0x46c0, 0x4727, 0x48af, 0x46c5, 0x482d, 0x483d, 0x482e, 0x4897, 0x479f, 0x488b, 0x4749, 0x489a, 0x46a8, 0x46f2, 0x488b, 0x4891, 0x47e8, 0x4872, 0x483d, 0x4716, 0x46fd, 0x49b5, 0x46a0, 0x46e7, 0x47a4, 0x48a1, 0x4767, +0x4939, 0x4935, 0x4703, 0x48c1, 0x4863, 0x48bd, 0x4913, 0x48cf, 0x48b6, 0x48b8, 0x4946, 0x4920, 0x495e, 0x48e1, 0x4938, 0x48b2, 0x493a, 0x4882, 0x483b, 0x49d5, 0x4911, 0x4972, 0x496b, 0x49df, 0x48f2, 0x4888, 0x4a46, 0x4821, 0x48c1, 0x490c, 0x49b2, 0x48a3, +0x463a, 0x47b0, 0x44cb, 0x4762, 0x4765, 0x46b9, 0x466a, 0x4814, 0x4631, 0x4796, 0x4666, 0x474b, 0x4798, 0x4704, 0x4838, 0x4761, 0x47d3, 0x4590, 0x45ea, 0x48a2, 0x47f1, 0x4844, 0x484b, 0x4776, 0x47d6, 0x46d8, 0x48f3, 0x44d3, 0x46fa, 0x478d, 0x481e, 0x466e, +0x4827, 0x481e, 0x45a2, 0x4794, 0x4727, 0x4806, 0x475d, 0x48d5, 0x4708, 0x4828, 0x4862, 0x480d, 0x4895, 0x4832, 0x48bd, 0x47f1, 0x482a, 0x46a7, 0x47b1, 0x492d, 0x484d, 0x4884, 0x48dc, 0x485f, 0x476d, 0x480c, 0x48e9, 0x46d3, 0x4728, 0x4884, 0x48a0, 0x480e, +0x4862, 0x4813, 0x4675, 0x485a, 0x47e8, 0x4738, 0x4836, 0x4823, 0x46e7, 0x4821, 0x4822, 0x47b3, 0x4846, 0x4855, 0x4863, 0x4717, 0x4872, 0x47c1, 0x46d5, 0x488e, 0x47e2, 0x485f, 0x487c, 0x48b8, 0x481e, 0x4788, 0x48bd, 0x4677, 0x46c9, 0x47f8, 0x48fe, 0x47fc, +0x47a0, 0x47b2, 0x4588, 0x467e, 0x4662, 0x46c7, 0x46e8, 0x4812, 0x4536, 0x474e, 0x46c0, 0x468f, 0x481f, 0x4679, 0x46a1, 0x46e2, 0x4809, 0x4560, 0x4630, 0x47eb, 0x46b5, 0x4757, 0x4848, 0x477f, 0x46a6, 0x46d8, 0x4870, 0x459a, 0x4670, 0x4678, 0x47d2, 0x468c, +0x4762, 0x48c4, 0x46e3, 0x4791, 0x46b1, 0x486d, 0x47d0, 0x4867, 0x468d, 0x47f6, 0x48a5, 0x4756, 0x4857, 0x4854, 0x4866, 0x4838, 0x484d, 0x46ec, 0x47d2, 0x48f6, 0x484a, 0x4879, 0x4848, 0x483c, 0x471d, 0x4806, 0x48fa, 0x4730, 0x4768, 0x47b8, 0x4865, 0x46f9, +0x48a8, 0x4918, 0x46ca, 0x4867, 0x4800, 0x4862, 0x48d3, 0x4910, 0x474e, 0x4849, 0x48eb, 0x486b, 0x4966, 0x48c5, 0x48f4, 0x4830, 0x48f9, 0x4778, 0x481e, 0x499e, 0x48cf, 0x48f1, 0x4982, 0x4923, 0x487c, 0x47cf, 0x49ea, 0x4649, 0x4773, 0x495e, 0x48b2, 0x483f, +0x48a7, 0x4975, 0x4616, 0x481e, 0x481f, 0x4866, 0x48b6, 0x4864, 0x47dc, 0x4873, 0x485c, 0x487f, 0x4938, 0x491f, 0x490d, 0x48b6, 0x48f8, 0x48a1, 0x4859, 0x492d, 0x489c, 0x4915, 0x4899, 0x4887, 0x486c, 0x4859, 0x49ca, 0x471e, 0x4867, 0x4918, 0x48d3, 0x4827, +0x488b, 0x4998, 0x4704, 0x481d, 0x48b8, 0x4880, 0x4876, 0x4944, 0x470c, 0x48f2, 0x48b9, 0x489b, 0x4956, 0x48e5, 0x48d6, 0x48a5, 0x48dc, 0x4856, 0x484e, 0x49ab, 0x48e0, 0x490e, 0x48dd, 0x4945, 0x488b, 0x48dd, 0x4a32, 0x47ea, 0x4835, 0x4911, 0x4965, 0x4819, +0x460e, 0x481e, 0x452c, 0x4673, 0x475c, 0x4717, 0x46f6, 0x46d0, 0x4696, 0x46bc, 0x4726, 0x481e, 0x4763, 0x46ea, 0x46fe, 0x4758, 0x478b, 0x4627, 0x4704, 0x483f, 0x46ad, 0x47b1, 0x4792, 0x4816, 0x46f2, 0x4684, 0x4827, 0x45a8, 0x472f, 0x47a4, 0x4797, 0x462b, +0x483f, 0x48ab, 0x468f, 0x4863, 0x485a, 0x4766, 0x481d, 0x48cb, 0x47dc, 0x4903, 0x48fc, 0x4830, 0x48cc, 0x483e, 0x48ab, 0x4864, 0x4966, 0x4763, 0x4794, 0x499d, 0x488e, 0x488b, 0x48dc, 0x4960, 0x4854, 0x484c, 0x499c, 0x474c, 0x4826, 0x48bc, 0x4949, 0x4883, +0x489d, 0x4905, 0x4718, 0x481e, 0x48e3, 0x48f4, 0x48c1, 0x4904, 0x47e8, 0x48b3, 0x4892, 0x48d4, 0x48ff, 0x4894, 0x48d5, 0x4886, 0x48fa, 0x4803, 0x47d2, 0x492e, 0x4870, 0x48b2, 0x48e5, 0x492b, 0x487b, 0x4785, 0x49e3, 0x471d, 0x4837, 0x48bf, 0x489b, 0x48c4, +0x475c, 0x4871, 0x464a, 0x4811, 0x47af, 0x471c, 0x4817, 0x4817, 0x463b, 0x484e, 0x477f, 0x464f, 0x4704, 0x487c, 0x47a3, 0x4725, 0x4853, 0x462a, 0x465a, 0x4860, 0x4736, 0x4880, 0x47e1, 0x482b, 0x4811, 0x46c0, 0x48dc, 0x475d, 0x4668, 0x4806, 0x4893, 0x46f4, +0x4858, 0x4959, 0x463d, 0x487b, 0x480f, 0x484e, 0x48c0, 0x48a6, 0x4847, 0x4894, 0x48a0, 0x484a, 0x491e, 0x48f4, 0x48fc, 0x48b5, 0x48ce, 0x47d2, 0x47db, 0x497f, 0x4955, 0x4939, 0x48a7, 0x48ce, 0x4890, 0x4884, 0x49d6, 0x4763, 0x486e, 0x4922, 0x48f4, 0x48c3, +0x47ec, 0x491c, 0x4698, 0x4783, 0x4715, 0x4754, 0x4745, 0x4752, 0x472f, 0x4832, 0x4817, 0x4809, 0x47f8, 0x48c3, 0x47e6, 0x4800, 0x48b6, 0x4730, 0x480a, 0x48cb, 0x479e, 0x488e, 0x47c2, 0x488e, 0x472f, 0x47ee, 0x489d, 0x4744, 0x4755, 0x4851, 0x4846, 0x47d3, +0x4838, 0x48a0, 0x4634, 0x4762, 0x4786, 0x4806, 0x47e3, 0x482d, 0x4726, 0x486c, 0x47b7, 0x4803, 0x48ac, 0x4814, 0x48e0, 0x4839, 0x4827, 0x4750, 0x46f2, 0x48c5, 0x483f, 0x4886, 0x48ad, 0x4856, 0x47e8, 0x47a9, 0x4937, 0x4743, 0x46d0, 0x481f, 0x484c, 0x4804, +0x47fd, 0x481f, 0x456d, 0x4813, 0x474d, 0x4807, 0x4688, 0x480e, 0x46e8, 0x4810, 0x469f, 0x4799, 0x4853, 0x478f, 0x47f2, 0x4824, 0x47d0, 0x471f, 0x46da, 0x485f, 0x4813, 0x481c, 0x482e, 0x4863, 0x4786, 0x480b, 0x48c9, 0x46b8, 0x475a, 0x46e2, 0x4852, 0x46c5, +0x45af, 0x4802, 0x4466, 0x46c2, 0x465d, 0x4743, 0x46b7, 0x47ba, 0x4636, 0x46c3, 0x4677, 0x4784, 0x485a, 0x47c2, 0x46dc, 0x46ac, 0x47de, 0x460e, 0x465f, 0x4834, 0x47f4, 0x4769, 0x46fc, 0x4810, 0x45fd, 0x45ea, 0x48d0, 0x45b5, 0x4704, 0x4783, 0x4830, 0x46c4, +0x4759, 0x47c7, 0x453d, 0x45b0, 0x4741, 0x4702, 0x4736, 0x4793, 0x461b, 0x47ba, 0x470b, 0x46dd, 0x4657, 0x470b, 0x470d, 0x4710, 0x486c, 0x468f, 0x45c3, 0x46ba, 0x479d, 0x483b, 0x46c9, 0x4774, 0x46a9, 0x46a7, 0x4833, 0x4606, 0x4690, 0x46a9, 0x46f5, 0x46a7, +0x47ac, 0x48bb, 0x452c, 0x4803, 0x470f, 0x4824, 0x47d5, 0x48cb, 0x4707, 0x484a, 0x4832, 0x4797, 0x4851, 0x482c, 0x487a, 0x4877, 0x4891, 0x465d, 0x47f4, 0x48ce, 0x4898, 0x4899, 0x484e, 0x486a, 0x47ac, 0x47f0, 0x493e, 0x4611, 0x47e2, 0x489e, 0x488c, 0x46af, +0x4665, 0x4836, 0x45e4, 0x46b6, 0x46a1, 0x46b9, 0x46c8, 0x46dd, 0x4658, 0x474b, 0x467b, 0x4777, 0x4769, 0x4798, 0x4785, 0x475e, 0x472a, 0x4656, 0x45fb, 0x4881, 0x46fc, 0x472d, 0x476e, 0x47a3, 0x465d, 0x46ca, 0x4855, 0x4500, 0x464f, 0x479a, 0x46c3, 0x4738, +0x481e, 0x486c, 0x4659, 0x4801, 0x4756, 0x477a, 0x47d5, 0x487b, 0x4706, 0x4808, 0x484f, 0x4838, 0x4870, 0x4863, 0x48d3, 0x4806, 0x4865, 0x4771, 0x46be, 0x494c, 0x4915, 0x484c, 0x4900, 0x4862, 0x481a, 0x46e8, 0x4974, 0x46a0, 0x4775, 0x483d, 0x487c, 0x480e +}; \ No newline at end of file diff --git a/hwpe/redmule_softclear/pulp_inject_fault.tcl b/hwpe/redmule_softclear/pulp_inject_fault.tcl new file mode 100644 index 0000000..61ccadf --- /dev/null +++ b/hwpe/redmule_softclear/pulp_inject_fault.tcl @@ -0,0 +1,53 @@ +# Copyright 2023 ETH Zurich and University of Bologna. +# Solderpad Hardware License, Version 0.51, see LICENSE for details. +# SPDX-License-Identifier: SHL-0.51 +# +# Author: Michael Rogenmoser (michaero@iis.ee.ethz.ch) + +transcript quietly +if {! [info exists ::env(VSIM_PATH)]} {error "Define VSIM_PATH"} +set utils_base_path [file join $::env(VSIM_PATH) scripts fault_injection_utils] +set script_base_path [file join $::env(VSIM_PATH) fault_injection_sim scripts] + +set verbosity 2 +set log_injections 1 +# Easy way to generate a variable seed +# set seed [clock seconds] +# Default value +set seed 12345 +set print_statistics 1 + +set inject_start_time 550000000000ps +set inject_stop_time 750000000000ps +set injection_clock "pulp_cluster_tb/cluster_i/clk_i" +set injection_clock_trigger 0 +set fault_period 150 +set rand_initial_injection_phase 0 +# max_num set to 0 means until stop_time +set max_num_fault_inject 0 +set signal_fault_duration 20ns +set register_fault_duration 0ns + +set allow_multi_bit_upset $::env(MULTI_BIT_UPSET) +set use_bitwidth_as_weight 0 +set check_core_output_modification 0 +set check_core_next_state_modification 0 +set reg_to_sig_ratio 1 + +source [file join $utils_base_path pulp_extract_nets.tcl] + +set inject_signals_netlist [] +set inject_register_netlist [] +set output_netlist [] +set next_state_netlist [] +set assertion_disable_list [] + +# for {set idx 0} {$idx < 12} {incr idx} { +# set inject_signals_netlist [list {*}$inject_signals_netlist {*}[get_all_core_nets $idx]] +# set output_netlist [list {*}$output_netlist {*}[get_core_output_nets $idx]] +# } + +set inject_register_netlist [list {*}$inject_register_netlist {*}[get_memory_slice {0 16} {256 336}]] + +source [file join $script_base_path inject_fault.tcl] + diff --git a/hwpe/redmule_softclear/redmule.c b/hwpe/redmule_softclear/redmule.c new file mode 100644 index 0000000..a80171c --- /dev/null +++ b/hwpe/redmule_softclear/redmule.c @@ -0,0 +1,185 @@ +/* + * Copyright (C) 2022-2023 ETH Zurich and University of Bologna + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * SPDX-License-Identifier: Apache-2.0 + * + * Author: Yvan Tortorella + * + * RedMulE SW test + */ + +#include +#include "stdio.h" +#include "archi_redmule.h" +#include "hal_redmule.h" +#include "pulp.h" + +static inline void wait_cycles(const unsigned cycles) +{ + /** + * Each iteration of the loop below will take four cycles on RI5CY (one for + * `addi` and three for the taken `bnez`; if the instructions hit in the + * I$). Thus, we let `i` count the number of remaining loop iterations and + * initialize it to a fourth of the number of clock cyles. With this + * initialization, we must not enter the loop if the number of clock cycles + * is less than four, because this will cause an underflow on the first + * subtraction. + */ + register unsigned threshold; + asm volatile("li %[threshold], 4" : [threshold] "=r" (threshold)); + asm volatile goto("ble %[cycles], %[threshold], %l2" + : /* no output */ + : [cycles] "r" (cycles), [threshold] "r" (threshold) + : /* no clobbers */ + : __wait_cycles_end); + register unsigned i = cycles >> 2; +__wait_cycles_start: + // Decrement `i` and loop if it is not yet zero. + asm volatile("addi %0, %0, -1" : "+r" (i)); + asm volatile goto("bnez %0, %l1" + : /* no output */ + : "r" (i) + : /* no clobbers */ + : __wait_cycles_start); +__wait_cycles_end: + return; +} + +int main() { + + volatile int errors = 0; + unsigned int cluster_id = rt_cluster_id(); + unsigned int intc_data_correctable_cnt, redmule_data_correctable_cnt = 0; + unsigned int intc_meta_correctable_cnt = 0; + unsigned int intc_data_uncorrectable_cnt, redmule_data_uncorrectable_cnt = 0; + unsigned int intc_meta_uncorrectable_cnt = 0; + + if(get_core_id() == 0){ + + uint16_t m_size = M_SIZE; + uint16_t n_size = N_SIZE; + uint16_t k_size = K_SIZE; + + uint8_t *x_ext = x_inp; + uint8_t *w_ext = w_inp; + uint8_t *y_ext = y_inp; + uint8_t *z_ext = z_oup; + + uint8_t volatile *x = (uint8_t volatile *) pi_l1_malloc(0, (2*m_size*n_size)); + uint8_t volatile *w = (uint8_t volatile *) pi_l1_malloc(0, (2*n_size*k_size)); + uint8_t volatile *y = (uint8_t volatile *) pi_l1_malloc(0, (2*m_size*k_size)); + uint8_t volatile *z = (uint8_t volatile *) pi_l1_malloc(0, (2*m_size*k_size)); + + #ifdef USE_DMA + volatile unsigned int dma_id = 0; + dma_id = mchan_alloc(); + mchan_transfer((unsigned int) 2*(2*m_size*n_size), + (unsigned int) x_ext, + (unsigned int) x ); + mchan_barrier(dma_id); + mchan_free(dma_id); + + dma_id = mchan_alloc(); + mchan_transfer((unsigned int) 2*(2*n_size*k_size), + (unsigned int) w_ext, + (unsigned int) w ); + mchan_barrier(dma_id); + mchan_free(dma_id); + + dma_id = mchan_alloc(); + mchan_transfer((unsigned int) 2*(2*m_size*k_size), + (unsigned int) y_ext, + (unsigned int) y ); + mchan_barrier(dma_id); + #else + generate_test_data16((int) x, (int) w, (int) y, (int) m_size, (int) n_size, (int) k_size); + #endif + + int gold_sum = 0, check_sum = 0; + int i,j; + + int offload_id_tmp, offload_id; + + // Enable RedMulE + hwpe_cg_enable(); + asm volatile("": : :"memory"); + + hwpe_soft_clear(); + asm volatile("": : :"memory"); + + volatile int job_id = -1; + + // job 0 + job_id = hwpe_wait_acquire(); + asm volatile("": : :"memory"); + redmule_x_add_set ((unsigned int) x); + redmule_w_add_set ((unsigned int) w); + redmule_y_add_set ((unsigned int) y); + redmule_z_add_set ((unsigned int) z); + redmule_cfg (m_size, n_size, k_size, gemm_ops); + asm volatile("": : :"memory"); + hwpe_trigger_job(); + asm volatile("": : :"memory"); + + // job 1 + job_id = hwpe_wait_acquire(); + asm volatile("": : :"memory"); + redmule_x_add_set ((unsigned int) x); + redmule_w_add_set ((unsigned int) w); + redmule_y_add_set ((unsigned int) y); + redmule_z_add_set ((unsigned int) z); + redmule_cfg (m_size, n_size, k_size, gemm_ops); + asm volatile("": : :"memory"); + hwpe_trigger_job(); + asm volatile("": : :"memory"); + + // soft-clear execution + wait_cycles(20); + hwpe_soft_clear(); + wait_cycles(100); + + // job 0 + job_id = hwpe_wait_acquire(); + asm volatile("": : :"memory"); + redmule_x_add_set ((unsigned int) x); + redmule_w_add_set ((unsigned int) w); + redmule_y_add_set ((unsigned int) y); + redmule_z_add_set ((unsigned int) z); + redmule_cfg (m_size, n_size, k_size, gemm_ops); + asm volatile("": : :"memory"); + hwpe_trigger_job(); + asm volatile("": : :"memory"); + + // Wait for end of computation + redmule_evt_wait(); + + // Disable RedMulE + hwpe_cg_disable(); + + errors = redmule_compare16((int) z, (int) m_size, (int) k_size); + + *(int *) 0x1A1040A0 = errors; + + if(job_id != 0) { + printf ("Terminated test with wrong job id!!! and %d errors. See you!\n", errors); + errors++; + } + else { + printf ("Terminated test with OK job id and %d errors. See you!\n", errors); + } + + } + synch_barrier(); + return (errors != 0); +} diff --git a/hwpe/softex/Makefile b/hwpe/softex/Makefile new file mode 100644 index 0000000..a15e398 --- /dev/null +++ b/hwpe/softex/Makefile @@ -0,0 +1,9 @@ +PULP_APP = test +PULP_APP_SRCS = softex.c +PULP_CFLAGS = -O3 + +ifeq ($(use_dma),1) + PULP_CFLAGS += -DUSE_DMA +endif + +include $(PULP_SDK_HOME)/install/rules/pulp_rt.mk diff --git a/hwpe/softex/archi_softex.h b/hwpe/softex/archi_softex.h new file mode 100644 index 0000000..8d08543 --- /dev/null +++ b/hwpe/softex/archi_softex.h @@ -0,0 +1,81 @@ +/* + * Andrea Belano + * + * Copyright 2024 ETH Zurich and University of Bologna + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * SPDX-License-Identifier: Apache-2.0 + */ + +#ifndef __ARCHI_SOFTEX__ +#define __ARCHI_SOFTEX__ + +#define DATA_WIDTH 256 + +/* PULP Cluster Archi defines */ +#define ARCHI_CLUST_CTRL_BASE ARCHI_CLUSTER_CTRL_ADDR +#define ARCHI_CLUST_HWPE_BASE ARCHI_HWCE_ADDR +#define DMA_COMMAND_QUEUE ARCHI_MCHAN_DEMUX_ADDR +#define DMA_STATUS_REGISTER (ARCHI_MCHAN_DEMUX_ADDR + 4) +#define ARCHI_CL_HWPE_EVT0 12 +#define ARCHI_CL_HWPE_EVT1 13 +#define FC_DMA_EVENT 8 +#define CL_DMA_EVENT 22 +#define CLUST_CTRL_HWPE_EN 0x18 +#define CLUST_CTRL_HWPE_EN_MASK 0x800 +#define __builtin_bitinsert(a,b,c,d) (a | (((b << (32-c)) >> (32-c)) << d)) + +#define SOFTEX_BASE_ADD ARCHI_CLUST_HWPE_BASE +#define SOFTEX_CG_EN_MSK 0x4000 +// Commands +#define SOFTEX_TRIGGER 0x00 +#define SOFTEX_ACQUIRE 0x04 +#define SOFTEX_FINISHED 0x08 +#define SOFTEX_STATUS 0x0C +#define SOFTEX_RUNNING_JOB 0x10 +#define SOFTEX_SOFT_CLEAR 0x14 + +#define SOFTEX_REG_OFFS 0x20 + +#define SOFTEX_IN_ADDR SOFTEX_REG_OFFS + 0x00 +#define SOFTEX_OUT_ADDR SOFTEX_REG_OFFS + 0x04 +#define SOFTEX_TOT_LEN SOFTEX_REG_OFFS + 0x08 +#define SOFTEX_COMMANDS SOFTEX_REG_OFFS + 0x0C +#define SOFTEX_CACHE_BASE_ADDR SOFTEX_REG_OFFS + 0x10 +#define SOFTEX_CAST_CTRL SOFTEX_REG_OFFS + 0x14 + + +#define SOFTEX_CMD_ACC_ONLY 0x00000001 +#define SOFTEX_CMD_DIV_ONLY 0x00000002 +#define SOFTEX_CMD_ACQUIRE_SLOT 0x00000004 +#define SOFTEX_CMD_LAST 0x00000008 +#define SOFTEX_CMD_SET_CACHE_ADDR 0x00000010 +#define SOFTEX_CMD_NO_OP 0x00000020 +#define SOFTEX_CMD_INT_INPUT 0x00000040 +#define SOFTEX_CMD_INT_OUTPUT 0x00000080 + +/* DMA Archi */ +#define DMA_TX 0 +#define DMA_RX 1 +#define DMA_INC 1 + +#define PLP_DMA_TYPE_BIT 0x00000011 +#define PLP_DMA_INCR_BIT 0x00000012 +#define PLP_DMA_2D_BIT 0x00000013 +#define PLP_DMA_ELE_BIT 0x00000014 +#define PLP_DMA_ILE_BIT 0x00000015 +#define PLP_DMA_BLE_BIT 0x00000016 +#define PLP_DMA_2D_TCDM_BIT 0x0000017 + +#endif \ No newline at end of file diff --git a/hwpe/softex/hal_softex.h b/hwpe/softex/hal_softex.h new file mode 100644 index 0000000..199a972 --- /dev/null +++ b/hwpe/softex/hal_softex.h @@ -0,0 +1,91 @@ +/* + * Andrea Belano + * + * Copyright 2024 ETH Zurich and University of Bologna + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * SPDX-License-Identifier: Apache-2.0 + */ + +#ifndef __HAL_SOFTEX__ +#define __HAL_SOFTEX__ + +#include +#include "archi_softex.h" + +#define HWPE_WRITE(value, offset) *(volatile int *)(SOFTEX_BASE_ADD + offset) = value +#define HWPE_READ(offset) *(volatile int *)(SOFTEX_BASE_ADD + offset) + +static inline void hwpe_trigger_job() { + HWPE_WRITE(0, SOFTEX_TRIGGER); +} + +static inline int hwpe_acquire_job() { + return HWPE_READ(SOFTEX_ACQUIRE); +} + +static inline unsigned int hwpe_get_status() { + return HWPE_READ(SOFTEX_STATUS); +} + +static inline void hwpe_soft_clear() { + HWPE_WRITE(0, SOFTEX_SOFT_CLEAR); +} + +static inline void hwpe_cg_enable() { + *(volatile int*) (ARCHI_CLUST_CTRL_BASE + CLUST_CTRL_HWPE_EN) |= (CLUST_CTRL_HWPE_EN_MASK | SOFTEX_CG_EN_MSK); +} + +static inline void hwpe_cg_disable() { + *(volatile int*) (ARCHI_CLUST_CTRL_BASE + CLUST_CTRL_HWPE_EN) &= ~(CLUST_CTRL_HWPE_EN_MASK | SOFTEX_CG_EN_MSK); +} + +static inline void softex_evt_wait() { + do { + eu_evt_maskWaitAndClr (1 << ARCHI_CL_HWPE_EVT0); + } while((*(int volatile *)(ARCHI_CLUST_HWPE_BASE + SOFTEX_STATUS)) != 0); +} + +/* DMA APIs */ +static inline int mchan_alloc(){ + return *(volatile int*) DMA_COMMAND_QUEUE; +} + +static inline void mchan_transfer(unsigned int len, + unsigned int ext_addr, + unsigned int tcdm_addr) { + + *(volatile int*) DMA_COMMAND_QUEUE = len | + (DMA_RX << PLP_DMA_TYPE_BIT) | + (DMA_INC << PLP_DMA_INCR_BIT) | + (0 << PLP_DMA_2D_BIT) | + (1 << PLP_DMA_ELE_BIT) | + (1 << PLP_DMA_ILE_BIT) | + (0 << PLP_DMA_BLE_BIT) | + (0 << PLP_DMA_2D_TCDM_BIT); + *(volatile int*) DMA_COMMAND_QUEUE = tcdm_addr; + *(volatile int*) DMA_COMMAND_QUEUE = ext_addr; +} + +static inline void mchan_barrier(int id) { + while(((*(volatile int*)(DMA_STATUS_REGISTER)) >> id ) & 0x1 ) { + eu_evt_maskWaitAndClr(1 << FC_DMA_EVENT); + } +} + +static inline void mchan_free(int id) { + *(volatile int*) DMA_STATUS_REGISTER = 0x1 << id; +} + +#endif \ No newline at end of file diff --git a/hwpe/softex/inc/golden.h b/hwpe/softex/inc/golden.h new file mode 100644 index 0000000..12f0012 --- /dev/null +++ b/hwpe/softex/inc/golden.h @@ -0,0 +1,1031 @@ +#ifndef __SOFTEX_GOLDEN__ +#define __SOFTEX_GOLDEN__ + +#define GOLDEN { \ + 0x31c8, \ + 0x323b, \ + 0x2cba, \ + 0x2bf2, \ + 0x3c72, \ + 0x2c91, \ + 0x39a1, \ + 0x308b, \ + 0x3c56, \ + 0x395d, \ + 0x308b, \ + 0x2f8c, \ + 0x2d45, \ + 0x3693, \ + 0x2613, \ + 0x3a16, \ + 0x32fe, \ + 0x326f, \ + 0x3310, \ + 0x2b82, \ + 0x2fb4, \ + 0x2c91, \ + 0x2f5b, \ + 0x28dd, \ + 0x3730, \ + 0x3b28, \ + 0x3b58, \ + 0x364a, \ + 0x2c1b, \ + 0x3890, \ + 0x2c80, \ + 0x3c89, \ + 0x38d1, \ + 0x2cef, \ + 0x2f2a, \ + 0x29db, \ + 0x2cba, \ + 0x294e, \ + 0x3906, \ + 0x38b8, \ + 0x39cf, \ + 0x3a8c, \ + 0x38d1, \ + 0x3028, \ + 0x3a78, \ + 0x2e7b, \ + 0x2d90, \ + 0x2f5b, \ + 0x31c8, \ + 0x2f9f, \ + 0x29f8, \ + 0x364a, \ + 0x34db, \ + 0x33fb, \ + 0x3ae8, \ + 0x381a, \ + 0x3028, \ + 0x35bf, \ + 0x2689, \ + 0x364a, \ + 0x3211, \ + 0x3791, \ + 0x33c3, \ + 0x3748, \ + 0x3a5b, \ + 0x39a1, \ + 0x2672, \ + 0x276f, \ + 0x34db, \ + 0x2656, \ + 0x2cef, \ + 0x3c13, \ + 0x33ac, \ + 0x3386, \ + 0x39a1, \ + 0x3058, \ + 0x3253, \ + 0x3b75, \ + 0x3a9f, \ + 0x2753, \ + 0x360b, \ + 0x309d, \ + 0x3568, \ + 0x3c89, \ + 0x276f, \ + 0x28ac, \ + 0x35bf, \ + 0x38a3, \ + 0x344f, \ + 0x2ea1, \ + 0x3003, \ + 0x3c3d, \ + 0x3a16, \ + 0x2626, \ + 0x2d2e, \ + 0x3436, \ + 0x37f0, \ + 0x31c8, \ + 0x36bd, \ + 0x2db8, \ + 0x3386, \ + 0x3a41, \ + 0x33dd, \ + 0x3200, \ + 0x2823, \ + 0x3c02, \ + 0x2dd1, \ + 0x3225, \ + 0x2898, \ + 0x340e, \ + 0x387e, \ + 0x3808, \ + 0x30b2, \ + 0x381a, \ + 0x371c, \ + 0x2689, \ + 0x27ae, \ + 0x3be5, \ + 0x2b32, \ + 0x33ac, \ + 0x3c56, \ + 0x2656, \ + 0x2c48, \ + 0x2cd3, \ + 0x2672, \ + 0x3a5b, \ + 0x3583, \ + 0x3943, \ + 0x2bd6, \ + 0x2a67, \ + 0x387e, \ + 0x3c3d, \ + 0x3709, \ + 0x3ab4, \ + 0x3534, \ + 0x3c13, \ + 0x29aa, \ + 0x2a95, \ + 0x269b, \ + 0x346a, \ + 0x3211, \ + 0x3943, \ + 0x2921, \ + 0x3b9d, \ + 0x2cd3, \ + 0x3a41, \ + 0x3890, \ + 0x323b, \ + 0x2cef, \ + 0x2851, \ + 0x3225, \ + 0x2b4a, \ + 0x2bbd, \ + 0x2a67, \ + 0x3351, \ + 0x3351, \ + 0x2823, \ + 0x3028, \ + 0x382e, \ + 0x3808, \ + 0x2cba, \ + 0x3665, \ + 0x2d2e, \ + 0x2ca5, \ + 0x2db8, \ + 0x3cb0, \ + 0x2fb4, \ + 0x2838, \ + 0x36a7, \ + 0x3253, \ + 0x2810, \ + 0x2753, \ + 0x395d, \ + 0x2f41, \ + 0x36bd, \ + 0x279a, \ + 0x3126, \ + 0x3172, \ + 0x336d, \ + 0x2f05, \ + 0x2f9f, \ + 0x35a8, \ + 0x392c, \ + 0x3015, \ + 0x3780, \ + 0x303f, \ + 0x2e8e, \ + 0x36a7, \ + 0x39cf, \ + 0x34db, \ + 0x2f41, \ + 0x39a1, \ + 0x3ce2, \ + 0x28fa, \ + 0x2a4c, \ + 0x38ed, \ + 0x2936, \ + 0x3ab4, \ + 0x3102, \ + 0x30ca, \ + 0x3be5, \ + 0x31b0, \ + 0x2dd1, \ + 0x2e18, \ + 0x36a7, \ + 0x361d, \ + 0x27fd, \ + 0x2eb6, \ + 0x3a16, \ + 0x2eb6, \ + 0x2a67, \ + 0x37d3, \ + 0x3436, \ + 0x33c3, \ + 0x336d, \ + 0x27c5, \ + 0x2f5b, \ + 0x360b, \ + 0x2cd3, \ + 0x387e, \ + 0x3568, \ + 0x3890, \ + 0x3b9d, \ + 0x3be5, \ + 0x2788, \ + 0x27fd, \ + 0x2886, \ + 0x3126, \ + 0x2eea, \ + 0x2753, \ + 0x2f8c, \ + 0x34db, \ + 0x2d2e, \ + 0x3075, \ + 0x360b, \ + 0x2a1f, \ + 0x3595, \ + 0x3682, \ + 0x2eb6, \ + 0x29db, \ + 0x395d, \ + 0x2f2a, \ + 0x2bbd, \ + 0x3906, \ + 0x263c, \ + 0x2e06, \ + 0x3acc, \ + 0x2700, \ + 0x28dd, \ + 0x2f16, \ + 0x2a67, \ + 0x309d, \ + 0x2b1d, \ + 0x2aa8, \ + 0x3709, \ + 0x28fa, \ + 0x3436, \ + 0x3534, \ + 0x3b03, \ + 0x2fe7, \ + 0x2aa8, \ + 0x2823, \ + 0x326f, \ + 0x32ae, \ + 0x3c72, \ + 0x29db, \ + 0x3253, \ + 0x29db, \ + 0x3225, \ + 0x2c91, \ + 0x2700, \ + 0x2bf2, \ + 0x3bca, \ + 0x34f8, \ + 0x29db, \ + 0x3568, \ + 0x27c5, \ + 0x3730, \ + 0x2672, \ + 0x3730, \ + 0x3a2a, \ + 0x303f, \ + 0x32c5, \ + 0x33c3, \ + 0x3693, \ + 0x37f0, \ + 0x33ac, \ + 0x3906, \ + 0x313d, \ + 0x3780, \ + 0x2cba, \ + 0x2c30, \ + 0x3c72, \ + 0x2cd3, \ + 0x2810, \ + 0x263c, \ + 0x382e, \ + 0x28fa, \ + 0x382e, \ + 0x395d, \ + 0x28ac, \ + 0x38a3, \ + 0x32e0, \ + 0x2724, \ + 0x31b0, \ + 0x2613, \ + 0x273a, \ + 0x2cef, \ + 0x29c1, \ + 0x2b93, \ + 0x2f78, \ + 0x2e2c, \ + 0x344f, \ + 0x2b93, \ + 0x2996, \ + 0x2d60, \ + 0x3ce2, \ + 0x3be5, \ + 0x2672, \ + 0x28c3, \ + 0x2ded, \ + 0x34db, \ + 0x2b4a, \ + 0x38d1, \ + 0x27ae, \ + 0x38ed, \ + 0x2c1b, \ + 0x3172, \ + 0x3288, \ + 0x2810, \ + 0x2bbd, \ + 0x3b03, \ + 0x326f, \ + 0x3b15, \ + 0x3b9d, \ + 0x2a0c, \ + 0x3ae8, \ + 0x3846, \ + 0x2e8e, \ + 0x2ecf, \ + 0x286d, \ + 0x3b28, \ + 0x2eea, \ + 0x3156, \ + 0x2c48, \ + 0x3ab4, \ + 0x35bf, \ + 0x2c48, \ + 0x32c5, \ + 0x2d90, \ + 0x3015, \ + 0x3860, \ + 0x3be5, \ + 0x2ded, \ + 0x3a2a, \ + 0x3b03, \ + 0x32ae, \ + 0x346a, \ + 0x3890, \ + 0x34f8, \ + 0x3a41, \ + 0x3b58, \ + 0x36bd, \ + 0x3bb2, \ + 0x2b4a, \ + 0x39a1, \ + 0x3693, \ + 0x2a83, \ + 0x2d1a, \ + 0x3890, \ + 0x3918, \ + 0x3762, \ + 0x3a2a, \ + 0x3860, \ + 0x2f9f, \ + 0x3ce2, \ + 0x3730, \ + 0x34c1, \ + 0x279a, \ + 0x35a8, \ + 0x2ba6, \ + 0x392c, \ + 0x33ac, \ + 0x3943, \ + 0x2da3, \ + 0x2eea, \ + 0x344f, \ + 0x35d8, \ + 0x2ea1, \ + 0x3c13, \ + 0x2a95, \ + 0x2bf2, \ + 0x2823, \ + 0x36f2, \ + 0x381a, \ + 0x3a05, \ + 0x3846, \ + 0x308b, \ + 0x3ae8, \ + 0x3b8b, \ + 0x354c, \ + 0x3b9d, \ + 0x2e2c, \ + 0x273a, \ + 0x3323, \ + 0x28fa, \ + 0x2b82, \ + 0x34aa, \ + 0x2cef, \ + 0x26e2, \ + 0x392c, \ + 0x2cba, \ + 0x2a67, \ + 0x2b4a, \ + 0x2a67, \ + 0x3748, \ + 0x371c, \ + 0x3288, \ + 0x32c5, \ + 0x3c3d, \ + 0x2e2c, \ + 0x3791, \ + 0x2e5d, \ + 0x3075, \ + 0x3a05, \ + 0x2e8e, \ + 0x32fe, \ + 0x3c02, \ + 0x27fd, \ + 0x2cba, \ + 0x3c89, \ + 0x2838, \ + 0x2700, \ + 0x2e43, \ + 0x3386, \ + 0x37f0, \ + 0x3421, \ + 0x354c, \ + 0x31e2, \ + 0x2996, \ + 0x30b2, \ + 0x2f8c, \ + 0x2a0c, \ + 0x3c02, \ + 0x32e0, \ + 0x2a83, \ + 0x2886, \ + 0x3568, \ + 0x326f, \ + 0x2788, \ + 0x398e, \ + 0x371c, \ + 0x2851, \ + 0x269b, \ + 0x2613, \ + 0x2672, \ + 0x364a, \ + 0x2bf2, \ + 0x387e, \ + 0x2f78, \ + 0x3398, \ + 0x2851, \ + 0x2838, \ + 0x39b6, \ + 0x2e18, \ + 0x3c3d, \ + 0x39b6, \ + 0x3943, \ + 0x28fa, \ + 0x2a83, \ + 0x3cb0, \ + 0x2f2a, \ + 0x2e7b, \ + 0x2f78, \ + 0x3bca, \ + 0x37bb, \ + 0x279a, \ + 0x2e7b, \ + 0x3a9f, \ + 0x392c, \ + 0x27c5, \ + 0x3156, \ + 0x37a5, \ + 0x3c56, \ + 0x3172, \ + 0x2d2e, \ + 0x3665, \ + 0x2fb4, \ + 0x2d08, \ + 0x361d, \ + 0x2abf, \ + 0x36f2, \ + 0x2cd3, \ + 0x30e5, \ + 0x2fb4, \ + 0x2a1f, \ + 0x3cc8, \ + 0x38a3, \ + 0x397b, \ + 0x2f9f, \ + 0x39b6, \ + 0x3200, \ + 0x3253, \ + 0x3156, \ + 0x2724, \ + 0x296a, \ + 0x3a5b, \ + 0x2c30, \ + 0x3398, \ + 0x2f5b, \ + 0x2cef, \ + 0x39ea, \ + 0x3906, \ + 0x3b3f, \ + 0x2724, \ + 0x2753, \ + 0x3200, \ + 0x2a1f, \ + 0x329a, \ + 0x32ae, \ + 0x2b32, \ + 0x33c3, \ + 0x3075, \ + 0x3126, \ + 0x37a5, \ + 0x361d, \ + 0x32fe, \ + 0x3665, \ + 0x263c, \ + 0x2c09, \ + 0x3709, \ + 0x29db, \ + 0x3682, \ + 0x39cf, \ + 0x2ecf, \ + 0x3d00, \ + 0x30ca, \ + 0x3421, \ + 0x3890, \ + 0x2f2a, \ + 0x3172, \ + 0x263c, \ + 0x2689, \ + 0x39ea, \ + 0x2cef, \ + 0x26c8, \ + 0x3015, \ + 0x2936, \ + 0x2689, \ + 0x3943, \ + 0x2db8, \ + 0x37d3, \ + 0x3534, \ + 0x3682, \ + 0x32fe, \ + 0x2b32, \ + 0x2f05, \ + 0x3421, \ + 0x2613, \ + 0x2b4a, \ + 0x3189, \ + 0x3310, \ + 0x2bf2, \ + 0x2f41, \ + 0x3780, \ + 0x3386, \ + 0x3102, \ + 0x326f, \ + 0x2cd3, \ + 0x3c3d, \ + 0x2eb6, \ + 0x33c3, \ + 0x2f5b, \ + 0x2bbd, \ + 0x3b03, \ + 0x2cba, \ + 0x3780, \ + 0x346a, \ + 0x398e, \ + 0x2c30, \ + 0x28fa, \ + 0x2a95, \ + 0x3ae8, \ + 0x2c91, \ + 0x381a, \ + 0x2788, \ + 0x26b0, \ + 0x34f8, \ + 0x3c27, \ + 0x34db, \ + 0x3780, \ + 0x3398, \ + 0x3b58, \ + 0x3172, \ + 0x31e2, \ + 0x350c, \ + 0x3bb2, \ + 0x3748, \ + 0x350c, \ + 0x3b75, \ + 0x34aa, \ + 0x2eb6, \ + 0x381a, \ + 0x2cba, \ + 0x2b1d, \ + 0x2613, \ + 0x3496, \ + 0x2abf, \ + 0x3102, \ + 0x2936, \ + 0x3351, \ + 0x2bbd, \ + 0x3496, \ + 0x3398, \ + 0x3015, \ + 0x2a34, \ + 0x2613, \ + 0x2e43, \ + 0x2ded, \ + 0x29db, \ + 0x37a5, \ + 0x296a, \ + 0x2bbd, \ + 0x3bca, \ + 0x37a5, \ + 0x3a2a, \ + 0x2f9f, \ + 0x3709, \ + 0x29c1, \ + 0x3bca, \ + 0x398e, \ + 0x3595, \ + 0x29f8, \ + 0x2da3, \ + 0x3568, \ + 0x3485, \ + 0x2da3, \ + 0x38a3, \ + 0x3323, \ + 0x2d90, \ + 0x344f, \ + 0x26b0, \ + 0x2a0c, \ + 0x3534, \ + 0x3b03, \ + 0x3b28, \ + 0x3c72, \ + 0x2f5b, \ + 0x2a34, \ + 0x3436, \ + 0x30ca, \ + 0x3730, \ + 0x3211, \ + 0x32e0, \ + 0x3126, \ + 0x3003, \ + 0x395d, \ + 0x294e, \ + 0x38ed, \ + 0x3c9c, \ + 0x2996, \ + 0x2b32, \ + 0x313d, \ + 0x350c, \ + 0x2d90, \ + 0x3d11, \ + 0x2eb6, \ + 0x2f78, \ + 0x39a1, \ + 0x3351, \ + 0x2da3, \ + 0x2985, \ + 0x3225, \ + 0x2c62, \ + 0x3ce2, \ + 0x3682, \ + 0x39cf, \ + 0x2aa8, \ + 0x2ea1, \ + 0x2d1a, \ + 0x344f, \ + 0x290e, \ + 0x2700, \ + 0x2af5, \ + 0x3808, \ + 0x3398, \ + 0x3211, \ + 0x2bbd, \ + 0x3780, \ + 0x3323, \ + 0x3172, \ + 0x350c, \ + 0x3acc, \ + 0x3058, \ + 0x3ab4, \ + 0x3200, \ + 0x2fb4, \ + 0x3cb0, \ + 0x2cba, \ + 0x3015, \ + 0x354c, \ + 0x26e2, \ + 0x2cef, \ + 0x3b28, \ + 0x2c30, \ + 0x3c02, \ + 0x2700, \ + 0x2788, \ + 0x2fb4, \ + 0x28ac, \ + 0x3b03, \ + 0x33c3, \ + 0x34db, \ + 0x3b28, \ + 0x3780, \ + 0x3b58, \ + 0x3d00, \ + 0x3075, \ + 0x28fa, \ + 0x34db, \ + 0x34db, \ + 0x279a, \ + 0x2ea1, \ + 0x3386, \ + 0x37bb, \ + 0x35bf, \ + 0x2eb6, \ + 0x371c, \ + 0x2e7b, \ + 0x2d90, \ + 0x2f78, \ + 0x32ae, \ + 0x3b03, \ + 0x269b, \ + 0x2ba6, \ + 0x2ba6, \ + 0x364a, \ + 0x2c91, \ + 0x279a, \ + 0x28fa, \ + 0x3a9f, \ + 0x33c3, \ + 0x2abf, \ + 0x3a2a, \ + 0x3846, \ + 0x2f2a, \ + 0x2b93, \ + 0x397b, \ + 0x2b4a, \ + 0x371c, \ + 0x2fcc, \ + 0x2a1f, \ + 0x37f0, \ + 0x3943, \ + 0x3730, \ + 0x3d00, \ + 0x2c80, \ + 0x346a, \ + 0x39a1, \ + 0x32ae, \ + 0x308b, \ + 0x39cf, \ + 0x32e0, \ + 0x3c02, \ + 0x2aa8, \ + 0x3568, \ + 0x3c89, \ + 0x2724, \ + 0x296a, \ + 0x3acc, \ + 0x296a, \ + 0x2e7b, \ + 0x2e5d, \ + 0x2936, \ + 0x3c27, \ + 0x3a9f, \ + 0x2ca5, \ + 0x2a4c, \ + 0x2f41, \ + 0x2b82, \ + 0x28c3, \ + 0x39a1, \ + 0x286d, \ + 0x308b, \ + 0x3253, \ + 0x395d, \ + 0x2e8e, \ + 0x2db8, \ + 0x3906, \ + 0x2c48, \ + 0x3310, \ + 0x326f, \ + 0x2810, \ + 0x3172, \ + 0x3632, \ + 0x2b93, \ + 0x3a5b, \ + 0x34db, \ + 0x290e, \ + 0x294e, \ + 0x3c3d, \ + 0x3534, \ + 0x29c1, \ + 0x37a5, \ + 0x39b6, \ + 0x3c13, \ + 0x3acc, \ + 0x269b, \ + 0x33dd, \ + 0x29db, \ + 0x2851, \ + 0x323b, \ + 0x3436, \ + 0x3709, \ + 0x26c8, \ + 0x2656, \ + 0x354c, \ + 0x2810, \ + 0x3ab4, \ + 0x3b9d, \ + 0x371c, \ + 0x2838, \ + 0x3386, \ + 0x3b15, \ + 0x3bca, \ + 0x32e0, \ + 0x2a67, \ + 0x2838, \ + 0x2c91, \ + 0x3189, \ + 0x279a, \ + 0x3225, \ + 0x27c5, \ + 0x3730, \ + 0x2cd3, \ + 0x269b, \ + 0x3225, \ + 0x309d, \ + 0x26e2, \ + 0x2a83, \ + 0x36a7, \ + 0x34aa, \ + 0x2bf2, \ + 0x387e, \ + 0x3c3d, \ + 0x28dd, \ + 0x3730, \ + 0x3253, \ + 0x2ca5, \ + 0x3338, \ + 0x2a67, \ + 0x2ea1, \ + 0x2d7d, \ + 0x3496, \ + 0x2cba, \ + 0x2e2c, \ + 0x2985, \ + 0x3126, \ + 0x2ecf, \ + 0x2e43, \ + 0x32c5, \ + 0x3be5, \ + 0x2e18, \ + 0x3386, \ + 0x3906, \ + 0x2689, \ + 0x33fb, \ + 0x31e2, \ + 0x3762, \ + 0x2b65, \ + 0x3a5b, \ + 0x3a8c, \ + 0x263c, \ + 0x27ae, \ + 0x2a4c, \ + 0x2d60, \ + 0x3860, \ + 0x303f, \ + 0x2724, \ + 0x344f, \ + 0x2d08, \ + 0x351f, \ + 0x361d, \ + 0x30ca, \ + 0x37bb, \ + 0x3ce2, \ + 0x2724, \ + 0x3ab4, \ + 0x2b65, \ + 0x3860, \ + 0x33c3, \ + 0x3015, \ + 0x2c1b, \ + 0x3189, \ + 0x2886, \ + 0x30b2, \ + 0x2996, \ + 0x3288, \ + 0x3918, \ + 0x2b93, \ + 0x2f9f, \ + 0x2613, \ + 0x33fb, \ + 0x3791, \ + 0x3c13, \ + 0x3113, \ + 0x2af5, \ + 0x3791, \ + 0x2e43, \ + 0x2ca5, \ + 0x27ae, \ + 0x3b15, \ + 0x34aa, \ + 0x3338, \ + 0x39a1, \ + 0x387e, \ + 0x3172, \ + 0x2b0b, \ + 0x34aa, \ + 0x2ded, \ + 0x3be5, \ + 0x3323, \ + 0x3568, \ + 0x2f41, \ + 0x2bd6, \ + 0x3568, \ + 0x34c1, \ + 0x2689, \ + 0x2672, \ + 0x2eb6, \ + 0x3b8b, \ + 0x3058, \ + 0x3113, \ + 0x3583, \ + 0x2a34, \ + 0x3906, \ + 0x3bb2, \ + 0x2eea, \ + 0x2ad8, \ + 0x319c, \ + 0x3693, \ + 0x33ac, \ + 0x38b8, \ + 0x2689, \ + 0x31e2, \ + 0x33ac, \ + 0x27ae, \ + 0x2bbd, \ + 0x360b, \ + 0x2985, \ + 0x28ac, \ + 0x2b1d, \ + 0x336d, \ + 0x35bf, \ + 0x323b, \ + 0x2e8e, \ + 0x351f, \ + 0x2b82, \ + 0x313d, \ + 0x3421, \ + 0x2f9f, \ + 0x3b8b, \ + 0x2fe7, \ + 0x360b, \ + 0x2b32, \ + 0x2b32, \ + 0x27c5, \ + 0x273a, \ + 0x3b75, \ + 0x2626, \ + 0x2f2a, \ + 0x296a, \ + 0x3730, \ + 0x37d3, \ + 0x2700, \ + 0x395d, \ + 0x30ca, \ + 0x2921, \ + 0x3156, \ + 0x3c9c, \ + 0x2fe7, \ + 0x2788, \ + 0x2bd6, \ + 0x35bf, \ + 0x3a16, \ + 0x36a7, \ + 0x351f, \ + 0x395d, \ + 0x3288, \ + 0x3a2a, \ + 0x37a5, \ + 0x2bbd, \ + 0x2d1a, \ + 0x34db, \ + 0x3126, \ + 0x2fe7, \ + 0x33fb, \ + 0x294e, \ + 0x2bbd, \ + 0x3156, \ + 0x2e7b, \ + 0x2a67, \ + 0x38ed, \ + 0x397b, \ + 0x30ca, \ + 0x2f78, \ + 0x2a0c, \ + 0x3075, \ + 0x2d2e, \ + 0x2656, \ + 0x3a16, \ + 0x2a83, \ + 0x2c80, \ + 0x3693, \ + 0x354c, \ + 0x2788, \ + 0x36f2, \ + 0x37f0, \ + 0x27ae, \ + 0x34f8, \ + 0x2b82, \ + 0x35a8, \ + 0x3632, \ + 0x2f16, \ +} + +#endif \ No newline at end of file diff --git a/hwpe/softex/inc/scores.h b/hwpe/softex/inc/scores.h new file mode 100644 index 0000000..d60ba7a --- /dev/null +++ b/hwpe/softex/inc/scores.h @@ -0,0 +1,1037 @@ +#ifndef __SOFTEX_SCORES__ +#define __SOFTEX_SCORES__ + +#define LENGTH 1024 + +#define FMT_WIDTH 2 + +#define N_VECTORS 1 + +#define SCORES { \ + 0x4182, \ + 0x4187, \ + 0x4114, \ + 0x4102, \ + 0x41f8, \ + 0x4110, \ + 0x41d9, \ + 0x4168, \ + 0x41f7, \ + 0x41d6, \ + 0x4168, \ + 0x4152, \ + 0x4120, \ + 0x41b7, \ + 0x0000, \ + 0x41de, \ + 0x418f, \ + 0x4189, \ + 0x4190, \ + 0x40f0, \ + 0x4156, \ + 0x4110, \ + 0x414e, \ + 0x4078, \ + 0x41be, \ + 0x41ea, \ + 0x41ec, \ + 0x41b4, \ + 0x4106, \ + 0x41cd, \ + 0x410e, \ + 0x41f9, \ + 0x41d0, \ + 0x4118, \ + 0x414a, \ + 0x40a8, \ + 0x4114, \ + 0x4090, \ + 0x41d2, \ + 0x41cf, \ + 0x41db, \ + 0x41e3, \ + 0x41d0, \ + 0x4160, \ + 0x41e2, \ + 0x413a, \ + 0x4126, \ + 0x414e, \ + 0x4182, \ + 0x4154, \ + 0x40ac, \ + 0x41b4, \ + 0x41a4, \ + 0x419a, \ + 0x41e7, \ + 0x41c8, \ + 0x4160, \ + 0x41ae, \ + 0x3f20, \ + 0x41b4, \ + 0x4185, \ + 0x41c2, \ + 0x4198, \ + 0x41bf, \ + 0x41e1, \ + 0x41d9, \ + 0x3f00, \ + 0x3ff0, \ + 0x41a4, \ + 0x3ec0, \ + 0x4118, \ + 0x41f4, \ + 0x4197, \ + 0x4195, \ + 0x41d9, \ + 0x4164, \ + 0x4188, \ + 0x41ed, \ + 0x41e4, \ + 0x3fe0, \ + 0x41b1, \ + 0x416a, \ + 0x41aa, \ + 0x41f9, \ + 0x3ff0, \ + 0x4068, \ + 0x41ae, \ + 0x41ce, \ + 0x419e, \ + 0x413e, \ + 0x415c, \ + 0x41f6, \ + 0x41de, \ + 0x3e00, \ + 0x411e, \ + 0x419d, \ + 0x41c6, \ + 0x4182, \ + 0x41b9, \ + 0x412a, \ + 0x4195, \ + 0x41e0, \ + 0x4199, \ + 0x4184, \ + 0x4038, \ + 0x41f3, \ + 0x412c, \ + 0x4186, \ + 0x4060, \ + 0x419b, \ + 0x41cc, \ + 0x41c7, \ + 0x416c, \ + 0x41c8, \ + 0x41bd, \ + 0x3f20, \ + 0x4010, \ + 0x41f2, \ + 0x40e4, \ + 0x4197, \ + 0x41f7, \ + 0x3ec0, \ + 0x410a, \ + 0x4116, \ + 0x3f00, \ + 0x41e1, \ + 0x41ab, \ + 0x41d5, \ + 0x4100, \ + 0x40c0, \ + 0x41cc, \ + 0x41f6, \ + 0x41bc, \ + 0x41e5, \ + 0x41a8, \ + 0x41f4, \ + 0x40a0, \ + 0x40c8, \ + 0x3f40, \ + 0x419f, \ + 0x4185, \ + 0x41d5, \ + 0x4088, \ + 0x41ef, \ + 0x4116, \ + 0x41e0, \ + 0x41cd, \ + 0x4187, \ + 0x4118, \ + 0x4048, \ + 0x4186, \ + 0x40e8, \ + 0x40fc, \ + 0x40c0, \ + 0x4193, \ + 0x4193, \ + 0x4038, \ + 0x4160, \ + 0x41c9, \ + 0x41c7, \ + 0x4114, \ + 0x41b5, \ + 0x411e, \ + 0x4112, \ + 0x412a, \ + 0x41fb, \ + 0x4156, \ + 0x4040, \ + 0x41b8, \ + 0x4188, \ + 0x4030, \ + 0x3fe0, \ + 0x41d6, \ + 0x414c, \ + 0x41b9, \ + 0x4008, \ + 0x4176, \ + 0x417c, \ + 0x4194, \ + 0x4146, \ + 0x4154, \ + 0x41ad, \ + 0x41d4, \ + 0x415e, \ + 0x41c1, \ + 0x4162, \ + 0x413c, \ + 0x41b8, \ + 0x41db, \ + 0x41a4, \ + 0x414c, \ + 0x41d9, \ + 0x41fd, \ + 0x4080, \ + 0x40bc, \ + 0x41d1, \ + 0x408c, \ + 0x41e5, \ + 0x4172, \ + 0x416e, \ + 0x41f2, \ + 0x4181, \ + 0x412c, \ + 0x4132, \ + 0x41b8, \ + 0x41b2, \ + 0x4028, \ + 0x4140, \ + 0x41de, \ + 0x4140, \ + 0x40c0, \ + 0x41c5, \ + 0x419d, \ + 0x4198, \ + 0x4194, \ + 0x4018, \ + 0x414e, \ + 0x41b1, \ + 0x4116, \ + 0x41cc, \ + 0x41aa, \ + 0x41cd, \ + 0x41ef, \ + 0x41f2, \ + 0x4000, \ + 0x4028, \ + 0x4058, \ + 0x4176, \ + 0x4144, \ + 0x3fe0, \ + 0x4152, \ + 0x41a4, \ + 0x411e, \ + 0x4166, \ + 0x41b1, \ + 0x40b4, \ + 0x41ac, \ + 0x41b6, \ + 0x4140, \ + 0x40a8, \ + 0x41d6, \ + 0x414a, \ + 0x40fc, \ + 0x41d2, \ + 0x3e80, \ + 0x4130, \ + 0x41e6, \ + 0x3fa0, \ + 0x4078, \ + 0x4148, \ + 0x40c0, \ + 0x416a, \ + 0x40e0, \ + 0x40cc, \ + 0x41bc, \ + 0x4080, \ + 0x419d, \ + 0x41a8, \ + 0x41e8, \ + 0x415a, \ + 0x40cc, \ + 0x4038, \ + 0x4189, \ + 0x418c, \ + 0x41f8, \ + 0x40a8, \ + 0x4188, \ + 0x40a8, \ + 0x4186, \ + 0x4110, \ + 0x3fa0, \ + 0x4102, \ + 0x41f1, \ + 0x41a5, \ + 0x40a8, \ + 0x41aa, \ + 0x4018, \ + 0x41be, \ + 0x3f00, \ + 0x41be, \ + 0x41df, \ + 0x4162, \ + 0x418d, \ + 0x4198, \ + 0x41b7, \ + 0x41c6, \ + 0x4197, \ + 0x41d2, \ + 0x4178, \ + 0x41c1, \ + 0x4114, \ + 0x4108, \ + 0x41f8, \ + 0x4116, \ + 0x4030, \ + 0x3e80, \ + 0x41c9, \ + 0x4080, \ + 0x41c9, \ + 0x41d6, \ + 0x4068, \ + 0x41ce, \ + 0x418e, \ + 0x3fc0, \ + 0x4181, \ + 0x0000, \ + 0x3fd0, \ + 0x4118, \ + 0x40a4, \ + 0x40f4, \ + 0x4150, \ + 0x4134, \ + 0x419e, \ + 0x40f4, \ + 0x409c, \ + 0x4122, \ + 0x41fd, \ + 0x41f2, \ + 0x3f00, \ + 0x4070, \ + 0x412e, \ + 0x41a4, \ + 0x40e8, \ + 0x41d0, \ + 0x4010, \ + 0x41d1, \ + 0x4106, \ + 0x417c, \ + 0x418a, \ + 0x4030, \ + 0x40fc, \ + 0x41e8, \ + 0x4189, \ + 0x41e9, \ + 0x41ef, \ + 0x40b0, \ + 0x41e7, \ + 0x41ca, \ + 0x413c, \ + 0x4142, \ + 0x4050, \ + 0x41ea, \ + 0x4144, \ + 0x417a, \ + 0x410a, \ + 0x41e5, \ + 0x41ae, \ + 0x410a, \ + 0x418d, \ + 0x4126, \ + 0x415e, \ + 0x41cb, \ + 0x41f2, \ + 0x412e, \ + 0x41df, \ + 0x41e8, \ + 0x418c, \ + 0x419f, \ + 0x41cd, \ + 0x41a5, \ + 0x41e0, \ + 0x41ec, \ + 0x41b9, \ + 0x41f0, \ + 0x40e8, \ + 0x41d9, \ + 0x41b7, \ + 0x40c4, \ + 0x411c, \ + 0x41cd, \ + 0x41d3, \ + 0x41c0, \ + 0x41df, \ + 0x41cb, \ + 0x4154, \ + 0x41fd, \ + 0x41be, \ + 0x41a3, \ + 0x4008, \ + 0x41ad, \ + 0x40f8, \ + 0x41d4, \ + 0x4197, \ + 0x41d5, \ + 0x4128, \ + 0x4144, \ + 0x419e, \ + 0x41af, \ + 0x413e, \ + 0x41f4, \ + 0x40c8, \ + 0x4102, \ + 0x4038, \ + 0x41bb, \ + 0x41c8, \ + 0x41dd, \ + 0x41ca, \ + 0x4168, \ + 0x41e7, \ + 0x41ee, \ + 0x41a9, \ + 0x41ef, \ + 0x4134, \ + 0x3fd0, \ + 0x4191, \ + 0x4080, \ + 0x40f0, \ + 0x41a2, \ + 0x4118, \ + 0x3f90, \ + 0x41d4, \ + 0x4114, \ + 0x40c0, \ + 0x40e8, \ + 0x40c0, \ + 0x41bf, \ + 0x41bd, \ + 0x418a, \ + 0x418d, \ + 0x41f6, \ + 0x4134, \ + 0x41c2, \ + 0x4138, \ + 0x4166, \ + 0x41dd, \ + 0x413c, \ + 0x418f, \ + 0x41f3, \ + 0x4028, \ + 0x4114, \ + 0x41f9, \ + 0x4040, \ + 0x3fa0, \ + 0x4136, \ + 0x4195, \ + 0x41c6, \ + 0x419c, \ + 0x41a9, \ + 0x4183, \ + 0x409c, \ + 0x416c, \ + 0x4152, \ + 0x40b0, \ + 0x41f3, \ + 0x418e, \ + 0x40c4, \ + 0x4058, \ + 0x41aa, \ + 0x4189, \ + 0x4000, \ + 0x41d8, \ + 0x41bd, \ + 0x4048, \ + 0x3f40, \ + 0x0000, \ + 0x3f00, \ + 0x41b4, \ + 0x4102, \ + 0x41cc, \ + 0x4150, \ + 0x4196, \ + 0x4048, \ + 0x4040, \ + 0x41da, \ + 0x4132, \ + 0x41f6, \ + 0x41da, \ + 0x41d5, \ + 0x4080, \ + 0x40c4, \ + 0x41fb, \ + 0x414a, \ + 0x413a, \ + 0x4150, \ + 0x41f1, \ + 0x41c4, \ + 0x4008, \ + 0x413a, \ + 0x41e4, \ + 0x41d4, \ + 0x4018, \ + 0x417a, \ + 0x41c3, \ + 0x41f7, \ + 0x417c, \ + 0x411e, \ + 0x41b5, \ + 0x4156, \ + 0x411a, \ + 0x41b2, \ + 0x40d0, \ + 0x41bb, \ + 0x4116, \ + 0x4170, \ + 0x4156, \ + 0x40b4, \ + 0x41fc, \ + 0x41ce, \ + 0x41d7, \ + 0x4154, \ + 0x41da, \ + 0x4184, \ + 0x4188, \ + 0x417a, \ + 0x3fc0, \ + 0x4094, \ + 0x41e1, \ + 0x4108, \ + 0x4196, \ + 0x414e, \ + 0x4118, \ + 0x41dc, \ + 0x41d2, \ + 0x41eb, \ + 0x3fc0, \ + 0x3fe0, \ + 0x4184, \ + 0x40b4, \ + 0x418b, \ + 0x418c, \ + 0x40e4, \ + 0x4198, \ + 0x4166, \ + 0x4176, \ + 0x41c3, \ + 0x41b2, \ + 0x418f, \ + 0x41b5, \ + 0x3e80, \ + 0x4104, \ + 0x41bc, \ + 0x40a8, \ + 0x41b6, \ + 0x41db, \ + 0x4142, \ + 0x41fe, \ + 0x416e, \ + 0x419c, \ + 0x41cd, \ + 0x414a, \ + 0x417c, \ + 0x3e80, \ + 0x3f20, \ + 0x41dc, \ + 0x4118, \ + 0x3f80, \ + 0x415e, \ + 0x408c, \ + 0x3f20, \ + 0x41d5, \ + 0x412a, \ + 0x41c5, \ + 0x41a8, \ + 0x41b6, \ + 0x418f, \ + 0x40e4, \ + 0x4146, \ + 0x419c, \ + 0x0000, \ + 0x40e8, \ + 0x417e, \ + 0x4190, \ + 0x4102, \ + 0x414c, \ + 0x41c1, \ + 0x4195, \ + 0x4172, \ + 0x4189, \ + 0x4116, \ + 0x41f6, \ + 0x4140, \ + 0x4198, \ + 0x414e, \ + 0x40fc, \ + 0x41e8, \ + 0x4114, \ + 0x41c1, \ + 0x419f, \ + 0x41d8, \ + 0x4108, \ + 0x4080, \ + 0x40c8, \ + 0x41e7, \ + 0x4110, \ + 0x41c8, \ + 0x4000, \ + 0x3f60, \ + 0x41a5, \ + 0x41f5, \ + 0x41a4, \ + 0x41c1, \ + 0x4196, \ + 0x41ec, \ + 0x417c, \ + 0x4183, \ + 0x41a6, \ + 0x41f0, \ + 0x41bf, \ + 0x41a6, \ + 0x41ed, \ + 0x41a2, \ + 0x4140, \ + 0x41c8, \ + 0x4114, \ + 0x40e0, \ + 0x0000, \ + 0x41a1, \ + 0x40d0, \ + 0x4172, \ + 0x408c, \ + 0x4193, \ + 0x40fc, \ + 0x41a1, \ + 0x4196, \ + 0x415e, \ + 0x40b8, \ + 0x0000, \ + 0x4136, \ + 0x412e, \ + 0x40a8, \ + 0x41c3, \ + 0x4094, \ + 0x40fc, \ + 0x41f1, \ + 0x41c3, \ + 0x41df, \ + 0x4154, \ + 0x41bc, \ + 0x40a4, \ + 0x41f1, \ + 0x41d8, \ + 0x41ac, \ + 0x40ac, \ + 0x4128, \ + 0x41aa, \ + 0x41a0, \ + 0x4128, \ + 0x41ce, \ + 0x4191, \ + 0x4126, \ + 0x419e, \ + 0x3f60, \ + 0x40b0, \ + 0x41a8, \ + 0x41e8, \ + 0x41ea, \ + 0x41f8, \ + 0x414e, \ + 0x40b8, \ + 0x419d, \ + 0x416e, \ + 0x41be, \ + 0x4185, \ + 0x418e, \ + 0x4176, \ + 0x415c, \ + 0x41d6, \ + 0x4090, \ + 0x41d1, \ + 0x41fa, \ + 0x409c, \ + 0x40e4, \ + 0x4178, \ + 0x41a6, \ + 0x4126, \ + 0x41ff, \ + 0x4140, \ + 0x4150, \ + 0x41d9, \ + 0x4193, \ + 0x4128, \ + 0x4098, \ + 0x4186, \ + 0x410c, \ + 0x41fd, \ + 0x41b6, \ + 0x41db, \ + 0x40cc, \ + 0x413e, \ + 0x411c, \ + 0x419e, \ + 0x4084, \ + 0x3fa0, \ + 0x40d8, \ + 0x41c7, \ + 0x4196, \ + 0x4185, \ + 0x40fc, \ + 0x41c1, \ + 0x4191, \ + 0x417c, \ + 0x41a6, \ + 0x41e6, \ + 0x4164, \ + 0x41e5, \ + 0x4184, \ + 0x4156, \ + 0x41fb, \ + 0x4114, \ + 0x415e, \ + 0x41a9, \ + 0x3f90, \ + 0x4118, \ + 0x41ea, \ + 0x4108, \ + 0x41f3, \ + 0x3fa0, \ + 0x4000, \ + 0x4156, \ + 0x4068, \ + 0x41e8, \ + 0x4198, \ + 0x41a4, \ + 0x41ea, \ + 0x41c1, \ + 0x41ec, \ + 0x41fe, \ + 0x4166, \ + 0x4080, \ + 0x41a4, \ + 0x41a4, \ + 0x4008, \ + 0x413e, \ + 0x4195, \ + 0x41c4, \ + 0x41ae, \ + 0x4140, \ + 0x41bd, \ + 0x413a, \ + 0x4126, \ + 0x4150, \ + 0x418c, \ + 0x41e8, \ + 0x3f40, \ + 0x40f8, \ + 0x40f8, \ + 0x41b4, \ + 0x4110, \ + 0x4008, \ + 0x4080, \ + 0x41e4, \ + 0x4198, \ + 0x40d0, \ + 0x41df, \ + 0x41ca, \ + 0x414a, \ + 0x40f4, \ + 0x41d7, \ + 0x40e8, \ + 0x41bd, \ + 0x4158, \ + 0x40b4, \ + 0x41c6, \ + 0x41d5, \ + 0x41be, \ + 0x41fe, \ + 0x410e, \ + 0x419f, \ + 0x41d9, \ + 0x418c, \ + 0x4168, \ + 0x41db, \ + 0x418e, \ + 0x41f3, \ + 0x40cc, \ + 0x41aa, \ + 0x41f9, \ + 0x3fc0, \ + 0x4094, \ + 0x41e6, \ + 0x4094, \ + 0x413a, \ + 0x4138, \ + 0x408c, \ + 0x41f5, \ + 0x41e4, \ + 0x4112, \ + 0x40bc, \ + 0x414c, \ + 0x40f0, \ + 0x4070, \ + 0x41d9, \ + 0x4050, \ + 0x4168, \ + 0x4188, \ + 0x41d6, \ + 0x413c, \ + 0x412a, \ + 0x41d2, \ + 0x410a, \ + 0x4190, \ + 0x4189, \ + 0x4030, \ + 0x417c, \ + 0x41b3, \ + 0x40f4, \ + 0x41e1, \ + 0x41a4, \ + 0x4084, \ + 0x4090, \ + 0x41f6, \ + 0x41a8, \ + 0x40a4, \ + 0x41c3, \ + 0x41da, \ + 0x41f4, \ + 0x41e6, \ + 0x3f40, \ + 0x4199, \ + 0x40a8, \ + 0x4048, \ + 0x4187, \ + 0x419d, \ + 0x41bc, \ + 0x3f80, \ + 0x3ec0, \ + 0x41a9, \ + 0x4030, \ + 0x41e5, \ + 0x41ef, \ + 0x41bd, \ + 0x4040, \ + 0x4195, \ + 0x41e9, \ + 0x41f1, \ + 0x418e, \ + 0x40c0, \ + 0x4040, \ + 0x4110, \ + 0x417e, \ + 0x4008, \ + 0x4186, \ + 0x4018, \ + 0x41be, \ + 0x4116, \ + 0x3f40, \ + 0x4186, \ + 0x416a, \ + 0x3f90, \ + 0x40c4, \ + 0x41b8, \ + 0x41a2, \ + 0x4102, \ + 0x41cc, \ + 0x41f6, \ + 0x4078, \ + 0x41be, \ + 0x4188, \ + 0x4112, \ + 0x4192, \ + 0x40c0, \ + 0x413e, \ + 0x4124, \ + 0x41a1, \ + 0x4114, \ + 0x4134, \ + 0x4098, \ + 0x4176, \ + 0x4142, \ + 0x4136, \ + 0x418d, \ + 0x41f2, \ + 0x4132, \ + 0x4195, \ + 0x41d2, \ + 0x3f20, \ + 0x419a, \ + 0x4183, \ + 0x41c0, \ + 0x40ec, \ + 0x41e1, \ + 0x41e3, \ + 0x3e80, \ + 0x4010, \ + 0x40bc, \ + 0x4122, \ + 0x41cb, \ + 0x4162, \ + 0x3fc0, \ + 0x419e, \ + 0x411a, \ + 0x41a7, \ + 0x41b2, \ + 0x416e, \ + 0x41c4, \ + 0x41fd, \ + 0x3fc0, \ + 0x41e5, \ + 0x40ec, \ + 0x41cb, \ + 0x4198, \ + 0x415e, \ + 0x4106, \ + 0x417e, \ + 0x4058, \ + 0x416c, \ + 0x409c, \ + 0x418a, \ + 0x41d3, \ + 0x40f4, \ + 0x4154, \ + 0x0000, \ + 0x419a, \ + 0x41c2, \ + 0x41f4, \ + 0x4174, \ + 0x40d8, \ + 0x41c2, \ + 0x4136, \ + 0x4112, \ + 0x4010, \ + 0x41e9, \ + 0x41a2, \ + 0x4192, \ + 0x41d9, \ + 0x41cc, \ + 0x417c, \ + 0x40dc, \ + 0x41a2, \ + 0x412e, \ + 0x41f2, \ + 0x4191, \ + 0x41aa, \ + 0x414c, \ + 0x4100, \ + 0x41aa, \ + 0x41a3, \ + 0x3f20, \ + 0x3f00, \ + 0x4140, \ + 0x41ee, \ + 0x4164, \ + 0x4174, \ + 0x41ab, \ + 0x40b8, \ + 0x41d2, \ + 0x41f0, \ + 0x4144, \ + 0x40d4, \ + 0x4180, \ + 0x41b7, \ + 0x4197, \ + 0x41cf, \ + 0x3f20, \ + 0x4183, \ + 0x4197, \ + 0x4010, \ + 0x40fc, \ + 0x41b1, \ + 0x4098, \ + 0x4068, \ + 0x40e0, \ + 0x4194, \ + 0x41ae, \ + 0x4187, \ + 0x413c, \ + 0x41a7, \ + 0x40f0, \ + 0x4178, \ + 0x419c, \ + 0x4154, \ + 0x41ee, \ + 0x415a, \ + 0x41b1, \ + 0x40e4, \ + 0x40e4, \ + 0x4018, \ + 0x3fd0, \ + 0x41ed, \ + 0x3e00, \ + 0x414a, \ + 0x4094, \ + 0x41be, \ + 0x41c5, \ + 0x3fa0, \ + 0x41d6, \ + 0x416e, \ + 0x4088, \ + 0x417a, \ + 0x41fa, \ + 0x415a, \ + 0x4000, \ + 0x4100, \ + 0x41ae, \ + 0x41de, \ + 0x41b8, \ + 0x41a7, \ + 0x41d6, \ + 0x418a, \ + 0x41df, \ + 0x41c3, \ + 0x40fc, \ + 0x411c, \ + 0x41a4, \ + 0x4176, \ + 0x415a, \ + 0x419a, \ + 0x4090, \ + 0x40fc, \ + 0x417a, \ + 0x413a, \ + 0x40c0, \ + 0x41d1, \ + 0x41d7, \ + 0x416e, \ + 0x4150, \ + 0x40b0, \ + 0x4166, \ + 0x411e, \ + 0x3ec0, \ + 0x41de, \ + 0x40c4, \ + 0x410e, \ + 0x41b7, \ + 0x41a9, \ + 0x4000, \ + 0x41bb, \ + 0x41c6, \ + 0x4010, \ + 0x41a5, \ + 0x40f0, \ + 0x41ad, \ + 0x41b3, \ + 0x4148 \ +} + +#endif \ No newline at end of file diff --git a/hwpe/softex/softex.c b/hwpe/softex/softex.c new file mode 100644 index 0000000..3126f1a --- /dev/null +++ b/hwpe/softex/softex.c @@ -0,0 +1,95 @@ +/* + * Andrea Belano + * + * Copyright 2024 ETH Zurich and University of Bologna + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * SPDX-License-Identifier: Apache-2.0 + */ + +#include +#include +#include "stdio.h" +#include "archi_softex.h" +#include "hal_softex.h" +#include "pulp.h" + +#include "inc/golden.h" +#include "inc/scores.h" + +#define TOLERANCE 0x2 + +uint16_t scores_ext [LENGTH] = SCORES; +uint16_t golden [LENGTH] = GOLDEN; + +int main() { + volatile int errors = 0; + + uint16_t volatile *scores = (uint16_t volatile *) pi_l1_malloc(0, (FMT_WIDTH*LENGTH)); + + if(get_core_id() == 0){ + #ifdef USE_DMA + volatile unsigned int dma_id = 0; + dma_id = mchan_alloc(); + + mchan_transfer((unsigned int) FMT_WIDTH*LENGTH , + (unsigned int) scores_ext , + (unsigned int) scores + ); + + mchan_barrier(dma_id); + mchan_free(dma_id); + #else + memcpy(scores, scores_ext, LENGTH*FMT_WIDTH); + #endif + + // Enable softex + hwpe_cg_enable(); + + hwpe_soft_clear(); + + HWPE_WRITE(scores, SOFTEX_IN_ADDR); + HWPE_WRITE(LENGTH * FMT_WIDTH, SOFTEX_TOT_LEN); + HWPE_WRITE(scores, SOFTEX_OUT_ADDR); + + hwpe_trigger_job(); + + softex_evt_wait(); + + // Disable softex + hwpe_cg_disable(); + + for (int i = 0; i < LENGTH; i++) { + uint16_t diff; + + if (golden [i] >= scores[i]) { + diff = golden [i] - scores [i]; + } else { + diff = scores [i] - golden [i]; + } + + if (diff > TOLERANCE) { + errors += 1; + + printf ("Mismatch!!!\tIndex: %d\tExpected: 0x%04x\tWas: 0x%04x\tDifference: 0x%x\n", i, golden [i], scores [i], diff); + } + } + + *(int *) 0x1A1040A0 = errors; + + printf("Test completed with %d errors\n", errors); + } + synch_barrier(); + return errors; +} diff --git a/mchan_tests/testMCHAN_2D_ext_tcdm/mchan_tests.h b/mchan_tests/testMCHAN_2D_ext_tcdm/mchan_tests.h index 254df64..3cd8117 100644 --- a/mchan_tests/testMCHAN_2D_ext_tcdm/mchan_tests.h +++ b/mchan_tests/testMCHAN_2D_ext_tcdm/mchan_tests.h @@ -10,14 +10,14 @@ #define LIN 0 #define TWD 1 -#define MCHAN_COMMAND_QUEUE 0x10204400 //0x10201800 -#define MCHAN_STATUS_REGISTER 0x10204404 //0x10201804 +#define MCHAN_COMMAND_QUEUE 0x50204400 //0x10201800 +#define MCHAN_STATUS_REGISTER 0x50204404 //0x10201804 // TEMPORARY FIX DAVIDE #define PLP_DMA_2D_TCDM_BIT 22 -#define PE_MCHAN_COMMAND_QUEUE 0x10201C00 -#define PE_MCHAN_STATUS_REGISTER 0x10201C04 +#define PE_MCHAN_COMMAND_QUEUE 0x50201C00 +#define PE_MCHAN_STATUS_REGISTER 0x50201C04 #define PLP_DMA_TYPE_BIT 0x00000011 #define PLP_DMA_INCR_BIT 0x00000012 diff --git a/mchan_tests/testMCHAN_4k_crossing/mchan_tests.h b/mchan_tests/testMCHAN_4k_crossing/mchan_tests.h index 254df64..3cd8117 100644 --- a/mchan_tests/testMCHAN_4k_crossing/mchan_tests.h +++ b/mchan_tests/testMCHAN_4k_crossing/mchan_tests.h @@ -10,14 +10,14 @@ #define LIN 0 #define TWD 1 -#define MCHAN_COMMAND_QUEUE 0x10204400 //0x10201800 -#define MCHAN_STATUS_REGISTER 0x10204404 //0x10201804 +#define MCHAN_COMMAND_QUEUE 0x50204400 //0x10201800 +#define MCHAN_STATUS_REGISTER 0x50204404 //0x10201804 // TEMPORARY FIX DAVIDE #define PLP_DMA_2D_TCDM_BIT 22 -#define PE_MCHAN_COMMAND_QUEUE 0x10201C00 -#define PE_MCHAN_STATUS_REGISTER 0x10201C04 +#define PE_MCHAN_COMMAND_QUEUE 0x50201C00 +#define PE_MCHAN_STATUS_REGISTER 0x50201C04 #define PLP_DMA_TYPE_BIT 0x00000011 #define PLP_DMA_INCR_BIT 0x00000012 diff --git a/mchan_tests/testMCHAN_TCDM2TCDM_tx_rx/mchan_tests.h b/mchan_tests/testMCHAN_TCDM2TCDM_tx_rx/mchan_tests.h index 254df64..3cd8117 100644 --- a/mchan_tests/testMCHAN_TCDM2TCDM_tx_rx/mchan_tests.h +++ b/mchan_tests/testMCHAN_TCDM2TCDM_tx_rx/mchan_tests.h @@ -10,14 +10,14 @@ #define LIN 0 #define TWD 1 -#define MCHAN_COMMAND_QUEUE 0x10204400 //0x10201800 -#define MCHAN_STATUS_REGISTER 0x10204404 //0x10201804 +#define MCHAN_COMMAND_QUEUE 0x50204400 //0x10201800 +#define MCHAN_STATUS_REGISTER 0x50204404 //0x10201804 // TEMPORARY FIX DAVIDE #define PLP_DMA_2D_TCDM_BIT 22 -#define PE_MCHAN_COMMAND_QUEUE 0x10201C00 -#define PE_MCHAN_STATUS_REGISTER 0x10201C04 +#define PE_MCHAN_COMMAND_QUEUE 0x50201C00 +#define PE_MCHAN_STATUS_REGISTER 0x50201C04 #define PLP_DMA_TYPE_BIT 0x00000011 #define PLP_DMA_INCR_BIT 0x00000012 diff --git a/mchan_tests/testMCHAN_basic/mchan_tests.h b/mchan_tests/testMCHAN_basic/mchan_tests.h index 254df64..3cd8117 100644 --- a/mchan_tests/testMCHAN_basic/mchan_tests.h +++ b/mchan_tests/testMCHAN_basic/mchan_tests.h @@ -10,14 +10,14 @@ #define LIN 0 #define TWD 1 -#define MCHAN_COMMAND_QUEUE 0x10204400 //0x10201800 -#define MCHAN_STATUS_REGISTER 0x10204404 //0x10201804 +#define MCHAN_COMMAND_QUEUE 0x50204400 //0x10201800 +#define MCHAN_STATUS_REGISTER 0x50204404 //0x10201804 // TEMPORARY FIX DAVIDE #define PLP_DMA_2D_TCDM_BIT 22 -#define PE_MCHAN_COMMAND_QUEUE 0x10201C00 -#define PE_MCHAN_STATUS_REGISTER 0x10201C04 +#define PE_MCHAN_COMMAND_QUEUE 0x50201C00 +#define PE_MCHAN_STATUS_REGISTER 0x50201C04 #define PLP_DMA_TYPE_BIT 0x00000011 #define PLP_DMA_INCR_BIT 0x00000012 diff --git a/mchan_tests/testMCHAN_basic_8cores/mchan_tests.h b/mchan_tests/testMCHAN_basic_8cores/mchan_tests.h index 8865d98..28d412a 100755 --- a/mchan_tests/testMCHAN_basic_8cores/mchan_tests.h +++ b/mchan_tests/testMCHAN_basic_8cores/mchan_tests.h @@ -10,14 +10,14 @@ #define LIN 0 #define TWD 1 -#define MCHAN_COMMAND_QUEUE 0x10204400 //0x10201800 -#define MCHAN_STATUS_REGISTER 0x10204404 //0x10201804 +#define MCHAN_COMMAND_QUEUE 0x50204400 //0x10201800 +#define MCHAN_STATUS_REGISTER 0x50204404 //0x10201804 // TEMPORARY FIX DAVIDE #define PLP_DMA_2D_TCDM_BIT 22 -#define PE_MCHAN_COMMAND_QUEUE 0x10201800 //0x10201C00 -#define PE_MCHAN_STATUS_REGISTER 0x10201804 //0x10201C04 +#define PE_MCHAN_COMMAND_QUEUE 0x50201800 //0x10201C00 +#define PE_MCHAN_STATUS_REGISTER 0x50201804 //0x10201C04 #define PLP_DMA_TYPE_BIT 0x00000011 #define PLP_DMA_INCR_BIT 0x00000012 diff --git a/mchan_tests/testMCHAN_basic_FC_TCDM/mchan_tests.h b/mchan_tests/testMCHAN_basic_FC_TCDM/mchan_tests.h index 254df64..3cd8117 100644 --- a/mchan_tests/testMCHAN_basic_FC_TCDM/mchan_tests.h +++ b/mchan_tests/testMCHAN_basic_FC_TCDM/mchan_tests.h @@ -10,14 +10,14 @@ #define LIN 0 #define TWD 1 -#define MCHAN_COMMAND_QUEUE 0x10204400 //0x10201800 -#define MCHAN_STATUS_REGISTER 0x10204404 //0x10201804 +#define MCHAN_COMMAND_QUEUE 0x50204400 //0x10201800 +#define MCHAN_STATUS_REGISTER 0x50204404 //0x10201804 // TEMPORARY FIX DAVIDE #define PLP_DMA_2D_TCDM_BIT 22 -#define PE_MCHAN_COMMAND_QUEUE 0x10201C00 -#define PE_MCHAN_STATUS_REGISTER 0x10201C04 +#define PE_MCHAN_COMMAND_QUEUE 0x50201C00 +#define PE_MCHAN_STATUS_REGISTER 0x50201C04 #define PLP_DMA_TYPE_BIT 0x00000011 #define PLP_DMA_INCR_BIT 0x00000012 diff --git a/mchan_tests/testMCHAN_not_incremental/mchan_tests.h b/mchan_tests/testMCHAN_not_incremental/mchan_tests.h index 254df64..3cd8117 100644 --- a/mchan_tests/testMCHAN_not_incremental/mchan_tests.h +++ b/mchan_tests/testMCHAN_not_incremental/mchan_tests.h @@ -10,14 +10,14 @@ #define LIN 0 #define TWD 1 -#define MCHAN_COMMAND_QUEUE 0x10204400 //0x10201800 -#define MCHAN_STATUS_REGISTER 0x10204404 //0x10201804 +#define MCHAN_COMMAND_QUEUE 0x50204400 //0x10201800 +#define MCHAN_STATUS_REGISTER 0x50204404 //0x10201804 // TEMPORARY FIX DAVIDE #define PLP_DMA_2D_TCDM_BIT 22 -#define PE_MCHAN_COMMAND_QUEUE 0x10201C00 -#define PE_MCHAN_STATUS_REGISTER 0x10201C04 +#define PE_MCHAN_COMMAND_QUEUE 0x50201C00 +#define PE_MCHAN_STATUS_REGISTER 0x50201C04 #define PLP_DMA_TYPE_BIT 0x00000011 #define PLP_DMA_INCR_BIT 0x00000012 diff --git a/mchan_tests/testMCHAN_pe_basic/mchan_tests.h b/mchan_tests/testMCHAN_pe_basic/mchan_tests.h index 254df64..3cd8117 100644 --- a/mchan_tests/testMCHAN_pe_basic/mchan_tests.h +++ b/mchan_tests/testMCHAN_pe_basic/mchan_tests.h @@ -10,14 +10,14 @@ #define LIN 0 #define TWD 1 -#define MCHAN_COMMAND_QUEUE 0x10204400 //0x10201800 -#define MCHAN_STATUS_REGISTER 0x10204404 //0x10201804 +#define MCHAN_COMMAND_QUEUE 0x50204400 //0x10201800 +#define MCHAN_STATUS_REGISTER 0x50204404 //0x10201804 // TEMPORARY FIX DAVIDE #define PLP_DMA_2D_TCDM_BIT 22 -#define PE_MCHAN_COMMAND_QUEUE 0x10201C00 -#define PE_MCHAN_STATUS_REGISTER 0x10201C04 +#define PE_MCHAN_COMMAND_QUEUE 0x50201C00 +#define PE_MCHAN_STATUS_REGISTER 0x50201C04 #define PLP_DMA_TYPE_BIT 0x00000011 #define PLP_DMA_INCR_BIT 0x00000012 diff --git a/mchan_tests/testMCHAN_pe_fc_basic/mchan_tests.h b/mchan_tests/testMCHAN_pe_fc_basic/mchan_tests.h index 254df64..3cd8117 100644 --- a/mchan_tests/testMCHAN_pe_fc_basic/mchan_tests.h +++ b/mchan_tests/testMCHAN_pe_fc_basic/mchan_tests.h @@ -10,14 +10,14 @@ #define LIN 0 #define TWD 1 -#define MCHAN_COMMAND_QUEUE 0x10204400 //0x10201800 -#define MCHAN_STATUS_REGISTER 0x10204404 //0x10201804 +#define MCHAN_COMMAND_QUEUE 0x50204400 //0x10201800 +#define MCHAN_STATUS_REGISTER 0x50204404 //0x10201804 // TEMPORARY FIX DAVIDE #define PLP_DMA_2D_TCDM_BIT 22 -#define PE_MCHAN_COMMAND_QUEUE 0x10201C00 -#define PE_MCHAN_STATUS_REGISTER 0x10201C04 +#define PE_MCHAN_COMMAND_QUEUE 0x50201C00 +#define PE_MCHAN_STATUS_REGISTER 0x50201C04 #define PLP_DMA_TYPE_BIT 0x00000011 #define PLP_DMA_INCR_BIT 0x00000012 diff --git a/mchan_tests/testMCHAN_unaligned/mchan_tests.h b/mchan_tests/testMCHAN_unaligned/mchan_tests.h index 254df64..3cd8117 100644 --- a/mchan_tests/testMCHAN_unaligned/mchan_tests.h +++ b/mchan_tests/testMCHAN_unaligned/mchan_tests.h @@ -10,14 +10,14 @@ #define LIN 0 #define TWD 1 -#define MCHAN_COMMAND_QUEUE 0x10204400 //0x10201800 -#define MCHAN_STATUS_REGISTER 0x10204404 //0x10201804 +#define MCHAN_COMMAND_QUEUE 0x50204400 //0x10201800 +#define MCHAN_STATUS_REGISTER 0x50204404 //0x10201804 // TEMPORARY FIX DAVIDE #define PLP_DMA_2D_TCDM_BIT 22 -#define PE_MCHAN_COMMAND_QUEUE 0x10201C00 -#define PE_MCHAN_STATUS_REGISTER 0x10201C04 +#define PE_MCHAN_COMMAND_QUEUE 0x50201C00 +#define PE_MCHAN_STATUS_REGISTER 0x50201C04 #define PLP_DMA_TYPE_BIT 0x00000011 #define PLP_DMA_INCR_BIT 0x00000012 diff --git a/parallel_bare_tests/Dijkstra/Dijkstra.c b/parallel_bare_tests/Dijkstra/Dijkstra.c index a6f6cab..8fe903d 100644 --- a/parallel_bare_tests/Dijkstra/Dijkstra.c +++ b/parallel_bare_tests/Dijkstra/Dijkstra.c @@ -96,8 +96,8 @@ int main() #endif if ( hc == 2 && id == 0 ) { - reset_timer(); - start_timer(); + reset_timer(rt_cluster_id()); + start_timer(rt_cluster_id()); } synch_barrier(); @@ -105,8 +105,8 @@ int main() dijkstra_distance(mind, ohd); if ( hc == 2 && id == 0 ) { - stop_timer(); - time = get_time(); + stop_timer(rt_cluster_id()); + time = get_time(rt_cluster_id()); } #ifdef PROFILE // stop performance counters diff --git a/parallel_bare_tests/LU/LU.c b/parallel_bare_tests/LU/LU.c index 3700837..d6ddc81 100644 --- a/parallel_bare_tests/LU/LU.c +++ b/parallel_bare_tests/LU/LU.c @@ -174,8 +174,8 @@ int main(int argc, char **argv) for(hc = 0; hc < 3; ++hc) { if ( hc == 2 && id == 0 ) { - reset_timer(); - start_timer(); + reset_timer(rt_cluster_id()); + start_timer(rt_cluster_id()); } perf_reset(); perf_start(); @@ -185,8 +185,8 @@ int main(int argc, char **argv) factor(G, N, N, pivots); if ( hc == 2 && id == 0 ) { - stop_timer(); - time = get_time(); + stop_timer(rt_cluster_id()); + time = get_time(rt_cluster_id()); } perf_stop(); diff --git a/parallel_bare_tests/conv16/conv16.c b/parallel_bare_tests/conv16/conv16.c index c4d95a2..38c3a92 100644 --- a/parallel_bare_tests/conv16/conv16.c +++ b/parallel_bare_tests/conv16/conv16.c @@ -89,10 +89,10 @@ int test_singlethread(void (*test)(int16_t *, int16_t *, int16_t *, int, int, in if(rt_core_id() == 0) { load(); - reset_timer(); - start_timer(); + reset_timer(rt_cluster_id()); + start_timer(rt_cluster_id()); test(g_W, g_x, g_y, IH, IW, FH, FW, OH, OW, 1, 0, 0); - stop_timer(); + stop_timer(rt_cluster_id()); #ifdef CHECK_CHECKSUM errors = 0; @@ -110,7 +110,7 @@ int test_singlethread(void (*test)(int16_t *, int16_t *, int16_t *, int, int, in #endif #ifndef PULP_SPI - printf("%s, errors=%d, time=%d\n", str, errors, get_time()); + printf("%s, errors=%d, time=%d\n", str, errors, get_time(rt_cluster_id())); #endif } @@ -129,12 +129,12 @@ int test_multithread(void (*test)(int16_t *, int16_t *, int16_t *, int, int, int synch_barrier(); if(rt_core_id() == 0) { - reset_timer(); - start_timer(); + reset_timer(rt_cluster_id()); + start_timer(rt_cluster_id()); } test(g_W, g_x, g_y, IH, IW, FH, FW, OH, OW, 1, 0, 0); if(rt_core_id() == 0) { - stop_timer(); + stop_timer(rt_cluster_id()); #ifdef CHECK_CHECKSUM errors = 0; @@ -152,7 +152,7 @@ int test_multithread(void (*test)(int16_t *, int16_t *, int16_t *, int, int, int #endif #ifndef PULP_SPI - printf("%s, errors=%d, time=%d\n", str, errors, get_time()); + printf("%s, errors=%d, time=%d\n", str, errors, get_time(rt_cluster_id())); #endif } diff --git a/parallel_bare_tests/parMatrixMul/parMatrixMul.c b/parallel_bare_tests/parMatrixMul/parMatrixMul.c index 78a3239..4ddd6aa 100644 --- a/parallel_bare_tests/parMatrixMul/parMatrixMul.c +++ b/parallel_bare_tests/parMatrixMul/parMatrixMul.c @@ -57,9 +57,6 @@ testcase_t testcases[] = { int main() { - if (rt_cluster_id() != 0) - return bench_cluster_forward(0); - int nbErrors = run_suite(testcases); synch_barrier(); @@ -85,9 +82,9 @@ void matrix_multiplication(testresult_t *result, void (*start)(), void (*stop)() lb = coreid * chunk; //upper bound ub = lb + chunk; - + synch_barrier(); - + /********************* Benchmark Execution *********************/ if (coreid +#include +#include "matmul.h" + +#define N_ITERS 1 +#define max(x,y) (x > y ? x : y) +#define min(x,y) (x < y ? x : y) + +__attribute__ ((section(".heapsram"))) int A[SIZE][SIZE]; +__attribute__ ((section(".heapsram"))) int B[SIZE][SIZE]; +__attribute__ ((section(".heapsram"))) int C[SIZE][SIZE]; + +void initialize_mat(); + +void initialize_mat() { + int i,j; + + for (i=0;i +#include +#include +#include + +#define SIZE 0x400 +#define NUM_BANKS 16 +#define SCRUBBER_INTERVAL 2 + +int main() { + // Collecting info about the core ID and the running cluster ID + unsigned int core_id = get_core_id(); + unsigned int cluster_id = rt_cluster_id(); + + if (rt_cluster_id() != 0) return bench_cluster_forward(0); + + if (core_id != 0) synch_barrier(); + + unsigned int *test_array = pi_l1_malloc(cluster_id, SIZE); + + // Initializing the memory + for (int i = 0; i < SIZE; i++) { + pulp_write32(&test_array[i], i); + } + + // Initialize the scrubbing interval for all memory banks + for (int i = 0; i < NUM_BANKS; i++) + tcdm_scrubber_set_interval(cluster_id, i, SCRUBBER_INTERVAL); + + // Initialize the error-tracking variables + bool mismatch = 0; + unsigned int error = 0; + for (int i = 0; i < SIZE; i++) { + mismatch = (pulp_read32(&test_array[i]) != i); + if (mismatch) { + error ++; + printf("Expected 0x%x, got 0x%x\n", i, pulp_read32(&test_array[i])); + } + } + + unsigned int mismatch_cnt = 0; + unsigned int fix_cnt = 0; + unsigned int uncorrectable_cnt = 0; + for (int i = 0; i < 16; i++) { + mismatch_cnt += tcdm_scrubber_get_mismatch_count(cluster_id, i); + fix_cnt += tcdm_scrubber_get_fix_count(cluster_id, i); + uncorrectable_cnt += tcdm_scrubber_get_uncorrectable_count(cluster_id, i); + } + + printf("mismatch_cnt: %d, fix_cnt: %d, uncorrectable_cnt: %d\n", mismatch_cnt, fix_cnt, uncorrectable_cnt); + + return (error != 0) && (uncorrectable_cnt == 0); +} diff --git a/reliability_tests/ecc_test/pulp_inject_fault.tcl b/reliability_tests/ecc_test/pulp_inject_fault.tcl new file mode 100644 index 0000000..45cef47 --- /dev/null +++ b/reliability_tests/ecc_test/pulp_inject_fault.tcl @@ -0,0 +1,53 @@ +# Copyright 2023 ETH Zurich and University of Bologna. +# Solderpad Hardware License, Version 0.51, see LICENSE for details. +# SPDX-License-Identifier: SHL-0.51 +# +# Author: Michael Rogenmoser (michaero@iis.ee.ethz.ch) + +transcript quietly +if {! [info exists ::env(VSIM_PATH)]} {error "Define VSIM_PATH"} +set utils_base_path [file join $::env(VSIM_PATH) scripts fault_injection_utils] +set script_base_path [file join $::env(VSIM_PATH) fault_injection_sim scripts] + +set verbosity 2 +set log_injections 1 +# Easy way to generate a variable seed +# set seed [clock seconds] +# Default value +set seed 12345 +set print_statistics 1 + +set inject_start_time 110584000000ps +set inject_stop_time 203880000000ps +set injection_clock "pulp_cluster_tb/cluster_i/clk_i" +set injection_clock_trigger 0 +set fault_period 100 +set rand_initial_injection_phase 0 +# max_num set to 0 means until stop_time +set max_num_fault_inject 0 +set signal_fault_duration 20ns +set register_fault_duration 0ns + +set allow_multi_bit_upset $::env(MULTI_BIT_UPSET) +set use_bitwidth_as_weight 0 +set check_core_output_modification 0 +set check_core_next_state_modification 0 +set reg_to_sig_ratio 1 + +source [file join $utils_base_path pulp_extract_nets.tcl] + +set inject_signals_netlist [] +set inject_register_netlist [] +set output_netlist [] +set next_state_netlist [] +set assertion_disable_list [] + +# for {set idx 0} {$idx < 12} {incr idx} { +# set inject_signals_netlist [list {*}$inject_signals_netlist {*}[get_all_core_nets $idx]] +# set output_netlist [list {*}$output_netlist {*}[get_core_output_nets $idx]] +# } + +set inject_register_netlist [list {*}$inject_register_netlist {*}[get_memory_slice {0 16} {385 449}]] + +source [file join $script_base_path inject_fault.tcl] + diff --git a/reliability_tests/icache_fi_conv16/Makefile b/reliability_tests/icache_fi_conv16/Makefile new file mode 100644 index 0000000..58620aa --- /dev/null +++ b/reliability_tests/icache_fi_conv16/Makefile @@ -0,0 +1,11 @@ +PULP_APP = test +PULP_APP_SRCS = icache_conv16.c + +PULP_CFLAGS = -O3 + +ifeq ($(fault_inject),1) + export FAULT_INJECTION=1 + export FAULT_INJECTION_SCRIPT=$(CURDIR)/pulp_inject_fault.tcl +endif + +include $(PULP_SDK_HOME)/install/rules/pulp.mk diff --git a/reliability_tests/icache_fi_conv16/conv16.h b/reliability_tests/icache_fi_conv16/conv16.h new file mode 100644 index 0000000..b75c587 --- /dev/null +++ b/reliability_tests/icache_fi_conv16/conv16.h @@ -0,0 +1,397 @@ +/* + * Copyright (C) 2018 ETH Zurich and University of Bologna + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* + * Mantainer: Luca Valente, luca.valente2@unibo.it + */ +/****************************************************************************** + * * + * Multitherman Lab @ DEI - University of Bologna * + * Viale Risorgimento 2 40136 * + * Bologna - phone 0512092759 * + * * + * Engineer: Francesco Conti - f.conti@unibo.it * + * * + * Project: CConvNet * + * File: conv16.h * + * Description: 16-bit fixed point convolution test * + * * + ******************************************************************************/ + +#ifndef _CONV16_H +#define _CONV16_H + +// uncomment if doing test with SPI (disables printf's) +// #define PULP_SPI + +// fractionary bits +#define QF 13 + +// uncomment if checking errors in detail +#define CHECK_ERROR + +// uncomment if performing checks at all +#define CHECK_CHECKSUM + +#define IMPRECISE_ASM5 + +#define FIXED_MUL(a,b) ((a*b) >> QF); + +#define IH 32 +#define IW 32 +#define FH 5 +#define FW 5 +#define OH (IH-FH+1) +#define OW (IW-FW+1) + +// right checksum +#define RIGHT_CHECKSUM 0x009da8b0 + +#define FIXED_MUL_ASM(W_ptr,x_ptr,conv) \ +__asm__ volatile \ +( \ + "l.lhs r28,0x0(%0); " \ + "l.addi %0,%0,0x4; " \ + "l.addi %1,%1,0xFFFC; " \ + "l.mul r28,r28,r29; " \ + "l.srli r28,r28,0xD; " \ + "l.add %2,%2,r28; " \ + : "=r"(W_ptr), "=r"(x_ptr), "=&r"(conv) \ + : "r"(W_ptr), "r"(x_ptr) \ + : "r28", "r29", "cc" \ +) + +#define FIXED_MUL_ASM5_IMPRECISE(W_ptr,x_ptr,conv) \ +__asm__ volatile \ +( \ + "l.ori r25,r0,0xffff; " \ + "l.ori r26,r0,16; " \ + "l.andi r27,r27,0x0000; " \ + "l.lwz r28,0x0000(%0); " \ + "l.lwz r29,0x0000(%1); " \ + "l.ror r30,r28,r26; " \ + "l.ror r31,r29,r26; " \ + "l.and r30,r30,r25; " \ + "l.and r31,r31,r25; " \ + "l.mul r30,r30,r31; " \ + "l.add r27,r27,r30; " \ + "l.and r28,r28,r25; " \ + "l.and r29,r29,r25; " \ + "l.mul r28,r28,r29; " \ + "l.add r27,r27,r28; " \ + "l.lwz r28,0x0004(%0); " \ + "l.lwz r29,0xfffc(%1); " \ + "l.ror r30,r28,r26; " \ + "l.ror r31,r29,r26; " \ + "l.and r30,r30,r25; " \ + "l.and r31,r31,r25; " \ + "l.mul r30,r30,r31; " \ + "l.add r27,r27,r30; " \ + "l.and r28,r28,r25; " \ + "l.and r29,r29,r25; " \ + "l.mul r28,r28,r29; " \ + "l.add r27,r27,r28; " \ + "l.lwz r28,0x0008(%0); " \ + "l.lwz r29,0xfff8(%1); " \ + "l.ror r31,r29,r26; " \ + "l.and r28,r28,r25; " \ + "l.and r31,r31,r25; " \ + "l.mul r28,r28,r31; " \ + "l.add r27,r27,r28; " \ + "l.srli r27,r27,0xD; " \ + "l.add %2,%2,r27; " \ + : "=r"(W_ptr), "=r"(x_ptr), "=&r"(conv) \ + : "r"(W_ptr), "r"(x_ptr), "r"(conv) \ + : "r27", "r28", "r29", "cc" \ +) + +#define FIXED_MUL_ASM5_PRECISE(W_ptr,x_ptr,conv) \ +__asm__ volatile \ +( \ + "l.lhs r28,0x0000(%0); " \ + "l.lhs r29,0x0000(%1); " \ + "l.mul r28,r28,r29; " \ + "l.srli r28,r28,0xD; " \ + "l.add %2,%2,r28; " \ + "l.lhs r28,0x0002(%0); " \ + "l.lhs r29,0xfffe(%1); " \ + "l.mul r28,r28,r29; " \ + "l.srli r28,r28,0xD; " \ + "l.add %2,%2,r28; " \ + "l.lhs r28,0x0004(%0); " \ + "l.lhs r29,0xfffc(%1); " \ + "l.mul r28,r28,r29; " \ + "l.srli r28,r28,0xD; " \ + "l.add %2,%2,r28; " \ + "l.lhs r28,0x0006(%0); " \ + "l.lhs r29,0xfffa(%1); " \ + "l.mul r28,r28,r29; " \ + "l.srli r28,r28,0xD; " \ + "l.add %2,%2,r28; " \ + "l.lhs r28,0x0008(%0); " \ + "l.lhs r29,0xfff8(%1); " \ + "l.mul r28,r28,r29; " \ + "l.srli r28,r28,0xD; " \ + "l.add %2,%2,r28; " \ + : "=r"(W_ptr), "=r"(x_ptr), "=&r"(conv) \ + : "r"(W_ptr), "r"(x_ptr) \ + : "r27", "r28", "r29", "cc" \ +) + +// #define FIXED_MUL_ASM25_PRECISE(W_ptr,x_ptr,conv) \ +// __asm__ volatile \ +// ( \ +// "l.lwz r28,0x0000(%0); " \ +// "l.lwz r29,0x0000(%1); " \ +// "l.mul r28,r28,r29; " \ +// "l.srli r28,r28,0xD; " \ +// "l.add %2,%2,r28; " \ +// "l.lwz r28,0x0004(%0); " \ +// "l.lwz r29,0xfffc(%1); " \ +// "l.mul r28,r28,r29; " \ +// "l.srli r28,r28,0xD; " \ +// "l.add %2,%2,r28; " \ +// "l.lwz r28,0x0008(%0); " \ +// "l.lwz r29,0xfff8(%1); " \ +// "l.mul r28,r28,r29; " \ +// "l.srli r28,r28,0xD; " \ +// "l.add %2,%2,r28; " \ +// "l.lwz r28,0x000c(%0); " \ +// "l.lwz r29,0xfff4(%1); " \ +// "l.mul r28,r28,r29; " \ +// "l.srli r28,r28,0xD; " \ +// "l.add %2,%2,r28; " \ +// "l.lwz r28,0x0010(%0); " \ +// "l.lwz r29,0xfff0(%1); " \ +// "l.mul r28,r28,r29; " \ +// "l.srli r28,r28,0xD; " \ +// "l.add %2,%2,r28; " \ +// \ +// "l.slli %1,r28,0x2; " \ +// \ +// "l.lwz r28,0x0014(%0); " \ +// "l.lwz r29,0x0000(%1); " \ +// "l.mul r28,r28,r29; " \ +// "l.srli r28,r28,0xD; " \ +// "l.add %2,%2,r28; " \ +// "l.lwz r28,0x0018(%0); " \ +// "l.lwz r29,0xfffc(%1); " \ +// "l.mul r28,r28,r29; " \ +// "l.srli r28,r28,0xD; " \ +// "l.add %2,%2,r28; " \ +// "l.lwz r28,0x001c(%0); " \ +// "l.lwz r29,0xfff8(%1); " \ +// "l.mul r28,r28,r29; " \ +// "l.srli r28,r28,0xD; " \ +// "l.add %2,%2,r28; " \ +// "l.lwz r28,0x0020(%0); " \ +// "l.lwz r29,0xfff4(%1); " \ +// "l.mul r28,r28,r29; " \ +// "l.srli r28,r28,0xD; " \ +// "l.add %2,%2,r28; " \ +// "l.lwz r28,0x0024(%0); " \ +// "l.lwz r29,0xfff0(%1); " \ +// "l.mul r28,r28,r29; " \ +// "l.srli r28,r28,0xD; " \ +// "l.add %2,%2,r28; " \ +// // WIP +// : "=r"(W_ptr), "=r"(x_ptr), "=&r"(conv) \ +// : "r"(W_ptr), "r"(x_ptr), "r"(w), "r"(fw) \ +// : "r27", "r28", "r29", "cc" \ +// ) + +#define XPTR_UPDATE(x_ptr,w,fw) \ +__asm__ volatile \ +( \ + "l.sub r28,%1,%2; " \ + "l.slli r28,r28,0x2; " \ + "l.sub %0,%0,r28; " \ + : "=&r"(x_ptr) \ + : "r"(x_ptr), "r"(w), "r"(fw) \ + : "r28", "cc" \ +) + +int test_singlethread(void (*test)(int16_t *, int16_t *, int16_t *, int, int, int, int, int, int, int, int, int), char *str); +int test_multithread(void (*test)(int16_t *, int16_t *, int16_t *, int, int, int, int, int, int, int, int, int), char *str); + +void conv16_gold(int16_t *__restrict__ W, int16_t *__restrict__ x, int16_t *__restrict__ y, int h, int w, int fh, int fw, int oh, int ow, int nif, int a, int b); +void conv16_asm_mul(int16_t *__restrict__ W, int16_t *__restrict__ x, int16_t *__restrict__ y, int h, int w, int fh, int fw, int oh, int ow, int nif, int a, int b); +// void conv16_asm_mac(int16_t *__restrict__ W, int16_t *__restrict__ x, int16_t *__restrict__ y, int h, int w, int fh, int fw, int oh, int ow, int nif, int a, int b); +void conv16_asm_mul_unrolled_5x5(int16_t *__restrict__ W, int16_t *__restrict__ x, int16_t *__restrict__ y, int h, int w, int fh, int fw, int oh, int ow, int nif, int a, int b); +void conv16_unrolled_5x5(int16_t *__restrict__ W, int16_t *__restrict__ x, int16_t *__restrict__ y, int h, int w, int fh, int fw, int oh, int ow, int nif, int a, int b); +void conv16_unrolled_ptr_5x5(int16_t *__restrict__ W, int16_t *__restrict__ x, int16_t *__restrict__ y, int h, int w, int fh, int fw, int oh, int ow, int nif, int a, int b); +// void conv16_gold_four_finest(int16_t *__restrict__ W, int16_t *__restrict__ x, int16_t *__restrict__ y, int h, int w, int fh, int fw, int oh, int ow, int nif, int a, int b, int32_t *shared_conv); +// void conv16_gold_four_fine(int16_t *__restrict__ W, int16_t *__restrict__ x, int16_t *__restrict__ y, int h, int w, int fh, int fw, int oh, int ow, int nif, int a, int b); +void conv16_gold_four_coarse(int16_t *__restrict__ W, int16_t *__restrict__ x, int16_t *__restrict__ y, int h, int w, int fh, int fw, int oh, int ow, int nif, int a, int b); +void conv16_unrolled_5x5_four_coarse(int16_t *__restrict__ W, int16_t *__restrict__ x, int16_t *__restrict__ y, int h, int w, int fh, int fw, int oh, int ow, int nif, int a, int b); +void conv16_unrolled_ptr_5x5_four_coarse(int16_t *__restrict__ W, int16_t *__restrict__ x, int16_t *__restrict__ y, int h, int w, int fh, int fw, int oh, int ow, int nif, int a, int b); +void conv16_gold_four_coarsest(int16_t *__restrict__ W, int16_t *__restrict__ x, int16_t *__restrict__ y, int h, int w, int fh, int fw, int oh, int ow, int nif, int a, int b); +void conv16_unrolled_5x5_four_coarsest(int16_t *__restrict__ W, int16_t *__restrict__ x, int16_t *__restrict__ y, int h, int w, int fh, int fw, int oh, int ow, int nif, int a, int b); +void conv16_unrolled_ptr_5x5_four_coarsest(int16_t *__restrict__ W, int16_t *__restrict__ x, int16_t *__restrict__ y, int h, int w, int fh, int fw, int oh, int ow, int nif, int a, int b); +void conv16_asm_mul_unrolled_5x5_four_coarsest(int16_t *__restrict__ W, int16_t *__restrict__ x, int16_t *__restrict__ y, int h, int w, int fh, int fw, int oh, int ow, int nif, int a, int b); + +void load(); +int check(int16_t *y); +int checksum(int16_t *y); + +int16_t correct_yout[OH*OW] = { + 0x0352, + 0x036c, + 0x0386, + 0x03a0, + 0x03ba, + 0x03d4, + 0x03ee, + 0x0408, + 0x0422, + 0x043c, + 0x0456, + 0x0470, + 0x04ee, + 0x0508, + 0x0522, + 0x053c, + 0x0556, + 0x0570, + 0x058a, + 0x05a4, + 0x05be, + 0x05d8, + 0x05f2, + 0x060c, + 0x068a, + 0x06a4, + 0x06be, + 0x06d8, + 0x06f2, + 0x070c, + 0x0726, + 0x0740, + 0x075a, + 0x0774, + 0x078e, + 0x07a8, + 0x0826, + 0x0840, + 0x085a, + 0x0874, + 0x088e, + 0x08a8, + 0x08c2, + 0x08dc, + 0x08f6, + 0x0910, + 0x092a, + 0x0944, + 0x09c2, + 0x09dc, + 0x09f6, + 0x0a10, + 0x0a2a, + 0x0a44, + 0x0a5e, + 0x0a78, + 0x0a92, + 0x0aac, + 0x0ac6, + 0x0ae0, + 0x0b5e, + 0x0b78, + 0x0b92, + 0x0bac, + 0x0bc6, + 0x0be0, + 0x0bfa, + 0x0c14, + 0x0c2e, + 0x0c48, + 0x0c62, + 0x0c7c, + 0x0cfa, + 0x0d14, + 0x0d2e, + 0x0d48, + 0x0d62, + 0x0d7c, + 0x0d96, + 0x0db0, + 0x0dca, + 0x0de4, + 0x0dfe, + 0x0e18, + 0x0e96, + 0x0eb0, + 0x0eca, + 0x0ee4, + 0x0efe, + 0x0f18, + 0x0f32, + 0x0f4c, + 0x0f66, + 0x0f80, + 0x0f9a, + 0x0fb4, + 0x1032, + 0x104c, + 0x1066, + 0x1080, + 0x109a, + 0x10b4, + 0x10ce, + 0x10e8, + 0x1102, + 0x111c, + 0x1136, + 0x1150, + 0x11ce, + 0x11e8, + 0x1202, + 0x121c, + 0x1236, + 0x1250, + 0x126a, + 0x1284, + 0x129e, + 0x12b8, + 0x12d2, + 0x12ec, + 0x136a, + 0x1384, + 0x139e, + 0x13b8, + 0x13d2, + 0x13ec, + 0x1406, + 0x1420, + 0x143a, + 0x1454, + 0x146e, + 0x1488, + 0x1506, + 0x1520, + 0x153a, + 0x1554, + 0x156e, + 0x1588, + 0x15a2, + 0x15bc, + 0x15d6, + 0x15f0, + 0x160a, + 0x1624, +}; + +#endif diff --git a/reliability_tests/icache_fi_conv16/icache_conv16.c b/reliability_tests/icache_fi_conv16/icache_conv16.c new file mode 100644 index 0000000..e62c440 --- /dev/null +++ b/reliability_tests/icache_fi_conv16/icache_conv16.c @@ -0,0 +1,935 @@ +/* + * Copyright (C) 2018 ETH Zurich and University of Bologna + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* + * Mantainer: Luca Valente, luca.valente2@unibo.it + */ +/****************************************************************************** + * * + * Multitherman Lab @ DEI - University of Bologna * + * Viale Risorgimento 2 40136 * + * Bologna - phone 0512092759 * + * * + * Engineer: Francesco Conti - f.conti@unibo.it * + * * + * Project: CConvNet * + * File: conv16.c * + * Description: 16-bit fixed point convolution test * + * * + ******************************************************************************/ + +#include +#include +#include "conv16.h" + +__attribute__((section(".heapsram"))) int16_t g_W[FH*FW]; +__attribute__((section(".heapsram"))) int16_t g_x[IH*IW]; +__attribute__((section(".heapsram"))) int16_t g_y[OH*OW]; +__attribute__((section(".heapsram"))) int16_t g_y_in[OH*OW]; + +int main() { + + if (rt_cluster_id() != 0) + return bench_cluster_forward(0); + + int errors = 0; + int sum = 0; + + // single-threaded "golden" by-the-book convolution + errors += test_singlethread(&conv16_gold, "sequential convolution"); + + // single-threaded loop-unrolled convolution + errors += test_singlethread(&conv16_unrolled_5x5, "sequential loop-unrolled convolution"); + + // single-threaded loop-unrolled pointer-optimized convolution + errors += test_singlethread(&conv16_unrolled_ptr_5x5, "sequential loop-unrolled pointer-optimized convolution"); + + // multi-threaded by-the-book convolution (1 thread per output pixel) + errors += test_multithread(&conv16_gold_four_coarse, "4-threaded convolution (1 thread per output pixel)"); + + // multi-threaded loop-unrolled convolution (1 thread per output pixel) + errors += test_multithread(&conv16_unrolled_5x5_four_coarse, "4-threaded loop-unrolled convolution (1 thread per output pixel)"); + + // multi-threaded loop-unrolled pointer-optimized convolution (1 thread per output pixel) + errors += test_multithread(&conv16_unrolled_ptr_5x5_four_coarse, "4-threaded loop-unrolled pointer-optimized convolution (1 thread per output pixel)"); + + // multi-threaded by-the-book convolution (1 thread per output row) + errors += test_multithread(&conv16_gold_four_coarsest, "4-threaded convolution (1 thread per output row)"); + + // multi-threaded loop-unrolled convolution (1 thread per output row) + errors += test_multithread(&conv16_unrolled_5x5_four_coarsest, "4-threaded loop-unrolled convolution (1 thread per output row)"); + + // multi-threaded loop-unrolled pointer-optimized convolution (1 thread per output row) + errors += test_multithread(&conv16_unrolled_ptr_5x5_four_coarsest, "4-threaded loop-unrolled pointer-optimized convolution (1 thread per output row)"); + + synch_barrier(); + + // TODO readout icache errors + + return errors; +} + +int test_singlethread(void (*test)(int16_t *, int16_t *, int16_t *, int, int, int, int, int, int, int, int, int), char *str) { + int errors = 0; + int sum = 0; + + synch_barrier(); + + if(rt_core_id() == 0) { + load(); + + reset_timer(rt_cluster_id()); + start_timer(rt_cluster_id()); + test(g_W, g_x, g_y, IH, IW, FH, FW, OH, OW, 1, 0, 0); + stop_timer(rt_cluster_id()); + + #ifdef CHECK_CHECKSUM + errors = 0; + sum = checksum(g_y); + if(sum != RIGHT_CHECKSUM) { + #ifndef PULP_SPI + printf("wrong checksum, 0x%08x instead of 0x%08x\n", sum, RIGHT_CHECKSUM); + #ifndef CHECK_ERROR + errors += 1; + #endif + #endif + #ifdef CHECK_ERROR + errors = check(g_y); + #endif + } + #else + errors = -1; + #endif + + #ifndef PULP_SPI + printf("%s, errors=%d, time=%d\n", str, errors, get_time(rt_cluster_id())); + #endif + + } + + return errors; +} + +int test_multithread(void (*test)(int16_t *, int16_t *, int16_t *, int, int, int, int, int, int, int, int, int), char *str) { + int errors = 0; + int sum = 0; + + if(rt_core_id() == 0) { + load(); + } + + synch_barrier(); + + if(rt_core_id() == 0) { + reset_timer(rt_cluster_id()); + start_timer(rt_cluster_id()); + } + test(g_W, g_x, g_y, IH, IW, FH, FW, OH, OW, 1, 0, 0); + if(rt_core_id() == 0) { + stop_timer(rt_cluster_id()); + + #ifdef CHECK_CHECKSUM + errors = 0; + sum = checksum(g_y); + if(sum != RIGHT_CHECKSUM) { + #ifndef PULP_SPI + printf("wrong checksum, 0x%08x instead of 0x%08x\n", sum, RIGHT_CHECKSUM); + #ifndef CHECK_ERROR + errors += 1; + #endif + #endif + #ifdef CHECK_ERROR + errors = check(g_y); + #endif + } + #else + errors = -1; + #endif + + #ifndef PULP_SPI + printf("%s, errors=%d, time=%d\n", str, errors, get_time(rt_cluster_id())); + #endif + + } + + return errors; +} + +void conv16_gold(int16_t *__restrict__ W, int16_t *__restrict__ x, int16_t *__restrict__ y, int h, int w, int fh, int fw, int oh, int ow, int nif, int a, int b) { + int i; + for (i=0; i> QF)); + #endif + } + } +} + +void conv16_unrolled_5x5(int16_t *__restrict__ W, int16_t *__restrict__ x, int16_t *__restrict__ y, int h, int w, int fh, int fw, int oh, int ow, int nif, int a, int b) { + int i; + for (i=0; i> QF); + + #endif + + } + } +} + +void conv16_unrolled_ptr_5x5(int16_t *__restrict__ W, int16_t *__restrict__ x, int16_t *__restrict__ y, int h, int w, int fh, int fw, int oh, int ow, int nif, int a, int b) { + register int i; + register int j; + + int16_t *y_ptr = y + a*oh*ow; + int16_t *x_base = x + b*h*w + (fh-1)*w + (fw-1); + int16_t *W_base = &W[((a*nif)+b)*fh*fw]; + int16_t *W_ptr; + int16_t *x_ptr; + + for (i=0; i> QF; + + #endif + + } + } + +} + +void conv16_gold_four_coarse(int16_t *__restrict__ W, int16_t *__restrict__ x, int16_t *__restrict__ y, int h, int w, int fh, int fw, int oh, int ow, int nif, int a, int b) { + int i; + register int myid = rt_core_id(); + register int num_cores = get_core_num(); + // synch_barrier(); + for (i=0; i> QF)); + #endif + } + } + synch_barrier(); +} + +void conv16_gold_four_coarsest(int16_t *__restrict__ W, int16_t *__restrict__ x, int16_t *__restrict__ y, int h, int w, int fh, int fw, int oh, int ow, int nif, int a, int b) { + int i; + register int myid = rt_core_id(); + register int num_cores = get_core_num(); + // synch_barrier(); + for (i=myid; i> QF)); + #endif + } + } + synch_barrier(); +} + +void conv16_unrolled_5x5_four_coarse(int16_t *__restrict__ W, int16_t *__restrict__ x, int16_t *__restrict__ y, int h, int w, int fh, int fw, int oh, int ow, int nif, int a, int b) { + int i; + register int myid = rt_core_id(); + register int num_cores = get_core_num(); + // synch_barrier(); + for (i=0; i> QF); // because i'm using 32-bit int + + #endif + + } + } + synch_barrier(); +} + +void conv16_unrolled_5x5_four_coarsest(int16_t *__restrict__ W, int16_t *__restrict__ x, int16_t *__restrict__ y, int h, int w, int fh, int fw, int oh, int ow, int nif, int a, int b) { + int i; + register int myid = rt_core_id(); + register int num_cores = get_core_num(); + // synch_barrier(); + for (i=myid; i> QF); // because i'm using 32-bit int + + #endif + + } + } + synch_barrier(); +} + +void conv16_unrolled_ptr_5x5_four_coarse(int16_t *__restrict__ W, int16_t *__restrict__ x, int16_t *__restrict__ y, int h, int w, int fh, int fw, int oh, int ow, int nif, int a, int b) { + register int i; + register int j; + register int myid = rt_core_id(); + register int num_cores = get_core_num(); + int16_t *W_ptr; + int16_t *x_ptr; + int16_t *y_ptr = y + a*oh*ow; + int16_t *x_base = x + b*h*w + (fh-1)*w + (fw-1); + int16_t *W_base = &W[((a*nif)+b)*fh*fw]; + + // synch_barrier(); + + for (i=0; i> QF; + + #endif + + } + } + + synch_barrier(); +} + +void conv16_unrolled_ptr_5x5_four_coarsest(int16_t *__restrict__ W, int16_t *__restrict__ x, int16_t *__restrict__ y, int h, int w, int fh, int fw, int oh, int ow, int nif, int a, int b) { + // register int i; + // register int j; + // register int myid = rt_core_id(); + // int16_t *W_ptr; + // int16_t *x_ptr; + int16_t *y_ptr = y + a*oh*ow; + int16_t *x_base = x + b*h*w + (fh-1)*w + (fw-1); + int16_t *W_base = &W[((a*nif)+b)*fh*fw]; + + register int myid = rt_core_id(); + register int num_cores = get_core_num(); + + register int i; + register int j; + int16_t *W_ptr; + int16_t *x_ptr; + + for (i=myid; i> QF; + + #endif + + } + } + + synch_barrier(); + +} + +#ifndef __GCC__ +#ifndef __riscv__ +void conv16_asm_mul_unrolled_5x5_four_coarsest(int16_t *__restrict__ W, int16_t *__restrict__ x, int16_t *__restrict__ y, int h, int w, int fh, int fw, int oh, int ow, int nif, int a, int b) { + register int i; + register int j; + register int myid = rt_core_id(); + register int num_cores = get_core_num(); + register int16_t *W_ptr; + register int16_t *x_ptr; + int16_t *y_ptr = y + a*oh*ow; + int16_t *x_base = x + b*h*w + (fh-1)*w + (fw-1); + int16_t *W_base = &W[((a*nif)+b)*fh*fw]; + for (i=myid; i