public class SchmidtTrigger extends UnitFilter
Output logic level value with hysteresis. Transition high when input exceeds setLevel. Only go low when input is below resetLevel. This can be used to reject low level noise on the input signal. The default values for setLevel and resetLevel are both 0.0. Setting setLevel to 0.1 and resetLevel to -0.1 will give some hysteresis. The outputPulse is a single sample wide pulse set when the output transitions from low to high.
if( output == 0.0 )
output = (input > setLevel) ? 1.0 : 0.0;
else if( output > 0.0 )
output = (input <= resetLevel) ? 0.0 : 1.0;
else
output = previous_output;
Compare| Modifier and Type | Field and Description |
|---|---|
UnitOutputPort |
outputPulse |
UnitInputPort |
resetLevel |
UnitInputPort |
setLevel |
input, outputFALSE, TRUE| Constructor and Description |
|---|
SchmidtTrigger() |
| Modifier and Type | Method and Description |
|---|---|
void |
generate(int start,
int limit)
Perform essential synthesis function.
|
getInput, getOutputaddPort, addPort, convertHalfLifeToMultiplier, flattenOutputs, generate, getCircuit, getFramePeriod, getFrameRate, getPortByName, getPorts, getSynthesisEngine, getSynthesizer, getTopUnit, getUnitGenerator, isEnabled, pullData, setCircuit, setEnabled, setFrameRate, setPort, setSynthesisEngine, start, start, stop, stopequals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetUnitGenerator, start, start, stop, stopgetUnitGeneratorpublic UnitInputPort setLevel
public UnitInputPort resetLevel
public UnitOutputPort outputPulse
public void generate(int start,
int limit)
UnitGeneratorgenerate in class UnitGeneratorstart - offset into port bufferslimit - limit offset into port buffers for loop