add rst wire (but do not do anything with it)
[fleet.git] / src / edu / berkeley / fleet / fpga / Fpga.java
index f5815a8..e4fafdf 100644 (file)
@@ -121,9 +121,10 @@ public class Fpga extends Fleet {
 
         if (quiet) return;
         System.out.println("`include \"macros.v\"");
-        System.out.println("module fabric(clk, data_Memory0_command_r, data_Memory0_command_a, data_Memory0_command,");
+        System.out.println("module fabric(clk, rst, data_Memory0_command_r, data_Memory0_command_a, data_Memory0_command,");
         System.out.println("                   data_Debug0_out_r, data_Debug0_out_a, data_Debug0_out);");
         System.out.println("  input  clk;");
+        System.out.println("  input  rst;");
         System.out.println("  input  data_Memory0_command_r;");
         System.out.println("  output data_Memory0_command_a;");
         System.out.println("  output data_Debug0_out_r;");
@@ -161,7 +162,7 @@ public class Fpga extends Fleet {
             System.out.print(ship.getType().toLowerCase());
             System.out.print(" ");
             System.out.print("krunk"+(krunk++));
-            System.out.print("(clk, ");
+            System.out.print("(clk, rst, ");
             boolean first = true;
             for(Pump port : ship.getPumps()) {
                 if (!first) System.out.print(", ");
@@ -183,7 +184,7 @@ public class Fpga extends Fleet {
                 } else {
                     System.out.print("outbox");
                 }
-                System.out.print(" krunk"+(krunk++)+"(clk, ");
+                System.out.print(" krunk"+(krunk++)+"(clk, rst, ");
                 System.out.print("instruction_"+getUniqueName(port.getShip())+"_"+port.getName()+"_r, ");
                 System.out.print("instruction_"+getUniqueName(port.getShip())+"_"+port.getName()+"_a, ");
                 System.out.print("`packet_data(instruction_"+getUniqueName(port.getShip())+"_"+port.getName()+"), ");
@@ -202,11 +203,11 @@ public class Fpga extends Fleet {
 
         }
 
-        System.out.println("funnel ihornfun(clk,"+
+        System.out.println("funnel ihornfun(clk, rst, "+
                            "             ihornleft_r, ihornleft_a, ihornleft,"+
                            "             ihorn_r, ihorn_a, ihorn,"+
                            "             source_r, source_a, source);");
-        System.out.println("horn tophorn(clk,"+
+        System.out.println("horn tophorn(clk, rst, "+
                            "             ihornleft_r, ihornleft_a, ihornleft,"+
                            "             instruction_r, instruction_a, instruction,"+
                            "             dest_r, dest_a, dest);");
@@ -311,7 +312,7 @@ public class Fpga extends Fleet {
                 } else {
                     System.out.println("     "+indent+
                                        component+" "+
-                                       "krunk"+(krunk++)+"(clk, "+
+                                       "krunk"+(krunk++)+"(clk, rst, "+
                                        describe(prefix)+"_r, "+
                                        describe(prefix)+"_a, "+
                                        describe(prefix)+", "+
@@ -376,7 +377,7 @@ public class Fpga extends Fleet {
             if (auto) {
                 pw.println("`include \"macros.v\"");
                 pw.println();
-                pw.println("module " + filename + "( clk");
+                pw.println("module " + filename + "( clk, rst ");
                 for(PumpDescription bb : sd) {
                     String bb_name = bb.getName();
                     pw.print("        ");
@@ -394,6 +395,7 @@ public class Fpga extends Fleet {
                 pw.println("        );");
                 pw.println();
                 pw.println("    input clk;");
+                pw.println("    input rst;");
                 for(PumpDescription bb : sd) {
                     String bb_name = bb.getName();
                     pw.print("        ");