1. 22 12月, 2021 1 次提交
    • J
      IPrefetch: fix prefetchPtr stop problem · ca4df9c2
      JinYue 提交于
      * This problem happens because prefetchPtr still exits when close IPrefetch
      
      * Fix PMP req port still be occupied even when ICache miss
      ca4df9c2
  2. 21 12月, 2021 5 次提交
    • W
      dcache: use sram to build ecc array (#1382) · 41b68474
      William Wang 提交于
      * dcache: use sram to build ecc array
      
      * MainPipe: latch s1_encTag to last until s1_fire
      Authored-by: Nzhanglinjuan <zhanglinjuan20s@ict.ac.cn>
      41b68474
    • Y
      lsq: add LsqEnqCtrl to optimize enqueue timing (#1380) · 10551d4e
      Yinan Xu 提交于
      This commit adds an LsqEnqCtrl module to add one more clock cycle
      between dispatch and load/store queue.
      
      LsqEnqCtrl maintains the lqEnqPtr/sqEnqPtr and lqCounter/sqCounter.
      They are used to determine whether load/store queue can accept new
      instructions. After that, instructions are sent to load/store queue.
      This module decouples queue allocation and real enqueue.
      
      Besides, uop storage in load/store queue are optimized. In dispatch,
      only robIdx is required. Other information is naturally conveyed in
      the pipeline and can be stored later in load/store queue if needed.
      For example, exception vector, trigger, ftqIdx, pdest, etc are
      unnecessary before the instruction leaves the load/store pipeline.
      10551d4e
    • W
      sbuffer: optimize sbuffer enqueue timing (#1379) · 67c26c34
      William Wang 提交于
      This commit removed PriorityEncoder in sbuffer enq path. It should improve sbuffer enqueue timing.
      67c26c34
    • W
      support cmo (#1360) · 9e2176fb
      wakafa 提交于
      * pma: allow r/w priv for l3-cache op mmio space
      
      * bump huancun
      
      * bump huancun
      
      * bump huancun
      9e2176fb
    • J
      Add simple instruction prefetch for L2 (directed by branch prediction) (#1374) · 7052722f
      Jay 提交于
      * Add Naive Instruction Prefetch
      
      * Add instruction prefetch module in ICache
      
      * send Hint to L2 (prefetched data stores in L2)
      
      * Ftq: add prefetchPtr and prefetch interface
      
      * Fix IPrefetch PMP Port preempting problem
      
      * Fix merge conflict
      7052722f
  3. 20 12月, 2021 6 次提交
  4. 18 12月, 2021 1 次提交
  5. 17 12月, 2021 2 次提交
    • L
      pmp: add static pmp check that stored in tlb entries (#1366) · 5b7ef044
      Lemover 提交于
      * memblock: regnext ptw's resp
      
      * pmp: timing optimization from tlb.sram.ppn to pmp, add static pmp check
      
      long latency: tlb's sram may be slow to gen ppn, ppn to pmp may be
      long latency.
      Solution: add static pmp check.
      
      Fatal problem: pmp grain is smalled than TLB pages(4KB, 2MB, 1GB)
      Solution: increase pmp'grain to 4K, for 4K entries, pre-check pmp and
      store the result into tlb storage. For super pages, still dynamic check
      that translation and check.
      
      * pmp: change pmp grain to 4KB, change pma relative init config
      
      * bump ready-to-run, update nemu so for pmp grain
      
      * bump ready-to-run, update nemu so for pmp grain again
      
        update pmp unit test. The old test assumes that pmp grain is less than 512bit.
      5b7ef044
    • Y
      csr: use zext pc when vm is disabled (#1361) · bd1f1bf3
      Yinan Xu 提交于
      bd1f1bf3
  6. 16 12月, 2021 4 次提交
    • Y
      rename: check valid condition for lui (#1368) · 89c0fb0a
      Yinan Xu 提交于
      89c0fb0a
    • L
      Trigger: hardwire timing to 1 · ddb65c47
      Li Qianruo 提交于
      We have singlestep already so triggers do not need to hit after inst commits
      ddb65c47
    • Z
      dcache: remove redundant ecc array (#1358) · 77decb47
      zhanglinjuan 提交于
      * dcache: fix bug in ecc check
      
      * dcache: remove redundant ecc array
      
      * CacheInstruction: fix typo
      
      * dcache: fix bugs in cache instruction on ecc
      
      * MetaArray: wrap ecc array as a single module
      77decb47
    • J
      Fix false hit bug after IFU timing optimization (#1367) · a1351e5d
      Jay 提交于
      * fix invalidTakenFault use wrong seqTarget
      
      * IFU: fix oversize bug
      
      * ctrl: mark all flushes as level.flush for frontend
      
      This commit changes how flushes behave for frontend.
      
      When ROB commits an instruction with a flush, we notify the frontend
      of the flush without the commit.
      
      Flushes to frontend may be delayed by some cycles and commit before
      flush causes errors. Thus, we make all flush reasons to behave the
      same as exceptions for frontend, that is, RedirectLevel.flush.
      
      * IFU: exclude lastTaken situation when judging beyond fetch
      Co-authored-by: NYinan Xu <xuyinan@ict.ac.cn>
      a1351e5d
  7. 15 12月, 2021 4 次提交
  8. 14 12月, 2021 5 次提交
    • Y
      difftest: move sc_valid to AtomicsUnit (#1350) · e13d224a
      Yinan Xu 提交于
      e13d224a
    • Y
      dp2: out.bits does not depend on lsq.canAccept (#1352) · 74ca315b
      Yinan Xu 提交于
      This commit optimizes Dispatch2Rs timing by ignoring lsq.canAccept
      when sending bits to reservation stations.
      74ca315b
    • J
      Optimize IFU and PreDecode timing (#1347) · 2a3050c2
      Jay 提交于
      * ICache: add ReplacePipe for Probe & Release
      
      * remove ProbeUnit
      
      * Probe & Release enter ReplacePipe
      
      * fix bugs when running Linux on MinimalConfig
      
      * TODO: set conflict for ReplacePipe
      
      * ICache: fix ReplacePipe invalid write bug
      
      * chores: code clean up
      
      * IFU: optimize timing
      
      * PreDecode: separate into 2 module for timing optimization
      
      * IBuffer: add enqEnable to replace valid for timing
      
      * IFU/ITLB: optimize timing
      
      * IFU: calculate cut_ptr in f1
      
      * TLB: send req in f1 and wait resp in f2
      
      * ICacheMainPipe: add tlb miss logic in s0
      
      * Optimize IFU timing
      
      * IFU: fix lastHalfRVI bug
      
      * IFU: fix performance bug
      
      * IFU: optimize MMIO commit timing
      
      * IFU: optmize trigger timing and add frontendTrigger
      
      * fix compile error
      
      * IFU: fix mmio stuck bug
      2a3050c2
    • Z
      dcache: fix bug in ecc check (#1349) · dd95524e
      zhanglinjuan 提交于
      dd95524e
    • Y
      csr: update mtval/stval according to the trap mode (#1344) · 7c071650
      Yinan Xu 提交于
      This commit changes the condition to update mtval and stval.
      
      According to the RISC-V spec, when a trap is taken into M/S-mode,
      mtval/stval is either set to zero or written wrih exception-specific
      information to assist software in handling the trap.
      
      Previously in XiangShan, mtval/stval is updated depending on the
      current priviledge mode, which is incorrect.
      7c071650
  9. 13 12月, 2021 4 次提交
    • Z
      Optimize dcache timing (#1332) · 69790076
      zhanglinjuan 提交于
      * MissQueue: loose merging condition to ease timing stress
      
      * MissQueue: remove grant_beats
      
      * MissQueue: compare block addr, not the whole addr bits
      
      * dcache: optimize timing for generating ready to sbuffer
      Co-authored-by: NWilliam Wang <zeweiwang@outlook.com>
      69790076
    • L
      Optimized trigger csr read/write · 716f717f
      Li Qianruo 提交于
      716f717f
    • W
      trigger: fix lq hitvec raddr · 08596256
      William Wang 提交于
      08596256
    • J
      SoC: insert more buffers into mmio path (#1329) · be340b14
      Jiawei Lin 提交于
      * SoC: add axi4spliter
      
      * pmp: add apply method to reduce loc
      
      * pma: add PMA used in axi4's spliter
      
      * Fix package import
      
      * pma: re-write tl-pma, put tl-pma into AXI4Spliter
      
      * pma: add memory mapped pma
      
      * soc: rm dma port, rm axi4spliter, mv mmpma out of spliter
      
      * csr: clear mstatus.mprv when mstatus.mpp != ModeM at xret
      
      * csr: fix write mask for mstatus, mepc and sepc
      
      This commit fixes the write mask for mstatus, mepc and sepc.
      
      According to the RISC-V instruction manual, for RV64 systems,
      the SXL and UXL fields are WARL fields that control the value of
      XLEN for S-mode and U-mode, respectively. For RV64 systems, if
      S-mode is not supported, then SXL is hardwired to zero. For RV64
      systems, if U-mode is not supported, then UXL is hardwired to zero.
      
      Besides, mepc[0] and sepc[0] should be hardwired to zero.
      
      * wb,load: delay load fp for one cycle
      
      * csr: add mconfigptr, but hardwire to 0 now
      
      * bump huancun
      
      * csr: add *BE to mstatusStruct which are hardwired to 0
      
      * Remove unused files
      
      * csr: fix bug of xret clear mprv
      
      * bump difftest
      
      * ci: add unit test, xret clear mstatus.mprv when xpp is not M
      
      * bump ready-to-run
      
      * mem,atomics: delay exception info for one cycle
      
      * SoC: insert more buffers into mmio path
      
      * SoC: insert buffer between l3_xbar and l3_banked_xbar
      
      * Optimze l3->ddr path
      
      * Bump huancun
      Co-authored-by: NZhangZifei <zhangzifei20z@ict.ac.cn>
      Co-authored-by: NYinan Xu <xuyinan@ict.ac.cn>
      Co-authored-by: Nwangkaifan <wangkaifan@ict.ac.cn>
      be340b14
  10. 12 12月, 2021 5 次提交
  11. 11 12月, 2021 3 次提交
    • Y
      jump: set the LSB of the target to zero (#1342) · 1a389dfd
      Yinan Xu 提交于
      According to RISC-V spec, for the JALR instruction, its target address
      is obtained by adding the sign-extended 12-bit I-immediate to the
      register rs1, then setting the least-significant bit of the result
      to zero.
      1a389dfd
    • Y
      csr: delay fflags and dirty_fs for better timing (#1341) · 7181c0c1
      Yinan Xu 提交于
      7181c0c1
    • L
      mmu: timing optimization of ptwfilter's recv and issue & storeunit's mmio (#1326) · 2c2c1588
      Lemover 提交于
      * TLB: when miss, regnext the req sent to ptw
      
      * PTWFilter: timing optimzation of do_iss that ignore ptwResp's filter
      
      * StoreUnit: logic optimization of from s2_mmio to s2_out_valid
      
      * ptwfilter: when issue but filtered, clear the v bit
      
      special case that
      ptw.resp clear all the duplicate req when arrive to filter
      ptw_resp is the RegNext of ptw.resp and it filters ptw.req
      when ptw_resp filter the req but ptw.resp not filter the tlb_req to
      stop do_enq, then the v bit of the req will not be cleared ever.
      
      It will be more correct to fliter the entries and tlb_req with ptw_resp,
      but the timing restriction says no. So just use the confusing trick
      to slove the complicate corner case.
      2c2c1588