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;