1. 25 7月, 2022 2 次提交
    • L
      l2tlb: add assert that do not allow duplicate mem access (#1669) · 1f4a7c0c
      Lemover 提交于
      Add bypassed logic of refill logic, to prevent duplicate mem access due to wrongly miss.
      Not actually forward the data, just check if vpn hit and re-access the page cache.
      
      Add some asserts to prevent duplicate mem access. These assert maybe wrongly triggered in some corner case.
      
      * l2tlb: add assert that do not allow duplicate mem access
      
      * l2tlb: change dup mem access assert to dup mem resp assert
      
      * l2tlb: when refill after access page cache, re-access page cache
      
      * l2tlb: fix assert signal that wrong assigned
      
      * l2tlb: store empty super page to sp entries
      
      * l2tlb: fix bug that lost req due to bypassed req not enq mq
      
      * l2tlb: fix bug that lost req due to bypassed req not enq mq
      
      * l2tlb: fix bug of cache resp ready logic
      
      * l2tlb.cache: fix bug of vpn bypass match
      
      * l2tlb.cache: fix bug of vs anticipate into hit check
      1f4a7c0c
    • L
      l1tlb: for non-block tlb port, resp should always be ready (#1673) · 9930e66f
      Lemover 提交于
      * l1tlb: for non-block tlb port, resp should always be ready
      
      * l1tlb: add tlb refill duplicate assert
      9930e66f
  2. 24 7月, 2022 5 次提交
    • Y
      storeset: don't allocate upon the first violation (#1132) · 6ef4f6f6
      Yinan Xu 提交于
      This commit changes the allocation policy in Store Set memory
      dependence predictor.
      
      Previously we allocate an entry for the load and store instructions
      every time when a memory violation is triggered. However, it's not
      robust enough and causes many load instructions to be blocked for
      issuing.
      
      The current allocation policy only allocates the same entry for the load
      and store instructions after both of them have triggered memory
      violations before. That is to say, only when a load/store instruction
      pair triggers memory violation twice, we do allocate the same entry to
      them. This change may cause more memory violation redirections than
      before, but it also reduces the number of blocked load instructions.
      6ef4f6f6
    • Y
      rob: fix commitInstr performance counters (#1679) · 7e8294ac
      Yinan Xu 提交于
      This commit fixes the wrong update values of commitInstr in ROB.
      Previously we add a RegNext to trueCommitCnt in #1644. However,
      we don't add RegNext to the ifCommit condition. This makes the
      commitInstr larger than the normal value and IPC looks better.
      
      This commit fixes this bug and the IPC numbers should be correct now.
      7e8294ac
    • W
      ci: disable vcs ci temporarily (#1682) · 580075cf
      wakafa 提交于
      580075cf
    • Z
      ErrorArray: optimize timing for read resp (#1670) · 45d6f9ad
      zhanglinjuan 提交于
      45d6f9ad
    • W
      lq: fix X caused by mem violation check (#1658) · d46eedc2
      William Wang 提交于
      Note that it is intend to prevent X prop in simulation, may cause
      timing problem. These check can be removed safely for better timing
      d46eedc2
  3. 21 7月, 2022 2 次提交
  4. 19 7月, 2022 2 次提交
  5. 18 7月, 2022 3 次提交
    • Y
      ftq,ctrl: add copies for pc and jalr_target data modules (#1661) · b56f947e
      Yinan Xu 提交于
      * ftq, ctrl: remove pc/target backend read ports, and remove redirectGen in ftq
      
      * ctrl: add data modules for pc and jalr_target
      
      This commit adds two data modules for pc and jalr_target respectively.
      They are the same as data modules in frontend. Should benefit timing.
      
      * jump: reduce pc and jalr_target read latency
      
      * ftq: add predecode redirect update target interface, valid only on ifuRedirect
      
      * ftq, ctrl: add second write port logic of jalrTargetMem, and delay write of pc/target mem for two cycles
      Co-authored-by: NLingrui98 <goulingrui19s@ict.ac.cn>
      b56f947e
    • L
      dtlb: change volume from s128f8 to s64f16 (#1662) · 06082082
      Lemover 提交于
      DTLB volume configuration:
      old: normal page 128 direct-asso + super page 8 full-asso
      new: normal page 64 direct-asso + super page 16 full-asso
      Better timing and better driver now.
      
      For Spec06,some specs increase slightly, while some others decrease slightly.
      06082082
    • L
      l1tlb: tlb's req port can be configured to be block or non-blocked (#1656) · f1fe8698
      Lemover 提交于
      each tlb's port can be configured to be block or non-blocked.
      For blocked port, there will be a req miss slot stored in tlb, but belong to
      core pipeline, which means only core pipeline flush will invalid them.
      
      For another, itlb also use PTW Filter but with only 4 entries.
      Last, keep svinval extension as usual, still work.
      
      
      * tlb: add blocked-tlb support, miss frontend changes
      
      * tlb: remove tlb's sameCycle support, result will return at next cycle
      
      * tlb: remove param ShouldBlock, move block method into TLB module
      
      * tlb: fix handle_block's miss_req logic
      
      * mmu.filter: change filter's req.ready to canEnqueue
      
      when filter can't let all the req enqueue, set the req.ready to false.
      canEnqueue after filtering has long latency, so we use **_fake
      without filtering, but the filter will still receive the reqs if
      it can(after filtering).
      
      * mmu.tlb: change name from BTlbPtwIO to VectorTlbPtwIO
      
      * mmu: replace itlb's repeater to filter&repeaternb
      
      * mmu.tlb: add TlbStorageWrapper to make TLB cleaner
      
      more: BlockTlbRequestorIO is same with TlbRequestorIO, rm it
      
      * mmu.tlb: rm unused param in function r_req_apply, fix syntax bug
      
      * [WIP]icache: itlb usage from non-blocked to blocked
      
      * mmu.tlb: change parameter NBWidth to Seq of boolean
      
      * icache.mainpipe: fix itlb's resp.ready, not always true
      
      * mmu.tlb: add kill sigal to blocked req that needs sync but fail
      
      in frontend, icache,itlb,next pipe may not able to sync.
      blocked tlb will store miss req ang blocks req, which makes itlb
      couldn't work. So add kill logic to let itlb not to store reqs.
      
      One more thing: fix icache's blocked tlb handling logic
      
      * icache.mainpipe: fix tlb's ready_recv logic
      
      icache mainpipe has two ports, but these two ports may not valid
      all the same time. So add new signals tlb_need_recv to record whether
      stage s1 should wait for the tlb.
      
      * tlb: when flush, just set resp.valid and pf, pf for don't use it
      
      * tlb: flush should concern satp.changed(for blocked io now)
      
      * mmu.tlb: add new flush that doesn't flush reqs
      
      Sfence.vma will flush inflight reqs and flushPipe
      But some other sfence(svinval...) will not. So add new flush to
      distinguish these two kinds of sfence signal
      
      morw: forget to assign resp result when ptw back, fix it
      
      * mmu.tlb: beautify miss_req_v and miss_v relative logic
      
      * mmu.tlb: fix bug, when ptw back and bypass, concern level to genPPN
      
      bug: when ptw back and bypass, forgot to concern level(1GB/2MB/4KB)
      when genPPN.
      
      by the way: some funtions need ": Unit = ", add it.
      
      * mmu.filter: fix bug of canEnqueue, mixed with tlb_req and tlb.req
      
      * icache.mainpipe: fix bug of tlbExcp's usage, & with tlb_need_back
      
      Icache's mainpipe has two ports, but may only port 0 is valid.
      When a port is invalid, the tlbexcp should be false.(Actually, should
      be ignored).
      So & tlb_need_back to fix this bug.
      
      * sfence: instr in svinval ext will also flush pipe
      
      A difficult problem to handle:
      Sfence and Svinval will flush MMU, but only Sfence(some svinval)
        will flush pipe. For itlb that some requestors are blocked and
        icache doesn't recv flush for simplicity, itlb's blocked ptw req
        should not be flushed.
      It's a huge problem for MMU to handle for good or bad solutions. But
        svinval is seldom used, so disable it's effiency.
      
      * mmu: add parameter to control mmu's sfence delay latency
      
      Difficult problem:
        itlb's blocked req should not be abandoned, but sfence will flush
        all infight reqs. when itlb and itlb repeater's delay is not same(itlb
        is flushed, two cycles later, itlb repeater is flushed, then itlb's
        ptw req after flushing will be also flushed sliently.
      So add one parameter to control the flush delay to be the same.
      
      * mmu.tlb: fix bug of csr.priv's delay & sfence valid when req fire
      
      1. csr.priv's delay
      csr.priv should not be delayed, csr.satp should be delayed.
      for excep/intr will change csr.priv, which will be changed at one
      instruction's (commit?). but csrrw satp will not, so satp has more
      cycles to delay.
      2. sfence
      when sfence valid but blocked req fire, resp should still fire.
      3. satp in TlbCsrBundle
      let high bits of satp.ppn to be 0.U
      
      * tlb&icache.mainpipe: rm commented codes
      
      * mmu: move method genPPN to entry bundle
      
      * l1tlb: divide l1tlb flush into flush_mmu and flush_pipe
      
      Problem:
      For l1tlb, there are blocked and non-blocked req ports.
      For blocked ports, there are req slots to store missed reqs.
      Some mmu flush like Sfence should not flush miss slots for outside
      may still need get tlb resp, no matter wrong and correct resp.
      For example. sfence will flush mmu and flush pipe, but won't flush
      reqs inside icache, which waiting for tlb resp.
      For example, svinval instr will flush mmu, but not flush pipe. so
      tlb should return correct resp, althrough the ptw req is flushed
      when tlb miss.
      
      Solution:
      divide l1tlb flush into flush_mmu and flush_pipe.
      The req slot is considered to be a part of core pipeline and should
      only be flushed by flush_pipe.
      flush_mmu will flush mmu entries and inflight ptw reqs.
      When miss but sfence flushed its ptw req, re-send.
      
      * l1tlb: code clean, correct comments and rm unused codes
      
      * l2tlb: divide filterSize into ifiterSize and dfilterSize
      
      * l2tlb: prefetch req won't enter miss queue. Rename MSHR to missqueue
      
      * l1tlb: when disable vm, ptw back should not bypass tlb and should let miss req go ahead
      f1fe8698
  6. 16 7月, 2022 2 次提交
    • W
      sta: delay sta to rs feedback for 1 cycle (#1637) · 7114a237
      William Wang 提交于
      It should remove dtlb to rs critical path
      7114a237
    • W
      dcache: use arbiter_with_pipereg for replace_pipe_req (#1657) · 069c72f8
      William Wang 提交于
      replace_pipe_req is causing timing problem as vaddr in it is used to
      generate mainpipe block signal. Unfortunately, vaddr from
      replace_pipe_req is selected form all miss queue entries
      (16 by default), which caused timing problem
      
      refill_pipe_req will not be scheduled until dcache main pipe s3 reports
      that replace_pipe_req has been finished. Thus it is legal to add a
      pipe reg for replace_pipe_req
      
      Now ALL mainpipe req candidates come from pipe reg. At the entry of
      main pipe, 1 req is selected from 4 main pipe reqs, and its vaddr is
      used to calcuate set block condition
      069c72f8
  7. 15 7月, 2022 2 次提交
  8. 14 7月, 2022 5 次提交
  9. 13 7月, 2022 3 次提交
    • Y
      dispatch2: optimize slow path and enqPtr matching timing (#1650) · fd09b64a
      Yinan Xu 提交于
      * dpq: add slow path for non-critical registers
      
      This commit separates the data module in Dispatch to slow and fast path.
      Slow path stores the data with a bad timing at Dispatch but a good timing
      at Dispatch2. Thus should benefit the timing at Dispatch, such as the LFST.
      
      For now, we merge the slow and fast data module. Chisel DCE does not
      eliminate the dead registers. We manully merge the two data modules
      for now.
      
      * dpq: optimize timing for enqPtr/deqPtr matching
      
      This commit optimizes the matching timing between enqPtr and deqPtr,
      which is used further for bypassing enqData to deqData.
      
      Now enqOffset and deqPtr/enqPtr matching work in parallel.
      fd09b64a
    • Y
      decode: move the soft-prefetch decoder to rename (#1646) · f025d715
      Yinan Xu 提交于
      This commit moves the decoder of software prefetch instructions to
      the rename stage.
      
      Previously the decoding of software prefetch instructions affects
      the imm gen and causes a long critical path.
      f025d715
    • Y
      utils: optimize OnesMoreThan and XORFold (#1645) · 2a08c787
      Yinan Xu 提交于
      * utils: optimize the timing of OnesMoreThan
      
      * utils: fix XORFold width
      2a08c787
  10. 12 7月, 2022 8 次提交
    • W
      Merge branch 'master' into nanhu-lsu-timing-220706 · 9230a40d
      William Wang 提交于
      9230a40d
    • W
      ldu: set load to use latency to 4 (#1623) · c837faaa
      William Wang 提交于
      This commit adds an extra cycle for load pipeline. It should fix timing problem caused by load pipeline.
      Huge perf loss is expected. Now load data result is sent to rs in load_s3, load may hit hint
      (fastUop.valid) is sent to rs in load_s2.
      
      We add a 3 cycle load to load fast forward data path. There should be enough time to forward
      data inside memory block.
      
      We will refactor code and add a load_s3 module in the future.
      
      BREAKING CHANGE: load pipeline reorginized
      c837faaa
    • Y
      ctrl: optimize freelist timing (#1633) · 66b2c4a4
      Yinan Xu 提交于
      * rat: map all arch registers to zero when init
      
      * freelist: fix stepBack width
      
      * freelist: fix timing of free offset
      66b2c4a4
    • Z
      MissQueue: use FastArbiter for main pipe req (#1639) · 7cd72b71
      zhanglinjuan 提交于
      7cd72b71
    • Y
      jump: delay pc and jalr_target for one cycle (#1640) · 74515c5a
      Yinan Xu 提交于
      74515c5a
    • Y
      ctrl: optimize the timing of dispatch2 stage (#1632) · 1cee9cb8
      Yinan Xu 提交于
      * ctrl: copy dispatch2 to avoid cross-module loops
      
      This commit makes copies of dispatch2 in CtrlBlock to avoid long
      cross-module timing loop paths. Should be good for timing.
      
      * dpq: re-write queue read logic
      
      This commit adds a Reg-Vec to store the queue read data. Since
      most queues read at most the current numRead and the next numRead
      entries, the read timing can be optimized by reading the data one
      cycle earlier.
      1cee9cb8
    • Y
      rs: optimize timing for dispatch and wakeup (#1621) · bcce877b
      Yinan Xu 提交于
      This commit optimizes the timing of reservation stations.
      
      * dispatched uops are latched and bypassed to s1_out
      
      * wakeup from slowPorts are latched and bypassed to s1_data
      
      * rs: optimize allocation selection
      
      Change select policy for allocation. Should avoid issuing the just
      dispatched instructions in some cases.
      
      * rs: disable load balance for load units
      bcce877b
    • Y
      sim,mmio: remove the vga device (#1638) · 613eddad
      Yinan Xu 提交于
      The VGA device may cause assertions in AXI4SlaveModule because it
      may send arbitrary requests to fb (AXI4RAM).
      613eddad
  11. 11 7月, 2022 2 次提交
  12. 10 7月, 2022 1 次提交
    • Y
      core: optimize redirect timing (#1630) · 0dc4893d
      Yinan Xu 提交于
      This commit adds separated redirect registers in ExuBlock and MemBlock.
      They have one cycle latency compared to redirect in CtrlBlock. This will
      help reduce the fanout of redirect registers.
      0dc4893d
  13. 09 7月, 2022 2 次提交
    • Y
      decode: move fusion decoder result Mux to rename (#1631) · 0febc381
      Yinan Xu 提交于
      This commit moves the fusion decoder to both decode and rename stage.
      
      In the decode stage, fusion decoder determines whether the instruction
      pairs can be fused. Valid bits of decode are not affected by fusion
      decoder. This should fix the timing issues of rename.valid.
      
      In the rename stage, some fields are updated according the result of
      fusion decoder. This will bring a minor timing path to both valid and
      other fields in uop in the rename stage. However, since freelist and
      rat have worse timing. This should not cause timing issues.
      0febc381
    • L
      dtlb: replace sram with SyncDataModule (#1627) · e05a24ab
      Lemover 提交于
      * dtlb: replace sram to SyncDataModule, nWays is useless
      
      * itlb: if miss_sameCycle, regnext ptw resp and block tlb check
      
      * dtlb: for normal_entry, when refill, do not need set miss by force
      e05a24ab
  14. 08 7月, 2022 1 次提交