Search in sources :

Example 1 with HeaderAllocationModel

use of com.jopdesign.wcet.allocation.HeaderAllocationModel in project jop by jop-devel.

the class WCETTool method onSetupAppInfo.

@SuppressWarnings({ "LiteralAsArgToStringEquals" })
@Override
public void onSetupAppInfo(AppSetup setup, AppInfo appInfo) throws BadConfigurationException {
    if (projectConfig.getProcessorName().equals("allocObjs")) {
        this.processor = new ObjectAllocationModel(this);
    } else if (projectConfig.getProcessorName().equals("allocHandles")) {
        this.processor = new HandleAllocationModel(this);
    } else if (projectConfig.getProcessorName().equals("allocHeaders")) {
        this.processor = new HeaderAllocationModel(this);
    } else if (projectConfig.getProcessorName().equals("allocBlocks")) {
        this.processor = new BlockAllocationModel(this);
    } else if (projectConfig.getProcessorName().equals("jamuth")) {
        this.processor = new JamuthWCETModel(this);
    } else if (projectConfig.getProcessorName().equals("JOP")) {
        try {
            this.processor = new JOPWcetModel(this);
        } catch (IOException e) {
            throw new BadConfigurationException("Unable to initialize JopWcetModel: " + e.getMessage(), e);
        }
    } else {
        throw new BadConfigurationException("Unknown WCET model: " + projectConfig.getProcessorName());
    }
    // create output dir only after initialization is successful
    File outDir = projectConfig.getProjectDir();
    Config.checkDir(outDir, true);
}
Also used : HandleAllocationModel(com.jopdesign.wcet.allocation.HandleAllocationModel) ObjectAllocationModel(com.jopdesign.wcet.allocation.ObjectAllocationModel) HeaderAllocationModel(com.jopdesign.wcet.allocation.HeaderAllocationModel) BlockAllocationModel(com.jopdesign.wcet.allocation.BlockAllocationModel) BadConfigurationException(com.jopdesign.common.config.Config.BadConfigurationException) IOException(java.io.IOException) JOPWcetModel(com.jopdesign.wcet.jop.JOPWcetModel) File(java.io.File)

Aggregations

BadConfigurationException (com.jopdesign.common.config.Config.BadConfigurationException)1 BlockAllocationModel (com.jopdesign.wcet.allocation.BlockAllocationModel)1 HandleAllocationModel (com.jopdesign.wcet.allocation.HandleAllocationModel)1 HeaderAllocationModel (com.jopdesign.wcet.allocation.HeaderAllocationModel)1 ObjectAllocationModel (com.jopdesign.wcet.allocation.ObjectAllocationModel)1 JOPWcetModel (com.jopdesign.wcet.jop.JOPWcetModel)1 File (java.io.File)1 IOException (java.io.IOException)1