Repository navigation
en getting started index
Use an 8-bit accumulator to progress from one assertion to pipelined inputs, a reference model, and coverage. Run each example, then change one thing and observe the result. The first lessons use a Python DUT, so no RTL simulator is needed. Real DUT integration comes later.
The two main files are:
examples/getting_started/
├── test_accumulator.py 按教学顺序排列的测试、驱动、监视器和模型
└── toy_dut.py 已写好的累加器
Each lesson names the relevant test and gives a command that runs only that test.
When using the repository files, do not paste duplicate definitions into them. When starting from
an empty file, append each lesson in order and retain earlier imports and definitions.
# region and # endregion are editor-folding comments; they do not affect execution.
| Lesson | Question it answers |
|---|---|
| 0. Prepare the environment | Where do commands run, and how are dependencies installed? |
| 1. Your first PASS and FAIL | How does a test decide whether a result is correct? |
| 2. Inputs and clocks | Why has the result not changed after writing an input? |
| 3. Data sets and boundaries | What should be tested beyond one ordinary value? |
| 4. Extract a Driver | How can input timing be defined once and reused? |
| 5. Delayed outputs and Monitors | How can a one-cycle output be captured reliably? |
| 6. Assemble an Agent | How do input, output, and checking fit together? |
| 7. Models and fixtures | How are expectations computed and test environments isolated? |
| 8. Pipelines, batches, and cancellation | Can the next request start before the previous response arrives? |
| 9. Understand failures | What do wrong, missing, late, and extra responses look like? |
| 10. Functional coverage | Which planned scenarios remain untested? |
You can stop after lesson 3 to practice. Driver, Monitor, and Agent organize code you have already written; you do not need all three in your first test. Afterwards, try out-of-order responses and native clocks and project DUTs.
- DUT: the design under test, such as an accumulator, cache, bus interface, or arithmetic unit.
- Stimulus: an input sent to the DUT, such as “add 3.”
- Expected and actual values: the result derived from the specification and the result observed from the DUT.
- Transaction: a complete operation, such as adding 3 and receiving its result, possibly across several cycles.
Run bash blocks in a terminal; python blocks belong in source files. Do not copy expected output as commands.
Continue with installation.
After lesson 3 you can write clocked tests with boundary assertions. After lesson 10 you can combine components, models, pipeline checking, and coverage. Then use the how-to guides, API reference, and explanations for your own project.
内容由 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