VerilogExporter now "hands through" a clk signal
authorDaniel Kirschten <daniel.kirschten@gmx.de>
Sun, 1 Mar 2020 16:26:28 +0000 (17:26 +0100)
committerDaniel Kirschten <daniel.kirschten@gmx.de>
Wed, 25 Mar 2020 13:08:26 +0000 (14:08 +0100)
to avoid combinatorial loops

plugins/net.mograsim.logic.model.am2900/src/net/mograsim/logic/model/examples/VerilogExporter.java

index e1d60bc..daef1aa 100644 (file)
@@ -305,7 +305,7 @@ public class VerilogExporter
 
        private void appendInterface(StringBuilder result)
        {
-               result.append("input rst");
+               result.append("input rst, input clk");
                if (!sortedInterfacePinNames.isEmpty())
                {
                        Map<String, Integer> logicWidthsPerInterfacePinName = Arrays.stream(componentJson.interfacePins)
@@ -430,7 +430,7 @@ public class VerilogExporter
                        result.append(' ');
                        // abuse the pinIdentifierGenerator for making these unique
                        result.append(pinIdentifierGenerator.getPinID("comp", subcomponentName));
-                       result.append(" (rst");
+                       result.append(" (rst, clk");
                        for (int i = 0; i < subcomponentInterfacePinNames.size(); i++)
                        {
                                result.append(",\n  ");