1. 19 8月, 2021 1 次提交
    • L
      core: add basic debug mode features (#918) · d4aca96c
      lqre 提交于
      Basic features of debug mode are implemented.
      
      * Rewrite CSR for debug mode
      * Peripheral work for implementing debug module
      * Added single step support
      * Use difftest with JTAG support
      d4aca96c
  2. 17 8月, 2021 1 次提交
    • Z
      Support RISC-V bitmanip extension v1.0 (#919) · ee8ff153
      zfw 提交于
      * Add bitmanip v1.0 instructions into decede table
      * Fix some instructions' name
      * Add basic instructions into Alu
      * Add clz, ctz, cpop, clmul Instruction into MulDivExeUnit
      ee8ff153
  3. 08 8月, 2021 1 次提交
  4. 05 8月, 2021 2 次提交
    • W
      mem,sq: replace !hasInflightMMIO flag with s_idle · 248b2726
      William Wang 提交于
      248b2726
    • Y
      mem,sq: don't set commited flag when mmio commits · 568e7b25
      Yinan Xu 提交于
      For simplicity, we increase cmtPtr and set commited flags when
      store instructions commit from ROB. However, this causes problems
      when there's an MMIO at the head and new instructions enqueue after
      the MMIO finishes but before the MMIO commits.
      
      For example, at cycle T0 mmio store instruction with sqPtr p0
      finishes and deqPtr is increased. At cycle T1, a new store
      instruction enqueues and the p0 is allocated for this new instruction.
      At cycle T2, the mmio instruction commits from ROB. With cmtPtr,
      p0 is set to commited. However, since p0 is allocated to the new
      store instruction, the commited flag should be false.
      
      The example causes at least two issues. (1) when redirect happens, p0
      will not be flushed. (2) p0 will be commit to sbuffer before p0
      writes back to store queue.
      
      In this commit, we change how commited flag works. We add a
      `hasInflightMMIO` flag. When store instructions commit, we only
      set commited flag when `hasInflightMMIO` is not set.
      568e7b25
  5. 04 8月, 2021 1 次提交
  6. 28 7月, 2021 1 次提交
  7. 25 7月, 2021 1 次提交
  8. 24 7月, 2021 2 次提交
  9. 19 7月, 2021 1 次提交
  10. 18 7月, 2021 2 次提交
  11. 17 7月, 2021 1 次提交
    • L
      mstatus.tvm: add tvm check for satp access and sfence.vma (#885) · b37cea47
      Lemover 提交于
      * CSR: add csr access check for mstatus.tvm
      
      tvm: trap virtual Memory.
      when tvm is set, r/w the satp in S-mode will raise illegal-instr
      
      * Fence: add tvm check that may disallow sfence
      
      when tvm is set and at s-mode, sfence.vma will raise illegal-instr
      b37cea47
  12. 16 7月, 2021 2 次提交
  13. 14 7月, 2021 1 次提交
    • Y
      backend: wrap all RS into a larger scheduler module (#880) · 66220144
      Yinan Xu 提交于
      This commit adds an non-parameterized scheduler containing all reservation stations.
      Now IntegerBlock, FloatBlock, MemBlock contain only function units.
      The Schduler connects dispatch with all function units.
      Parameterization to be added later.
      66220144
  14. 12 7月, 2021 1 次提交
  15. 11 7月, 2021 1 次提交
    • L
      ptw: update PTWRepeater to support multi-port by RRArbiter (#874) · 5d64f936
      Lemover 提交于
      * PTW: Repeater support multi req by RRArbiter
      
      * ptw: add parameter to choose repeater and filter(default)
      
      simple ci test show that: the filter is critical for perf
      like mcf(5m):
        old ptw:2.38
        new ptw with repeater: 2.41
        new ptw with filter: 2.58
      5d64f936
  16. 08 7月, 2021 1 次提交
    • Y
      backend: optimize dispatch and issue timing (#821) · c84ff7ef
      Yinan Xu 提交于
      * better select policy timing
      * unified RS enqueue ports for 4 ALUs
      * wrap imm extractor into a module
      * backend,rs: wrap dataArray in RawDataModuleTemplate
      * should only bypass data between the same addr when allocate.valid
      c84ff7ef
  17. 03 7月, 2021 1 次提交
  18. 14 6月, 2021 1 次提交
  19. 04 6月, 2021 2 次提交
  20. 27 5月, 2021 1 次提交
  21. 18 5月, 2021 3 次提交
  22. 15 5月, 2021 1 次提交
    • Y
      backend,RS: rewrite RS to optimize timing (#812) · 5c7674fe
      Yinan Xu 提交于
      * test,vcs: call $finish when difftest fails
      
      * backend,RS: refactor with more submodules
      
      This commit rewrites the reservation station in a more configurable style.
      
      The new RS has not finished.
      - Support only integer instructions
      - Feedback from load/store instructions is not supported
      - Fast wakeup for multi-cycle instructions is not supported
      - Submodules are refined later
      
      * RS: use wakeup signals from arbiter.out
      
      * RS: support feedback and re-schedule when needed
      
      For load and store reservation stations, the instructions that left RS before may be
      replayed later.
      
      * test,vcs: check difftest_state and return on nemu trap instructions
      
      * backend,RS: support floating-point operands and delayed regfile read for store RS
      
      This commit adds support for floating-point instructions in reservation stations.
      Beside, currently fp data for store operands come a cycle later than int data. This
      feature is also supported.
      
      Currently the RS should be ready for any circumstances.
      
      * rs,status: don't trigger assertions when !status.valid
      
      * test,vcs: add +workload option to specify the ram init file
      
      * backend,rs: don't enqueue when redirect.valid or flush.valid
      
      * backend,rs: support wait bit that instruction waits until store issues
      
      This commit adds support for wait bit, which is mainly used in load and
      store reservation stations to delay instruction issue until the corresponding
      store instruction issued.
      
      * backend,RS: optimize timing
      
      This commit optimizes BypassNetwork and PayloadArray timing.
      
      - duplicate bypass mask to avoid too many FO4
      - use one-hot vec to get read data
      5c7674fe
  23. 12 5月, 2021 2 次提交
    • L
      PTW: rewrite ptw for multiple requests support (#811) · 4d586ba1
      Lemover 提交于
      * PTW: add ptw multi-processing graph
      
      * [WIP] PTW: try to add miss queue, failed for complexity and not very useful
      
      * [WIP] PTW: rewrite ptw for multi req support
      
      * PTW: remove some assert, fix level init bug
      
      * PTW: itlb has highter priority than dtlb
      
      * PTW: fix bug that mix cache's resp logic
      
      * PTW: fix stupid bug that mix .U and .W
      
      * PTW: replay will not be blocked if fsm empty
      
      * PTW: miss queue req may return miss queue
      
      In the before design, only miss queue req can go into
      fsm, and would not be blocked.
      Now, to simplify design, miss queue req are just the
      same with new req, may blocked, going to fsm or miss queue.
      
      * PTW: fix ptw filter iss valid bug
      
      * PTW.fsm: fix bug that should not mem.req when sfenceLatch
      
      * PTW: fix ptw sfenceLatch's bug
      
      * PTW: add some perf counters
      
      * PTW: fix bug in filter enq ptr logic
      
      * PTW: fix bug of sfence in ptw
      
      * test: add current branch to ci-test, tmp
      
      * PTW: fix bug of cache's hit logic and fsm's pf
      
      * PTW: fix bug of filter's enq and block* signal
      
      * PTW: fix bug of filter's pteResp filter
      
      * PTW: add some assert of filter's counter
      
      * PTW: fix bug of filter's enq logic
      
      * PTW: set PTWMSHRSIZE 16
      
      * PTW: fix naive perf counter's bug
      
      * PTW: set PTWMSHRSIZE 8
      
      * PTW: set PTWMSHRSIZE 32
      
      * Revert "PTW: set PTWMSHRSIZE 32"
      
      This reverts commit fd3981ae8bbb015c6cd398c4db60486d39fc92ef.
      
      * Revert "test: add current branch to ci-test, tmp"
      
      This reverts commit 8a7a8a494d5c05789e05a385a9fc7791a8ffef2f.
      4d586ba1
    • W
      Configs: update MinimalConfig for FPGA (#809) · 05f23f57
      William Wang 提交于
      * Configs: add MinimalFPGAConfig
      
      * TODO: change cache parameters
      
      * Chore: add parameter print
      
      * README: add simulation usage
      
      Currently, XiangShan does not support NOOP FPGA. FPGA related
      instructions are removed
      
      * Configs: limit frontend width in MinimalConfig
      
      * MinimalConfig: limit L1/L2 cache size
      
      * MinimalConfig: limit ptw size, disable L2
      
      * MinimalConfig: limit L3 size
      
      * Sbuffer: force trigger write if sbuffer fulls
      05f23f57
  24. 11 5月, 2021 1 次提交
    • W
      backend,mem: add Store Sets memory dependence predictor (#796) · de169c67
      William Wang 提交于
      * LoadQueue: send stFtqIdx via rollback request
      
      * It will make it possible for setore set to update its SSIT
      
      * StoreSet: setup store set update req
      
      * StoreSet: add store set identifier table (SSIT)
      
      * StoreSet: add last fetched store table (LFST)
      
      * StoreSet: put SSIT into decode stage
      
      * StoreSet: put LFST into dispatch1
      
      * Future work: optimize timing
      
      * RS: store rs now supports delayed issue
      
      * StoreSet: add perf counter
      
      * StoreSet: fix SSIT update logic
      
      * StoreSet: delay LFST update input for 1 cycle
      
      * StoreSet: fix LFST update logic
      
      * StoreSet: fix LFST raddr width
      
      * StoreSet: do not force store in ss issue in order
      
      Classic store set requires store in the same store set issue in seq.
      However, in current micro-architecture, such restrict will lead to
      severe perf lost. We choose to disable it until we find another way
      to fix it.
      
      * StoreSet: support ooo store in the same store set
      
      * StoreSet: fix store set merge logic
      
      * StoreSet: check earlier store when read LFST
      
      * If store-load pair is in the same dispatch bundle, loadWaitBit should
      also be set for load
      
      * StoreSet: increase default SSIT flush period
      
      * StoreSet: fix LFST read logic
      
      * Fix commit c0e541d1
      
      * StoreSet: add StoreSetEnable parameter
      
      * RSFeedback: add source type
      
      * StoreQueue: split store addr and store data
      
      * StoreQueue: update ls forward logic
      
      * Now it supports splited addr and data
      
      * Chore: force assign name for load/store unit
      
      * RS: add rs'support for store a-d split
      
      * StoreQueue: fix stlf logic
      
      * StoreQueue: fix addr wb sq update logic
      
      * AtomicsUnit: support splited a/d
      
      * Parameters: disable store set by default
      
      * WaitTable: wait table will not cause store delay
      
      * WaitTable: recover default reset period to 2^17
      
      * Fix dev-stad merge conflict
      
      * StoreSet: enable storeset
      
      * RS: disable store rs delay logic
      
      CI perf shows that current delay logic will cause perf loss. Disable
      unnecessary delay logic will help.
      
      To be more specific, `io.readyVec` caused the problem. It will be
      updated in future commits.
      
      * RS: opt select logic with load delay (ldWait)
      
      * StoreSet: disable 2-bit lwt
      Co-authored-by: NZhangZifei <zhangzifei20z@ict.ac.cn>
      de169c67
  25. 09 5月, 2021 1 次提交
  26. 07 5月, 2021 1 次提交
  27. 06 5月, 2021 2 次提交
    • W
      Config: add MinimalConfig · ec5c8ac7
      William Wang 提交于
      MinimalConfig limited queues' size, disabled TAGE to limit generated
      verilog size
      
      Usage: change `config = DefaultConfig` to `config = MinimalConfig`
      in Top.scala / SimTop.scala
      ec5c8ac7
    • L
      Backend: add mul to fast wakeup (#769) · 22deac3a
      Lemover 提交于
      * [WIP] Backend: add mul to fast wake-up
      
      * Backend: handle mul wb priority and fix wrong delay
      
      * RS: devide fastwakeup and nonBlocked(they were binded)
      22deac3a
  28. 05 5月, 2021 1 次提交
  29. 04 5月, 2021 1 次提交
    • Y
      DispatchQueue: wrap around tailPtr index when redirect (#800) · 695364a3
      Yinan Xu 提交于
      This commit fixes the bug when redirect.valid and the last valid instruction is in the last slot.
      Previously the tailPtr becomes size.U when there're no instructions before headPtr. It works fine
      when DispatchQueueSize is power2.
      695364a3
  30. 01 5月, 2021 1 次提交
  31. 30 4月, 2021 1 次提交
    • Y
      cache: support fake dcache, ptw, l1pluscache, l2cache and l3cache (#795) · 9d5a2027
      Yinan Xu 提交于
      In this commit, we add support for using DPI-C calls to replace
      DCache, PTW and L1plusCache. L2Cache and L3 Cache are also allowed to
      be ignored or bypassed. Configurations are controlled by useFakeDCache,
      useFakePTW, useFakeL1plusCache, useFakeL2Cache and useFakeL3Cache.
      However, some configurations may not work correctly.
      9d5a2027