Statement_Delay

Parent Previous Next

Full Library / Defining_Flow / Basic Processing / Statement_Delay
Block Name: Statement_Delay

Code File Location: VisualSim/actor/lib/DS_Delay_K

Description

This block combines two blocks in One - Statement and Delay. It first completes the Statement operations and then queues up the Data Structure to be sent on the output after the "Delay_Value". The four "field_Parameters are evaluated based on the Data Structure Expression Language. This works on the basic format of X = Y op(Operator) Z. This block evaluates the expressions in the RHS (Right-Hand Side) and places the result on the LHS (Left-Hand Side). For each Field_description line. After the 4 expression are evaluated, the incoming Data Structure is delayed by value in the delay field and then placed on the output port. Parameters, fields or memories can be used in this expression. The 'Delay Value' field can be either a double value, memory name or an incoming Data Structure field name. The Statement block can perform many operations on a single data structure field, plus multiple operations on a single data structure, using progressive field updates.

Expression Language Syntax: X Op Y, or Xswd = Y Op Z.

Where X can be a Memory or Field, OP is the Operator (See below), Y can be Memory, Field, Time, Parameter or Value and Z can be Memory, Parameter, Field, Time or Value.

TYPES

Integer, long, double, string, binary, boolean and data structure.

OPERATORS

For the format of X Op Y, Operators are: =, +=, -=, *=, /=, 1/=, %=, !, ^, sqrt, ~, &, |, xor
For the format of Y Op Z, Operators are: +, -, *, /, 1/, %, &, |, xor
Additional operators include binary functions for Y Op Z: & (AND), | (OR), ~ (NOT), ! and 'xor' (Exclusive OR).  
Additional operators include binary functions for Y Op Z: '&=', '|=', '~=', 'xor='
Logical operators are for Y Op Z: <<', '<<=', '>>', '>>='
Random: irand(lower, upper), rand(lower, upper), exp(mean), norm(mean, stdev)
This block can also be used to define a memory as: MyMemL local 0, MyMemG global 1.0.

TIME

DSNow, TNow, TLast, TDelta, TReal, TRealLast and TRealDelta.

NOTE

Binary and shift operators can be applied only on int, binary and binary strings.

The Use Model for the Data Structure Blocks is to modify user-defined data structures or memories to implement an architectural abstraction, or cycle accurate model. Data Structure Blocks provide for communication between model flows via memory elements (Traffic or VariableList) and with composite Data Structures to quickly and efficiently implement a modeling abstraction. One can think of Data Structure Blocks as operating on Data Structures, similar to individual EXCEL spreadsheets with flow oriented operators. 

Refer Statement_Select_Delay Demo Model.



Parameter

Explanation

 Type 

Example

Field_Description_1

The field description 1 (op_x, assign, op_y, op, op_z) is a string that utilizes the DS Expression language. op_x represents the result of the asssignment (assign) operator, typically '='. The expression formats, operators, types and Time values listed in the summary section can be used here. 

The assignment operator can also be '+=', '-=', '*=', '/=', etc. similar to C/C++. The assign can also be 'local' or 'global' for declaring memories. op_x can be a memory (local, global), composite data structure field, or combination 'memory:field'. op_x cannot be a constant or numerical value, like C/C++. op_y, op_z can be a memory, composite data structure field, 'memory.field', constant, or numerical value.

String

Name_X Assign Name_Y OP Name_Z

Field_Description_2

The field description 2 (op_x, assign, op_y, op, op_z) is a string that utilizes the DS Expression language. op_x represents the result of the asssignment (assign) operator, typically '='. The expression formats, operators, types and Time values listed in the summary section can be used here. 

The assignment operator can also be '+=', '-=', '*=', '/=', etc. similar to C/C++. The assign can also be 'local' or 'global' for declaring memories. op_x can be a memory (local, global), composite data structure field, or combination 'memory:field'. op_x cannot be a constant or numerical value, like C/C++. op_y, op_z can be a memory, composite data structure field, 'memory.field', constant, or numerical value.

String

Name_X Assign Name_Y OP Name_Z

Field_Description_3

The field description 3 (op_x, assign, op_y, op, op_z) is a string that utilizes the DS Expression language. op_x represents the result of the asssignment (assign) operator, typically '='. The expression formats, operators, types and Time values listed in the summary section can be used here.  The assignment operator can also be '+=', '-=', '*=', '/=', etc. similar to C/C++.

The assign can also be 'local' or 'global' for declaring memories. op_x can be a memory (local, global), composite data structure field, or combination 'memory:field'. op_x cannot be a constant or numerical value, like C/C++. op_y, op_z can be a memory, composite data structure field, 'memory.field', constant, or numerical value.

String

Name_X Assign Name_Y OP Name_Z

Field_Description_4

The field description 4 (op_x, assign, op_y, op, op_z) is a string that utilizes the DS Expression language. op_x represents the result of the asssignment (assign) operator, typically '='. The expression formats, operators, types and Time values listed in the summary section can be used here.  The assignment operator can also be '+=', '-=', '*=', '/=', etc. similar to C/C++.

The assign can also be 'local' or 'global' for declaring memories. op_x can be a memory (local, global), composite data structure field, or combination 'memory:field'. op_x cannot be a constant or numerical value, like C/C++. op_y, op_z can be a memory, composite data structure field, 'memory.field', constant, or numerical value.

String

Name_X Assign Name_Y OP Name_Z

Delay_Value

Delay_Value can be a field name, memory name, numeric (string number), or double.

String

"Fld_Name_or_Mem_Name_or_Double"

Random_Seed

Random Number Seed.

String

123457L



Port

Explanation

Type

input

This input port takes in a Data Structure.

General

output

This output port sends the modified Data Structure out.

General




 

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