name: Bug report
description: Report a bug (incorrect behaviors) of XiangShan Processor Cores.
labels:
  - 'type: bug/reported'
  - 'module: unknown'
body:
  - type: markdown
    attributes:
      value: |
        You could use English or Chinese to open an issue.
        您可以使用中文或英文提问，我们推荐使用英文。

        This template is only used for reporting a bug (incorrect behaviors) of XiangShan Processor Cores. If this doesn't look right, please back and choose another template.
        这个 issue 模板仅用于提报香山不正确的行为。如果您遇到的不是此类问题，请回退并选择其他模板。

        Please make sure that the incorrect behaviors can still be reproduced on the latest commit of the master branch.
        请确保不正确的行为在 master 分支最新的 commit 仍能复现。

        Please fill in the following information so we can better understand and address your issue. Thank you!
        请填写以下内容，以便我们更好地理解和处理您的问题。谢谢！
  - type: checkboxes
    id: before-start
    attributes:
      label: Before start
      description: |
        Before start, PLEASE MAKE SURE you have done these:
        开始之前，请确保您已经做过以下事情：
      options:
        - label: I have read the [RISC-V ISA Manual](https://github.com/riscv/riscv-isa-manual) and this is not a RISC-V ISA question. 我已经阅读过 RISC-V 指令集手册，这不是一个指令集本身的问题。
          required: true
        - label: I have read the [XiangShan Documents](https://xiangshan-doc.readthedocs.io/zh_CN/latest). 我已经阅读过香山文档。
          required: true
        - label: I have searched the previous issues and did not find anything relevant. 我已经搜索过之前的 issue，并没有找到相关的。
          required: true
        - label: I have reviewed the commit messages from the relevant commit history. 我已经浏览过相关的提交历史和提交信息。
          required: true
        - label: I have reproduced the incorrect behaviors using the latest commit on the master branch. 我已经使用 master 分支最新的 commit 复现了不正确的行为。
          required: true
  - type: textarea
    id: describe
    attributes:
      label: Describe the bug
      description: |
        A clear and concise description of what the bug is.
        请清晰、准确地描述这一缺陷。

        If applicable, add screenshots / logs to help explain your problem.
        如果可能，请提供有助于您描述问题的屏幕截图和日志。

        Please upload logs as attachments, do not paste them directly into the text box.
        请使用附件的形式上传日志，不要直接粘贴到文本框中。
      placeholder:
    validations:
      required: true
  - type: textarea
    id: expected-behavior
    attributes:
      label: Expected behavior
      description: |
        A clear and concise description of what you expected to happen.
        请清晰、准确地描述期望的行为。
      placeholder:
    validations:
      required: true
  - type: textarea
    id: reproduce
    attributes:
      label: To Reproduce
      description: |
        Steps to reproduce the bug. Also a corresponding minimal workload (source code and bin) along with a description.
        复现这一缺陷的步骤，以及相关的最小测试用例（包含源码、二进制文件和说明）。
      placeholder:
    validations:
      required: true
  - type: textarea
    id: environment
    attributes:
      label: Environment
      description: |
        Please provide your environment information.
        请提供您的环境信息。

        XiangShan config specifies the XiangShan compilation options specified by `CONFIG=` when compiling XiangShan. If no option is specified, the default is `DefaultConfig`.
        XiangShan config 为您编译香山时由 `CONFIG=` 指定的香山编译选项，如果没有显示指定，则默认为 `DefaultConfig`。
      placeholder:
      value: |
        - XiangShan branch:
        - XiangShan commit id:
        - XiangShan config:
        - NEMU commit id:
        - SPIKE commit id:
    validations:
      required: true
  - type: textarea
    id: additional
    attributes:
      label: Additional context
      description: |
        Add any other context about the problem here.
        可在此处附上其他相关信息。

        For example, your guess about the cause of the bug, or the modules that may be related.
        例如，您对 bug 可能原因的猜测，或者可能与 bug 相关的模块。
      placeholder:
    validations:
      required: false
