Skip to content
Merged
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
1 change: 1 addition & 0 deletions content/en/Guide/Development Workflow and Build System.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ nix develop
This command sets up:
- Scala/Chisel RTL development tools
- Verilator for hardware simulation
- Rust toolchain for code generation and utilities
- C/C++ compiler for software
- Test frameworks and dependencies
- Pre-commit hooks
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Buckyball provides comprehensive execution tracing infrastructure for debugging,

### Trace Types

Buckyball generates multiple trace streams during simulation, each capturing specific aspects of system behavior. The **ITRACE** stream captures instruction issue and complete events along with RoB entry identifiers, making it ideal for debugging instruction sequencing and identifying stalls. The **MTRACE** stream records memory operations, load/store patterns, and DMA activity for analyzing cache behavior and memory bottlenecks. The **PMCTRACE** stream emits performance counter events including cache hits and misses, enabling system-level profiling and throughput measurement. The **CTRACE** stream logs commit and retire events for verifying program correctness. The **BANKTRACE** stream monitors bank access patterns and scoreboard state, useful for register pressure analysis and rename efficiency assessment.
Buckyball generates multiple trace streams during simulation, each capturing specific aspects of system behavior. The **ITRACE** stream captures instruction issue and complete events along with RoB entry identifiers and clock cycle timestamps, making it ideal for debugging instruction sequencing and identifying stalls. Each event records the exact clock cycle when the instruction was issued, issued to a domain, or completed. The **MTRACE** stream records memory operations, load/store patterns, and DMA activity for analyzing cache behavior and memory bottlenecks. The **PMCTRACE** stream emits performance counter events including cache hits and misses, enabling system-level profiling and throughput measurement. The **CTRACE** stream logs commit and retire events for verifying program correctness. The **BANKTRACE** stream monitors bank access patterns and scoreboard state, useful for register pressure analysis and rename efficiency assessment.

### Enabling Traces

Expand Down Expand Up @@ -54,11 +54,11 @@ Memory trace records document load, store, and DMA operations. Each record speci

### NDJSON Visualization Script

The `bdb_ndjson_viz.py` script generates a timeline visualization of RoB activity from trace files. It shows the lifetime of each RoB entry (allocation, issue, and completion), instruction issue rates over time, domain utilization (how much Ball, Memory, and GP bandwidth is used), and stall patterns that reveal when no instructions are active. The output is a PNG timeline image that makes it easy to spot performance issues visually.
The `bdb_ndjson_viz.py` script generates a timeline visualization of RoB activity from trace files. It shows the lifetime of each RoB entry (allocation, issue, and completion), instruction issue rates over time, domain utilization (how much Ball, Memory, and GP bandwidth is used), and stall patterns that reveal when no instructions are active. The visualization includes clock cycle information to precisely align events in time, making it easy to correlate different traces. The output is a PNG timeline image that makes it easy to spot performance issues visually.

### Trace Annotation
### Trace Annotation Script

The `bdb_ndjson_annotate.py` script enriches traces with symbolic information by cross-referencing instruction encodings against the ISA definitions and symbol tables. It adds function names (via symbol table lookup), instruction mnemonics (decoded from ISA definitions), pretty-printed operands, and call/return markers. Annotated traces are much more readable and make it easier to correlate high-level program behavior with low-level execution patterns.
The `bdb_ndjson_annotate.py` script enriches traces with symbolic information by cross-referencing instruction encodings against the ISA definitions and symbol tables. It adds function names (via symbol table lookup), instruction mnemonics (decoded from ISA definitions), pretty-printed operands, and call/return markers. Annotated traces are much more readable and make it easier to correlate high-level program behavior with low-level execution patterns. The script preserves clock cycle information to maintain temporal accuracy after annotation.

### Manual Trace Processing

Expand Down
3 changes: 2 additions & 1 deletion content/zh/Guide/Development Workflow and Build System.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ nix develop
此命令设置:
- Scala/Chisel RTL 开发工具
- 硬件模拟用的 Verilator
- C/C++ 编译器
- 代码生成和工具的 Rust 工具链
- 软件用的 C/C++ 编译器
- 测试框架和依赖项
- 预提交钩子

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Buckyball 提供全面的执行追踪基础设施,用于调试、性能分析

### 追踪类型

Buckyball 在模拟期间生成多个追踪流,每个流捕获系统行为的特定方面。**ITRACE** 流捕获指令发放和完成事件及 RoB 条目标识符,非常适合调试指令序列和识别停顿。**MTRACE** 流记录内存操作、load/store 模式和 DMA 活动,用于分析缓存行为和内存瓶颈。**PMCTRACE** 流发出性能计数器事件,包括缓存命中和缺失,用于系统级分析和吞吐量测量。**CTRACE** 流记录提交和退役事件,用于验证程序正确性。**BANKTRACE** 流监控库访问模式和计分板状态,对寄存器压力分析和重命名效率评估有用。
Buckyball 在模拟期间生成多个追踪流,每个流捕获系统行为的特定方面。**ITRACE** 流捕获指令发放和完成事件及 RoB 条目标识符和时钟周期时间戳,非常适合调试指令序列和识别停顿。每个事件记录指令发放、发放到执行域或完成时的精确时钟周期。**MTRACE** 流记录内存操作、load/store 模式和 DMA 活动,用于分析缓存行为和内存瓶颈。**PMCTRACE** 流发出性能计数器事件,包括缓存命中和缺失,用于系统级分析和吞吐量测量。**CTRACE** 流记录提交和退役事件,用于验证程序正确性。**BANKTRACE** 流监控库访问模式和计分板状态,对寄存器压力分析和重命名效率评估有用。

### 启用追踪

Expand Down Expand Up @@ -54,11 +54,11 @@ Buckyball 在模拟期间生成多个追踪流,每个流捕获系统行为的

### NDJSON 可视化脚本

`bdb_ndjson_viz.py` 脚本从追踪文件生成 RoB 活动的时间轴可视化。它显示每个 RoB 条目的生命周期(分配、发放和完成)、随时间的指令发放率、域利用率(Ball、内存和 GP 带宽的使用程度),以及揭示何时没有指令活跃的停顿模式。输出是 PNG 时间轴图像,使得视觉上很容易发现性能问题。
`bdb_ndjson_viz.py` 脚本从追踪文件生成 RoB 活动的时间轴可视化。它显示每个 RoB 条目的生命周期(分配、发放和完成)、随时间的指令发放率、域利用率(Ball、内存和 GP 带宽的使用程度),以及揭示何时没有指令活跃的停顿模式。可视化包含时钟周期信息以精确对齐时间中的事件,使得关联不同追踪变得容易。输出是 PNG 时间轴图像,使得视觉上很容易发现性能问题。

### 追踪注解
### 追踪注解脚本

`bdb_ndjson_annotate.py` 脚本通过交叉引用指令编码与 ISA 定义和符号表来用符号信息充实追踪。它添加函数名(通过符号表查找)、指令助记符(从 ISA 定义解码)、美化打印的操作数和调用/返回标记。注解追踪更易读,并使得关联高级程序行为与低级执行模式变得更容易。
`bdb_ndjson_annotate.py` 脚本通过交叉引用指令编码与 ISA 定义和符号表来用符号信息充实追踪。它添加函数名(通过符号表查找)、指令助记符(从 ISA 定义解码)、美化打印的操作数和调用/返回标记。注解追踪更易读,并使得关联高级程序行为与低级执行模式变得更容易。脚本在注解后保留时钟周期信息以保持时间精度。

### 手动追踪处理

Expand Down