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

csr: Implement menvcfg #1653

Merged

Conversation

zarubaf
Copy link
Contributor

@zarubaf zarubaf commented Nov 23, 2023

Only the fiom bit needs to be implemented. Since we anyway treat all fences and atomics as fully sequential the value is currently not needed anywhere.

3.1.18 Machine Environment Configuration Registers (menvcfg and menvcfgh)

If bit FIOM (Fence of I/O implies Memory) is set to one in menvcfg, FENCE instructions executed in modes less privileged than M are modified so the requirement to order accesses to device I/O implies also the requirement to order main memory accesses. Table 3.8 details the modified inter- pretation of FENCE instruction bits PI, PO, SI, and SO for modes less privileged than M when FIOM=1.
Similarly, for modes less privileged than M when FIOM=1, if an atomic instruction that accesses a region ordered as device I/O has its aq and/or rl bit set, then that instruction is ordered as though it accesses both device I/O and memory.
If S-mode is not supported, or if satp.MODE is read-only zero (always Bare), the implementation may make FIOM read-only zero.

Only the `fiom` bit needs to be implemented. Since we anyway treat all
fences and atomics as fully sequential the value is currently not needed
anywhere.
Copy link
Contributor

❌ failed run, report available here.

core/csr_regfile.sv Outdated Show resolved Hide resolved
Copy link
Contributor

✔️ successful run, report available here.

@JeanRochCoulon JeanRochCoulon merged commit 8146c96 into openhwgroup:master Dec 14, 2023
19 checks passed
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

Successfully merging this pull request may close these issues.

3 participants