From 1042295e5f24f4879b7a7eaaa2be4e73a0ba86b1 Mon Sep 17 00:00:00 2001 From: EDiasAlberto Date: Tue, 15 Oct 2024 14:57:37 +0100 Subject: [PATCH] define fixed point arithmetic constants --- .idea/.gitignore | 8 +++ .idea/editor.xml | 103 ++++++++++++++++++++++++++++++++++++++ .idea/misc.xml | 18 +++++++ .idea/vcs.xml | 6 +++ src/threads/fixed-point.h | 9 ++++ 5 files changed, 144 insertions(+) create mode 100644 .idea/.gitignore create mode 100644 .idea/editor.xml create mode 100644 .idea/misc.xml create mode 100644 .idea/vcs.xml create mode 100644 src/threads/fixed-point.h diff --git a/.idea/.gitignore b/.idea/.gitignore new file mode 100644 index 0000000..13566b8 --- /dev/null +++ b/.idea/.gitignore @@ -0,0 +1,8 @@ +# Default ignored files +/shelf/ +/workspace.xml +# Editor-based HTTP Client requests +/httpRequests/ +# Datasource local storage ignored files +/dataSources/ +/dataSources.local.xml diff --git a/.idea/editor.xml b/.idea/editor.xml new file mode 100644 index 0000000..855412d --- /dev/null +++ b/.idea/editor.xml @@ -0,0 +1,103 @@ + + + + + \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml new file mode 100644 index 0000000..53624c9 --- /dev/null +++ b/.idea/misc.xml @@ -0,0 +1,18 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 0000000..35eb1dd --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/src/threads/fixed-point.h b/src/threads/fixed-point.h new file mode 100644 index 0000000..1eb44b3 --- /dev/null +++ b/src/threads/fixed-point.h @@ -0,0 +1,9 @@ +#ifndef FIXED_POINT_H +#define FIXED_POINT_H + +/* Fixed Point Arithmetic bit count constants */ +#define NUM_INT_BITS 11 +#define NUM_FRAC_BITS 20 +#define CONVERSION_CONST 1048576 /* f = 2^q, (2^20) */ + +#endif //FIXED_POINT_H