Ramp

Parent Previous Next

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

Code File Location: VisualSim/actor/lib/Ramp

Block Overview

o       Produce a Ramp output with a shape specified by the parameters.  

Description

Produce an output token on each execution with a value that is incremented by the specified step each iteration. The first output is given by the init parameter, and the increment may be given either by the step parameter or by the associated step port. Note that the increment will show up in the output only on the next iteration. The type of the output is determined by the constraint that it must be greater than or equal to the types of the parameter (and/or the step port, if it is connected). This block is polymorphic in the sense that its output data type can be that of any scalar type (Integer, Double, Long, Array, Matrix).

Refer Ramp Demo Model.

Parameter

Explanation

Type

Example

init

The value produced by the ramp on its first iteration.

Integer

0

step

The amount by which the ramp output is incremented on each iteration.   

Integer

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

step

This input port is used to provide the step amount.  This is an optional port and the block can be used without the input step.

Any value

Created with the Personal Edition of HelpNDoc: Easy EBook and documentation generator