ONESHOT |
Controlled One-Shot
This function is a controlled oneshot with parameterizable values of low and
high peak output, input trigger value level, delay, and output rise and fall
times. It takes an input voltage or current value. This value is used as the
independent variable in the piecewise linear curve described by the
coordinate points of the cntl_array and pw_array pairs. From the curve, a
pulse width value is determined, and the oscillator will output a pulse of
that width, delayed by the delay value, and with specified rise and fall
times.
From the above, it is easy to see that array sizes of 2 for both the
cntl_array and the pw_array will yield a linear variation of the pulse width
with respect to the control input. Any sizes greater than 2 will yield a
piecewise linear transfer characteristic. For more detail, refer to the
description of the piecewise linear controlled source, which uses a similar
method to derive an output value given a control input.
Description | Direction | Default Type | Allowed Types | Vector | Vector Bounds | Null Allowed |
clock input | IN | v | v,vd,i,id,vnam | NO | NO | |
control input | IN | v | v,vd,i,id,vnam | NO | YES | |
clear signal | IN | v | v,vd,i,id,vnam | NO | YES | |
Output | OUT | v | v,vd,i,id | NO | NO |
Name | Description | Data Type | Default Value | Limits | Vector | Vector Bounds | Null Allowed |
cntl_array | control in array | Real | 0.0 | YES | 2 / - | NO | |
pw_array | pulse width array | Real | 1.0e-6 | 0 / - | YES | 2 / - | NO |
clk_trig | clock trigger value | Real | 0.5 | NO | NO | ||
pos_edge_trig | pos/neg edge trigger switch | Boolean | TRUE | NO | NO | ||
out_low | output low value | Real | 0.0 | NO | YES | ||
out_high | output high value | Real | 1.0 | NO | YES | ||
rise_time | output rise time | Real | 1.0e-9 | NO | YES | ||
rise_delay | output delay from trigger | Real | 1.0e-9 | NO | YES | ||
fall_delay | output delay from pw | Real | 1.0e-9 | NO | YES | ||
fall_time | output rise time | Real | 1.0e-9 | NO | YES | ||
retrig | retrigger switch | Boolean | FALSE | NO | YES |
OHESHOT: Error allocating oneshot block storage
Generic storage allocation error.
ONESHOT: Size of control array different than pulse-width array
This error indicates that the control array and pulse-width arrays are of different sizes.
ONESHOT: Extrapolated Pulse-Width Limited to zero
This error indicates that for the current control input, a pulse-width of less than zero is indicated. The model will consequently limit the pulse width to zero until the control input returns to a more reasonable value.
ain 12 3 4 pulse2
.model pulsel oneshot(cntl.array = [-1 0 10 11]
+ pw_array = [le-6 le-6 le-4 le-4]
+ clk.trig = 0.9 pos_edge_trig = FALSE
+ out_low = 0.0 out.high = 4.5 duty_cycle = 0.9
+ rise.delay = 20.0-9 fall.delay = 35.0e-9)