|
jAER project on SourceForge | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.util.Observable
net.sf.jaer.biasgen.Pot
net.sf.jaer.biasgen.IPot
ch.unizh.ini.jaer.chip.dvs320.ConfigurableIPot
public class ConfigurableIPot
An IPot with full configurability. The sex (N/P), type (NORMAL/CASCODE), current level (LOW,NORNAL), enabled state (normal, or weakly tied to rail), buffer bias current, and bias current can all be digitally configured. First implemented on TCVS320, improved on DVS320.
Nested Class Summary | |
---|---|
static class |
ConfigurableIPot.BiasEnabled
If enabled=true the bias operates normally, if enabled=false, then the bias is disabled by being weakly tied to the appropriate rail (depending on bias sex, N or P). |
static class |
ConfigurableIPot.CurrentLevel
Operating current level, defines whether to use shifted-source current mirrors for small currents. |
Nested classes/interfaces inherited from class net.sf.jaer.biasgen.Pot |
---|
Pot.Sex, Pot.Type |
Field Summary | |
---|---|
protected static int |
bitValueMask
Bit mask for bias current value bits |
protected static int |
bufferBiasMask
Bit mask for buffer bias bits |
protected int |
bufferBitValue
The bit value of the buffer bias current |
protected static int |
enabledMask
Bit mask for flag bias enabled (normal operation) or disabled (tied weakly to rail) |
protected static int |
lowCurrentModeMask
Bit mask for flag low current mode enabled |
static int |
maxBitValue
Max bias bit value |
static int |
maxBufferValue
Maximum buffer bias value (all bits on) |
protected static int |
numBiasBits
Number of bits used for bias value |
protected static int |
numBufferBiasBits
The number of bits specifying buffer bias currrent as fraction of master bias current |
protected static int |
sexMask
Bit mask for flag for bias sex (N or P) |
protected static int |
typeMask
Bit mask for flag for bias type (normal or cascode) |
Fields inherited from class net.sf.jaer.biasgen.IPot |
---|
biasgen, shiftRegisterNumber |
Fields inherited from class net.sf.jaer.biasgen.Pot |
---|
bitValue, CHANGE_FRACTION, chip, chipNumber, displayPosition, group, log, masterbias, name, numBits, numBytes, pinNumber, prefs, sex, tooltipString, type |
Constructor Summary | |
---|---|
ConfigurableIPot(Biasgen biasgen)
|
|
ConfigurableIPot(Biasgen biasgen,
java.lang.String name,
int shiftRegisterNumber,
Pot.Type type,
Pot.Sex sex,
boolean lowCurrentModeEnabled,
boolean enabled,
int bitValue,
int bufferBitValue,
int displayPosition,
java.lang.String tooltipString)
Creates a new instance of IPot |
Method Summary | |
---|---|
protected int |
computeBinaryRepresentation()
Computes the actual bit pattern to be sent to chip based on configuration values |
ConfigurableIPot.BiasEnabled |
getBiasEnabled()
Returns enabled via enum |
byte[] |
getBinaryRepresentation()
Computes and returns a the reused array of bytes representing the bias to be sent over hardware interface to the device. |
int |
getBufferBitValue()
|
float |
getBufferCurrent()
Computes the estimated current based on the bit value for the current splitter and the Pot.masterbias |
ConfigurableIPot.CurrentLevel |
getCurrentLevel()
|
int |
getPreferedBitValue()
returns the preference value |
boolean |
isEnabled()
returns enabled via boolean |
boolean |
isLowCurrentModeEnabled()
|
void |
loadPreferences()
loads and makes active the preference value. |
javax.swing.JComponent |
makeGUIPotControl()
Builds the component used to control the IPot. |
protected java.lang.String |
prefsKey()
Returns the String key by which this pot is known in the Preferences. |
void |
setBiasEnabled(ConfigurableIPot.BiasEnabled biasEnabled)
Sets bias enabled via enum |
void |
setBufferBitValue(int bufferBitValue)
Set the buffer bias bit value |
float |
setBufferCurrent(float current)
sets the bit value based on desired current and Pot.masterbias current. |
void |
setCurrentLevel(ConfigurableIPot.CurrentLevel currentLevel)
Sets whether this is a normal type or low current bias which uses shifted source |
void |
setEnabled(boolean enabled)
sets enabled via boolean |
void |
setLowCurrentModeEnabled(boolean lowCurrentModeEnabled)
|
void |
setSex(Pot.Sex sex)
Overrides super of setSex (N or P) to call observers |
void |
setType(Pot.Type type)
Overrides super of type (NORNAL or CASCODE) to call observers |
void |
storePreferences()
stores as a preference the bit value |
java.lang.String |
toString()
|
Methods inherited from class net.sf.jaer.biasgen.IPot |
---|
changeByRatio, decrementCurrent, getCurrent, getCurrentResolution, getMaxCurrent, getMinCurrent, getPhysicalValue, getPhysicalValueUnits, getShiftRegisterNumber, incrementCurrent, processCommand, setChipNumber, setCurrent, setPhysicalValue, setShiftRegisterNumber, update |
Methods inherited from class net.sf.jaer.biasgen.Pot |
---|
addObserver, decrementBitValue, getBitValue, getChipNumber, getDisplayPosition, getGroup, getMaxBitValue, getMinBitValue, getName, getNumBits, getNumBytes, getPinNumber, getSex, getTooltipString, getType, incrementBitValue, preferenceChange, resume, setBitValue, setDisplayPosition, setGroup, setName, setNumBits, setNumBytes, setPinNumber, setTooltipString, suspend, toBitPatternString |
Methods inherited from class java.util.Observable |
---|
clearChanged, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers, setChanged |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected static int enabledMask
protected static int lowCurrentModeMask
protected static int sexMask
protected static int typeMask
protected static int bitValueMask
protected static int bufferBiasMask
protected static int numBiasBits
protected static int numBufferBiasBits
protected int bufferBitValue
public static int maxBufferValue
public static int maxBitValue
Constructor Detail |
---|
public ConfigurableIPot(Biasgen biasgen)
public ConfigurableIPot(Biasgen biasgen, java.lang.String name, int shiftRegisterNumber, Pot.Type type, Pot.Sex sex, boolean lowCurrentModeEnabled, boolean enabled, int bitValue, int bufferBitValue, int displayPosition, java.lang.String tooltipString)
biasgen
- name
- shiftRegisterNumber
- the position in the shift register, 0 based, starting on end from which bits are loadedtype
- (NORMAL, CASCODE)sex
- Sex (N, P)lowCurrentModeEnabled
- bias is normal (false) or in low current mode (true)enabled
- bias is enabled (true) or weakly tied to rail (false)bitValue
- initial bitValuebufferBitValue
- buffer bias bit valuedisplayPosition
- position in GUI from top (logical order)tooltipString
- a String to display to user of GUI telling them what the pots doesMethod Detail |
---|
public javax.swing.JComponent makeGUIPotControl()
makeGUIPotControl
in class IPot
public int getBufferBitValue()
public void setBufferBitValue(int bufferBitValue)
bufferBitValue
- the value which has maxBufferValue as maximum and specifies fraction of master biaspublic ConfigurableIPot.BiasEnabled getBiasEnabled()
public void setBiasEnabled(ConfigurableIPot.BiasEnabled biasEnabled)
biasEnabled
- public boolean isEnabled()
public void setEnabled(boolean enabled)
enabled
- public boolean isLowCurrentModeEnabled()
public void setLowCurrentModeEnabled(boolean lowCurrentModeEnabled)
protected int computeBinaryRepresentation()
public byte[] getBinaryRepresentation()
IPot
getBinaryRepresentation
in class IPot
protected java.lang.String prefsKey()
prefsKey
in class IPot
public void storePreferences()
storePreferences
in class Pot
public void loadPreferences()
loadPreferences
in class Pot
public int getPreferedBitValue()
getPreferedBitValue
in class Pot
public float setBufferCurrent(float current)
Pot.masterbias
current.
Observers are notified if value changes.
current
- in amps
public float getBufferCurrent()
Pot.masterbias
public java.lang.String toString()
toString
in class IPot
public ConfigurableIPot.CurrentLevel getCurrentLevel()
public void setCurrentLevel(ConfigurableIPot.CurrentLevel currentLevel)
public void setType(Pot.Type type)
setType
in class Pot
public void setSex(Pot.Sex sex)
setSex
in class Pot
|
jAER project on SourceForge | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |