Repository navigation
zh Home
github-actions[bot] edited this page Oct 30, 2026
·
1 revision
本文档对应从 XReactor 迁入的 Toffee 2;Legacy 保留在
master,升级见迁移指南。
写硬件测试,通常要做三件事:给设计送输入、等待结果、判断结果是否正确。 Toffee 帮你把这些工作写成 Python 测试,并在需要时拆成可复用的组件。
按你当前的目的选择入口,各部分可以独立阅读。
| 你的目的 | 从这里开始 | 读完能做什么 |
|---|---|---|
| 第一次使用,想跟着做 | 教程 | 用一个 8 位累加器完成断言、驱动、自动检查和覆盖率练习 |
| 已经有测试,要完成具体任务 | 操作指南 | 按任务接入 DUT、组织验证组件、运行回归或迁移项目 |
| 查一个接口或参数 | 参考 | 找到 API、默认值、命令行选项和支持边界 |
| 理解行为背后的原因 | 原理说明 | 理解时钟推进、任务归属,以及检查和覆盖率的关系 |
从准备环境和第一次 PASS 与 FAIL开始。 教程前半部分只需 Python,不需要先搭好 RTL 仿真环境。每页都有仓库中的测试文件、 运行命令和预期结果;完成一项练习后再引入下一个概念。
- 配置和启动仿真:创建 Backend,并在测试结束时释放资源。
- 编写 Driver和采集输出:把重复的输入输出时序放进组件。
- 接入参考模型:在输入接受后推进模型,自动比较响应。
- 运行回归与汇总覆盖率:选择测试、并行运行和排查收集失败。
内容由 CI 自动同步;请编辑主仓库文档。 Automatically synced by CI; edit the source documentation.
- 首页
- 教程
- 操作指南
- 参考
- 原理说明
- Home
-
Tutorials
- Learning path
- 0. Prepare your environment
- 1. Your first PASS and FAIL
- 2. Inputs and clocks
- 3. More cases and boundaries
- 4. Extract a Driver
- 5. Delayed output and a Monitor
- 6. Assemble an Agent
- 7. Models and the test environment
- 8. Pipelines, batches, and cancellation
- 9. Understand failures
- 10. Functional coverage
- Optional: out-of-order responses
- Optional: native clocks and project DUTs
-
How-to guides
- Find your task
- Simulation and events
- Verification components
- Coverage and regressions
- Migration and maintenance
- Runnable examples
- Reference
- Explanation