From 7a7c32e14f7b02f96640ad06ba88787f34838493 Mon Sep 17 00:00:00 2001 From: mbertuletti Date: Thu, 19 Dec 2024 14:03:22 +0100 Subject: [PATCH] [software] Cross-out defines for Banshee Monte-Carlo simulation --- software/apps/baremetal/mimo_mmse_f16/main.c | 26 ------------------- software/apps/baremetal/mimo_mmse_f8/main.c | 27 -------------------- 2 files changed, 53 deletions(-) diff --git a/software/apps/baremetal/mimo_mmse_f16/main.c b/software/apps/baremetal/mimo_mmse_f16/main.c index b1ef24451..dea8a80c7 100644 --- a/software/apps/baremetal/mimo_mmse_f16/main.c +++ b/software/apps/baremetal/mimo_mmse_f16/main.c @@ -89,34 +89,18 @@ __fp16 l1_x[2 * N_TX * N_ITR] int main() { uint32_t core_id = mempool_get_core_id(); -#ifndef BANSHEE uint32_t num_cores = mempool_get_core_count(); mempool_barrier_init(core_id); // Initialize barrier and synchronize uint32_t time_init, time_end; -#endif /* Initialize matrices */ if (core_id == 0) { -#ifdef BANSHEE - for (uint32_t i = 0; i < N_RX * N_TX * N_ITR; i++) { - (*(uint32_t *)&l1_H[2 * i]) = *(uint32_t *)&l2_H[2 * i]; - } - for (uint32_t i = 0; i < N_RX * N_ITR; i++) { - (*(uint32_t *)&l1_y[2 * i]) = *(uint32_t *)&l2_y[2 * i]; - } - for (uint32_t i = 0; i < N_TX * N_ITR; i++) { - (*(uint32_t *)&l1_S[2 * i]) = *(uint32_t *)&l2_S[2 * i]; - } -#else dma_memcpy_blocking(l1_H, l2_H, 2 * N_TX * N_RX * N_ITR * sizeof(int16_t)); dma_memcpy_blocking(l1_y, l2_y, 2 * N_RX * N_ITR * sizeof(int16_t)); dma_memcpy_blocking(l1_S, l2_S, 2 * N_TX * N_ITR * sizeof(int16_t)); -#endif printf("Data transferred\n"); } -#ifndef BANSHEE mempool_barrier(num_cores); -#endif #ifdef SINGLE /* Benchmark */ @@ -194,21 +178,11 @@ int main() { mempool_stop_benchmark(); #endif -#ifdef BANSHEE - // Check the result - if (core_id == 0) { - for (uint32_t i = 0; i < 2 * N_TX * N_ITR; i++) { - uint32_t x = (*(uint32_t *)&l1_x[i]) & 0x0000FFFF; - printf("RES=%04x\n", x); - } - } -#else if (core_id == 0) { printf("Runtime: %d\n", time_end - time_init); } mempool_check_f16(l1_x, l2_x, 2 * N_RX * N_TX, 0.01f, 0); mempool_barrier(num_cores); -#endif return 0; } diff --git a/software/apps/baremetal/mimo_mmse_f8/main.c b/software/apps/baremetal/mimo_mmse_f8/main.c index 006dbf83b..f95f93220 100644 --- a/software/apps/baremetal/mimo_mmse_f8/main.c +++ b/software/apps/baremetal/mimo_mmse_f8/main.c @@ -66,33 +66,17 @@ __fp16 l1_x[2 * N_TX * N_ITR] int main() { uint32_t core_id = mempool_get_core_id(); -#ifndef BANSHEE uint32_t num_cores = mempool_get_core_count(); mempool_barrier_init(core_id); // Initialize barrier and synchronize -#endif /* Initialize matrices */ if (core_id == 0) { -#ifdef BANSHEE - for (uint32_t i = 0; i < 2 * N_RX * N_TX * N_ITR; i++) { - l1_H[i] = l2_H[i]; - } - for (uint32_t i = 0; i < 2 * N_RX * N_ITR; i++) { - l1_y[i] = l2_y[i]; - } - for (uint32_t i = 0; i < 2 * N_TX * N_ITR; i++) { - l1_S[i] = l2_S[i]; - } -#else dma_memcpy_blocking(l1_H, l2_H, 2 * N_TX * N_RX * N_ITR * sizeof(int8_t)); dma_memcpy_blocking(l1_y, l2_y, 2 * N_RX * N_ITR * sizeof(int8_t)); dma_memcpy_blocking(l1_S, l2_S, 2 * N_TX * N_ITR * sizeof(int16_t)); -#endif printf("Data transferred\n"); } -#ifndef BANSHEE mempool_barrier(num_cores); -#endif #ifdef SINGLE /* Benchmark */ @@ -173,20 +157,9 @@ int main() { mempool_stop_benchmark(); #endif -#ifdef BANSHEE - // Check the result - if (core_id == 0) { - for (uint32_t i = 0; i < 2 * N_TX * N_ITR; i++) { - uint32_t x = (*(uint32_t *)&l1_x[i]) & 0x0000FFFF; - printf("RES=%04x\n", x); - } - } -#else if (core_id == 0) { printf("Runtime: %d\n", time_end - time_init); } mempool_barrier(num_cores); -#endif - return 0; }