Skip to content

Commit

Permalink
Merge pull request #219 from rmsyn/riscv/csr-macro
Browse files Browse the repository at this point in the history
riscv: add CSR-defining macros
  • Loading branch information
romancardenas authored Oct 18, 2024
2 parents 7096e0a + b568220 commit a35fde8
Show file tree
Hide file tree
Showing 10 changed files with 829 additions and 86 deletions.
1 change: 1 addition & 0 deletions riscv/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
- Add `Mstatus` vector extension support
- Add fallible counterparts to all functions that `panic`
- Add `riscv-pac` as a dependency
- Add CSR-defining macros to create in-memory types

### Fixed

Expand Down
1 change: 1 addition & 0 deletions riscv/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,4 @@ critical-section = "1.1.2"
embedded-hal = "1.0.0"
riscv-pac = { path = "../riscv-pac", version = "0.2.0" }
riscv-macros = { path = "macros", version = "0.1.0", optional = true }
paste = "1.0.15"
4 changes: 3 additions & 1 deletion riscv/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,10 @@
#![no_std]
#![allow(clippy::missing_safety_doc)]

pub use paste::paste;

pub mod asm;
pub(crate) mod bits;
pub mod bits;
pub mod delay;
pub mod interrupt;
pub mod register;
Expand Down
3 changes: 3 additions & 0 deletions riscv/src/register.rs
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,9 @@ pub mod minstreth;
mod mhpmeventx;
pub use self::mhpmeventx::*;

#[cfg(test)]
mod tests;

// TODO: Debug/Trace Registers (shared with Debug Mode)

// TODO: Debug Mode Registers
Loading

0 comments on commit a35fde8

Please sign in to comment.