diff options
author | David Li <li.davidm96@gmail.com> | 2016-01-25 16:42:32 -0500 |
---|---|---|
committer | David Li <li.davidm96@gmail.com> | 2016-01-25 16:42:32 -0500 |
commit | 4ab7f50c2c144f3dbe73e051d794b84a1548c03a (patch) | |
tree | ff22010840c6193ad4515dd092dea1865a191490 /src/main.rs | |
parent | ce1004f48b21eb3e54c90d65cd0234b722d581a5 (diff) |
Diffstat (limited to 'src/main.rs')
-rw-r--r-- | src/main.rs | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/main.rs b/src/main.rs index a9af93e..38ab791 100644 --- a/src/main.rs +++ b/src/main.rs @@ -27,7 +27,7 @@ use rustv::memory; use rustv::simulator; use memory_tracker::MemoryTracker; -use shareable_cache::ShareableCache; +use shareable_cache::{AccessibleRegion, ShareableCache}; use system::SyscallHandler; const USAGE: &'static str = " @@ -118,9 +118,13 @@ fn main() { let mut cores = vec![]; let mut core_caches = vec![]; + let midpoint = isa::Word(0x4000000 / 2); + for i in 0..4 { let core_cache = Rc::new(RefCell::new( - ShareableCache::new(i, cache_ref.clone(), cache2_ref.clone()))); + ShareableCache::new( + i, midpoint, AccessibleRegion::Low, + cache_ref.clone(), cache2_ref.clone()))); core_caches.push(core_cache.clone()); let mut core = simulator::Core::new( i, start1, isa::Word(0x100000 * (i + 1) as u32), core_cache, @@ -133,7 +137,9 @@ fn main() { for i in 4..8 { let core_cache = Rc::new(RefCell::new( - ShareableCache::new(i, cache2_ref.clone(), cache_ref.clone()))); + ShareableCache::new( + i, midpoint, AccessibleRegion::High, + cache2_ref.clone(), cache_ref.clone()))); core_caches.push(core_cache.clone()); let mut core = simulator::Core::new( i, start2, isa::Word(0x100000 * (i + 1) as u32), core_cache, |