From: Adam Megacz Date: Tue, 3 Mar 2009 20:42:15 +0000 (+0000) Subject: add PercolatedPort X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=3ab530407fa2cf96a49eba51730eee0a5fdbeda2;p=fleet.git add PercolatedPort --- diff --git a/testCode/edu/berkeley/fleet/two/PercolatedPort.java b/testCode/edu/berkeley/fleet/two/PercolatedPort.java new file mode 100644 index 0000000..d2fd257 --- /dev/null +++ b/testCode/edu/berkeley/fleet/two/PercolatedPort.java @@ -0,0 +1,17 @@ +package edu.berkeley.fleet.two; + +/** + * A PercolatedPort is a connection to a top-level pin; it is + * propagated up or down the hierarchy + */ +public class PercolatedPort { + public static enum PortType { UP, DOWN, INOUT }; + public final String name; + public final int width; + public final PortType type; + public PercolatedPort(String name, int width, PortType type) { + this.name = name; + this.width = width; + this.type = type; + } +} diff --git a/testCode/edu/berkeley/fleet/two/ShipDescription.java b/testCode/edu/berkeley/fleet/two/ShipDescription.java index dbc682e..1aa801b 100644 --- a/testCode/edu/berkeley/fleet/two/ShipDescription.java +++ b/testCode/edu/berkeley/fleet/two/ShipDescription.java @@ -1,6 +1,5 @@ package edu.berkeley.fleet.two; import edu.berkeley.fleet.api.*; -//import edu.berkeley.fleet.fpga.verilog.Verilog.PercolatedPort; import java.io.*; import java.util.*; @@ -21,7 +20,7 @@ public class ShipDescription implements Iterable { return ports.values(); } - //public final LinkedList percolatedPorts = new LinkedList(); + public final LinkedList percolatedPorts = new LinkedList(); public ShipDescription(String name, BufferedReader r) throws IOException { if (name.endsWith(".ship")) name = name.substring(0, name.length()-".ship".length()); @@ -89,7 +88,6 @@ public class ShipDescription implements Iterable { else if (key.equals("in")) { inbox = true; } else if (key.equals("dockless out")) { inbox = false; dockless = true; } else if (key.equals("out")) { inbox = false; } - /* else if (key.startsWith("percolate")) { key = s; key = key.substring("percolate".length()+1).trim(); @@ -103,7 +101,6 @@ public class ShipDescription implements Iterable { percolatedPorts.add(new PercolatedPort(name, width, type)); continue; } - */ else if (key.startsWith("constant")) { String constname = key.substring("constant".length()+1).trim(); String val = s.substring(s.indexOf(':')+1).trim();