b6900d94 | 28-Apr-2022 |
Yinan Xu <[email protected]> |
core,rob: support the WFI instruction
The RISC-V WFI instruction is previously decoded as NOP. This commit adds support for the real wait-for-interrupt (WFI).
We add a state_wfi FSM in the ROB. Aft
core,rob: support the WFI instruction
The RISC-V WFI instruction is previously decoded as NOP. This commit adds support for the real wait-for-interrupt (WFI).
We add a state_wfi FSM in the ROB. After WFI leaves the ROB, the next instruction will wait in the ROB until an interrupt.
show more ...
|
a4e57ea3 | 20-Dec-2021 |
Li Qianruo <[email protected]> |
Merge branch 'master' into trigger |
ddb65c47 | 16-Dec-2021 |
Li Qianruo <[email protected]> |
Trigger: hardwire timing to 1
We have singlestep already so triggers do not need to hit after inst commits |
1ca0e4f3 | 10-Dec-2021 |
Yinan Xu <[email protected]> |
core: refactor hardware performance counters (#1335)
This commit optimizes the coding style and timing for hardware
performance counters.
By default, performance counters are RegNext(RegNext(_)). |
6ab6918f | 09-Dec-2021 |
Yinan Xu <[email protected]> |
core: refactor writeback parameters (#1327)
This commit adds WritebackSink and WritebackSource parameters for
multiple modules. These traits hide implementation details from
other modules by defin
core: refactor writeback parameters (#1327)
This commit adds WritebackSink and WritebackSource parameters for
multiple modules. These traits hide implementation details from
other modules by defining IO-related functions in modules.
By using WritebackSink, ROB is able to choose the writeback sources.
Now fflags and exceptions are connected from exe units to reduce write
ports and optimize timing.
Further optimizations on write-back to RS and better coding style to
be added later.
show more ...
|
19bcce38 | 02-Dec-2021 |
Fawang Zhang <[email protected]> |
bku: fix sm4 instructions (#1263) |
8a009b1d | 01-Dec-2021 |
Li Qianruo <[email protected]> |
Bug fix on detection logic for addw fusion (#1276) |
6535afbb | 26-Nov-2021 |
Yinan Xu <[email protected]> |
decode,fusion: optimize detection logic for addw and logic ops (#1262)
This commit optimizes instruction fusion detection logic for fused
addw{byte, bit, zexth, sexth}, mulw7, and logic{lsb, zexth}
decode,fusion: optimize detection logic for addw and logic ops (#1262)
This commit optimizes instruction fusion detection logic for fused
addw{byte, bit, zexth, sexth}, mulw7, and logic{lsb, zexth}
instructions.
Previously we use fuType and fuOpType from the normal decoder, and this
incurs a bad timing. Now we change the detection logic to use only the
raw instructions. Though the fused instruction still uses the
fuOpType from the normal decoder, there should be only serveral MUXes
left.
show more ...
|
980c1bc3 | 23-Nov-2021 |
William Wang <[email protected]> |
mem,mdp: use robIdx instead of sqIdx (#1242)
* mdp: implement SSIT with sram
* mdp: use robIdx instead of sqIdx
Dispatch refactor moves lsq enq to dispatch2, as a result, mdp can not
get corr
mem,mdp: use robIdx instead of sqIdx (#1242)
* mdp: implement SSIT with sram
* mdp: use robIdx instead of sqIdx
Dispatch refactor moves lsq enq to dispatch2, as a result, mdp can not
get correct sqIdx in dispatch. Unlike robIdx, it is hard to maintain a
"speculatively assigned" sqIdx, as it is hard to track store insts in
dispatch queue. Yet we can still use "speculatively assigned" robIdx
for memory dependency predictor.
For now, memory dependency predictor uses "speculatively assigned"
robIdx to track inflight store.
However, sqIdx is still used to track those store which's addr is valid
but data it not valid. When load insts try to get forward data from
those store, load insts will get that store's sqIdx and wait in RS.
They will not waken until store data with that sqIdx is issued.
* mdp: add track robIdx recover logic
show more ...
|
d200f594 | 27-Oct-2021 |
William Wang <[email protected]> |
mem: simplify software prefetch logic (#1176)
* mem: update lsu op encoding
* decode: remove prefetch bits from CtrlSignals
* mem: simplify software prefetch logic in loadpipe
* mem: fix wrong dc
mem: simplify software prefetch logic (#1176)
* mem: update lsu op encoding
* decode: remove prefetch bits from CtrlSignals
* mem: simplify software prefetch logic in loadpipe
* mem: fix wrong dcacheShouldResp assertion
show more ...
|
af2f7849 | 27-Oct-2021 |
happy-lx <[email protected]> |
Svinval (#1055)
* Svinval: implement Svinval * add three new instructions(SINVAL_VMA SFENCE_W_INVAL SFENCE_INVAL_IR) * TODO : test
* Prevent illegal software code by adding an assert * make sure th
Svinval (#1055)
* Svinval: implement Svinval * add three new instructions(SINVAL_VMA SFENCE_W_INVAL SFENCE_INVAL_IR) * TODO : test
* Prevent illegal software code by adding an assert * make sure the software runs as follow: begin instruction of svinval extension svinval xxxx svinval xxxx ... end instruction of svinval extension
* Svinval: add an CSR to control it and some annotations
* Roq: fix assert bug of Svinval
* Svinval: fix svinval.vma's rs2 type * make it reg instead of imm
* Svinval: change assert logic and fix bug * fix the condition judging Svinval.vma instruction * using doingSvinval in assert
* ci: add rv64mi-p-svinval to ci
* fix typo
* fix bug that lost ','
* when svinval disable, raise illegal instr excep
* CSR: mv svinval ctl to srnctl(1)
* rob: when excep, do not set dosvinval
* decode: when disable svinval, do not set flushpipe
* bump ready-to-run
Co-authored-by: ZhangZifei <[email protected]>
show more ...
|
cd365d4c | 23-Oct-2021 |
rvcoresjw <[email protected]> |
add performance counters at core and hauncun (#1156)
* Add perf counters
* add reg from hpm counter source
* add print perfcounter enable |
c3abb8b6 | 22-Oct-2021 |
Yinan Xu <[email protected]> |
rob: optimize bits width in storage (#1155)
This PR optimizes out isFused and crossPageIPFFix usages in Rob's DispatchData. They will not be stored in ROB. Now DispatchData has only 38 bits.
* is
rob: optimize bits width in storage (#1155)
This PR optimizes out isFused and crossPageIPFFix usages in Rob's DispatchData. They will not be stored in ROB. Now DispatchData has only 38 bits.
* isFused is merged with commitType (2 bits reduced)
* crossPageIPFFix is used only in ExceptionGen (1 bit reduced)
* rename: reduce ldest usages
* decode: set isMove to false if ldest is zero
show more ...
|
45f497a4 | 21-Oct-2021 |
happy-lx <[email protected]> |
asid: add asid, mainly work when hit check, not in sfence.vma (#1090)
add mmu's asid support.
1. put asid inside sram (if the entry is sram), or it will take too many sources.
2. when sfence, just
asid: add asid, mainly work when hit check, not in sfence.vma (#1090)
add mmu's asid support.
1. put asid inside sram (if the entry is sram), or it will take too many sources.
2. when sfence, just flush it all, don't care asid.
3. when hit check, check asid.
4. when asid changed, flush all the inflight ptw req for safety
5. simple asid unit test:
asid 1 write, asid 2 read and check, asid 2 write, asid 1 read and check. same va, different pa
* ASID: make satp's asid bits configurable to RW
* use AsidLength to control it
* ASID: implement asid refilling and hit checking
* TODO: sfence flush with asid
* ASID: implement sfence with asid
* TODO: extract asid from SRAMTemplate
* ASID: extract asid from SRAMTemplate
* all is down
* TODO: test
* fix write to asid
* Sfence: support rs2 of sfence and fix Fence Unit
* rs2 of Sfence should be Reg and pass it to Fence Unit
* judge the value of reg instead of the index in Fence Unit
* mmu: re-write asid
now, asid is stored inside sram, so sfence just flush it
it's a complex job to handle the problem that asid is changed but
no sfence.vma is executed. when asid is changed, all the inflight
mmu reqs are flushed but entries in storage is not influenced.
so the inflight reqs do not need to record asid, just use satp.asid
* tlb: fix bug of refill mask
* ci: add asid unit test
Co-authored-by: ZhangZifei <[email protected]>
show more ...
|
ca18a0b4 | 20-Oct-2021 |
William Wang <[email protected]> |
mem: add Zicbom and Zicboz support (#1145)
Now we merge them for timing opt, unit test to be added later |
f4b2089a | 16-Oct-2021 |
Yinan Xu <[email protected]> |
core: use redirect ports for flush (#1121)
This commit removes flush IO for every module. Flush now re-uses
redirect ports to flush the instructions. |
d1fe0262 | 16-Oct-2021 |
William Wang <[email protected]> |
Add strict mode to reduce mdp mispredict (#1113)
* storeset: fix waitForSqIdx generate logic
Now right waitForSqIdx will be generated for earlier store in the same
dispatch bundle.
* mdp: add
Add strict mode to reduce mdp mispredict (#1113)
* storeset: fix waitForSqIdx generate logic
Now right waitForSqIdx will be generated for earlier store in the same
dispatch bundle.
* mdp: add strict wait mode
When loadWaitStrict && loadWaitBit, load will wait in rs until all
older store addr calculation are finished.
* chore: add storeset_load_strict_wait counter
show more ...
|
c7160cd3 | 12-Oct-2021 |
William Wang <[email protected]> |
mem: update block load logic (#1035)
* mem: update block load logic
Now load will be selected as soon as the store it depends on is ready,
which is predicted by Store Sets
* mem: opt block lo
mem: update block load logic (#1035)
* mem: update block load logic
Now load will be selected as soon as the store it depends on is ready,
which is predicted by Store Sets
* mem: opt block load logic
Load blocked by std invalid will wait for that std to issue
Load blocked by load violation wait for that sta to issue
* csr: add 2 extra storeset config bits
Following bits were added to slvpredctl:
- storeset_wait_store
- storeset_no_fast_wakeup
* storeset: fix waitForSqIdx generate logic
Now right waitForSqIdx will be generated for earlier store in the same
dispatch bundle
show more ...
|
3f4ec46f | 10-Oct-2021 |
CODE-JTZ <[email protected]> |
add softprefetch (prefetch.r & prefetch.w). (#1099)
* add soft prefetch
Add the softprefetch. Actually, prefetch.r&w are an ORI which's ldest is x0, we distinguish it in decodeUnit and send it to l
add softprefetch (prefetch.r & prefetch.w). (#1099)
* add soft prefetch
Add the softprefetch. Actually, prefetch.r&w are an ORI which's ldest is x0, we distinguish it in decodeUnit and send it to ld func unit. Then, we modified some interaction signals in ordinary Load steps.
show more ...
|
3feeca58 | 10-Oct-2021 |
zfw <[email protected]> |
riscv-crypto: support K extension (#1102)
* This commit add risc-v cryptography extension subset(zknd zkne zknh zksed zksh)
- Rename bmu to bku
- Add crypto instruction in Mdu -> bku
- Store imme
riscv-crypto: support K extension (#1102)
* This commit add risc-v cryptography extension subset(zknd zkne zknh zksed zksh)
- Rename bmu to bku
- Add crypto instruction in Mdu -> bku
- Store immediate into mdu RS
* ci: add riscv-crypto test
show more ...
|
9aca92b9 | 28-Sep-2021 |
Yinan Xu <[email protected]> |
misc: code clean up (#1073)
* rename Roq to Rob
* remove trailing whitespaces
* remove unused parameters |
675acc68 | 25-Sep-2021 |
Yinan Xu <[email protected]> |
backend: optimize aluOpType to 7 bits (#1061)
This commit optimizes ALUOpType to 7 bits. Alu timing will be checked
later.
We also apply some misc changes including:
* Move REVB, PACK, PACKH,
backend: optimize aluOpType to 7 bits (#1061)
This commit optimizes ALUOpType to 7 bits. Alu timing will be checked
later.
We also apply some misc changes including:
* Move REVB, PACK, PACKH, PACKW to ALU
* Add fused logicZexth, addwZext, addwSexth
* Add instruction fusion test cases to CI
show more ...
|
07596dc6 | 25-Sep-2021 |
zfw <[email protected]> |
Bmu: support zbk* instruction (#1059)
* Bmu: support zbk* instructions
* ci: add zbk* instruction test |
c88c3a2a | 13-Sep-2021 |
Yinan Xu <[email protected]> |
backend: clean up exception vector usages (#1026)
This commit cleans up exception vector usages in backend.
Previously the exception vector will go through the pipeline with the
uop. However, in
backend: clean up exception vector usages (#1026)
This commit cleans up exception vector usages in backend.
Previously the exception vector will go through the pipeline with the
uop. However, instructions with exceptions will enter ROB when they are
dispatched. Thus, actually we don't need the exception vector when an
instruction enters a function unit.
* exceptionVec, flushPipe, replayInst are reset when an instruction
enters function units.
* For execution units that don't have exceptions, we reset their output
exception vectors to avoid ROB to record them.
* Move replayInst to CtrlSignals.
show more ...
|
a792bcf1 | 12-Sep-2021 |
Yinan Xu <[email protected]> |
backend: add 3-bit shift fused instructions (#1022)
This commit adds 3-bit shift fused instructions. When the program
tries to add 8-byte index, these may be used.
List of fused instructions add
backend: add 3-bit shift fused instructions (#1022)
This commit adds 3-bit shift fused instructions. When the program
tries to add 8-byte index, these may be used.
List of fused instructions added in this commit:
* szewl3: `slli r1, r0, 32` + `srli r1, r0, 29`
* sr29add: `srli r1, r0, 29` + `add r1, r1, r2`
show more ...
|