Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -171,3 +171,8 @@ cython_debug/
# and can be added to the global gitignore or merged into this file. For a more nuclear
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
#.idea/

# vscode
.vscode/
*.fst
*.dat
10 changes: 9 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,15 @@ test_all: dut
@python3 run.py --config $(CFG) $(KV) -- $(REPORT) -vs ut_*/ $(args)

test: dut
@python3 run.py --config $(CFG) $(KV) -- $(REPORT) -vs $(target) $(args)
python3 run.py --config $(CFG) $(KV) -- $(REPORT) -vs $(target) $(args) -n auto

test_trigger: dut
make test CFG="./configs/frontend_trigger.yaml" target="./ut_frontend/ifu/frontend_trigger/"



test_predecode: dut
make test target="./ut_frontend/ifu/predecode/"

dut: rtl
@python3 run.py --config $(CFG) --build $(DUTS) $(args)
Expand Down
88 changes: 88 additions & 0 deletions configs/frontend_trigger.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
#coding=utf8
#***************************************************************************************
# This project is licensed under Mulan PSL v2.
# You can use this software according to the terms and conditions of the Mulan PSL v2.
# You may obtain a copy of Mulan PSL v2 at:
# http://license.coscl.org.cn/MulanPSL2
#
# THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
# EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
# MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
#
# See the Mulan PSL v2 for more details.
#**************************************************************************************/

# Default configuration file
# Configuration load order: _default.yaml -> user-specified *.yaml -> command line arguments e.g., log.term-level='debug'

# RTL configuration
rtl:
# RTL download URL, fetch all *.gz.tar files from this URL as target RTL
base-url: https://raw.githubusercontent.com/XS-MLVP/UnityChipXiangShanRTLs/refs/heads/main/README.md
# RTL version to download e.g., openxiangshan-kmh-97e37a2237-24092701
version: latest
# Directory to store RTL, relative to the current configuration file path
cache-dir: "%{root}/rtl"

# Test case configuration (tags and cases support wildcards)
test:
# Skip tags, all test cases with these tags will be skipped
skip-tags: ["LONG_TIME_RUN", "RARELY_USED", "REGRESSION", "CI","BUG"]
# Run tags, only test cases with these tags will be executed (skip-tags override run-tags)
run-tags: []
# Skip cases, all test cases with these names (or module names) will be skipped
skip-cases: []
# Run cases, only test cases with these names (or module names) will be executed (skip-cases override run-cases)
run-cases: []
# Skip exceptions, all test cases that raise these exceptions will be skipped
skip-exceptions: []

# Output configuration
output:
# Output directory, relative to the current configuration file path
out-dir: "%{root}/out"

# Test report configuration
report:
# Report generation directory, relative to output.out-dir
report-dir: "report"
# Report name, supports variable substitution: %{host} hostname, %{pid} process ID, %{time} current time
report-name: "%{time}-%{gitag}/index.html"
# Report content
information:
# Report title
title: "XiangShan KMH Test Report"
# Report user information
user:
name: "leesum"
email: "leesum1@qq.com"
# Report user information
line_grate: 99
# Other information to display, key is the title, value is the content
meta:
Version: "%{giturl}"

# Log configuration
log:
# Root log level
root-level: "debug"
# Terminal log level
term-level: "info"
# Directory to store log files, relative to the outout.out-dir path
file-dir: "log"
# Log file name, supports variable substitution: %{host} hostname, %{pid} process ID, %{time} current time
file-name: "%{host}-%{pid}-%{time}.log"
# File log level
file-level: "info"

# Doc result configuration (this data is used to populate charts and other statistics in
# the documents, and the raw data comes from the report generated by toffee-test).
# After run test, use `make doc` to check the result.
doc-result:
# Process result or not
disable: False
# Target duts and their structure
dutree: "%{root}/configs/dutree/xiangshan-kmh.yaml"
# Result path, relative to the current configuration file path
result-name: "ut_data_progress.json"
report-link: "%{root}/documents/static/data/reports"
21 changes: 21 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
[project]
name = "unitychipforxiangshan"
version = "0.1.0"
description = "Add your description here"
readme = "README.md"
requires-python = ">=3.12"
dependencies = [
"allure-pytest>=2.13.5",
"filelock>=3.9.0",
"hypothesis>=6.124.7",
"pytest>=8.3.4",
"pytest-asyncio>=0.25.2",
"pytoffee",
"pyyaml>=6.0.1",
"requests>=2.28.1",
"toffee-test",
]

[tool.uv.sources]
pytoffee = { git = "https://github.com/XS-MLVP/toffee", rev = "master" }
toffee-test = { git = "https://github.com/XS-MLVP/toffee-test", rev = "master" }
Binary file not shown.
Loading