projects
/
Mograsim.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Exchanged all Bit[] by BitVector, tests work
[Mograsim.git]
/
era.mi
/
src
/
era
/
mi
/
logic
/
components
/
gates
/
NotGate.java
diff --git
a/era.mi/src/era/mi/logic/components/gates/NotGate.java
b/era.mi/src/era/mi/logic/components/gates/NotGate.java
index
eaa9aec
..
7baf606
100644
(file)
--- a/
era.mi/src/era/mi/logic/components/gates/NotGate.java
+++ b/
era.mi/src/era/mi/logic/components/gates/NotGate.java
@@
-2,49
+2,46
@@
package era.mi.logic.components.gates;
\r
import java.util.List;
\r
\r
\r
import java.util.List;
\r
\r
-import era.mi.logic.Util;
\r
import era.mi.logic.components.BasicComponent;
\r
import era.mi.logic.components.BasicComponent;
\r
-import era.mi.logic.wires.WireArray;
\r
-import era.mi.logic.wires.WireArray.WireArrayEnd;
\r
+import era.mi.logic.wires.Wire.WireEnd;
\r
\r
public class NotGate extends BasicComponent
\r
{
\r
\r
public class NotGate extends BasicComponent
\r
{
\r
- private Wire
Array in, out
;
\r
- private Wire
ArrayEnd outI
;
\r
+ private Wire
End in
;
\r
+ private Wire
End out
;
\r
\r
\r
- public NotGate(int processTime, Wire
Array in, WireArray
out)
\r
+ public NotGate(int processTime, Wire
End in, WireEnd
out)
\r
{
\r
super(processTime);
\r
this.in = in;
\r
in.addObserver(this);
\r
this.out = out;
\r
{
\r
super(processTime);
\r
this.in = in;
\r
in.addObserver(this);
\r
this.out = out;
\r
- outI = out.createInput();
\r
}
\r
\r
@Override
\r
}
\r
\r
@Override
\r
- p
ublic
void compute()
\r
+ p
rotected
void compute()
\r
{
\r
{
\r
- out
I.feedSignals(Util.not(in.getValues()
));
\r
+ out
.feedSignals(in.getValues().not(
));
\r
}
\r
\r
}
\r
\r
- public Wire
Array
getIn()
\r
+ public Wire
End
getIn()
\r
{
\r
return in;
\r
}
\r
\r
{
\r
return in;
\r
}
\r
\r
- public Wire
Array
getOut()
\r
+ public Wire
End
getOut()
\r
{
\r
return out;
\r
}
\r
\r
@Override
\r
{
\r
return out;
\r
}
\r
\r
@Override
\r
- public List<Wire
Array
> getAllInputs()
\r
+ public List<Wire
End
> getAllInputs()
\r
{
\r
return List.of(in);
\r
}
\r
\r
@Override
\r
{
\r
return List.of(in);
\r
}
\r
\r
@Override
\r
- public List<Wire
Array
> getAllOutputs()
\r
+ public List<Wire
End
> getAllOutputs()
\r
{
\r
return List.of(out);
\r
}
\r
{
\r
return List.of(out);
\r
}
\r