Search in sources :

Example 1 with ROMManger

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;
}
Also used : Model(de.neemann.digital.core.Model) ROMManger(de.neemann.digital.core.memory.rom.ROMManger)

Aggregations

Model (de.neemann.digital.core.Model)1 ROMManger (de.neemann.digital.core.memory.rom.ROMManger)1