aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Li <li.davidm96@gmail.com>2015-12-29 15:17:55 -0700
committerDavid Li <li.davidm96@gmail.com>2015-12-29 15:17:55 -0700
commitcaf6340423358554f64babcc503404315ac7dc45 (patch)
tree04222fb71b474dc6c4293847c795774fa7c5b9a9
parentdcc8f7d726620e7e2c7667fcff4c134c664971d9 (diff)
Don't give simulator ownership of binary
-rw-r--r--src/simulator.rs5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/simulator.rs b/src/simulator.rs
index 55b2b41..971427e 100644
--- a/src/simulator.rs
+++ b/src/simulator.rs
@@ -74,8 +74,9 @@ impl RegisterFile {
}
impl Simulator {
- pub fn new(num_cores: usize, binary: Binary) -> Simulator {
- let memory = Memory::new_from_binary(0x2000, binary);
+ pub fn new(num_cores: usize, memory: Memory) -> Simulator {
+ // TODO: pass in GP, SP, _start
+ // TODO: allow API user to specify core-cache layout
// TODO: initialize GP, registers (GP is in headers)
Simulator {
num_cores: num_cores,