Advanced_Mapper

Parent Previous Next

Mappers / SoftwareMapper

Block Name: SoftwareMapper

Code File Location: VisualSim/actor/lib/Task_Issue

Block Overview

  o   Is a Mapper thata conencts the behavior flow with the archietcture resource.

  o   Receives a data structure on the input port, extracts the required information based on the parameter settings, places it in the queue and when the Resource becomes available, sends the Data Structure with the information to the SystemResource or SystemResource_Extend. 

  o   Resource name can be set a string name (Static) or as a data structure field (Dynamic) where the selected resource can change each time.

    o   There are two difference between this block and the Mapper- this has a local queue and the second is that this enables Mutex for the  Data Structures.

Advanced Mapper

Description

The Software_Mapper sends the incoming Data Structure to the SystemResource or SystemResource_Extend based on the parameter settings of this block. There are two difference between this block and the Mapper- this has a local queue and the second is that this enables Mutex for the  Data Structures.  The queue will auto-size and no parameter is required for the size of the queue.

The parameter settings of this block determine how the task will be processed by the Resource. All of the parameter fields can be fixed values, or fields of incoming Data Structures, or an expression containing RegEx, fields, parameter, data and variables.  The field must be prefix with 'input.'. This allows information to be passed for further model refinement, especially with the SystemResource_Extend Block.  The block can either Queue the incoming Data Structure or send it to the SystemResource imemdiately.  When Queued, the simulator notes down the order of arrival and sends it to the appropriate SystemResource when the SystemResource becomes available.  The task time can be fixed or variable based on this block settings.

Refer SystemResource_FCFS_Preempt_Mutex demo model. 


Parameter

Explanation

Type

Example

Parent_Scheduler_Name

Parameter used to identify the SystemResource or SystemResource_Extend.

This parameter can have a  static value or can be an expression.  The expression can contain a string, parameter, variable, data structure field or an Expression with RegEx. The field name must have the input. prefix

If the Parent_Scheduler_Name does not match a SystemResource in the model, then an exception will be generated.

String

or

Expression

"Processor"

or

(getBlockStatus("CPU1,"length")>1?CPU2:CPU1

Task_Number

The processing period along a timeline is available on the plot_output from the Schedulers. The duration is highlighted by a low-to-high at the beginning and high-to-low at the end of the period.  The Task_Number value is the height on the Y-axis. If plotting is important, this number must be unique.  If the default is unchanged, the Task_Number = 1

Integer or String (field)

Or Expression

Task_Numer or 1

Task_Priority

Parameter for the priority of the data structure. The priority is sent to the SystemResource and SystemResource_Extend.  The queue in the SystemResource is reordered based on the priority. This field can contain an integer (fixed for all data structures), or an expression with a parameter, variable, data structure field or RegEx. The field name must have the input. prefix


If the Priority is not required, then the default can be retained or None

.

Integer or Expression

A_Priority or 2 or None

Task_Mean_Time

It is used in conjunction with Task_Distribution. In Uniform distribution it represents minimum time. In Exponential distribution it represents the mean. In Normal distribution it represents the mean value. In Fixed distribution, it represents the task execution time. The task time is passed to a SystemResource or SystemResource_Extend and determines the duration of the task.  The value passed is units of time if the SystemResource setting is relative time and number of clock cycles if the SystemResource setting is number of clocks. If a distribution is selected, then the value passed to the SystemResource is based on the distribution calculation.


This field can contain an double (fixed for all data structures), or an expression with a parameter, variable, data structure field or RegEx. The field name must have the 'input.' prefix

Double or String (field) or

Expression

 

input.DELTA or 2.0

Task_Spread_Time

It is used in conjunction with Task_Distribution. In Uniform distribution it represents maximum time and in Normal distribution it represents standard deviation.


This field can contain an integer (fixed for all data structures), string referencing a field, or an expression with a parameter, variable, data structure field or RegEx. The field name must have the 'input.' prefix

Double or String (field)

2.0

Random_Seed

It is used to set the random seed for the uniform, exponential, or normal distributions.

-

123457L

Task_Distribution

Task_Distribution attribute for statistically estimating task executuion, such as "Fixed (Mean)," "Uniform (Mean, Spread)," "Exponential (Mean)," or "Normal (Mean, Spread)."

Selector

Fixed (Mean)

Task_Type

Task Type attribute, either "Queue Task Now", or "Issue Task Now".  If "Queue Task Now", then used to queue tasks at the Software_Mapaper and if "Issue Task Now" then it is sent immediately to the SystemResource or SystemResource_Extend queue.

-

Queue Task Now

Task_Mutual_Exclusion

Task_Mutual_Exclusion attribute is used to lock out all other tasks from preempting this Task at the SystemResource when the parameter is set to true and once the task starts. If set to false, then no effect on at the SystemResource.

-

No



Port

Explanation

input

The input port.

output

The output port.



Created with the Personal Edition of HelpNDoc: Full-featured EBook editor