mirror of
https://github.com/hneemann/Digital.git
synced 2025-09-19 09:54:49 -04:00
Fixed LUT data editor bug.
This commit is contained in:
parent
f73e223fbe
commit
9f7fe517cd
@ -24,7 +24,7 @@ public class LookUpTable extends Node implements Element {
|
||||
int size = elementAttributes.get(Keys.INPUT_COUNT);
|
||||
PinDescription[] names = new PinDescription[size];
|
||||
for (int i = 0; i < size; i++)
|
||||
names[i] = input("in_" + i);
|
||||
names[i] = input(Integer.toString(i));
|
||||
return new PinDescriptions(names);
|
||||
}
|
||||
}
|
||||
|
@ -261,7 +261,14 @@ public final class EditorFactory {
|
||||
@Override
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
int bits = attr.get(Keys.BITS);
|
||||
int size = 1 << attr.get(Keys.ADDR_BITS);
|
||||
int size;
|
||||
if (attr.contains(Keys.INPUT_COUNT)) {
|
||||
// used to handle the LUT
|
||||
size = 1 << attr.get(Keys.INPUT_COUNT);
|
||||
} else {
|
||||
// memory, RAM/ROM
|
||||
size = 1 << attr.get(Keys.ADDR_BITS);
|
||||
}
|
||||
DataEditor de = new DataEditor(panel, data, size, bits, false, NoSync.INST);
|
||||
if (de.showDialog()) {
|
||||
data = de.getModifiedDataField();
|
||||
|
Loading…
x
Reference in New Issue
Block a user