1. 04 6月, 2023 2 次提交
  2. 21 5月, 2023 1 次提交
    • S
      lsu: split lq for larger ooo load window (#2077) · e4f69d78
      sfencevma 提交于
      BREAKING CHANGE: new LSU/LQ architecture introduced in this PR
      
      In this commit, we replace unified LQ with:
      * virtual load queue
      * load replay queue
      * load rar queue
      * load raw queue
      * uncache buffer
      
      It will provide larger ooo load window.
      
      NOTE: IPC loss in this commit is caused by MDP problems, for previous MDP
      does not fit new LSU architecture. 
      MDP update is not included in this commit, IPC loss will be fixed by MDP update later.
      
      ---------
      Co-authored-by: NLyn <lyn@Lyns-MacBook-Pro.local>
      e4f69d78
  3. 16 4月, 2023 2 次提交
  4. 27 3月, 2023 1 次提交
  5. 15 3月, 2023 2 次提交
  6. 10 3月, 2023 1 次提交
  7. 08 3月, 2023 1 次提交
  8. 06 3月, 2023 1 次提交
  9. 15 2月, 2023 1 次提交
    • Maxpicca's avatar
      lsdb: add some information of ls instructions by chiselDB (#1900) · 8744445e
      Maxpicca 提交于
      Besides adding load/store arch database, this PR also fixed a bug which caused
      prefetch using l1 info failed to work.
      
      Former RTL change break `isFirstIssue` flag gen logic, which caused prefetcher
      failed to receive prefetch train info from L1. This commit should fix that.
      
      * ROB: add inst db drop
      
      globalID signal output is still duplicated
      
      * TLB: TLB will carry mem idx when req and resp
      
      * InstDB: update the TLBFirstIssue
      
      * InstDB: the first version is complete
      
      * InstDB: update decode logic
      
      * InstDB: update ctrlBlock writeback
      
      * Merge: fix bug
      
      * merge: fix compile bug
      
      * code rule: rename debug signals and add db's FPGA signal control
      
      * code rule: update db's FPGA signal control
      
      * ldu: fix isFirstIssue flag for ldflow from rs
      
      * ldu: isFirstIssue flag for hw pf is always false
      
      ---------
      Co-authored-by: Ngood-circle <fenghaoyuan19@mails.ucas.ac.cn>
      Co-authored-by: NWilliam Wang <zeweiwang@outlook.com>
      8744445e
  10. 11 2月, 2023 1 次提交
  11. 28 1月, 2023 3 次提交
  12. 16 1月, 2023 1 次提交
    • Z
      backend,vector: fix vector relative bug and first vadd instr success · 0f038924
      ZhangZifei 提交于
      Modification and Bugs includes:
      1. readFpRf/writeFpRf is replaced with readFpVecRf/writeFpVecRf in some
      places;
      2. fpWen is replaced with fpVecWen in some places;
      3. add ADD/SUB decode info
      4. dispatch logic modification
      5. dataWidth & wakeup logic in rs
      6. ExuInput/ExuOutput at many places
      7. fuSel inside FUBlock of FMAC
      8. FuType encoding
      9. many other bugs
      0f038924
  13. 12 1月, 2023 1 次提交
  14. 11 1月, 2023 1 次提交
  15. 08 1月, 2023 1 次提交
    • Z
      backend: creates sub-class ExuBlock/FUBlock/Scheduler. Int*/Vec* · 3e16df82
      ZhangZifei 提交于
      There are actual useful changes besides coding style. Meaningful
      changes that makes codes more clean by divides int/fp/vec into their
      sub-class will be done later.
      
      Creates ExuBlock/FUBlock/Schduler's sub-class. The sub-class has
      not meaningful codes now.
      3e16df82
  16. 07 1月, 2023 1 次提交
  17. 06 1月, 2023 1 次提交
    • C
      rs: mv rf-read from dispatch2rs to rs-select(asyn read regfile now) · 9ab1568e
      czw 提交于
      chore(*): Change Sequential Parameter Pass to Parameter Name Parameter Passing
      
      refactor(Regfile): Modify Synchronous Read to Asynchronous Read
      
      refactor(Scheduler, ReservationStationBase): Connect the asynchronous read port of the register and the reserved station
      
      1. add parameter( numIntRfReadPorts, numFpRfReadPorts, params.exuCfg)
      2. fix extractReadRf
      3. remove dataArray and add dataArrayWrite, dataArrayMultiWrite,
      s1_out_addr
      4. add immBypassedData2 for bypass and fix DataSelect
      
      refactor(ReservationStationStd):  fix connect between s1_deqRfDataSel and readFpRf_asyn(i).data
      
      refactor(ReservationStationJump):  add jalrMem and fix immExts connect
      9ab1568e
  18. 05 1月, 2023 1 次提交
  19. 02 1月, 2023 1 次提交
    • Y
      Switch to asynchronous reset for all modules (#1867) · 67ba96b4
      Yinan Xu 提交于
      This commit changes the reset of all modules to asynchronous style,
      including changes on the initialization values of some registers.
      For async registers, they must have constant reset values.
      67ba96b4
  20. 25 12月, 2022 2 次提交
  21. 23 12月, 2022 1 次提交
  22. 21 12月, 2022 1 次提交
  23. 14 12月, 2022 1 次提交
  24. 17 11月, 2022 1 次提交
    • H
      top-down: introduce top-down counters and scripts (#1803) · eb163ef0
      Haojin Tang 提交于
      * top-down: add initial top-down features
      
      * rob600: enlarge queue/buffer size
      
      * 🎨 After git pull
      
      *  Add BranchResteers->CtrlBlock
      
      *  Cg BranchResteers after pending
      
      *  Add robflush_bubble & ldReplay_bubble
      
      * 🚑 Fix loadReplay->loadReplay.valid
      
      * 🎨 Dlt printf
      
      *  Add stage2_redirect_cycles->CtrlBlock
      
      * :saprkles: CtrlBlock:Add s2Redirect_when_pending
      
      *  ID:Add ifu2id_allNO_cycle
      
      *  Add ifu2ibuffer_validCnt
      
      *  Add ibuffer_IDWidth_hvButNotFull
      
      *  Fix ifu2ibuffer_validCnt
      
      * 🚑 Fix ibuffer_IDWidth_hvButNotFull
      
      *  Fix ifu2ibuffer_validCnt->stop
      
      * feat(buggy): parameterize load/store pipeline, etc.
      
      * fix: use LoadPipelineWidth rather than LoadQueueSize
      
      * fix: parameterize `rdataPtrExtNext`
      
      * fix(SBuffer): fix idx update logic
      
      * fix(Sbuffer): use `&&` to generate flushMask instead of `||`
      
      * fix(atomic): parameterize atomic logic in `MemBlock`
      
      * fix(StoreQueue): update allow enque requirement
      
      * chore: update comments, requirements and assertions
      
      * chore: refactor some Mux to meet original logic
      
      * feat: reduce `LsMaxRsDeq` to 2 and delete it
      
      * feat: support one load/store pipeline
      
      * feat: parameterize `EnsbufferWidth`
      
      * chore: resharp codes for better generated name
      
      * top-down: add initial top-down features
      
      * rob600: enlarge queue/buffer size
      
      * top-down: add l1, l2, l3 and ddr loads bound perf counters
      
      * top-down: dig into l1d loads bound
      
      * top-down: move memory related counters to `Scheduler`
      
      * top-down: add 2 Ldus and 2 Stus
      
      * top-down: v1.0
      
      * huancun: bump HuanCun to a version with top-down
      
      * chore: restore parameters and update `build.sc`
      
      * top-down: use ExcitingUtils instead of BoringUtils
      
      * top-down: add switch of top-down counters
      
      * top-down: add top-down scripts
      
      * difftest: enlarge stuck limit cycles again
      Co-authored-by: Ngaozeyu <gaozeyu18@mails.ucas.ac.cn>
      eb163ef0
  25. 01 11月, 2022 1 次提交
  26. 15 10月, 2022 1 次提交
    • Z
      issue: add alu and jump[csr] rs · d16f4ea4
      ZhangZifei 提交于
      More modification:
      1. parameter RSMod to generate different submodules
      add case class RSMod for a list of rs's submodule's generator methods
      2. remove [submodule]RSIO
      remove ALU[Jump..]RSIO, add RSExtraIO to contain all the extra
      io of different child class. Ugly codes. Assign DontCare to the extra
      io.
      3. Same with 2. The submodule's io should contain all the io.
      
      For jump:
      move pcMem part code into JumpRS from BaseRS
      
      For jump and alu:
      add immExtractorGen for jump/alu and other child class
      d16f4ea4
  27. 13 10月, 2022 2 次提交
    • Z
      issue: add submodule for each type rs, not acutually implimented · 54034ccd
      ZhangZifei 提交于
      There are several kinds of reservation station type. Name them with
      coresponding exu name:
      1. ALU
      2. Jump[/CSR/i2f/fence]
      3. Mul[Div]
      4. Load
      5. Sta
      6. Std
      7. FMA[c]
      8. FMisc
      
      They have only a few differences with each other. The main body of
      rs is the same. To make rs more easy to read and understand, we
      keep the 'common body' in the BaseRS, move the difference into the
      submodules.
      54034ccd
    • H
      lq: update data field iff load_s2 valid (#1795) · e323d51e
      happy-lx 提交于
      Now we update data field (fwd data, uop) in load queue when load_s2
      is valid. It will help to on lq wen fanout problem.
      
      State flags will be treated differently. They are still updated
      accurately according to loadIn.valid
      Co-authored-by: NWilliam Wang <zeweiwang@outlook.com>
      e323d51e
  28. 18 9月, 2022 1 次提交
  29. 01 9月, 2022 1 次提交
  30. 23 8月, 2022 1 次提交
  31. 18 7月, 2022 1 次提交
    • 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
  32. 12 7月, 2022 1 次提交
    • 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
  33. 28 6月, 2022 1 次提交