Mappers / DynamicMapper
Code File Location: VisualSim/actor/lib/Task_Software
o Used to connect the behavior flow with the architecture resources
o Receives
a data structure on the input port, extracts the required information based on the parameter settings
and sends the Data Structure with the information to the Processor, SystemResource or SystemResource_Extend.
o Target_Resource name can be set a string name (Static) or as a data structure field (Dynamic) where the selected resource can change each time.
This block accepts a data
structure on the input and sends this along with the information in
block parameters to the target resource (processor
or SystemResource). When the resource completes the
processing, the data structure is returned to this block, which places
it on the output port. The Target_Resource determines the target
resource. The Target_Resource, Task_Number, Task_Time and
Task_Priority are used for the SystemResource. The Target_Resource,
Task_Number, Task_Instruction, Task_Priority are used for the
Processor. The Task_Plot_ID is used to plot the activity for this
block on the plot output port.
All the fields can be have an
Expression that contains a field, parameter, value, variable and
RegEx. In addition, the block can reference a column of the
Database_Lookup. The database row to
use is matched
with the Task_Name from this block. The Database block must have
a column called Task_Name. If the Task_Name does not match or
there is no Task_Name specified, a error is generated. The
Database_Lookup will have the Linking_Name of a Database block in the
model. For these blocks the order of priority is Database
Column->Parameter->Variable. For a field, the prefix
'input.' is required.
Refer Co_Processor and Auto_sh Demo Model.
The Target_Resource can have a string name, Database column name or the RegEx- getNextDestination("Database_Name","Column_Name"). This will select the first currently free resource from the list of Resource in the Column_Name. If no resource is currently free, the function will return none. Hence the Database_Expression must do a test to provide a default resource, if all resources are busy.
The function would look like this:
((getNextDestination("Database_name,"Destination_Column"))=="none")?"Destination_Column":(getNextDestination("Database_name,"Destination_Column")))
Parameter |
Explanation |
Type |
Example |
Block_Name |
The Block_Name is used internally to identify this block as a return point for a completed task. This is used at the SystemResource and Processor to return the Data Structure to the output port of this block. |
String |
"FFT_Mapping" |
Database_Lookup |
The Database_Lookup contains the name of the Database block with the following possible columns; Task_Name (this is field to be matched in the database lookup and Required), Task_Number (optional ID assignment), Target_Resource (Processor or SystemResource or SystemResource_Extend name), Task_Time, Task_Instruction {Array containing the list of instructions associated with the Task} and Task_Priority (integer). |
String (String, or none) |
"Processor_Mapping" |
Task_Name |
This is a unique name to identify the Task. |
String, Expression or Database Column |
"FFT" |
Target_Resource |
Target_Resource
is used to identify the SystemResource, SystemResource_Extend
or Processor. If the Target_Resource does not match a SystemResource or Processor, then
an exception will be generated. |
String, Expression or Database Column |
"ARM926" |
Task_Instruction |
It is an array containing a list of instructions. |
Array of strings, Expression or Database Column |
{"ADD","MOV"} |
Task_Plot_ID | Height of the timing diagram plot for the selected task | Integer | 1 |
Task_Number |
Task_Number is used for plotting states in SystemResource or SystemResource_Extend. It is desireable to keep Task_Number unique. If the default is unchanged, the Task_Number = 1 |
Integer, Expression or Database Column |
1 |
Task_Priority |
Task_Priority
is used to set the priority of the Task. The priority is passed
to SystemResource, SystemResource_Extend and Processor. This
effects the reordering of the queue and preemption of tasks. |
Integer, Expression or Database Column |
A_Priority |
Task_Time |
Task_Time
is used to pass the time (cycles or time) to the SystemResources. |
Double, Expression or Database Column |
(A_Priority>1)?1.0:DELTA |
Port |
Explanation |
input |
The input port. |
output |
The output port. |
plot |
The plot port. |
Created with the Personal Edition of HelpNDoc: Full-featured Kindle eBooks generator