Code File Location: VisualSim/actor/lib/Custom_Source
o Generate traffic with the T_Interval period and stalls all transmission during the T_Pause.
o This block starts at
Start_Time and continues generating traffic with T_Interval as period unltil Number_Of_Transactions completes, then stops for
T_Pause and restarts again.
o Multiple instances of Custom_Source can exist in a model.
Custom_Source block outputs Data Structure (DS) during the time intervals specified by the "value_of T_Interval
and pauses all transmission during T_Pause. At the end of T_Pause, it
restarts the transmission for the T_Interval period. During the T_Interval period, it equally distributes the
"Number_of_Transactions". This blocks starts transmitting at Start_Time.
A Data Structure is a transaction containing a list of Field Names + Values. A template file containing the list of field names and initial values is specified in a .TXT or compiled .JAVA file. The name of this file is specified in the Data_Structure_Name parameter or listed in fileName parameter. To understand the fileName parameter, view the Define Data Structure Example. Examples showing different parameter configurations are listed below:
Parameter |
Explanation |
Type |
Example |
Data_Structure_Name |
Default Value: "Header" outputs a Data Structure containing the 6 Header fields only. Additional fields maybe dynamically created in the dataflow using Expression or Decision blocks. User can add any data structure using the format shown in Type and the associated examples A special Data Structure name called "Pulse" will generate a constant value of "1" for each output. The "Processor_DS" is a
special data structure template that has all the required for fields
for the Hardware Architecture blocks. An integer number can also be entered within "" to output a integer value. This is a fixed value. The .txt or .class extensions must not be added to the file name in this parameter. This is of type string and the file name must be within "". Refer DataStructure Demo Model for more details. |
File name if located in the $VS/VisualSim/data directory. |
Processor_DS |
Relative path + file if located under $VS install directory. |
VisualSim.data.Processor_DS |
||
Absolute path is required for accessing files located anywhere. |
"C:.VisualSim.DS.Processor_DS" on Windows and ".VisualSim.DS.Processor_DS" on Unix/Linux. |
||
fileOrURL | This
parameter selects a data structure template fileusing the Browse
button. This
Parameter is an alternate to the Data_Structure_File field above.
If the user defines a file name here, the above parameter is not
considered. | File Parameter format | C:/VisualSim/Data_Structure_Name.txt (or) C:/VisualSim/Data_Structure_Name.class
The user can link this to a fileParameter in the window. |
Start_Time |
This
Parameter is the time delay before the first data structure is
generated. The Default Value : 0.0 |
Double |
0.0 |
T_Interval |
T_Interval is a parameter for time delay between packets. It can take random values also which can be both double and integer i.e rand and irand respectively.If the user puts random values then the value changes within the range given. |
Double |
1.0 or irand(1,2) or rand(1.0,2.0) |
T_Pause |
T_Pause
is a parameter for the pause that will be there after generating the number of transactions specified by the user.It
can take random values, which can be both double and integer i.e
irand and rand respectively. |
Double |
2.0 or irand(2,3) or rand(2.0,3.0) |
Number_of_Transactions | It represents the number of transactions that are sent within each T_Pause period. It
can take random values but has to be integer i.e
irand . | Integer | 123, irand(2,3) |
Port |
Explanation |
Type |
Output |
This is the port that the generated Data Structures are sent on. |
General |