mmserv

Minimum Mean Square Error detection on RISC-V Vector Extention
git clone https://git.ea.contact/mmserv
Log | Files | Refs | README

commit d25ea3f9e506196c8bec6da133c54844835faafb
parent 10633fb7052c199286994a5580317e064b582c21
Author: Egor Achkasov <eaachkasov@edu.hse.ru>
Date:   Fri, 10 Jan 2025 12:08:15 +0100

Post-merge fixes

Diffstat:
Mmain.c | 22+---------------------
Msrc/mmserv.c | 28++++++----------------------
2 files changed, 7 insertions(+), 43 deletions(-)

diff --git a/main.c b/main.c @@ -1,26 +1,6 @@ #include "include/mmserv.h" -#include <stdio.h> /* for printf */ - -/* Import a binary file */ -#define IMPORT_BIN(sect, file, sym) asm (\ - ".section " #sect "\n" /* Change section */\ - ".balign 4\n" /* Word alignment */\ - ".global " #sym "\n" /* Export the object address */\ - #sym ":\n" /* Define the object label */\ - ".incbin \"" file "\"\n" /* Import the file */\ - ".balign 4\n" /* Word alignment */\ - ".section \".text\"\n") /* Restore section */ - -/* Import the data */ -IMPORT_BIN(".rodata", "data/x_re.bin", x_re); -IMPORT_BIN(".rodata", "data/x_im.bin", x_im); -IMPORT_BIN(".rodata", "data/H_re.bin", H_re); -IMPORT_BIN(".rodata", "data/H_im.bin", H_im); -IMPORT_BIN(".rodata", "data/R_re.bin", R_re); -IMPORT_BIN(".rodata", "data/R_im.bin", R_im); -IMPORT_BIN(".rodata", "data/y_re.bin", y_re); -IMPORT_BIN(".rodata", "data/y_im.bin", y_im); +#include "../common/printf.h" /* Transmitted signal */ extern data_t x_re[NUM_TX_ANT][NUM_SC]; diff --git a/src/mmserv.c b/src/mmserv.c @@ -1,30 +1,14 @@ #include "../include/mmserv.h" +#include "../../common/rivec/vector_defines.h" +#include "riscv_vector.h" + #include <stddef.h> /* for size_t */ #ifdef DEBUG -#include <stdint.h> /* for uint64_t */ -#include <stdio.h> /* for printf */ - -#ifdef _WIN32 -#include <intrin.h> -#else -#include <x86intrin.h> -#endif - -static uint64_t start = 0, end = 0; -void start_timer() -{ - start = __rdtsc(); -} -void stop_timer() -{ - end = __rdtsc(); -} -unsigned long long get_timer() -{ - return end - start; -} +#include "../../common/runtime.h" +#include "../../common/util.h" +#include "printf.h" #define TIME(msg, func, ...) \ start_timer(); \