projects
/
Mograsim.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Switched to using logical U for mnemonic X to avoid glitches in Am2900
[Mograsim.git]
/
plugins
/
net.mograsim.machine
/
src
/
net
/
mograsim
/
machine
/
mi
/
parameters
/
IntegerClassification.java
diff --git
a/plugins/net.mograsim.machine/src/net/mograsim/machine/mi/parameters/IntegerClassification.java
b/plugins/net.mograsim.machine/src/net/mograsim/machine/mi/parameters/IntegerClassification.java
index
c24cabe
..
ef9f614
100644
(file)
--- a/
plugins/net.mograsim.machine/src/net/mograsim/machine/mi/parameters/IntegerClassification.java
+++ b/
plugins/net.mograsim.machine/src/net/mograsim/machine/mi/parameters/IntegerClassification.java
@@
-10,10
+10,19
@@
public class IntegerClassification implements ParameterClassification
private final int bits;
private final IntegerImmediate defaultValue;
private final int bits;
private final IntegerImmediate defaultValue;
+ /**
+ * The default value is set to X.
+ */
+ public IntegerClassification(int bits)
+ {
+ this.bits = bits;
+ this.defaultValue = new IntegerImmediate(this, null, bits);
+ }
+
public IntegerClassification(int defaultValue, int bits)
{
this.bits = bits;
public IntegerClassification(int defaultValue, int bits)
{
this.bits = bits;
- this.defaultValue = new IntegerImmediate(BitVector.from(defaultValue, bits));
+ this.defaultValue = new IntegerImmediate(
this,
BitVector.from(defaultValue, bits));
}
@Override
}
@Override
@@
-31,7
+40,7
@@
public class IntegerClassification implements ParameterClassification
@Override
public IntegerImmediate parse(String toParse)
{
@Override
public IntegerImmediate parse(String toParse)
{
- return new IntegerImmediate(new BigInteger(toParse), bits);
+ return new IntegerImmediate(
this, toParse.equals("X") ? null :
new BigInteger(toParse), bits);
}
@Override
}
@Override