aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/memory.rs5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/memory.rs b/src/memory.rs
index 8fdf43d..5092f55 100644
--- a/src/memory.rs
+++ b/src/memory.rs
@@ -54,9 +54,8 @@ pub trait MemoryInterface {
pub type SharedMemory<'a> = Rc<RefCell<Box<MemoryInterface + 'a>>>;
-// TODO: should be a trait
-pub struct Mmu<T: MemoryInterface> {
- memory: T,
+pub trait Mmu {
+ fn translate(address: isa::Address) -> isa::Address;
}
pub struct Memory {