mirror of
https://github.com/hneemann/Digital.git
synced 2025-09-27 06:51:37 -04:00
added default value to RS and T-flop-flop
This commit is contained in:
parent
cf31464026
commit
9391455d2c
@ -23,6 +23,7 @@ public class FlipflopRS extends Node implements Element {
|
|||||||
= new ElementTypeDescription("RS_FF", FlipflopRS.class, input("S"), input("C"), input("R"))
|
= new ElementTypeDescription("RS_FF", FlipflopRS.class, input("S"), input("C"), input("R"))
|
||||||
.addAttribute(Keys.ROTATE)
|
.addAttribute(Keys.ROTATE)
|
||||||
.addAttribute(Keys.LABEL)
|
.addAttribute(Keys.LABEL)
|
||||||
|
.addAttribute(Keys.DEFAULT)
|
||||||
.addAttribute(Keys.INVERTERCONFIG)
|
.addAttribute(Keys.INVERTERCONFIG)
|
||||||
.addAttribute(Keys.VALUE_IS_PROBE);
|
.addAttribute(Keys.VALUE_IS_PROBE);
|
||||||
|
|
||||||
@ -48,6 +49,11 @@ public class FlipflopRS extends Node implements Element {
|
|||||||
this.qn = new ObservableValue("\u00ACQ", 1).setPinDescription(DESCRIPTION);
|
this.qn = new ObservableValue("\u00ACQ", 1).setPinDescription(DESCRIPTION);
|
||||||
isProbe = attributes.get(Keys.VALUE_IS_PROBE);
|
isProbe = attributes.get(Keys.VALUE_IS_PROBE);
|
||||||
label = attributes.getCleanLabel();
|
label = attributes.getCleanLabel();
|
||||||
|
|
||||||
|
int def = attributes.get(Keys.DEFAULT);
|
||||||
|
out = def > 0;
|
||||||
|
q.setBool(out);
|
||||||
|
qn.setBool(!out);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -23,6 +23,7 @@ public class FlipflopT extends Node implements Element {
|
|||||||
= new ElementTypeDescription("T_FF", FlipflopT.class, input("C"))
|
= new ElementTypeDescription("T_FF", FlipflopT.class, input("C"))
|
||||||
.addAttribute(Keys.ROTATE)
|
.addAttribute(Keys.ROTATE)
|
||||||
.addAttribute(Keys.LABEL)
|
.addAttribute(Keys.LABEL)
|
||||||
|
.addAttribute(Keys.DEFAULT)
|
||||||
.addAttribute(Keys.INVERTERCONFIG)
|
.addAttribute(Keys.INVERTERCONFIG)
|
||||||
.addAttribute(Keys.VALUE_IS_PROBE);
|
.addAttribute(Keys.VALUE_IS_PROBE);
|
||||||
|
|
||||||
@ -46,6 +47,11 @@ public class FlipflopT extends Node implements Element {
|
|||||||
this.qn = new ObservableValue("\u00ACQ", 1).setPinDescription(DESCRIPTION);
|
this.qn = new ObservableValue("\u00ACQ", 1).setPinDescription(DESCRIPTION);
|
||||||
isProbe = attributes.get(Keys.VALUE_IS_PROBE);
|
isProbe = attributes.get(Keys.VALUE_IS_PROBE);
|
||||||
label = attributes.getCleanLabel();
|
label = attributes.getCleanLabel();
|
||||||
|
|
||||||
|
int def = attributes.get(Keys.DEFAULT);
|
||||||
|
out = def > 0;
|
||||||
|
q.setBool(out);
|
||||||
|
qn.setBool(!out);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
Loading…
x
Reference in New Issue
Block a user