ParaNut SystemC Model
A SystemC Model of the ParaNut architecture
Macros | Enumerations
csr.h File Reference
#include "paranut-peripheral.h"
#include "base.h"
#include "paranut-config.h"
#include "exu_csr.h"
Include dependency graph for csr.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define CYCLEREG_LOW   (csr_mcycle.read () (31, 0))
 
#define CYCLEREG_HIGH   (csr_mcycle.read () (63, 32))
 
#define PERFREGS(COUNTER)   csr_mhpmcounter[COUNTER].read ()
 

Enumerations

enum  ECSRFunc { CSRRW = 1 , CSRRS , CSRRC }
 
enum  ECSR {
  mvendorid = 0xF11 , marchid , mimpid , mhartid ,
  mstatus = 0x300 , misa , medeleg , mideleg ,
  mie , mtvec , mscratch = 0x340 , mepc ,
  mcause , mtval , mip , mcycle = 0xB00 ,
  minstret = 0xB02 , mhpmcounter3 , mhpmcounter4 , mhpmcounter5 ,
  mhpmcounter6 , mhpmcounter7 , mhpmcounter8 , mhpmcounter31 = 0xB1F ,
  mcycleh = 0xB80 , minstreth = 0xB82 , mhpmcounter3h , mhpmcounter4h ,
  mhpmcounter5h , mhpmcounter6h , mhpmcounter7h , mhpmcounter8h ,
  mhpmcounter31h = 0xB9F , mhpmevent3 = 0x323 , mhpmevent31 = 0x33F , sstatus = 0x100 ,
  sedeleg = 0x102 , sideleg , sie , stvec ,
  scounteren , sscratch = 0x140 , sepc , scause ,
  stval , sip , satp = 0x180 , ustatus = 0x000 ,
  uie = 0x004 , utvec , uscratch = 0x040 , uepc ,
  ucause , utval , uip , ucycle = 0xC00 ,
  utime , uinstret , uhpmcounter3 , uhpmcounter4 ,
  uhpmcounter5 , uhpmcounter6 , uhpmcounter7 , uhpmcounter8 ,
  uhpmcounter9 , uhpmcounter10 , uhpmcounter11 , uhpmcounter12 ,
  uhpmcounter13 , uhpmcounter14 , uhpmcounter15 , uhpmcounter16 ,
  uhpmcounter17 , uhpmcounter18 , uhpmcounter19 , uhpmcounter20 ,
  uhpmcounter21 , uhpmcounter22 , uhpmcounter23 , uhpmcounter24 ,
  uhpmcounter25 , uhpmcounter26 , uhpmcounter27 , uhpmcounter28 ,
  uhpmcounter29 , uhpmcounter30 , uhpmcounter31 , ucycleh ,
  utimeh , uinstreth , uhpmcounter3h , uhpmcounter4h ,
  uhpmcounter5h , uhpmcounter6h , uhpmcounter7h , uhpmcounter8h ,
  uhpmcounter9h , uhpmcounter10h , uhpmcounter11h , uhpmcounter12h ,
  uhpmcounter13h , uhpmcounter14h , uhpmcounter15h , uhpmcounter16h ,
  uhpmcounter17h , uhpmcounter18h , uhpmcounter19h , uhpmcounter20h ,
  uhpmcounter21h , uhpmcounter22h , uhpmcounter23h , uhpmcounter24h ,
  uhpmcounter25h , uhpmcounter26h , uhpmcounter27h , uhpmcounter28h ,
  uhpmcounter29h , uhpmcounter30h , uhpmcounter31h , dcsr = 0x7b0 ,
  dpc , dscratch0 , tselect = 0x7a0 , pncache = 0x7C0 ,
  pngrpsel = 0x8C0 , pnce , pnlm , pnxsel ,
  pnm2cp = 0xFC0 , pnx , pncacheinfo = 0xFC4 , pncachesets ,
  pnclockinfo , pnmemsize , pnece , pntimebase ,
  pncpus = 0xCD0 , pncoreid = 0xCD4 , pnepc = 0x841 , pncause = 0x842
}
 

Macro Definition Documentation

◆ CYCLEREG_HIGH

#define CYCLEREG_HIGH   (csr_mcycle.read () (63, 32))

◆ CYCLEREG_LOW

#define CYCLEREG_LOW   (csr_mcycle.read () (31, 0))

◆ PERFREGS

#define PERFREGS (   COUNTER)    csr_mhpmcounter[COUNTER].read ()

Enumeration Type Documentation

◆ ECSR

enum ECSR
Enumerator
mvendorid 
marchid 
mimpid 
mhartid 
mstatus 
misa 
medeleg 
mideleg 
mie 
mtvec 
mscratch 
mepc 
mcause 
mtval 
mip 
mcycle 
minstret 
mhpmcounter3 
mhpmcounter4 
mhpmcounter5 
mhpmcounter6 
mhpmcounter7 
mhpmcounter8 
mhpmcounter31 
mcycleh 
minstreth 
mhpmcounter3h 
mhpmcounter4h 
mhpmcounter5h 
mhpmcounter6h 
mhpmcounter7h 
mhpmcounter8h 
mhpmcounter31h 
mhpmevent3 
mhpmevent31 
sstatus 
sedeleg 
sideleg 
sie 
stvec 
scounteren 
sscratch 
sepc 
scause 
stval 
sip 
satp 
ustatus 
uie 
utvec 
uscratch 
uepc 
ucause 
utval 
uip 
ucycle 
utime 
uinstret 
uhpmcounter3 
uhpmcounter4 
uhpmcounter5 
uhpmcounter6 
uhpmcounter7 
uhpmcounter8 
uhpmcounter9 
uhpmcounter10 
uhpmcounter11 
uhpmcounter12 
uhpmcounter13 
uhpmcounter14 
uhpmcounter15 
uhpmcounter16 
uhpmcounter17 
uhpmcounter18 
uhpmcounter19 
uhpmcounter20 
uhpmcounter21 
uhpmcounter22 
uhpmcounter23 
uhpmcounter24 
uhpmcounter25 
uhpmcounter26 
uhpmcounter27 
uhpmcounter28 
uhpmcounter29 
uhpmcounter30 
uhpmcounter31 
ucycleh 
utimeh 
uinstreth 
uhpmcounter3h 
uhpmcounter4h 
uhpmcounter5h 
uhpmcounter6h 
uhpmcounter7h 
uhpmcounter8h 
uhpmcounter9h 
uhpmcounter10h 
uhpmcounter11h 
uhpmcounter12h 
uhpmcounter13h 
uhpmcounter14h 
uhpmcounter15h 
uhpmcounter16h 
uhpmcounter17h 
uhpmcounter18h 
uhpmcounter19h 
uhpmcounter20h 
uhpmcounter21h 
uhpmcounter22h 
uhpmcounter23h 
uhpmcounter24h 
uhpmcounter25h 
uhpmcounter26h 
uhpmcounter27h 
uhpmcounter28h 
uhpmcounter29h 
uhpmcounter30h 
uhpmcounter31h 
dcsr 
dpc 
dscratch0 
tselect 
pncache 
pngrpsel 
pnce 
pnlm 
pnxsel 
pnm2cp 
pnx 
pncacheinfo 
pncachesets 
pnclockinfo 
pnmemsize 
pnece 
pntimebase 
pncpus 
pncoreid 
pnepc 
pncause 

◆ ECSRFunc

enum ECSRFunc
Enumerator
CSRRW 
CSRRS 
CSRRC