1. 30 11月, 2021 2 次提交
  2. 29 11月, 2021 1 次提交
  3. 26 11月, 2021 2 次提交
    • Y
      decode,fusion: optimize detection logic for addw and logic ops (#1262) · 6535afbb
      Yinan Xu 提交于
      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.
      6535afbb
    • Y
      refCounter: optimize timing for freeRegs (#1255) · 459d1cae
      Yinan Xu 提交于
      This commit changes how isFreed is calculated. Instead of using
      refCounter in the next, we compute it at this cycle and RegNext it.
      459d1cae
  4. 24 11月, 2021 1 次提交
  5. 23 11月, 2021 2 次提交
    • W
      mem,mdp: use robIdx instead of sqIdx (#1242) · 980c1bc3
      William Wang 提交于
      * 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
      980c1bc3
    • Y
      rs: fix counter for not-selected entries (#1251) · 0e1ce320
      Yinan Xu 提交于
      0e1ce320
  6. 18 11月, 2021 2 次提交
  7. 17 11月, 2021 1 次提交
  8. 16 11月, 2021 1 次提交
    • J
      Fix multi-core dedup bug (#1235) · 5668a921
      Jiawei Lin 提交于
      * FDivSqrt: use hierarchy API to avoid dedup bug
      
      * Dedup: use hartId from io port instead of core parameters
      
      * Bump fudian
      5668a921
  9. 15 11月, 2021 1 次提交
  10. 13 11月, 2021 1 次提交
  11. 12 11月, 2021 2 次提交
    • Y
      difftest: add basic difftest features for releases (#1219) · cbe9a847
      Yinan Xu 提交于
      * difftest: add basic difftest features for releases
      
      This commit adds basic difftest features for every release, no matter
      it's for simulation or physical design. The macro SYNTHESIS is used to
      skip these logics when synthesizing the design. This commit aims at
      allowing designs for physical design to be verified.
      
      * bump ready-to-run
      
      * difftest: add int and fp writeback data
      cbe9a847
    • Y
      top: add seip and meip bits from plic (#1221) · b3d79b37
      Yinan Xu 提交于
      b3d79b37
  12. 11 11月, 2021 3 次提交
  13. 10 11月, 2021 1 次提交
  14. 09 11月, 2021 1 次提交
  15. 05 11月, 2021 1 次提交
  16. 02 11月, 2021 1 次提交
  17. 30 10月, 2021 1 次提交
  18. 29 10月, 2021 1 次提交
  19. 27 10月, 2021 2 次提交
    • W
      mem: simplify software prefetch logic (#1176) · d200f594
      William Wang 提交于
      * mem: update lsu op encoding
      * decode: remove prefetch bits from CtrlSignals
      * mem: simplify software prefetch logic in loadpipe
      * mem: fix wrong dcacheShouldResp assertion
      d200f594
    • H
      Svinval (#1055) · af2f7849
      happy-lx 提交于
      * 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: NZhangZifei <zhangzifei20z@ict.ac.cn>
      af2f7849
  20. 25 10月, 2021 1 次提交
    • L
      pma: add pmp-like pma, software can read and write (#1169) · ca2f90a6
      Lemover 提交于
      remove the old hard-wired pma and turn to pmp-like csr registers. the pma config is writen in pma register.
      1. pma are m-priv csr, so only m-mode csrrw can change pma
      2. even in m-mode, pma should be always checked, no matter lock or not
      3. so carefully write pma, make sure not to "suicide"
      
      * pma: add pmp-like pma, just module/bundle added, not to circuit
      
      use reserved 2 bits as atomic and cached
      
      * pma: add pmp-like pma into pmp module
      
      pma have two more attribute than pmp
      1. atmoic;
      2. c/cache, if false, go to mmio.
      
      pma uses 16+4 machine-level custom ready write csr.
      pma will always be checked even in m-mode.
      
      * pma: remove the old MemMap in tlb, mmio arrives next cycle
      
      * pma: ptw raise af when mmio
      
      * pma: fix bug of match's zip with last entry
      
      * pma: fix bug of pass reset signal through method's parameter
      
      strange bug, want to reset, pass reset signal to a method, does not
      work.
      import chisel3.Module.reset, the method can access reset it's self.
      
      * pma: move some method to trait and fix bug of pma_init value
      
      * pma: fix bug of pma init value assign way
      
      * tlb: fix stupid bug that pf.ld not & fault_valid
      
      * loadunit: fix bug that uop is flushed, pmp's dcache kill failed also
      
      * ifu: mmio access needs f2_valid now
      
      * loadunit: if mmio and have sent fastUop, flush pipe when commit
      
      * storeunit: stu->lsq at stage1 and re-in lsq at stage2 to update mmio
      ca2f90a6
  21. 24 10月, 2021 1 次提交
  22. 23 10月, 2021 1 次提交
  23. 22 10月, 2021 4 次提交
  24. 21 10月, 2021 3 次提交
    • W
      mem: add CSR based l1 cache instructions (#1116) · e19f7967
      William Wang 提交于
      e19f7967
    • H
      asid: add asid, mainly work when hit check, not in sfence.vma (#1090) · 45f497a4
      happy-lx 提交于
      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: NZhangZifei <zhangzifei20z@ict.ac.cn>
      45f497a4
    • Y
      refCounter: delay de-allocation for one more cycle (#1144) · 103fe42b
      Yinan Xu 提交于
      This commit changes how de-allocation is done in RefCounter. One cycle
      after we update the reference counters, the free registers are released
      to the freelist.
      
      Previous version creates a critical path, starting from deallocate ports
      and ending at freelist registers. This commit adds one more cycle in the
      allocation --> updating reference counters --> freeing physical
      registers --> allocation loop.
      103fe42b
  25. 20 10月, 2021 2 次提交
    • W
      mem: add Zicbom and Zicboz support (#1145) · ca18a0b4
      William Wang 提交于
      Now we merge them for timing opt, unit test to be added later
      ca18a0b4
    • Z
      New DCache (#1111) · ad3ba452
      zhanglinjuan 提交于
      * L1D: provide independent meta array for load pipe
      
      * misc: reorg files in cache dir
      
      * chore: reorg l1d related files
      
      * bump difftest: use clang to compile verialted files
      
      * dcache: add BankedDataArray
      
      * dcache: fix data read way_en
      
      * dcache: fix banked data wmask
      
      * dcache: replay conflict correctly
      
       When conflict is detected:
      * Report replay
      * Disable fast wakeup
      
      * dcache: fix bank addr match logic
      
      * dcache: add bank conflict perf counter
      
      * dcache: fix miss perf counters
      
      * chore: make lsq data print perttier
      
      * dcache: enable banked ecc array
      
      * dcache: set dcache size to 128KB
      
      * dcache: read mainpipe data from banked data array
      
      * dcache: add independent mainpipe data read port
      
      * dcache: revert size change
      
      * Size will be changed after main pipe refactor
      
      * Merge remote-tracking branch 'origin/master' into l1-size
      
      * dcache: reduce banked data load conflict
      
      * MainPipe: ReleaseData for all replacement even if it's clean
      
      * dcache: set dcache size to 128KB
      
      BREAKING CHANGE: l2 needed to provide right vaddr index to probe l1,
      and it has to help l1 to avoid addr alias problem
      
      * chore: fix merge conflict
      
      * Change L2 to non-inclusive / Add alias bits in L1D
      
      * debug: hard coded dup data array for debuging
      
      * dcache: fix ptag width
      
      * dcache: fix amo main pipe req
      
      * dcache: when probe, use vaddr for main pipe req
      
      * dcache: include vaddr in atomic unit req
      
      * dcache: fix get_tag() function
      
      * dcache: fix writeback paddr
      
      * huancun: bump version
      
      * dcache: erase block offset bits in release addr
      
      * dcache: do not require probe vaddr != 0
      
      * dcache: opt banked data read timing
      
      * bump huancun
      
      * dcache: fix atom unit pipe req vaddr
      
      * dcache: simplify main pipe writeback_vaddr
      
      * bump huancun
      
      * dcache: remove debug data array
      
      * Turn on all usr bits in L1
      
      * Bump huancun
      
      * Bump huancun
      
      * enable L2 prefetcher
      
      * bump huancun
      
      * set non-inclusive L2/L3 + 128KB L1 as default config
      
      * Use data in TLBundleB to hint ProbeAck beeds data
      
      * mmu.l2tlb: mem_resp now fills multi mq pte buffer
      
      mq entries can just deq without accessing l2tlb cache
      
      * dcache: handle dirty userbit
      
      * bump huancun
      
      * chore: l1 cache code clean up
      
      * Remove l1plus cache
      * Remove HasBankedDataArrayParameters
      
      * Add bus pmu between L3 and Mem
      
      * bump huncun
      
      * IFU: add performance counters and mmio af
      
      * icache replacement policy moniter
      
      * ifu miss situation moniter
      
      * icache miss rate
      
      * raise access fault when found mmio req
      
      * Add framework for seperated main pipe and reg meta array
      
      * Rewrite miss queue for seperated pipes
      
      * Add RefillPipe
      
      * chore: rename NewSbuffer.scala
      
      * cache: add CacheInstruction opcode and reg list
      
      * CSR: add cache control registers
      
      * Add Replace Pipe
      
      * CacheInstruction: add CSRs for cache instruction
      
      * mem: remove store replay unit
      
      * Perf counter to be added
      * Timing opt to be done
      
      * mem: update sbuffer to support new dcache
      
      * sbuffer: fix missqueue time out logic
      
      * Merge remote-tracking branch 'origin/master' into dcache-rm-sru
      
      * chore: fix merge conflict, remove nStoreReplayEntries
      
      * Temporarily disable TLMonitor
      
      * Bump huancun (L2/L3 MSHR bug fix)
      
      * Rewrite main pipe
      
      * ReplacePipe: read meta to decide whether data should be read
      
      * RefillPipe: add a store resp port
      
      * MissQueue: new req should be rejected according to set+way
      
      * Add replacement policy interface
      
      * sbuffer: give missq replay the highest priority
      
      Now we give missqReplayHasTimeOut the highest priority, as eviction
      has already happened
      Besides, it will fix the problem that fix dcache eviction generate logic
      gives the wrong sbuffer id
      
      * Finish DCache framework
      
      * Split meta & tag and use regs to build meta array
      
      * sbuffer: use new dcache io
      
      * dcache: update dcache resp in memblock and fake d$
      
      * Add atomics processing flow
      
      * Refactor Top
      
      * Bump huancun
      
      * DCacheWrapper: disable ld fast wakeup only when bank conflict
      
      * sbuffer: update dcache_resp difftest io
      
      * MainPipe: fix combinational loop
      
      * Sbuffer: fix bug in assert
      
      * RefillPipe: fix bug of getting tag from addr
      
      * dcache: ~0.U should restrict bit-width
      
      * LoadPipe: fix bug in assert
      
      * ReplacePipe: addr to be replaced should be block-aligned
      
      * MainPipe: fix bug in required coh sending to miss queue
      
      * DCacheWrapper: tag write in refill pipe should always be ready
      
      * MainPipe: use replacement way_en when the req is from miss queue
      
      * MissQueue: refill data should be passed on to main pipe
      
      * MainPipe: do not use replacement way when tag match
      
      * CSR: clean up cache op regs
      
      * chore: remove outdated comments
      
      * ReplacePipe: fix stupid bug
      
      * dcache: replace checkOneHot with assert
      
      * alu: fix bug of rev8 & orc.b instruction
      
      * MissQueue: fix bug in the condition of mshr accepting a req
      
      * MissQueue: add perf counters
      
      * chore: delete out-dated code
      
      * chore: add license
      
      * WritebackQueue: distinguish id from miss queue
      
      * AsynchronousMetaArray: fix bug
      
      * Sbuffer: fix difftest io
      
      * DCacheWrapper: duplicate one more tag copy for main pipe
      
      * Add perf cnt to verify whether replacing is too early
      
      * dcache: Release needs to wait for refill pipe
      
      * WritebackQueue: fix accept condition
      
      * MissQueue: remove unnecessary assert
      
      * difftest: let refill check ingore illegal mem access
      
      * Parameters: enlarge WritebackQueue to break dead-lock
      
      * DCacheWrapper: store hit wirte should not be interrupted by refill
      
      * Config: set nReleaseEntries to twice of nMissEntries
      
      * DCacheWrapper: main pipe read should block refill pipe by set
      Co-authored-by: NWilliam Wang <zeweiwang@outlook.com>
      Co-authored-by: NLinJiawei <linjiav@outlook.com>
      Co-authored-by: NTangDan <tangdan@ict.ac.cn>
      Co-authored-by: NLinJiawei <linjiawei20s@ict.ac.cn>
      Co-authored-by: NZhangZifei <zhangzifei20z@ict.ac.cn>
      Co-authored-by: Nwangkaifan <wangkaifan@ict.ac.cn>
      Co-authored-by: NJinYue <jinyue20s@ict.ac.cn>
      Co-authored-by: Fa_wang's avatarZhangfw <471348957@qq.com>
      ad3ba452
  26. 18 10月, 2021 1 次提交
    • Y
      scheduler: fix regfile read ports connection (#1133) · fe58a36b
      Yinan Xu 提交于
      Previously difftest uses the extra 32 read ports of regfile and it is
      disabled by default under FPGAPlatform. However, when FPGAPlatform is
      enabled, we also drop the right 32 read ports and it causes errors.
      fe58a36b