use of de.neemann.digital.core.memory.rom.ROMManger in project Digital by hneemann.
the class ModelCreator method createModel.
/**
* Creates the model.
*
* @param attachWires if true the wires are attached to the values
* @return the model
* @throws PinException PinException
* @throws NodeException NodeException
*/
public Model createModel(boolean attachWires) throws PinException, NodeException {
Model m = new Model();
for (Net n : netList) n.interconnect(m, attachWires);
for (ModelEntry e : entries) e.applyInputs();
for (ModelEntry e : entries) e.getElement().registerNodes(m);
for (ModelEntry e : entries) {
e.getElement().init(m);
e.getVisualElement().getShape().registerModel(this, m, e);
}
ROMManger romManager = circuit.getAttributes().get(Keys.ROMMANAGER);
romManager.applyTo(m);
return m;
}