diff options
Diffstat (limited to 'src/config.h')
| -rw-r--r-- | src/config.h | 74 |
1 files changed, 74 insertions, 0 deletions
diff --git a/src/config.h b/src/config.h new file mode 100644 index 0000000..5bc9557 --- /dev/null +++ b/src/config.h | |||
| @@ -0,0 +1,74 @@ | |||
| 1 | #ifndef INCLUDED_CONFIG_H | ||
| 2 | #define INCLUDED_CONFIG_H | ||
| 3 | |||
| 4 | #include <stdint.h> | ||
| 5 | |||
| 6 | #define INITIAL_SCREEN_WIDTH 500 | ||
| 7 | #define INITIAL_SCREEN_HEIGHT 500 | ||
| 8 | #define WINDOW_NAME "MERSI/MESIF LRU vizualization" | ||
| 9 | |||
| 10 | #define CPU_COUNT 4 | ||
| 11 | #define CACHE_COUNT CPU_COUNT | ||
| 12 | #define MEMORY_SIZE 16 | ||
| 13 | #define CACHE_LINE_SIZE 1 | ||
| 14 | #define CACHE_LINE_COUNT 4 | ||
| 15 | #define CACHE_ASSOCIATIVITY 2 | ||
| 16 | #define CACHE_LINES_PER_SET (CACHE_LINE_COUNT/CACHE_ASSOCIATIVITY) | ||
| 17 | |||
| 18 | #define SCREEN_PADDING 25 | ||
| 19 | |||
| 20 | #define BUS_THICKNESS 10 | ||
| 21 | #define BUS_MARGIN 40 | ||
| 22 | #define BUS_SPACING 40 | ||
| 23 | #define BUS_ARROW_SIDE (2*BUS_THICKNESS) | ||
| 24 | #define BUS_ARROW_HEIGHT (BUS_ARROW_SIDE*sqrt (3)/2) | ||
| 25 | |||
| 26 | #define BLOCK_WIDTH 170 | ||
| 27 | #define BLOCK_MARGINH 50 | ||
| 28 | #define BLOCK_MARGINV 50 | ||
| 29 | #define BLOCK_PADDING 4 | ||
| 30 | |||
| 31 | #define TEXT_MARGIN 4 | ||
| 32 | #define TEXT_SPACING 4 | ||
| 33 | #define FONT_SIZE 24 | ||
| 34 | |||
| 35 | #define ENTRY_HEIGHT 20 | ||
| 36 | #define ENTRY_MARGIN 6 | ||
| 37 | |||
| 38 | #define ROUNDNESS 0.05 | ||
| 39 | #define SEGMENTS 16 | ||
| 40 | #define LINE_THICKNESS 2 | ||
| 41 | |||
| 42 | #define TRANSACTIONS_PER_SECOND 2 | ||
| 43 | #define TICKS_PER_TRANSACTION 20 | ||
| 44 | #define TICKS_PER_SECOND (TICKS_PER_TRANSACTION*TRANSACTIONS_PER_SECOND) | ||
| 45 | #define TICK_SECONDS (1./TICKS_PER_SECOND) | ||
| 46 | #define MAX_TIME (60*60) | ||
| 47 | #define MAX_TICKS (MAX_TIME*TICKS_PER_SECOND) | ||
| 48 | |||
| 49 | #define DARKDARKGRAY (Color) { 20, 20, 20, 255 } | ||
| 50 | #define COLOR_DATA RED | ||
| 51 | #define COLOR_ADDR BLUE | ||
| 52 | #define COLOR_SHARED MAGENTA | ||
| 53 | #define THEME_LIGHT 0 | ||
| 54 | #define THEME_DARK 1 | ||
| 55 | #define THEME THEME_LIGHT | ||
| 56 | #if THEME == THEME_DARK | ||
| 57 | #define COLOR_BACKGROUND BLACK | ||
| 58 | #define COLOR_BUS_INACTIVE LIGHTGRAY | ||
| 59 | #define COLOR_BLOCK BLACK | ||
| 60 | #define COLOR_BLOCK_EDGE WHITE | ||
| 61 | #define COLOR_BUTTON DARKDARKGRAY | ||
| 62 | #define COLOR_BUTTON_HOVER COLOR_BACKGROUND | ||
| 63 | #define COLOR_TEXT WHITE | ||
| 64 | #else | ||
| 65 | #define COLOR_BACKGROUND WHITE | ||
| 66 | #define COLOR_BUS_INACTIVE DARKGRAY | ||
| 67 | #define COLOR_BLOCK WHITE | ||
| 68 | #define COLOR_BLOCK_EDGE BLACK | ||
| 69 | #define COLOR_BUTTON LIGHTGRAY | ||
| 70 | #define COLOR_BUTTON_HOVER COLOR_BACKGROUND | ||
| 71 | #define COLOR_TEXT BLACK | ||
| 72 | #endif | ||
| 73 | |||
| 74 | #endif | ||
