riscv / riscv-j-extension

Working Draft of the RISC-V J Extension Specification
https://jira.riscv.org/browse/RVG-128
Creative Commons Attribution 4.0 International
159 stars 18 forks source link

why new instruction for a subset of FENCE.I #16

Open jnk0le opened 2 years ago

jnk0le commented 2 years ago

about id-consistency-proposal.pdf v0.9.1

Default (conservative) behaviour of FENCE.I is to flush the pipeline, all uncoherent instruction caches and anything else related. fence.i also didn't allocate whole 22.125 bits of opcode just to waste it.

IMPORT.I - is just an isb like pipeline flush that is already subset of fence.i. Why can't we use those 12bits of imm to somehow encode fence.ipipe instruction? In this way it degrades to regular fence.i on "legacy" cores.

There is also an likely need for fence.ipipe instruction for different purposes than importing new instructions, so fence.ipipe and import.i probably should be encoded with a different bit pattern as the latter might not need to perform whole pipeline flush.