diff options
Diffstat (limited to 'triscv/src/tmb.c')
| -rw-r--r-- | triscv/src/tmb.c | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/triscv/src/tmb.c b/triscv/src/tmb.c new file mode 100644 index 0000000..3f6c037 --- /dev/null +++ b/triscv/src/tmb.c @@ -0,0 +1,29 @@ +#include <triscv/tmb.h> + +struct map { + vm_t to; + tri_t val; + size_t width; + bool valid; +}; + +#define TMB_SIZE 3 +struct tmb { + struct map map[TMB_SIZE]; +}; + +struct tmb *tmb_create() +{ + return calloc(1, sizeof(struct tmb)); +} + +void tmb_destroy(struct tmb *tmb) +{ + free(tmb); +} + +size_t tmb_size(struct cpu *cpu) +{ + (void)cpu; + return TMB_SIZE; +} |
