1 /*
2  * Copyright (c) 2020 Helmut Neemann.
3  * Use of this source code is governed by the GPL v3 license
4  * that can be found in the LICENSE file.
5  */
6 package de.neemann.digital.draw.library;
7 
8 import de.neemann.digital.core.Model;
9 import de.neemann.digital.core.NodeException;
10 import de.neemann.digital.core.ObservableValues;
11 import de.neemann.digital.core.element.Element;
12 import de.neemann.digital.core.element.ElementAttributes;
13 import de.neemann.digital.core.element.ElementTypeDescription;
14 import de.neemann.digital.core.element.Keys;
15 
16 /**
17  * Allows to a generic init code to a circuit.
18  */
19 public class GenericInitCode implements Element {
20     /**
21      * The GenericInitCodeElement description
22      */
23     public static final ElementTypeDescription DESCRIPTION
24             = new ElementTypeDescription(GenericInitCode.class)
25             .addAttribute(Keys.LABEL)
26             .addAttribute(Keys.ENABLED)
27             .addAttribute(Keys.GENERIC)
28             .supportsHDL();
29 
30     /**
31      * creates a new instance
32      *
33      * @param attributes the attributes
34      */
GenericInitCode(ElementAttributes attributes)35     public GenericInitCode(ElementAttributes attributes) {
36     }
37 
38     @Override
setInputs(ObservableValues inputs)39     public void setInputs(ObservableValues inputs) throws NodeException {
40     }
41 
42     @Override
getOutputs()43     public ObservableValues getOutputs() {
44         return ObservableValues.EMPTY_LIST;
45     }
46 
47     @Override
registerNodes(Model model)48     public void registerNodes(Model model) {
49     }
50 }
51