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

Is there any implementation of FENCE instructions? #123

Open
zyn810039594 opened this issue Sep 23, 2024 · 1 comment
Open

Is there any implementation of FENCE instructions? #123

zyn810039594 opened this issue Sep 23, 2024 · 1 comment

Comments

@zyn810039594
Copy link

Hi!

I'm testing somethine about memory access, and I want to keep the order between two store/load instruction. I used "fence rw,rw" to do that, but nothing happened.

After checking the file, FENCE instruction has been found in EnvCallPlugin,

https://github.com/SpinalHDL/NaxRiscv/blob/main/src/main/scala/naxriscv/execute/EnvCallPlugin.scala#60

but I've not found any implementation of it. Is this feature been supported? Or it's just done in another module?

Thanks for your help!

@Dolu1990
Copy link
Member

Hi,

Fence are only "properly" implemented if memory coherency is enabled. It is done in the Lsu2Plugin :

val fencer = cache.withCoherency generate new Area{

It will add some logic to hold instruction just before the issue queue (dispatcher)

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

2 participants