Commit 3e78ddcb authored by Simon Schulz's avatar Simon Schulz

Refactoring

parent 1b6f6624
package core
import Programs.Test
import Programs.{ConflictTest, Test}
import engine.CacheEngine
import model.CacheModel
......@@ -8,7 +8,7 @@ object Driver {
def main(args: Array[String]): Unit = {
val cache = new CacheModel(32768, 16, 2)
val program = new Test
val program = new ConflictTest
val engine = new CacheEngine(cache)
engine.simulate(program)
}
......
package Programs
import Programs.Program
import model.CacheModel
/**
* Created by work on 30.09.14.
*/
class Test extends Program("Test") {
override def program: Int = {
val length = 1000
val a = alloc(length, 0)
val b = alloc(length, 1024)
for(i <- 0 to length-1) {
printf("i: " + i + "\n")
a(i) := b(i)
}
return a(1)
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment