History log of /XiangShan/src/main/scala/xiangshan/backend/fu/wrapper/CSR.scala (Results 1 – 25 of 84)
Revision Date Author Comments
# 8cfc24b2 07-Apr-2025 Tang Haojin <[email protected]>

feat(AIA): integrate ChiselAIA again (#4509)


# 529b1cfd 17-Mar-2025 Tang Haojin <[email protected]>

Revert "feat(AIA): integrate ChiselAIA (#4378)" (#4429)

This reverts commit 7fbc1cb42a2c96ef89a1dfd0f5f885ccada40c26.


# 7fbc1cb4 08-Mar-2025 Tang Haojin <[email protected]>

feat(AIA): integrate ChiselAIA (#4378)


# 8882eb68 21-Feb-2025 Xin Tian <[email protected]>

feat(bitmap/memenc): support memory isolation by bitmap checking and memory encrpty used SM4-XTS (#3980)

- Add bitmap module in MMU for memory isolation
- Add memory encryption module based on AXI p

feat(bitmap/memenc): support memory isolation by bitmap checking and memory encrpty used SM4-XTS (#3980)

- Add bitmap module in MMU for memory isolation
- Add memory encryption module based on AXI protoco
- Can don't using these modules by setting the option `HasMEMencryption`
& `HasBitmapCheck` to false

show more ...


# 075d4937 30-Dec-2024 junxiong-ji <[email protected]>

feat(CSR): allow most CSRR can be out-of-order issued and executed

* Add some comment on rdata in NewCSR.
* Allow CSRR not to block backward instruction.
* Here is **Inorder** CSRR list,
* fflags,

feat(CSR): allow most CSRR can be out-of-order issued and executed

* Add some comment on rdata in NewCSR.
* Allow CSRR not to block backward instruction.
* Here is **Inorder** CSRR list,
* fflags, fcsr,
* vxsat, vcsr, vstart,
* mstatus, sstatus, hstatus, vsstatus, mnstatus,
* dcsr.
* The reason for Inorder CSRR executed is that these CSR will be changed
by Use-Level instruction without any fence, and executing OoO would
get wrong result.
* Since there must be FENCE before reading any PMC CSRs, there is no
need to let reading PMC CSRs inorder.

show more ...


# 6520f4f4 22-Jan-2025 Tang Haojin <[email protected]>

feat(Zawrs): support Zawrs extension (#4211)

This commit implements a basic nop-based Zawrs extension.

- `wrs.sto` in this commit acts as a nop instruction.
- `wrs.nto` in this commit acts as a nop

feat(Zawrs): support Zawrs extension (#4211)

This commit implements a basic nop-based Zawrs extension.

- `wrs.sto` in this commit acts as a nop instruction.
- `wrs.nto` in this commit acts as a nop instruction, except it:
- raises illegal instruction exception when !isModeM && mstatus.TW=1, or
- raises virtual instruction exception when privState.V && mstatus.TW=0
&& hstatus.VTW=1

Seems that completely raises no exception is also a valid
implementation,
but raises an exception can help OS to do scheduling during waiting.

Also, like WFI, interrupts cannot take on wrs instructions.

show more ...


# 881e32f5 22-Jan-2025 Zifei Zhang <[email protected]>

submodule(CoupledL2, OpenLLC): bump L2 and LLC (#4189)

This pull request includes:
- add compilation support for CHI Issue C (but not yet verified)
- enable DataCheck and Poison
- add requirement fo

submodule(CoupledL2, OpenLLC): bump L2 and LLC (#4189)

This pull request includes:
- add compilation support for CHI Issue C (but not yet verified)
- enable DataCheck and Poison
- add requirement for CHI port width check
- add prefetch control by custom csr
- optimize timing in CoupledL2, mainly paths from SRAM to ICG
- add clock gate to each of the splitted SRAMs in CoupledL2
- fix several bugs concerning WriteEvictOrEvict, SnpQuery,
SnpCleanShared, SnpStash*, etc

---------

Co-authored-by: zhanglinjuan <[email protected]>
Co-authored-by: Ma-YX <[email protected]>
Co-authored-by: Yanqin Li <[email protected]>

show more ...


# b7a63495 16-Jan-2025 NewPaulWalker <[email protected]>

feat(custom, csr): add two custom CSRs mcorepwr and mflushpwr to control power (#4164)

Co-authored-by: Zhu Yu <[email protected]>


# 7cc77234 06-Jan-2025 Zhaoyang You <[email protected]>

timing(CSR): using addr/wdata after 1 cycle for writing frontend and memory (#4119)

Register 1 cycle addr and wdata, then write to frontend and memory.


# 6c106319 30-Dec-2024 xu_zh <[email protected]>

feat(ICache): ECC error injection (#4044)

This PR is part of *RAS(Reliability, Accessibility, Serviceability)* error recovery features.

- Add a series of mmio-mapped CSR to control ICache ECC check

feat(ICache): ECC error injection (#4044)

This PR is part of *RAS(Reliability, Accessibility, Serviceability)* error recovery features.

- Add a series of mmio-mapped CSR to control ICache ECC check & ECC inject features
- Implement ICache ECC injection
- M-state software can write `eccctrl` to trigger error injection to meta/dataArray, next read can trigger auto-recovery (implemented in #3899)
- Remove custom CSR `Sfetchctl`

# Details
## CSR
The base address of the added mmio-mapped CSR is `0x38022080` and the registers is defined as below:
```
64 10 7 4 2 1 0
0x00 eccctrl | WARL | ierror | istatus | itarget | inject | enable |

64 PAddrBits-1 0
0x08 ecciaddr | WARL | paddr |
```
| CSR | field | desp |
| --- | --- | --- |
| eccctrl | enable | ECC check enable |
| eccctrl | inject | ECC inject enable (write 1 to trigger injection, read always 0) |
| eccctrl | itarget | ECC inject target<br>0: metaArray<br>1: rsvd<br>2: dataArray<br>3: rsvd |
| eccctrl | istatus | ECC inject status (read-only)<br>0: idle: inject controller idle, goes to working when received a inject request (i.e. write 1 to eccctrl.inject)<br>1: working: inject controller working, goes to injected when finished / error when failed<br>2: injected, goes to idle after read<br>3: rsvd<br>4: rsvd<br>5: rsvd<br>6: rsvd<br>7: error: inject failed (check eccctl.ierror for reason), goes to idle after read |
| eccctrl | ierror | ECC error reason (read-only, valid only if `eccctrl.istatus==error`)<br>0: ECC check is not enabled (i.e. `!eccctrl.enable`)<br>1: inject target invalid (i.e. `eccctrl.itarget==rsvd`)<br>2: inject addr (i.e. `ecciaddr.paddr`) not in ICache<br>3: rsvd<br>4: rsvd<br>5: rsvd<br>6: rsvd<br>7: rsvd |
| ecciaddr | paddr | Physical address of the inject target |

## Inject method
```asm
$INJECT_ADDR:
# maybe do something else
ret

test:
la t0, $BASE_ADDR # load icache control base addr
la t1, $INJECT_ADDR # load inject addr
jalr ra, 0(t1) # jump to injected addr to load it i
sd t1, 8(t0) # set inject addr
la t2, (target << 2 | 1 << 1 | 1 << 0) # load inject target & inject enable & ecc enable
sd t1, 0(t0) # set inject enable & ecc enable
loop:
ld t1, 0(t0) # get ecc control state
andi t1, t1, (0b11 << (4+1)) # get high bits of inject state
beqz t1, loop # if is idle, or working, loop

addi t1, t1, -1 # t1 = inject_state[2:1] - 1
bnez t1, error # if is not injected, error or rsvd

jalr ra, 0(t1) # jump to injected addr to trigger error
j finish

error:
# handle error
finish:
# finish
```
Or, checkout https://github.com/OpenXiangShan/nexus-am/pull/48

show more ...


# c559bb17 26-Dec-2024 Zhaoyang You <[email protected]>

fix(CSR): flush CSR when inst redirect (#4079)

* CSR read is Out-of-Order operation.
* If a inst executed before a CSR read inst is redirected, we need to refresh CSR.


# 32fe4d47 02-Dec-2024 sinceforYy <[email protected]>

timing(csr): remove 1 cycle to csr waddr, wdata


# 8cbf000b 09-Dec-2024 chengguanghui <[email protected]>

fix(CSR, Trace): remove reg `isXRetFlag` in CSR

* remove useless reg `isXRetFlag` in CSR.scala
* fix update of itype for xret instruction


# c308d936 21-Nov-2024 chengguanghui <[email protected]>

fix(trace): remove traceTrap & tracePriv from trace pipeline


# 725e8ddc 19-Sep-2024 chengguanghui <[email protected]>

feat(trace): add TraceCoreInterface in top.


# 4907ec88 19-Sep-2024 chengguanghui <[email protected]>

feat(trace): add trace buffer.


# 189833a1 05-Dec-2024 Haoyuan Feng <[email protected]>

feat(pointer masking): support Ssnpm & Smnpm & Smmpm (#3921)

feat(pointer masking): support Ssnpm & Smnpm & Smmpm


# 7071df62 29-Nov-2024 Zhaoyang You <[email protected]>

timing(csr): add 1 cycle to csr read/write and select highest interrupt priority (#3946)

This PR adds 1 cycle for csr read/write and selects highest interrupt
priority to fix timing.


# a751b11a 11-Nov-2024 chengguanghui <[email protected]>

fix(dcsr): debug support critical error state

* support nmip, cetrig, extcause fileds in dcsr.
* critical error state enter dmode when dcsr.cetrig assert.


# 71b6c42e 14-Nov-2024 xu_zh <[email protected]>

fix(CSR,RVC): c.fp instrs should be illegal when fs is off (#3859)

* fix RVC floating-point inst raise EX_II in predecode when xstatus.fs
is off

Fix #3864

Update: https://github.com/OpenXiang

fix(CSR,RVC): c.fp instrs should be illegal when fs is off (#3859)

* fix RVC floating-point inst raise EX_II in predecode when xstatus.fs
is off

Fix #3864

Update: https://github.com/OpenXiangShan/rocket-chip/pull/20 is merged
and this PR is rebased, ready to review.

---------

Co-authored-by: sinceforYy <[email protected]>

show more ...


# 85a8d7ca 01-Nov-2024 Zehao Liu <[email protected]>

feat(dbltrp) : add support for critical error (#3793)


# 25742929 21-Oct-2024 Xuan Hu <[email protected]>

fix(Ebreak): use isPcBkpt to hold exception raised by ebreak (#3769)

* This signal is only used to distinguish EX_BP store pc or load/store
address in {m|s|vs}tval.


# fe52823c 18-Oct-2024 Xuan Hu <[email protected]>

fix(Breakpoint): memory trigger set {m|s|vs}tval with faulting address (#3762)

* This commit fix the value of {m|s|vs}tval when load/store/atomic
trigger fire. The faulting address should be writte

fix(Breakpoint): memory trigger set {m|s|vs}tval with faulting address (#3762)

* This commit fix the value of {m|s|vs}tval when load/store/atomic
trigger fire. The faulting address should be written to tval.

show more ...


# 676ddb73 09-Oct-2024 Xuan Hu <[email protected]>

fix(CSR): fix shadow write to PMA and customize CSRs (#3703)

* Use wenLegal in NewCSR as distribute csr write wen signal


# 8bc90631 05-Oct-2024 Zehao Liu <[email protected]>

fix(Smrnmi): expand NMI interrupt to two types and route the nmi signals to XSTOP (#3691)


1234