1. 15 12月, 2021 1 次提交
    • Y
      rename: add fused lui and load (#1356) · fd7603d9
      Yinan Xu 提交于
      This commit adds fused load support by bypassing LUI results to load.
      
      For better timing, detection is done at the rename stage. Imm is stored
      in psrc(1), psrc(0) and imm.
      fd7603d9
  2. 11 12月, 2021 1 次提交
    • Y
      core: delay csrCtrl for two cycles (#1336) · 6f688dac
      Yinan Xu 提交于
      This commit adds DelayN(2) to some CSR-related signals, including
      control bits to ITLB, DTLB, PTW, etc.
      
      To avoid accessing the ITLB before control bits change, we also need
      to delay the flush for two cycles. We assume branch misprediction or
      memory violation does not cause csrCtrl to change.
      6f688dac
  3. 10 12月, 2021 1 次提交
  4. 09 12月, 2021 1 次提交
    • Y
      core: refactor writeback parameters (#1327) · 6ab6918f
      Yinan Xu 提交于
      This commit adds WritebackSink and WritebackSource parameters for
      multiple modules. These traits hide implementation details from
      other modules by defining IO-related functions in modules.
      
      By using WritebackSink, ROB is able to choose the writeback sources.
      Now fflags and exceptions are connected from exe units to reduce write
      ports and optimize timing.
      
      Further optimizations on write-back to RS and better coding style to
      be added later.
      6ab6918f
  5. 05 12月, 2021 1 次提交
  6. 23 11月, 2021 1 次提交
    • 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
  7. 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
  8. 24 10月, 2021 1 次提交
  9. 23 10月, 2021 1 次提交
  10. 16 10月, 2021 2 次提交
    • Y
      rename: support full-featured move elimination (#1123) · 70224bf6
      Yinan Xu 提交于
      This commit optimizes the move elimination implementation.
      
      Reference counting for every physical register is recorded. Originally
      0-31 registers have counters of ones. Every time the physical register
      is allocated or deallocated, the counter is increased or decreased by
      one. When the counter becomes zero from a non-zero value, the register
      is freed and released to freelist.
      70224bf6
    • Y
      core: use redirect ports for flush (#1121) · f4b2089a
      Yinan Xu 提交于
      This commit removes flush IO for every module. Flush now re-uses
      redirect ports to flush the instructions.
      f4b2089a
  11. 13 10月, 2021 1 次提交
  12. 10 10月, 2021 1 次提交
    • Y
      renameTable: optimize read and write timing (#1101) · 7fa2c198
      Yinan Xu 提交于
      This commit optimizes RenameTable's timing.
      
      Read addresses come from instruction buffer directly and has best
      timing. So we let data read at decode stage and bypass write data
      from this clock cycle to the read data at next cycle.
      
      For write, we latch the write request and process it at the next cycle.
      7fa2c198
  13. 09 10月, 2021 1 次提交
    • W
      Add runahead debug signals (#1082) · 20edb3f7
      William Wang 提交于
      * runahead: add runahead support (WIP)
      
      * runahead: fix redirect event
      
      * difftest: bump difftest
      
      * runahead: bump version
      
      Note: current runahead does not support instruction fusion, disable that
      in XiangShan if runahead is needed
      
      * runahead: bump version
      
      * difftest: bump version to support runahead
      
      * chore: bump huancun to make ci happy
      
      * chore: fix wrong submodule url
      
      * difftest: bump version
      
      BREAKING CHANGE: nemu update_config api has changed
      20edb3f7
  14. 01 10月, 2021 1 次提交
    • Y
      core: update parameters and module organizations (#1080) · 2b4e8253
      Yinan Xu 提交于
      This commit moves load/store reservation stations into the first
      ExuBlock (or calling it IntegerBlock). The unnecessary dispatch module
      is also removed from CtrlBlock.
      
      Now the module organization becomes:
      * ExuBlock: Int RS, Load/Store RS, Int RF, Int FUs
      * ExuBlock_1: Fp RS, Fp RF, Fp FUs
      * MemBlock: Load/Store FUs
      
      Besides, load queue has 80 entries and store queue has 64 entries now.
      2b4e8253
  15. 28 9月, 2021 1 次提交
  16. 19 9月, 2021 1 次提交
    • Y
      core: add timer counters for important stages (#1045) · ebb8ebf8
      Yinan Xu 提交于
      This commit adds timer counters for some important pipeline stages,
      including rename, dispatch, dispatch2, select, issue, execute, commit.
      We add performance counters for different types of instructions to see
      the latency in different pipeline stages.
      ebb8ebf8
  17. 13 9月, 2021 1 次提交
    • Y
      backend: clean up exception vector usages (#1026) · c88c3a2a
      Yinan Xu 提交于
      This commit cleans up exception vector usages in backend.
      
      Previously the exception vector will go through the pipeline with the
      uop. However, instructions with exceptions will enter ROB when they are
      dispatched. Thus, actually we don't need the exception vector when an
      instruction enters a function unit.
      
      * exceptionVec, flushPipe, replayInst are reset when an instruction
      enters function units.
      
      * For execution units that don't have exceptions, we reset their output
      exception vectors to avoid ROB to record them.
      
      * Move replayInst to CtrlSignals.
      c88c3a2a
  18. 02 9月, 2021 2 次提交
  19. 01 9月, 2021 1 次提交
  20. 21 8月, 2021 2 次提交
    • Y
      backend, rename: support move elimination (#920) · 8b8e745d
      YikeZhou 提交于
      * Bundle, Rename: Add some comments
      FreeList, RenameTable: Comment out unused variables
      
      * refcnt: Implement AdderTree for reference counter
      
      * build.sc: add testOne method for unit test
      
      * AdderTest: add testbench for Adder (passed)
      
      * AdderTree: Add testbench for AdderTree (passed)
      
      * ReferenceCounter: implement a 2-bit counter
      
      * Rename: remove redundant code
      
      * Rename: prepared for move elimination [WIP]
      
      * Roq: add eliminated move bit in roq entry;
        label elim move inst as writebacked
      AlternativeFreeList: new impl for int free list
      Rename: change io of free list
      Dispatch1: (todo) not send move to intDq
      Bundle: add eliminatedMove bit in roqCommitInfo, uop and debugio
      ReferenceCounter: add debug print msg
      
      * Dispatch1: [BUG FIX] not send move inst to IntDq
      
      * DecodeUnit: [BUG FIX] differentiate li from mv
      
      * Bug fix:
        1. Dispatch1: should not label pdest of move as busy in busy table
        2. Rename: use psrc0 to index bit vec isMax
        3. AlternativeFreeList: fix maxVec calculation logic and ref counter
           increment logic
      Besides, more debug info and assertions were added.
      
      * AlternativeFreeList Bug Fix:
        1. add redirect input - shouldn't allocate reg when redirect is
           valid
        2. handle duplicate preg in roqCommits in int free list
      
      * AlternativeFreeList: Fix value assignment race condition
      
      * Rename: Fix value assignment race condition too
      
      * RenameTable: refactor spec/arch table write process
      
      * Roq: Fix debug_exuData of move(addi) instruction
        (it was trash data before because move needn't enter exu)
      
      * Rename: change intFreeList's redirect process
        (by setting headPtr back) and flush process
      
      * ME: microbench & coremark & linux-hello passed
        1. DecodeUnit: treat `mv x,x` inst as non-move
        2. AlternativeFreeList: handle duplicate walk req correctly
        3. Roq: fix debug_exuData bug (make sure writeback that updates
      debug_exuData happens before ME instruction in program order)
      
      * AlternativeFreeList: License added
      build.sc: remove unused config
      Others: comments added
      
      * package rename: remove unused modules
      
      * Roq: Replace debug_prf with a cleaner fix method
      
      * Disp1/AltFL/Rename: del unnecessary white spaces
      
      * build.sc: change stack size
      AlternativeFreeList: turn off assertions
      
      * build.sc: change stack size for test
      8b8e745d
    • L
      ftq, ctrlblock: code clean ups · 5e63d5cb
      Lingrui98 提交于
      5e63d5cb
  21. 20 8月, 2021 1 次提交
    • W
      mem: loadpipe will not miss if fullForward succeed · 3db2cf75
      William Wang 提交于
      New option `EnableFastForward` is added to config list.
      EnableFastForward will reduce L1D$ miss but make timing worse.
      
      * `forwardMaskFast` is generated at load_s1, it is used to generate
      fastUop for fast wakeup
      * `forwardMask` is generated at load_s2, it will be used to check if
      forward result is correct
      3db2cf75
  22. 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
  23. 16 8月, 2021 2 次提交
  24. 02 8月, 2021 1 次提交
  25. 31 7月, 2021 1 次提交
    • Z
      bpu: Add Tage · 8a597714
      zoujr 提交于
      Add Tage into Composer
      Add global history manage logic in BPU
      Modify CfiUpdate interface: sawNotTakenBranch -> br_hit
      8a597714
  26. 29 7月, 2021 1 次提交
  27. 24 7月, 2021 1 次提交
  28. 17 7月, 2021 7 次提交
    • L
      [WIP] ifu: fix more merge errors · 83aefafe
      Lingrui98 提交于
      83aefafe
    • L
      [WIP] ftq, ctrl: fix some unconnected wires · de066b14
      Lingrui98 提交于
      de066b14
    • L
      [WIP] finish ftq logic and fix syntax errors · 5cbe3dbd
      Lingrui98 提交于
      * Now can pass compiling.
      
      [WIP] comment out-of-date code in frontend
      
      [WIP] move NewFtq to xiangshan.frontend and rename class to Ftq
      
      Ibuffer: update sigal names for new IFU
      
      [WIP] remove redundant NewFrontend
      
      [WIP] set entry_fetch_status to f_sent once send req to buf
      
      Fix syntax error in IFU
      
      Fix syntax error in IFU/ICache/Ibuffer
      
      [WIP] indent fix in ftq
      
      BPU: Move GlobalHistory define from IFU.scala to BPU.scala
      
      [WIP] fix some compilation errors
      
      BPU: Remove HasIFUConst
      and move some bundles from BPU.scala to frontendBundle.scala
      
      [WIP] fix some compilation errors
      
      [WIP] rename ftq-bpu ios
      
      [WIP] recover some const definitions
      
      [WIP] fix some compilation errors
      
      [WIP]connect some IOs in frontend
      
      BPU: fix syntax error
      
      [WIP] fix compilation errors in predecode
      
      BPU: fix RAS syntax error
      
      [WIP] add some simulation perf counters back
      
      BPU: Remove numBr redefine in ubtb and bim
      5cbe3dbd
    • L
      core: move ftq to frontend · ed3ba220
      Lingrui98 提交于
      ed3ba220
    • Y
      configs: change function unit configs for MinimalConfig (#884) · 3a6496e9
      Yinan Xu 提交于
      * change the number of function units in MinimalConfig
      * remove some hard-wired values
      3a6496e9
    • Y
      scheduler: add support for parameterization via rs and dp ports (#882) · acd4a4e3
      Yinan Xu 提交于
      This commit adds support for a parameterized scheduler. A scheduler
      can be parameterized via issue and dispatch ports.
      
      Note: other parameters have not been tested.
      acd4a4e3
    • Y
      backend: wrap all RS into a larger scheduler module (#880) · 68f95118
      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.
      68f95118
  29. 16 7月, 2021 2 次提交