#
dfb03ba2 |
| 10-Mar-2025 |
xu_zh <[email protected]> |
fix(IFU): handle uncache corrupt (#4301)
When InstrUncache Tilelink bus gives `d.bits.corrupt` or `d.bits.denied` (included in `d.bits.corrupt`), mark the fetch block as `access fault`, and skips `m
fix(IFU): handle uncache corrupt (#4301)
When InstrUncache Tilelink bus gives `d.bits.corrupt` or `d.bits.denied` (included in `d.bits.corrupt`), mark the fetch block as `access fault`, and skips `m_resendTLB` etc..
Also: - remove `currentIsRVC` as it's actually identical with `mmio_is_RVC` - fix `crossPageIPFFix`, it should be valid only when `mmio_has_resend` - rename `mmio_resend_exception` to `mmio_exception`, since it's also used to store Tilelink corrupt before resend
Update: rebased to Feb-28-2025-66e9b546 for regression test.
show more ...
|
#
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 ...
|
#
415fcbe2 |
| 29-Nov-2024 |
xu_zh <[email protected]> |
refactor(ICache): refactor code style & eliminate IDE warnings (#3947)
- add type annotation to public members
- add private qualifier to other members
- add `asUInt` to shift results (Bits)
- fi
refactor(ICache): refactor code style & eliminate IDE warnings (#3947)
- add type annotation to public members
- add private qualifier to other members
- add `asUInt` to shift results (Bits)
- fix typo
- remove unused imports
- rename `ICacheMSHR.waymask` to `way` since it is not a mask
- use `idxBits` for `log2Up(nSets)`
- use `wayBits` for `log2Up(nWays)`
- use `foreach` instead of `map` when return value is not needed
- use `{}` instead of `()` for multi-line `foreach` and `map`
The generated verilog is checked and is identical with the original
(except `waymask` -> `way` & order changes).
show more ...
|
#
1d8f4dcb |
| 28-Nov-2021 |
Jay <[email protected]> |
ICache: Add tilelink consistency modification (#1228)
* ICache: metaArray & dataArray use bank interleave
* ICache: add bank interleave
* ICache: add parity check for meta and data arrays
*
ICache: Add tilelink consistency modification (#1228)
* ICache: metaArray & dataArray use bank interleave
* ICache: add bank interleave
* ICache: add parity check for meta and data arrays
* IFU: fix bug in secondary miss
* secondary miss doesn't send miss request to miss queue
* ICache: write back cancled miss request
* ICacheMissEntry: add second miss merge
* deal with situations that this entry has been flushed, and the next miss req just
requests the same cachline.
* ICache: add acquireBlock and GrantAck support
* refact: move icache modules to frontend modules
* ICache: add release surport and meta coh
* ICache: change Get to AcquireBlock for A channel
* rebuild: change ICachePara package for other file
* ICache: add tilelogger for L1I
* ICahce: add ProbeQueue and Probe Process Unit
* ICache: add support for ProbeData
* ICahceParameter: change tag code to ECC
* ICahce: fix bugs in connect and ProbeUnit
* metaArray/dataArray responses are not connected
* ProbeUnit use reg so data and req are not synchronized
* RealeaseUnit: write back mata when voluntary
* Add ICache CacheInstruction
* move ICache to xiangshan.frontend.icache._
* ICache: add CacheOpDecoder
* change ICacheMissQueue to ICacheMissUnit
* ProbeUnit: fix meta data not latch bug
* IFU: delete releaseSlot and add missSlot
* IFU: fix bugs in missSlot state machine
* IFU: fix some bugs in miss Slot
* IFU: move out fetch to ICache Array logic
* ReleaseUnit: delete release write logic
* MissUnit: send Release to ReleaseUnit after GAck
* ICacheMainPipe: add mainpipe and stop logic
* when f3_ready is low, stop the pipeline
* IFU: move tlb and array access to mainpipe
* Modify Frontend and ICache top for mainpipe
* ReleaseUnit: add probe merge status register
* ICache: add victim info and release in mainpipe
* ICahche: add set-conflict logic
* Release: do not invalid meta after sending release
* bump Huancun: fix probe problem
* bump huancun for MinimalConfig combinational loop
* ICache: add LICENSE for new files
* Chore: remove debug code and add perf counter
* Bump huancun for bug fix
* Bump HuanCun for alias bug
* ICache: add dirty state for CliendMeta
show more ...
|