From 58e8da0ca937273221a02b625cc93b09f0240777 Mon Sep 17 00:00:00 2001 From: David Li Date: Fri, 1 Jan 2016 21:05:22 -0700 Subject: Make MMU a trait for API user to implement --- src/memory.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src') 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>>; -// TODO: should be a trait -pub struct Mmu { - memory: T, +pub trait Mmu { + fn translate(address: isa::Address) -> isa::Address; } pub struct Memory { -- cgit v1.2.3