sim: arith. fixes, optimized mem access
[calu.git] / 3b_sim / cdat.hpp
index 39ea074a4e251a420d162a220c740369fef4c4c2..b5d212b152f9a66fa8c61bc55194b55e1beb0a05 100644 (file)
@@ -7,7 +7,9 @@
 typedef __UINT32_TYPE__ CDat;
 typedef __UINT64_TYPE__ CDatd;
 
-#define BIT_LEN 32
-static_assert(sizeof(CDat) == 4, "The size of the datatype for int is NOT 4 bytes (32 Bit!)");
-static_assert(sizeof(CDatd) > 4, "The size of the datatype for double int is NOT bigger than 4 bytes (32 Bit!)");
+#define BYTE_COUNT 4
+
+#define BIT_LEN (BYTE_COUNT * 8)
+static_assert(sizeof(CDat) == BYTE_COUNT, "The size of the datatype for int is NOT 4 bytes (32 Bit!)");
+static_assert(sizeof(CDatd) > BYTE_COUNT, "The size of the datatype for double int is NOT bigger than 4 bytes (32 Bit!)");
 #endif