构建具有多内核流水线的RISC - V处理器
1. 执行阶段
在执行阶段,代码会进行一系列操作。首先定义了一些变量,如 result2 和 computed_pc 。通过 select_hart 函数选择要执行的内核。如果输入指令有效,会将对应内核的执行状态标记为满,并保存输入信息。
以下是执行阶段的部分代码:
int result2;
code_address_t computed_pc;
select_hart (e_state_is_full, m_state_is_full, &is_selected, &selected_hart);
if (e_from_i.is_valid) {
e_state_is_full [e_from_i.hart] = 1;
save_input_from_i (e_from_i, e_state);
}
is_executing = is_selected || (e_from_i.is_valid && !m_state_is_full [e_from_i.hart]);
executing_hart = (is_selected)? selected_hart : e_from_i.hart;
if (is_executing) {
e_state_is_full [executing_hart] = 0;
compute (executing_hart, e_state, &bcond, &result1, &
多内核流水线RISC-V处理器设计
超级会员免费看
订阅专栏 解锁全文

954

被折叠的 条评论
为什么被折叠?



