The top-level palette is shown in figure 17-1. The palettes are Signal Sources, I/O, Arithmetic, Nonlinear Functions, Logic, Control, Conversion, Signal Processing, and Higher Order Functions. The stars on the Higher Order Functions (HOF) palette are used to help lay out schematics graphically. The HOF stars are in the HOF domain, and not the C50 domain. Each palette is summarized in more detail below. More information about each star can be obtained using the on-line "profile" command (","), the on-line "man" command ("M"), or by looking in the Star Atlas volume of The Almagest.
At the top of each palette, for convenience, are instances of the delay icon, the bus icon, and the following star:
BlackHoleDiscard all inputs. This star is useful for discarding signals that are not useful.
ImpulseGenerate a single impulse or an impulse train. The size is determined by impulseSize (default ONE). If period (default is 0) is positive an impulse train with this period is generated, otherwise a single impulse is generated. If delay (default 0) is positive the impulse (or impulse train) is delayed by this amount.
IIDUniformGenerate an i.i.d. uniformly distributed pseudo-random process. Output is uniformly distributed between -range and range (default ONE).
IIDGaussianGenerate a white Gaussian pseudo-random process with mean 0 and standard deviation 0.1. A Gaussian distribution is realized by summing noUniforms (default 16) number of uniform random variables. According to the central limit theorem, the sum of N random variables approaches a Gaussian distribution as N approaches infinity.
ToneGenerate a sine or cosine wave using a second order oscillator. The wave will be of amplitude (default 0.5), frequency (default 0.2), and calcType (default "sin")
AInThis is an interrupt driven star to receive samples from the A/D converter in the Analog Interface Chip. The sample rate is determined by sampleRate. The actual conversion rate is 285.7KHz/N where N is an integer from 4 to 64. This star supports an internal buffer to hold the received samples. The size of this buffer can be set manually by changing the interruptBufferSize parameter. Setting interruptBufferSize to a negative value will set the size of the buffer equal to the number of times the star is fired on each iteration of the universe.
AOutThis is an interrupt driven star to send samples to the D/A converter in the AIC chip. The parameters are identical to those of the
Add(2 icons) Output the sum of the inputs. If saturation is set to yes, the output will saturate.
SubOutputs the "pos" input minus all of the "neg" inputs.
Mpy(2 icons) Outputs the product of all of the inputs.
GainThe output is set the input multiplied by a gain term. The gain must be in [-1,1).
AddCx(2 icons) Output the complex sum of the inputs. If saturation is set to yes, the output will saturate.
SubCxOutputs the "pos" input minus all of the "neg" inputs.
MpyCx(2 icons) Outputs the product of all of the inputs.
AddInt(2 icons) Output the sum of the inputs. If saturation is set to yes, the output will saturate.
SubIntOutputs the "pos" input minus all of the "neg" inputs.
MpyInt(2 icons) Outputs the product of all of the inputs.
GainIntThe output is set the input multiplied by an integer gain term.
DivByIntThis is an amplifier. The integer output is the integer input divided by the integer divisor (default 2). Truncated integer division is used.
MpyShiftMultiply and shift.
NegOutput the negation of the input.
ShifterScale by shifting left leftShifts bits. Negative values of leftShifts implies right shifting.
AbsOutput the absolute value of the input.
ACosOutput the inverse cosine of the input, which is in the range -1.0 to 1.0. The output, in the principle range of 0 to , is scaled down by .
ASinOutput the inverse sine of the input, which is in the range -1.0 to 1.0. The output, in the principle range of
CosOutput the cosine, calculated the table lookup. The input range is [-1,1] scaled by .
expjxOutput the complex exponential of the input.
IntgrtrAn integrator with leakage set by feedbackGain. If there is an overflow, the onOverflow parameter will designate a wrap around, saturate or reset operation.
LimitLimits the input between the range of [bottom, top].
LogOutputs the base two logarithm.
MaxMinOutput the maximal or minimal (MAX) sample out of the last N input samples. This can either compareMagnitude or take into account the sign. If outputMagnitude is
YESthe magnitude of the result is written to the output, otherwise the result itself is written.
ModuloIntOutput the remainder after dividing the integer input by the integer modulo parameter.
OrderTwoIntTakes two inputs and outputs the greater and lesser of the two integers.
QuantQuantizes the input to one of N+1 possible output levels using N thresholds.
QuantIdxThe star quantizes the input to one of N+1 possible output levels using N thresholds. It also outputs the index of the quantization level used.
QuantRangeQuantizes the input to one of N+1 possible output levels using N thresholds.
ReciprocalOutputs the reciprocal to Nf precision in terms of a fraction and some left shifts.
SgnOutputs the sign of the input.
SgnIntOutputs the sign of the integer input.
SinOutputs the sine, calculated using a table lookup. The input range is [-1,1) scaled by .
SincOutputs the sinc functions calculated as sin(x)/x.
SqrtOutputs the square root of the input.
TableImplements a real-valued lookup table. The values state contains the values to output; its first element is element zero. An error occurs if an out of bounds value is received.
TableIntImplements an integer-valued lookup table. The values state contains the values to output; its first element is element zero. An error occurs if an out of bounds value is received.
ExprGeneral expression evaluation.
LookupTblThe input accesses a lookup table. The interpolation parameter determines the output for input values between table-entry points. If interpolation is "linear" the star will interpolate between table entries; if interpolation is set to "none", it will use the next lowest entry.
PulseGenerates a variable length pulse. A pulse begins when a non-zero trigger is received. The pulse duration varies between 1 and maxDuration as the control varies between [-1,1).
QntBtsIntOutputs the two's complement number given by the top noBits of the input (for integer output).
QntBtsLinOutputs the two's complement number given by the top noBits of the input, but an optional offset can be added to shift the output levels up or down.
SkewGeneric skewing star.
SqrOutputs the square of the input.
VarQuasarA sequence of values(data) is repeated at the output with period N (integer input), zero-padding or truncating the sequence to N if necessary. A value of O for N yields an aperiodic sequence.
XorOutput the bit-wise exclusive-or of the inputs.
Test(4 icons) Test to see if two inputs are equal, not equal, greater than, and greater than or equal. For less than and less than or equal, switch the order of the inputs.
And(3 icons) True if all inputs are non-zero.
Nand(2 icons) True if all inputs are not non-zero.
Or(2 icons) True if any input is non-zero.
Nor(2 icons) True if any input is zero.
Xor(2 icons) True if its inputs differ in value.
Xnor(2 icons) True if its inputs coincide in value.
Mux, Repeat, Reverse, and
ChopVarOffsetThis star has the same functionality as the
Chopstar except now the offset parameter is determined at run time through a control input.
CutOn each execution, this star reads a block of nread samples (default 128) and writes nwrite of these samples (default 64), skipping the first offset samples (default 0). It is an error if nwrite + offset > nread. If nwrite > nread, then the output consists of overlapping windows, and hence offset must be negative.
DelayA delay star of parameter totalDelay unit delays.
PadOn each execution, Pad reads a block of nread samples and writes a block of nwrite samples. The first offset samples have value fill, the next nread output samples have values taken from the inputs, and the last nwrite - nread - offset samples have value fill again.
RotateThe star reads in an input block of a certain length and performs a circular shift of the input. If the rotation is positive, the input is shifted to the left so that ouput = input[rotation]. If the rotation is negative, the input is shifted to the right so that output[rotation] = input.
sampleNholdGalaxyThis sample-and-hold galaxy is more memory efficient than using a downsample star for the same purpose. This star is not present in Ptolemy0.6.
VarDelayA variable delay that will vary between 0 and maxDelay as the control input varies between -1.0 and 1.0.
WasteCyclesStalls the flow of data for cyclesToWaste number of cycles.
CxToRectOutput the real part and imaginary part of the input of separate output ports.
RectToCxOutput a complex signal with real and imaginary part inputs.
BitsToIntConvert a stream of bits to an integer.
IntToBitsConvert an integer into a stream of bits.
FixToCxConvert fixed-point numbers to complex fixed-point numbers.
FixToIntConvert fixed-point numbers to integer numbers.
CxToFixOutput the magnitude squared of the complex number.
CxToIntOutput the magnitude squared of the complex number.
IntToFixConvert an integer input to a fixed point output.
IntToCxConvert an integer input to a complex output.
IIRstars are identical to their SDF counterparts.
AllpassAn allpass filter with one pole and one zero. The location of these is given by the "polezero" input.
BiquadA two-pole, two-zero IIR filter (a biquad).
CombA comb filter with a one-pole lowpass filter in the delay loop.
BiquadDSPlayA two-pole, two zero IIR filter (a biquad). This biquad is tailored to use the coefficients from the DSPlay filter design tool. If DSPlay gives the coefficients: A B C D E then define the parameters as follows: a=A, b=B, c=C, d=-(D+1), e = -E. This only works if a, b, c, d, and e, are in the range [-1,1). The default coefficients implement a low pass filter.
FIRA finite impulse response (FIR) filter. Coefficients are specified by the taps parameter. The default coefficients give an 8th order, linear-phase, lowpass filter. To read coefficients from a file, replace the default coefficients with
filename, preferably specifying a complete path. Polyphase multirate filtering is not yet supported.
LMSAn adaptive filter using the LMS adaptation algorithm. The initial coefficients are given by the coef parameter. The default initial coefficients give an 8th order, linear phase lowpass filter. To read default coefficients from a file, replace the default coefficients with
filename, preferably specifying a complete path. This star supports decimation, but not interpolation.
LMSGangedA LMS filter were the coefficients from the adaptive filter are used to run a FIR filter in parallel. The initial coefficients default to a lowpass filter of order 8.
RaisedCosAn FIR filter with a magnitude frequency response shaped like the standard raised cosine used in digital communications.See the
SDFRaisedCosinestar for more information.
GoertzelDetector, GoertzelPower, and
LMSOscDetare identical to their SDF counterparts.
FFTCxCompute the discrete-time Fourier transform of a complex input using the fast Fourier transform (FFT) algorithm. The parameter order (default 8) is the transform size. The parameter direction (default 1) is 1 for forward, -1 for the inverse FFT.
WindowGenerate standard window functions or periodic repetitions of standard window functions. The possible functions are
Kaiser. One period of samples is produced on each firing.