Pulse

Parent Previous Next

Full Library / Source / Clock / Pulse
Block Name: Pulse

Code File Location: VisualSim/actor/lib/Pulse

Block Overview

o       Produce a pulse with a shape specified by the parameters.  

Description

Produce a pulse with a shape specified by the parameters. The values parameter contains an Array, which specifies the sequence of values to produce at the output. The indexes parameter contains an array of integers, which specifies when those values should be produced. The array in the indexes parameter must have the same length as that in the values parameter or an exception will be thrown. Also, the indexes array must be increasing and non-negative, or an exception will be thrown when it is set.

Eventually, this block supports a zero (of the same type as the values) whenever the iteration count does not match an index in indexes.

The default for the values parameter is an integer vector of form {1, 0}. The default indexes array is {0, 1}. Thus, the default output sequence will be 1, 0, 0, ...
However, the Pulse block has a repeat parameter. When set to true, the defined sequence is repeated indefinitely. Otherwise, the default sequence of zero values result.

The type of the output can be any token type. This type is inferred from the element type of the values parameter.

Refer Pulse Demo Model.

Parameter

Explanation

Type

Example

indexes

The indexes at which the specified values will be produced. 

Array

{0,1}

repeat

The flag that indicates whether the pulse sequence needs to be repeated.  

Boolean

false

values

The values that will be produced at the specified indexes.  

Array

{1, 0}

firingCountLimit

Number of times this block must be executed.   NONE indicates no restriction

Integer

NONE

Port

Explanation

Type

Output

At every pulse edge a value is output on this port 

Integer

trigger

This input port is used to start the generation of events from this block.  This is an optional port and the block can be used without the input trigger.

Any value

Created with the Personal Edition of HelpNDoc: Full-featured Kindle eBooks generator