diff --git a/am/src/xs/isa/riscv/cache.c b/am/src/xs/isa/riscv/cache.c index 5c816bea..d02d6ce8 100644 --- a/am/src/xs/isa/riscv/cache.c +++ b/am/src/xs/isa/riscv/cache.c @@ -3,6 +3,19 @@ #include #include +// these functions are interface for cache +// uintptr_t _l1cache_op_read(int op_idx): return value in the cache cop csr +// uintptr_t _l1cache_data_read(int data_idx): return data in the cache data csr +// void _l1cache_op_write(int op_idx, uintptr_t val): set value in the cache cop csr +// void _l1cache_data_write(int data_idx, uintptr_t val): set data in the cache data csr +// when testing, can use these interface in nexus-am/tests/amtest/src/tests/cache.c + +// void _l3cache_tag(int tag): set value of tag in l3chache +// void _l3cache_set(int set): set value of tag in l3chache +// void _l3cache_cmd(int cmd): set value of tag in l3chache +// when testing, can use these interface in nexus-am/tests/dualcoretest/tests/huancunop.c + + uintptr_t _l1cache_op_read(int op_idx) { uintptr_t op; switch(op_idx){ diff --git a/am/src/xs/isa/riscv/pma.c b/am/src/xs/isa/riscv/pma.c index 00ad29ab..8f73de59 100644 --- a/am/src/xs/isa/riscv/pma.c +++ b/am/src/xs/isa/riscv/pma.c @@ -2,11 +2,11 @@ #include #include -// this functions are interface for pma -// _pma_get_addr(int addr_idx): return value in the pmpaddr csr -// _pma_get_cfg(int cfg_idx): return value in the pmpefg csr -// _pma_set_addr(int addr_idx, uintptr_t val): modify value in the pmpaddr csr -// _pma_set_cfg(int cfg_idx, uintptr_t val): modify value in the pmpcfg csr +// these functions are interface for pma +// uintptr_t _pma_get_addr(int addr_idx): return value in the pmpaddr csr +// uintptr_t _pma_get_cfg(int cfg_idx): return value in the pmpefg csr +// void _pma_set_addr(int addr_idx, uintptr_t val): modify value in the pmpaddr csr +// void _pma_set_cfg(int cfg_idx, uintptr_t val): modify value in the pmpcfg csr // when testing pma: // firstly, using _cfg = _pma_get_cfg(cfg_idx), get the value of cfg // secondly, using _cfg = _cfg | PMP_W, or using _cfg = _cfg & ~PMP_W, to set the permission