projects
/
Mograsim.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Implemented most of the Am2904. Missing: shifts, C0, component layout
[Mograsim.git]
/
net.mograsim.logic.model.am2900
/
src
/
net
/
mograsim
/
logic
/
model
/
examples
/
GUIComponentTestbench.java
diff --git
a/net.mograsim.logic.model.am2900/src/net/mograsim/logic/model/examples/GUIComponentTestbench.java
b/net.mograsim.logic.model.am2900/src/net/mograsim/logic/model/examples/GUIComponentTestbench.java
index
1c17ac3
..
e5b24f1
100644
(file)
--- a/
net.mograsim.logic.model.am2900/src/net/mograsim/logic/model/examples/GUIComponentTestbench.java
+++ b/
net.mograsim.logic.model.am2900/src/net/mograsim/logic/model/examples/GUIComponentTestbench.java
@@
-1,7
+1,6
@@
package net.mograsim.logic.model.examples;
import java.util.ArrayList;
package net.mograsim.logic.model.examples;
import java.util.ArrayList;
-import java.util.Arrays;
import java.util.Comparator;
import java.util.List;
import java.util.Comparator;
import java.util.List;
@@
-26,8
+25,7
@@
public class GUIComponentTestbench
@SuppressWarnings("unused") // for GUIWires being created
public static void createTestbench(ViewModelModifiable model)
{
@SuppressWarnings("unused") // for GUIWires being created
public static void createTestbench(ViewModelModifiable model)
{
- GUIComponent comp = IndirectGUIComponentCreator.createComponent(model, "file:components/am2910/GUIAm2910.json", "Am2910");
-// GUIComponent comp = new GUImux4_12(model, "c");
+ GUIComponent comp = IndirectGUIComponentCreator.createComponent(model, "file:components/am2904/GUIAm2904.json");
// guess which pins are outputs and which are inputs
// TODO this code exists four times... but it seems too "hacky" to put it in a helper class
// guess which pins are outputs and which are inputs
// TODO this code exists four times... but it seems too "hacky" to put it in a helper class
@@
-43,7
+41,7
@@
public class GUIComponentTestbench
outputPinNames.add(p.name);
} else
for (Pin p : comp.getPins().values())
outputPinNames.add(p.name);
} else
for (Pin p : comp.getPins().values())
- if (p.getRelX()
== 0
)
+ if (p.getRelX()
< comp.getWidth()
)
inputPinNames.add(p.name);
else
outputPinNames.add(p.name);
inputPinNames.add(p.name);
else
outputPinNames.add(p.name);
@@
-51,9
+49,6
@@
public class GUIComponentTestbench
inputPinNames.sort(Comparator.comparing(comp::getPin, Comparator.comparing(Pin::getRelY)));
outputPinNames.sort(Comparator.comparing(comp::getPin, Comparator.comparing(Pin::getRelY)));
inputPinNames.sort(Comparator.comparing(comp::getPin, Comparator.comparing(Pin::getRelY)));
outputPinNames.sort(Comparator.comparing(comp::getPin, Comparator.comparing(Pin::getRelY)));
- inputPinNames = Arrays.asList("C", "D", "_RLD", "_CC", "_CCEN", "I", "CI");
- outputPinNames = Arrays.asList("_FULL", "_PL", "_MAP", "_VECT", "Y");
-
comp.moveTo(100, 0);
for (int i = 0; i < inputPinNames.size(); i++)
{
comp.moveTo(100, 0);
for (int i = 0; i < inputPinNames.size(); i++)
{