projects
/
Mograsim.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Timeline now passed via constructor
[Mograsim.git]
/
era.mi
/
src
/
era
/
mi
/
logic
/
components
/
TriStateBuffer.java
diff --git
a/era.mi/src/era/mi/logic/components/TriStateBuffer.java
b/era.mi/src/era/mi/logic/components/TriStateBuffer.java
index
920c2ec
..
123e2c5
100644
(file)
--- a/
era.mi/src/era/mi/logic/components/TriStateBuffer.java
+++ b/
era.mi/src/era/mi/logic/components/TriStateBuffer.java
@@
-2,17
+2,19
@@
package era.mi.logic.components;
import java.util.List;
import java.util.List;
-import era.mi.logic.Bit;
-import era.mi.logic.wires.Wire.WireEnd;
+import era.mi.logic.timeline.Timeline;
+import era.mi.logic.types.Bit;
+import era.mi.logic.wires.Wire.ReadEnd;
+import era.mi.logic.wires.Wire.ReadWriteEnd;
public class TriStateBuffer extends BasicComponent
{
public class TriStateBuffer extends BasicComponent
{
-
Wire
End in, enable;
-
Wir
eEnd out;
+
Read
End in, enable;
+
ReadWrit
eEnd out;
- public TriStateBuffer(
int processTime, WireEnd in, WireEnd out, Wire
End enable)
+ public TriStateBuffer(
Timeline timeline, int processTime, ReadEnd in, ReadWriteEnd out, Read
End enable)
{
{
- super(processTime);
+ super(
timeline,
processTime);
if (in.length() != out.length())
throw new IllegalArgumentException(
"Tri-state output must have the same amount of bits as the input. Input: " + in.length() + " Output: " + out.length());
if (in.length() != out.length())
throw new IllegalArgumentException(
"Tri-state output must have the same amount of bits as the input. Input: " + in.length() + " Output: " + out.length());
@@
-35,13
+37,13
@@
public class TriStateBuffer extends BasicComponent
}
@Override
}
@Override
- public List<
Wire
End> getAllInputs()
+ public List<
Read
End> getAllInputs()
{
return List.of(in, enable);
}
@Override
{
return List.of(in, enable);
}
@Override
- public List<
Wir
eEnd> getAllOutputs()
+ public List<
ReadWrit
eEnd> getAllOutputs()
{
return List.of(out);
}
{
return List.of(out);
}