7 //typedef reg_t sv_reg_t;
8 //typedef sreg_t sv_sreg_t;
10 class sv_mmu_t
: public mmu_t
13 sv_mmu_t(simif_t
* sim
, processor_t
* proc
) : mmu_t(sim
, proc
) {}
15 #define sv_load_func_decl(type) \
16 sv_reg_t load_##type(reg_spec_t const& reg, sv_reg_t const& offs); \
17 sv_reg_t load_##type(reg_t const& addr);
19 // load value from memory at aligned address; zero extend to register width
20 sv_load_func_decl(uint8
)
21 sv_load_func_decl(uint16
)
22 sv_load_func_decl(uint32
)
23 sv_load_func_decl(uint64
)
25 // load value from memory at aligned address; sign extend to register width
26 sv_load_func_decl(int8
)
27 sv_load_func_decl(int16
)
28 sv_load_func_decl(int32
)
29 sv_load_func_decl(int64
)
31 #define sv_store_func_decl(type) \
32 void store_##type(reg_spec_t const& reg, sv_reg_t const& offs, \
34 void store_##type(sv_reg_t const& addr, type##_t val);
36 // store value to memory at aligned address
37 sv_store_func_decl(uint8
)
38 sv_store_func_decl(uint16
)
39 sv_store_func_decl(uint32
)
40 sv_store_func_decl(uint64
)
42 #define sv_amo_func(type) \
43 template<typename _op> \
44 sv_reg_t amo_##type(sv_reg_t const& addr, sv_reg_t const& rhs, _op f) { \
45 type##_t v = mmu_t::amo_##type(addr, rhs, f); \
52 void store_float128(sv_reg_t
const& addr
, float128_t val
);
53 sv_float128_t
load_float128(sv_reg_t
const& addr
);
55 void acquire_load_reservation(sv_reg_t
const& vaddr
);
56 bool check_load_reservation(sv_reg_t
const& vaddr
);