aboutsummaryrefslogtreecommitdiff
path: root/riscv/processor.h
AgeCommit message (Collapse)AuthorFilesLines
2021-10-06Make vxsat into its own classScott Johnson1-2/+3
Since its rules will need to be different than other vector CSRs (coming next). No functional change intended.
2021-09-29Convert vtype to csr_tScott Johnson1-3/+3
Adds commit log events for vtype to many vector instructions.
2021-09-29Convert vl to csr_tScott Johnson1-3/+3
Adds commit log events for vl to many vector instructions.
2021-09-29Convert vxrm to csr_tScott Johnson1-4/+4
2021-09-29Convert vstart to csr_tScott Johnson1-3/+3
Adds commit log events for vstart to many vector instructions.
2021-09-29Convert vxsat to csr_tScott Johnson1-2/+3
Adds commit log events for vxsat to many vector instructions.
2021-09-29Initialize vectorUnit_t attributes to avoid Valgrind warningsScott Johnson1-2/+20
2021-09-28Convert sentropy to csr_tScott Johnson1-2/+2
2021-09-27Convert frm & fflags to csr_tScott Johnson1-2/+2
Adds proper logging of fflags on FP arithmetic ops.
2021-09-26Convert dcsr to csr_tScott Johnson1-1/+1
2021-09-26Move dcsr_t definition to csrs.hScott Johnson1-12/+0
In prep for its conversion to csr_t.
2021-09-26Convert dpc to csr_tScott Johnson1-1/+1
2021-09-26Convert dscratch0/1 to csr_tScott Johnson1-1/+0
2021-09-26Convert tdata2 to csr_tScott Johnson1-2/+2
2021-09-26Extract variable for repeated tdata2 lookupsScott Johnson1-9/+10
2021-09-26Convert tselect to csr_tScott Johnson1-1/+1
2021-09-25Convert hgatp to csr_tScott Johnson1-1/+1
2021-09-25Convert hideleg to csr_tScott Johnson1-1/+1
2021-09-25Convert hedeleg to csr_tScott Johnson1-1/+1
2021-09-25Convert htinst to csr_tScott Johnson1-1/+1
2021-09-25Convert htval to csr_tScott Johnson1-1/+1
2021-09-25Convert mtinst to csr_tScott Johnson1-1/+1
2021-09-25Convert mtval2 to csr_tScott Johnson1-1/+1
2021-09-25Merge pull request #804 from scottj97/minstretAndrew Waterman1-1/+1
Convert minstret and friends to new CSR format
2021-09-17Don't use "using"Andrew Waterman1-4/+1
2021-09-17Use RIAA pattern in manipulating ostream flagsAndrew Waterman1-2/+2
sout is renamed to sout_ to reduce likelihood programmers accidentally use it.
2021-09-16Convert minstret to csr_tScott Johnson1-1/+1
This is a little messy in RV32 since it's accessed via two different CSRs (upper and lower halves). This changes logging of mcycle[h] to log a change to minstret[h], since that's how it's always been implemented in Spike. There is no separate mcycle register.
2021-09-09Splitted K-ext to zedsMark Fedorov1-0/+9
2021-09-08Move satp methods into satp classesScott Johnson1-2/+0
2021-09-08Use virtualized_csr_t for satp and vsatpScott Johnson1-4/+4
This was much more complicated than the others because of the mstatus.TVM and hstatus.VTVM bits, and because of the special WARL-ness of satp that doesn't apply to vsatp. It appears (based on reading the code) that the commitlog for these two was problematic. CSRW to satp when V=1 was reporting a write to satp instead of vsatp which was actually written. Also a CSRW to vsatp looks like it was not being logged at all. Both problems should be fixed now.
2021-09-08Convert hcounteren to csr_tScott Johnson1-1/+1
2021-09-08Convert scounteren to csr_tScott Johnson1-1/+1
2021-09-08Convert mcounteren to csr_tScott Johnson1-1/+1
2021-09-08Remove nonvirtual_sstatus from processor_t classScott Johnson1-1/+0
Since it's no longer needed there.
2021-09-08Declare mip/mie to use customized classesScott Johnson1-2/+2
Because I plan to make these two have slightly different APIs next.
2021-09-08Convert hstatus to csr_t familyScott Johnson1-1/+1
2021-09-08Convert medeleg to csr_t familyScott Johnson1-1/+1
2021-09-08Convert mideleg to csr_t familyScott Johnson1-1/+1
2021-09-08Convert mie to csr_t familyScott Johnson1-2/+2
This changes the commitlog of `csrw sie` so that it only logs a change to `mie`, instead of both `mie` and `sie`. This is arguably preferable, since there is no real `sie` register -- it is only a view into `mie`. It also adds proper tracing of the modification to `mie` when doing `csrw` to `hie` and `vsie`, which were both missing previously.
2021-09-08Rename class which I will share with mie soonScott Johnson1-1/+1
2021-09-08Move dirtying logic into sstatus_csr_tScott Johnson1-3/+1
2021-09-08Convert mip to csr_t familyScott Johnson1-2/+2
This changes the commitlog of `csrw sip` so that it only logs a change to `mip`, instead of both `mip` and `sip`. This is arguably preferable, since there is no real `sip` register -- it is only a view into `mip`. It also adds proper tracing of the modification to `mip` when doing `csrw` to `hip`, `hvip`, and `vsip`, which were all missing previously.
2021-09-08Add extension_enabled_const() methodScott Johnson1-0/+9
This will enable upcoming optimizations that make assumptions about which bits in misa are writable, without those assumptions making the code brittle. I.e. if those assumptions should ever change, the code will immediately fail and alert the maintainer of the violated assumption.
2021-09-08Rename supports_extension() to extension_enabled()Scott Johnson1-6/+6
Because this checks the dynamic run-time state of misa, let's use the same language as the misa spec (enabled vs disabled). Calling it supports_extension() could be confused for a check of the static configuration of Spike (i.e. the --isa string), which it was not.
2021-09-08Finish conversion of misa to csr_tScott Johnson1-2/+2
2021-09-08Add get_const_xlen() as a way to document assumptions of unchanging xlenScott Johnson1-0/+6
Spike does not support dynamic xlen today, but if it should in the future, this will help identify all the code that needs to be updated.
2021-09-08Convert sstatus to virtualized_csr_tScott Johnson1-1/+1
Step 5 of plan in csrs.h. This changes the commitlog to properly report when the architectural `vsstatus` register is written, e.g. by `csrw sstatus` in VS-mode.
2021-09-08Convert mstatus into csr_t familyScott Johnson1-1/+1
Step 3 of plan described in csrs.h.
2021-09-08Add new method any_custom_extensions()Scott Johnson1-0/+3
Needed by the next commit which won't be able to access private custom_extensions.
2021-09-08Start to convert sstatus to csr_t familyScott Johnson1-0/+2
See plan in csrs.h. This adds mstatus.FS dirty writes to the commit log, which were previously missing.