broken commit

Signed-off-by: Sean Cross <sean@xobs.io>
This commit is contained in:
2023-12-29 22:08:47 +08:00
commit eb5881a358
9 changed files with 4248 additions and 0 deletions

11
src/riscv/bus.rs Normal file
View File

@ -0,0 +1,11 @@
use crate::riscv::exception::Exception;
pub enum XLen {
X32,
X64,
}
pub trait Bus<XLen> {
fn read(&mut self, addr: XLen, size: u8) -> Result<XLen, Exception>;
fn write(&mut self, addr: XLen, value: XLen, size: u8) -> Result<(), Exception>;
}