projects
/
Mograsim.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Wire concept was changed to accommodate multiple inputs. Not all
[Mograsim.git]
/
era.mi
/
src
/
era
/
mi
/
logic
/
components
/
gates
/
OrGate.java
diff --git
a/era.mi/src/era/mi/logic/components/gates/OrGate.java
b/era.mi/src/era/mi/logic/components/gates/OrGate.java
index
06296ba
..
c1d95a7
100644
(file)
--- a/
era.mi/src/era/mi/logic/components/gates/OrGate.java
+++ b/
era.mi/src/era/mi/logic/components/gates/OrGate.java
@@
-1,12
+1,14
@@
package era.mi.logic.components.gates;
import era.mi.logic.Util;
package era.mi.logic.components.gates;
import era.mi.logic.Util;
-import era.mi.logic.WireArray;
import era.mi.logic.components.BasicComponent;
import era.mi.logic.components.BasicComponent;
+import era.mi.logic.wires.WireArray;
+import era.mi.logic.wires.WireArray.WireArrayInput;
public class OrGate extends BasicComponent
{
private WireArray a, b, out;
public class OrGate extends BasicComponent
{
private WireArray a, b, out;
+ private WireArrayInput outI;
public OrGate(int processTime, WireArray a, WireArray b, WireArray out)
{
public OrGate(int processTime, WireArray a, WireArray b, WireArray out)
{
@@
-16,11
+18,12
@@
public class OrGate extends BasicComponent
this.b = b;
b.addObserver(this);
this.out = out;
this.b = b;
b.addObserver(this);
this.out = out;
+ this.outI = out.createInput();
}
protected void compute()
{
}
protected void compute()
{
- out.feedSignals(Util.or(a.getValues(), b.getValues()));
+ out
I
.feedSignals(Util.or(a.getValues(), b.getValues()));
}
public WireArray getA()
}
public WireArray getA()