- 17 9月, 2021 1 次提交
-
-
由 Yinan Xu 提交于
This commit adds manual reset for every register in Regfile. Previously the reset is done by add reset values to the registers. However, physically general-purpose register file does not have reset values. Since all the regfile always has the same writeback data, we don't need to explicitly assign reset data.
-
- 16 9月, 2021 1 次提交
-
-
由 Yinan Xu 提交于
This commit adds critical_wakeup_*_* counters to indicate which function units wake up the instructions in RS. Previously we have wait_for_src_* counters but they cannot represent where the critical operand (the last waiting operand) comes from. We need these counters to optimize fast wakeup logic. If some instructions critically depend on some other instructions, we can think of how we can optimize the wakeup process. Furthermore, this commit also adds a specific counter for FMAs that wakeup other FMAs' third operand. This helps us to decide which strategy is used for FMA fast issue.
-
- 15 9月, 2021 1 次提交
-
-
由 Lemover 提交于
nothing changed but add one parameter to control if ldtlb and sttlb are the same now there two similar parameters: outReplace: when this is true, two ldtlb are 'same', two sttlb are 'same' refillBothTlb: when this is true, the four tlb are same(require outReplace to be true) * mmu.tlb: add param refillBothTlb to refill both ld & st tlb * mmu.tlb: set param refillBothTlb to false
-
- 13 9月, 2021 1 次提交
-
-
由 Yinan Xu 提交于
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.
-
- 12 9月, 2021 2 次提交
-
-
由 Yinan Xu 提交于
This commit moves issue select logic in reservation stations to stage 0 from stage 1. It helps timing of stage 1, which load-to-load requires. Now, reservation stations have the following stages: * S0: enqueue and wakeup, select. Selection results are RegNext-ed. * S1: data/uop read and data bypass. Bypassed results are RegNext-ed. * S2: issue instructions to function units.
-
由 Yinan Xu 提交于
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`
-
- 11 9月, 2021 1 次提交
-
-
由 Yinan Xu 提交于
This commit simplifies status logic in reservations stations. Module StatusArray is mostly rewritten. The following optimizations are applied: * Wakeup now has higher priority than enqueue. This reduces the length of the critical path of ALU back-to-back wakeup. * Don't compare fpWen/rfWen if the reservation station does not have float/int operands. * Ignore status.valid or redirect for srcState update. For data capture, these are necessary and not changed. * Remove blocked and scheduled conditions in issue logic when the reservation station does not have loadWait bit and feedback.
-
- 10 9月, 2021 1 次提交
-
-
由 Yinan Xu 提交于
This commit changes how uop and data are read in reservation stations. It helps the issue timing. Previously, we access payload array and data array after we decide the instructions that we want to issue. This method makes issue selection and array access serialized and brings critial path. In this commit, we add one more read port to payload array and data array. This extra read port is for the oldest instruction. We decide whether to issue the oldest instruction and read uop/data simultaneously. This change reduces the critical path to each selection logic + read + Mux (previously it's selection + arbitration + read). Variable oldestOverride indicates whether we choose the oldest ready instruction instead of the normal selection. An oldestFirst option is added to RSParams to parameterize whether we need the age logic. By default, it is set to true unless the RS is for ALU. If the timing for aged ALU rs meets, we will enable it later.
-
- 09 9月, 2021 1 次提交
-
-
由 Yinan Xu 提交于
This commit adds some simple instruction fusion cases in decode stage. Currently we only implement instruction pairs that can be fused into RV64GCB instructions. Instruction fusions are detected in the decode stage by FusionDecoder. The decoder checks every two instructions and marks the first instruction fused if they can be fused into one instruction. The second instruction is removed by setting the valid field to false. Simple fusion cases include sh1add, sh2add, sh3add, sexth, zexth, etc. Currently, ftq in frontend needs every instruction to commit. However, the second instruction is removed from the pipeline and will not commit. To solve this issue, we temporarily add more bits to isFused to indicate the offset diff of the two fused instruction. There are four possibilities now. This feature may be removed later. This commit also adds more instruction fusion cases that need changes in both the decode stage and the funtion units. In this commit, we add some opcode to the function units and fuse the new instruction pairs into these new internal uops. The list of opcodes we add in this commit is shown below: - szewl1: `slli r1, r0, 32` + `srli r1, r0, 31` - szewl2: `slli r1, r0, 32` + `srli r1, r0, 30` - byte2: `srli r1, r0, 8` + `andi r1, r1, 255` - sh4add: `slli r1, r0, 4` + `add r1, r1, r2` - sr30add: `srli r1, r0, 30` + `add r1, r1, r2` - sr31add: `srli r1, r0, 31` + `add r1, r1, r2` - sr32add: `srli r1, r0, 32` + `add r1, r1, r2` - oddadd: `andi r1, r0, 1`` + `add r1, r1, r2` - oddaddw: `andi r1, r0, 1`` + `addw r1, r1, r2` - orh48: mask off the first 16 bits and or with another operand (`andi r1, r0, -256`` + `or r1, r1, r2`) Furthermore, this commit adds some complex instruction fusion cases to the decode stage and function units. The complex instruction fusion cases are detected after the instructions are decoded into uop and their CtrlSignals are used for instruction fusion detection. We add the following complex instruction fusion cases: - addwbyte: addw and mask it with 0xff (extract the first byte) - addwbit: addw and mask it with 0x1 (extract the first bit) - logiclsb: logic operation and mask it with 0x1 (extract the first bit) - mulw7: andi 127 and mulw instructions. Input to mul is AND with 0x7f if mulw7 bit is set to true.
-
- 08 9月, 2021 1 次提交
-
-
由 zfw 提交于
* Alu: fix andn, orn, xnor * Decode: change instruction name
-
- 06 9月, 2021 2 次提交
-
-
由 Yinan Xu 提交于
This commit assigns exu.io.out.fflags to RegNext(fu.io.fflags) if the function unit has fastUopOut but has not implemented it. Previously it causes a bug that fflags may be one cycle earlier than expected. This commit also removes the extra logic in FmacExeUnit and FmiscExeUnit. They are exactly the same as ExeUnit now.
-
由 YikeZhou 提交于
* backend, rename: support elimination of mv inst whose lsrc=0 [known bug] instr page fault not properly raised after sfence.vma * backend, roq: [bug fix] won't label me with exception as writebacked
-
- 05 9月, 2021 3 次提交
-
-
由 Jiawei Lin 提交于
-
由 Yinan Xu 提交于
This commit adds support for load balance between different issue ports when the function unit is not pipelined and the reservation station has more than one issue ports. We use a ping pong bit to decide which port to issue the instruction. At every clock cycle, the bit is flipped.
-
由 Yinan Xu 提交于
This commit adds assertion in MaskData to check the width of mask and data. When the width of mask is smaller than the width of data, (~mask & data) and (mask & data) will always clear the upper bits of the data. This usually causes unexpected behavior. This commit adds explicit width declarations where MaskData is used.
-
- 04 9月, 2021 1 次提交
-
-
由 Jiawei Lin 提交于
* FMA: spearate fadd/fmul/fma * exu: enable fast uop out from fmacExeUnit Co-authored-by: NYinan Xu <xuyinan@ict.ac.cn>
-
- 03 9月, 2021 3 次提交
-
-
由 Jiuyang Liu 提交于
-
由 Jiawei Lin 提交于
* Multiplier: adjust pipeline
-
由 Yinan Xu 提交于
This commit adds an 8-entry buffer for fdivSqrt function unit input. Set hasInputBuffer to true to enable input buffers for other function units.
-
- 02 9月, 2021 5 次提交
-
-
由 Lemover 提交于
* Revert "Revert "l0tlb: add a new level tlb to each mem pipeline (#936)" (#945)" This reverts commit b052b972. * fu: remove unused import * mmu.tlb: 2 load/store pipeline has 1 dtlb * mmu: remove btlb, the l1-tlb * mmu: set split-tlb to 32 to check perf effect * mmu: wrap tlb's param with TLBParameters * mmu: add params 'useBTlb' dtlb size is small: normal 8, super 2 * mmu.tlb: add Bundle TlbEntry, simplify tlb hit logic(coding) * mmu.tlb: seperate tlb's storage, relative hit/sfence logic tlb now supports full-associate, set-associate, directive-associate. more: change tlb's parameter usage, change util.Random to support case that mod is 1. * mmu.tlb: support normalAsVictim, super(fa) -> normal(sa/da) be carefull to use tlb's parameter, only a part of param combination is supported * mmu.tlb: fix bug of hit method and victim write * mmu.tlb: add tlb storage's perf counter * mmu.tlb: rewrite replace part, support set or non-set * mmu.tlb: add param outReplace to receive out replace index * mmu.tlb: change param superSize to superNWays add param superNSets, which should always be 1 * mmu.tlb: change some perf counter's name and change some params * mmu.tlb: fix bug of replace io bundle * mmu.tlb: remove unused signal wayIdx in tlbstorageio * mmu.tlb: separate tlb_ld/st into two 'same' tlb * mmu.tlb: when nWays is 1, replace returns 0.U before, replace will return 1.U, no influence for refill but bad for perf counter * mmu.tlb: give tlb_ld and tlb_st a name (in waveform)
-
由 William Wang 提交于
-
由 William Wang 提交于
-
由 Yinan Xu 提交于
This PR adds support for fast load-to-load wakeup and issue. In load-to-load fast wakeup and issue, load-to-load latency is reduced to 2 cycles. Now a load instruction can wakeup another load instruction at LOAD stage 1. When the producer load instruction arrives at stage 2, the consumer load instruction is issued to load stage 0 and using data from the producer to generate load address. In reservation station, load can be dequeued from staged 1 when stage 2 does not have a valid instruction. If the fast load is not accepted, from the next cycle on, the load will dequeue as normal. Timing in reservation station (for imm read) and load unit (for writeback data selection) to be optimized later. * backend,rs: issue load one cycle earlier when possible This commit adds support for issuing load instructions one cycle earlier if the load instruction is wakeup by another load. An extra 2-bit UInt is added to IO. * mem: add load to load addr fastpath framework * mem: enable load to load forward * mem: add load-load forward counter Co-authored-by: NWilliam Wang <zeweiwang@outlook.com>
-
由 YikeZhou 提交于
MEFreeList: remove useless code + give specified (instead of DontCare) value to phy reg allocated port
-
- 01 9月, 2021 4 次提交
-
-
由 Lingrui98 提交于
-
由 Jiawei Lin 提交于
* IntToFP: support fully pipelined mode
-
由 William Wang 提交于
This reverts commit e3f759ae.
-
由 Yinan Xu 提交于
This commit adds fastUopOut support for pipelined function units via implementing fastUopOut in trait HasPipelineReg. The following function units now support fastUopOut: - MUL - FMA - F2I - F2F
-
- 31 8月, 2021 3 次提交
-
-
由 Jiawei Lin 提交于
* Add submodule 'fudian' * IntToFP: use fudian * FMA: use fudian.CMA * FPToInt: remove recode format
-
由 zfw 提交于
* Alu: optimize timing This pull request optimizes timing by adding a 32bit adder for addw and changing the encode.
-
由 Yinan Xu 提交于
This commit optimizes ExuBlock timing by connecting writeback when possible. The timing priorities are RegNext(rs.fastUopOut) > fu.writeback > arbiter.out(--> io.rfWriteback --> rs.writeback). The higher priority, the better timing. (1) When function units have exclusive writeback ports, their wakeup ports for reservation stations can be connected directly from function units' writeback ports. Special case: when the function unit has fastUopOut, valid and uop should be RegNext. (2) If the reservation station has fastUopOut for all instructions in this exu, we should replace io.fuWriteback with RegNext(fastUopOut). In this case, the corresponding execution units must have exclusive writeback ports, unless it's impossible that rs can ensure the instruction is able to write the regfile. (3) If the reservation station has fastUopOut for all instructions in this exu, we should replace io.rfWriteback (rs.writeback) with RegNext(rs.wakeupOut).
-
- 30 8月, 2021 2 次提交
-
-
由 YikeZhou 提交于
-
由 Jiawei Lin 提交于
* bump chisel to 3.5 * Remove deprecated 'toBool' && disable tl monitor * Update RocketChip / Re-enable TLMonitor * Makefile: remove '--infer-rw'
-
- 29 8月, 2021 1 次提交
-
-
由 Yinan Xu 提交于
* rs,bypass: remove optBuf for valid bits * rs,bypass: add left and right bypass strategy This commit adds another bypass network implementation to optimize timing of the first stage of function units. In BypassNetworkLeft, we bypass data at the same cycle that function units write data back. This increases the length of the critical path of the last stage of function units but reduces the length of the critical path of the first stage of function units. Some function units that require a shorter stage zero, like LOAD, may use BypassNetworkLeft. In this commit, we set all bypass networks to the left style, but we will make it configurable depending on different function units in the future.
-
- 28 8月, 2021 1 次提交
-
-
由 Yinan Xu 提交于
This commit changes how io.out is computed for age detector. We use a register to keep track of the position of the oldest instruction. Since the updating information has better timing than issue, this could optimize the timing of issue logic.
-
- 27 8月, 2021 2 次提交
-
-
由 Yinan Xu 提交于
This commit reduces register usage in age detector via using the upper matrix only. Since the age matrix is symmetric, age(i)(j) equals !age(j)(i). Besides, age(i)(i) is the same as valid(i). Thus, we also remove validVec in this commit.
-
由 Yinan Xu 提交于
This commit adds a fastUopOut option to function units. This allows the function units to give valid and uop one cycle before its output data is ready. FastUopOut lets writeback arbitration happen one cycle before data is ready and helps optimize the timing. Since some function units are not ready for this new feature, this commit adds a fastImplemented option to allow function units to have fastUopOut but the data is still at the same cycle as uop. This option will delay the data for one cycle and may cause performance degradation. FastImplemented should be true after function units support fastUopOut.
-
- 26 8月, 2021 2 次提交
-
-
由 Yinan Xu 提交于
This commit adds support for directly connecting data from function units if the function units exclusively own the writeback ports. This happens for ALU and FMA currently.
-
由 zfw 提交于
* separate the Alu instructions by 64bit data instructions and w-suffix instructions * optimize select logic of instructions result
-
- 25 8月, 2021 1 次提交
-
-
由 YikeZhou 提交于
decode: slightly change def of `isMove` [TODO] handle mv inst with lsrc=0
-