aboutsummaryrefslogtreecommitdiff
path: root/triscv/src/tmb.c
blob: 3f6c0379742d4a0af1909faf244f88d4df31e72b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
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;
}