use of com.jopdesign.wcet.uppaal.translator.cache.FIFOVarBlockCacheBuilder in project jop by jop-devel.
the class SystemBuilder method getCacheSimulation.
private CacheSimBuilder getCacheSimulation() {
MethodCache cache = project.getWCETProcessorModel().getMethodCache();
UppaalCacheApproximation cacheApprox = config.getCacheApproximation();
CacheSimBuilder sim;
if (cache.getName() == CacheImplementation.NO_METHOD_CACHE) {
sim = new StaticCacheBuilder(false);
} else if (cacheApprox == UppaalCacheApproximation.ALWAYS_MISS) {
sim = new StaticCacheBuilder(true);
} else {
switch(cache.getName()) {
case LRU_CACHE:
sim = new LRUCacheBuilder((BlockCache) cache);
break;
case FIFO_CACHE:
sim = new FIFOCacheBuilder((BlockCache) cache, config.emptyInitialCache);
break;
case LRU_VARBLOCK_CACHE:
sim = new LRUVarBlockCacheBuilder(project, (VarBlockCache) cache, this.methodId.keySet());
break;
case FIFO_VARBLOCK_CACHE:
sim = new FIFOVarBlockCacheBuilder(project, (VarBlockCache) cache, this.methodId.keySet(), config.emptyInitialCache);
break;
default:
throw new AssertionError("Unsupport cache implementation: " + cache.getName());
}
}
return sim;
}
Aggregations