Skip to content

Commit bbee198

Browse files
committed
fix: update code comments in rob.rs for clarity and consistency, changing 'entry_id' to 'rob_id' and specifying code block format
1 parent 1062430 commit bbee198

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

bebop/src/buckyball/rob.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
/// - **Inflight**: 指令已被调度出去执行,正在执行单元中处理。一旦被标记为 Inflight,该条目就不会再被重复调度。
1212
///
1313
/// ## 状态转换流程
14-
/// ```
14+
/// ```text
1515
/// Idle -> Allocated (rob_allocate_ext)
1616
/// ↓
1717
/// Inflight (rob_dispatch_int)
@@ -52,12 +52,13 @@
5252
/// ## 使用示例
5353
///
5454
/// ```rust
55+
/// use bebop::buckyball::Rob;
5556
/// let mut rob = Rob::new(8);
5657
/// // 初始化时所有8个entry都是Idle状态
5758
/// // 分配指令
58-
/// rob.rob_allocate_ext(Some((1, 10, 20, 0))); // 找到第一个Idle entry, entry_id = 0, status -> Allocated
59+
/// rob.rob_allocate_ext(Some((1, 10, 20, 0))); // 找到第一个Idle entry, rob_id = 0, status -> Allocated
5960
/// // 调度指令
60-
/// let dispatched = rob.rob_dispatch_int(); // entry_id = 0, status -> Inflight
61+
/// let dispatched = rob.rob_dispatch_int(); // rob_id = 0, status -> Inflight
6162
/// // 执行完成后提交
6263
/// rob.rob_commit_ext(Some(0)); // entry 0 状态 -> Idle,可以再次使用
6364
/// ```

0 commit comments

Comments
 (0)