diff options
| author | Kimplul <kimi.h.kuparinen@gmail.com> | 2023-10-28 00:00:21 +0300 |
|---|---|---|
| committer | Kimplul <kimi.h.kuparinen@gmail.com> | 2023-10-28 00:00:21 +0300 |
| commit | d96b8c7d12fc61ec609d6138627b9d6d18139a9a (patch) | |
| tree | 82bc9a4c2b22de6c021097fb79a57b6d7756a127 /triscv/src/tmb.c | |
| download | tri-d96b8c7d12fc61ec609d6138627b9d6d18139a9a.tar.gz tri-d96b8c7d12fc61ec609d6138627b9d6d18139a9a.zip | |
move to monorepo
+ Will probably have to make some changes to dir layout to make things
make more sense
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; +} |
