+ mpmFile = project.getFile(configuration.getAttribute(MPM_FILE_ATTR, ""));
+
+ String initialRAMFileName = configuration.getAttribute(INITIAL_RAM_FILE_ATTR, "");
+ MainMemory mem;
+ if (!"".equals(initialRAMFileName))
+ {
+ IFile initialRAMFile = project.getFile(initialRAMFileName);
+ try (InputStream initialRAMStream = initialRAMFile.getContents())
+ {
+ mem = MainMemoryParser.parseMemory(mainMemDef, initialRAMStream);
+ }
+ catch (IOException e)
+ {
+ throw new CoreException(
+ new Status(IStatus.ERROR, MograsimActivator.PLUGIN_ID, "Unexpected IO exception reading initial RAM file", e));
+ }
+ } else
+ mem = null;
+
+ MachineDebugTarget debugTarget = new MachineDebugTarget(launch, machineDefinition);
+ debugTarget.suspend();
+ debugTarget.setExecutionSpeed(1);
+ machine = debugTarget.getMachine();
+ assignMicroInstructionMemory();
+ if (mem != null)
+ machine.getMainMemory().bind(mem);
+ machine.reset();
+ }