Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RV32跳转停顿问题 #23

Open
ferryuei opened this issue Apr 3, 2023 · 0 comments
Open

RV32跳转停顿问题 #23

ferryuei opened this issue Apr 3, 2023 · 0 comments

Comments

@ferryuei
Copy link

ferryuei commented Apr 3, 2023

在RV实现部分原文提到

跳转停顿:BRANCH/JALR 指令需要寄存器读值才能计算 npc ,为了防止 ID段 组合逻辑过长,我们在 EX段 才计算并发送 npc 到 IF 段,导致总是在 ID段 产生一周期的气泡 (这里不考虑 speculation + 冲刷流水线的技术)。

实现方法:EX段 和 ID段 都可以向 IF段 发送 npc ,但不会同时,所以给 EX段 和 ID段 加上 (* conflict_free *) 属性。

想问一下,如果前一条是BRANCH/JMP指令,需要在EX阶段执行if_pc.enq();而后一条指令为NOP,在ID阶段执行if_pc.enq(),那么EX段 和 ID段 都可以向 IF段 发送 npc ,但会同时,我的理解有问题吗?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant