Refactored Wire and finally renamed length to width
[Mograsim.git] / net.mograsim.logic.core / src / net / mograsim / logic / core / components / TriStateBuffer.java
index ac2e422..057c49e 100644 (file)
@@ -15,11 +15,11 @@ public class TriStateBuffer extends BasicComponent
        public TriStateBuffer(Timeline timeline, int processTime, ReadEnd in, ReadWriteEnd out, ReadEnd enable)
        {
                super(timeline, processTime);
-               if (in.length() != out.length())
+               if (in.width() != out.width())
                        throw new IllegalArgumentException(
-                                       "Tri-state output must have the same amount of bits as the input. Input: " + in.length() + " Output: " + out.length());
-               if (enable.length() != 1)
-                       throw new IllegalArgumentException("Tri-state enable must have exactly one bit, not " + enable.length() + ".");
+                                       "Tri-state output must have the same amount of bits as the input. Input: " + in.width() + " Output: " + out.width());
+               if (enable.width() != 1)
+                       throw new IllegalArgumentException("Tri-state enable must have exactly one bit, not " + enable.width() + ".");
                this.in = in;
                in.registerObserver(this);
                this.enable = enable;