projects
/
Mograsim.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
4b580a6
)
Changed GUIMerger/Splitter read end array order; removed resolved TODO
author
Daniel Kirschten
<daniel.kirschten@gmx.de>
Mon, 2 Sep 2019 12:02:23 +0000
(14:02 +0200)
committer
Daniel Kirschten
<daniel.kirschten@gmx.de>
Mon, 2 Sep 2019 12:02:23 +0000
(14:02 +0200)
net.mograsim.logic.core/src/net/mograsim/logic/core/wires/Wire.java
patch
|
blob
|
history
net.mograsim.logic.model/src/net/mograsim/logic/model/model/components/atomic/GUIMerger.java
patch
|
blob
|
history
net.mograsim.logic.model/src/net/mograsim/logic/model/model/components/atomic/GUISplitter.java
patch
|
blob
|
history
net.mograsim.logic.model/src/net/mograsim/logic/model/model/wires/Pin.java
patch
|
blob
|
history
net.mograsim.logic.model/src/net/mograsim/logic/model/modeladapter/componentadapters/MergerAdapter.java
patch
|
blob
|
history
net.mograsim.logic.model/src/net/mograsim/logic/model/modeladapter/componentadapters/SplitterAdapter.java
patch
|
blob
|
history
diff --git
a/net.mograsim.logic.core/src/net/mograsim/logic/core/wires/Wire.java
b/net.mograsim.logic.core/src/net/mograsim/logic/core/wires/Wire.java
index
4063d78
..
15755ae
100644
(file)
--- a/
net.mograsim.logic.core/src/net/mograsim/logic/core/wires/Wire.java
+++ b/
net.mograsim.logic.core/src/net/mograsim/logic/core/wires/Wire.java
@@
-637,7
+637,7
@@
public class Wire
* @param bitA The bit of {@link Wire} a to be fused
* @param bitB The bit of {@link Wire} b to be fused
*/
* @param bitA The bit of {@link Wire} a to be fused
* @param bitB The bit of {@link Wire} b to be fused
*/
- p
rivate
static void fuse(Wire a, Wire b, int bitA, int bitB)
+ p
ublic
static void fuse(Wire a, Wire b, int bitA, int bitB)
{
if (bitA >= a.width)
throw new IllegalArgumentException("No bit " + bitA + " in " + a + " (width " + a.width + ")");
{
if (bitA >= a.width)
throw new IllegalArgumentException("No bit " + bitA + " in " + a + " (width " + a.width + ")");
diff --git
a/net.mograsim.logic.model/src/net/mograsim/logic/model/model/components/atomic/GUIMerger.java
b/net.mograsim.logic.model/src/net/mograsim/logic/model/model/components/atomic/GUIMerger.java
index
313a51a
..
d8ef015
100644
(file)
--- a/
net.mograsim.logic.model/src/net/mograsim/logic/model/model/components/atomic/GUIMerger.java
+++ b/
net.mograsim.logic.model/src/net/mograsim/logic/model/model/components/atomic/GUIMerger.java
@@
-57,8
+57,8
@@
public class GUIMerger extends GUIComponent
gc.setForeground(ColorManager.current().toColor(c));
double outLineY = posY + (logicWidth - 1) * heightPerPin / 2;
gc.drawLine(posX + width / 2, outLineY, posX + width, outLineY);
gc.setForeground(ColorManager.current().toColor(c));
double outLineY = posY + (logicWidth - 1) * heightPerPin / 2;
gc.drawLine(posX + width / 2, outLineY, posX + width, outLineY);
- double inputHeight = posY
+ (logicWidth - 1) * heightPerPin
;
- for (int i = 0; i < logicWidth; i++, inputHeight
-
= 10)
+ double inputHeight = posY;
+ for (int i = 0; i < logicWidth; i++, inputHeight
+
= 10)
{
c = BitVectorFormatter.formatAsColor(inputEnds[i]);
if (c != null)
{
c = BitVectorFormatter.formatAsColor(inputEnds[i]);
if (c != null)
diff --git
a/net.mograsim.logic.model/src/net/mograsim/logic/model/model/components/atomic/GUISplitter.java
b/net.mograsim.logic.model/src/net/mograsim/logic/model/model/components/atomic/GUISplitter.java
index
9527279
..
6da4658
100644
(file)
--- a/
net.mograsim.logic.model/src/net/mograsim/logic/model/model/components/atomic/GUISplitter.java
+++ b/
net.mograsim.logic.model/src/net/mograsim/logic/model/model/components/atomic/GUISplitter.java
@@
-57,8
+57,8
@@
public class GUISplitter extends GUIComponent
gc.setForeground(ColorManager.current().toColor(c));
double inLineY = posY + (logicWidth - 1) * heightPerPin / 2;
gc.drawLine(posX, inLineY, posX + width / 2, inLineY);
gc.setForeground(ColorManager.current().toColor(c));
double inLineY = posY + (logicWidth - 1) * heightPerPin / 2;
gc.drawLine(posX, inLineY, posX + width / 2, inLineY);
- double outputHeight = posY
+ (logicWidth - 1) * heightPerPin
;
- for (int i = 0; i < logicWidth; i++, outputHeight
-
= 10)
+ double outputHeight = posY;
+ for (int i = 0; i < logicWidth; i++, outputHeight
+
= 10)
{
c = BitVectorFormatter.formatAsColor(outputEnds[i]);
if (c != null)
{
c = BitVectorFormatter.formatAsColor(outputEnds[i]);
if (c != null)
diff --git
a/net.mograsim.logic.model/src/net/mograsim/logic/model/model/wires/Pin.java
b/net.mograsim.logic.model/src/net/mograsim/logic/model/model/wires/Pin.java
index
5f6504c
..
0c63d38
100644
(file)
--- a/
net.mograsim.logic.model/src/net/mograsim/logic/model/model/wires/Pin.java
+++ b/
net.mograsim.logic.model/src/net/mograsim/logic/model/model/wires/Pin.java
@@
-18,7
+18,6
@@
import net.mograsim.logic.model.model.components.GUIComponent;
*/
public class Pin
{
*/
public class Pin
{
- // TODO introduce input/output/tristate hints
/**
* The {@link GUIComponent} this pin belongs to.
*/
/**
* The {@link GUIComponent} this pin belongs to.
*/
diff --git
a/net.mograsim.logic.model/src/net/mograsim/logic/model/modeladapter/componentadapters/MergerAdapter.java
b/net.mograsim.logic.model/src/net/mograsim/logic/model/modeladapter/componentadapters/MergerAdapter.java
index
e5e4430
..
cb3057e
100644
(file)
--- a/
net.mograsim.logic.model/src/net/mograsim/logic/model/modeladapter/componentadapters/MergerAdapter.java
+++ b/
net.mograsim.logic.model/src/net/mograsim/logic/model/modeladapter/componentadapters/MergerAdapter.java
@@
-25,8
+25,8
@@
public class MergerAdapter implements ComponentAdapter<GUIMerger>
ReadEnd[] inputEnds = new ReadEnd[guiComponent.logicWidth];
for (int i = 0; i < guiComponent.logicWidth; i++)
{
ReadEnd[] inputEnds = new ReadEnd[guiComponent.logicWidth];
for (int i = 0; i < guiComponent.logicWidth; i++)
{
- Wire input = logicWiresPerPin.get(guiComponent.getPin("I" +
i
));
- Wire.fuse(input, output, 0,
guiComponent.logicWidth - 1 - i, 1
);
+ Wire input = logicWiresPerPin.get(guiComponent.getPin("I" +
(guiComponent.logicWidth - 1 - i)
));
+ Wire.fuse(input, output, 0,
i
);
inputEnds[i] = input.createReadOnlyEnd();
}
guiComponent.setLogicModelBinding(inputEnds, output.createReadOnlyEnd());
inputEnds[i] = input.createReadOnlyEnd();
}
guiComponent.setLogicModelBinding(inputEnds, output.createReadOnlyEnd());
diff --git
a/net.mograsim.logic.model/src/net/mograsim/logic/model/modeladapter/componentadapters/SplitterAdapter.java
b/net.mograsim.logic.model/src/net/mograsim/logic/model/modeladapter/componentadapters/SplitterAdapter.java
index
1a5a50e
..
57cad51
100644
(file)
--- a/
net.mograsim.logic.model/src/net/mograsim/logic/model/modeladapter/componentadapters/SplitterAdapter.java
+++ b/
net.mograsim.logic.model/src/net/mograsim/logic/model/modeladapter/componentadapters/SplitterAdapter.java
@@
-25,8
+25,8
@@
public class SplitterAdapter implements ComponentAdapter<GUISplitter>
ReadEnd[] outputEnds = new ReadEnd[guiComponent.logicWidth];
for (int i = 0; i < guiComponent.logicWidth; i++)
{
ReadEnd[] outputEnds = new ReadEnd[guiComponent.logicWidth];
for (int i = 0; i < guiComponent.logicWidth; i++)
{
- Wire output = logicWiresPerPin.get(guiComponent.getPin("O" +
i
));
- Wire.fuse(input, output,
guiComponent.logicWidth - 1 - i, 0, 1
);
+ Wire output = logicWiresPerPin.get(guiComponent.getPin("O" +
(guiComponent.logicWidth - 1 - i)
));
+ Wire.fuse(input, output,
i, 0
);
outputEnds[i] = output.createReadOnlyEnd();
}
guiComponent.setLogicModelBinding(input.createReadOnlyEnd(), outputEnds);
outputEnds[i] = output.createReadOnlyEnd();
}
guiComponent.setLogicModelBinding(input.createReadOnlyEnd(), outputEnds);