Full Library / Resource / Channel and Pipeline / Channel_N
Block Name: Channel_N
Code File Location: VisualSim/actor/lib/Channel_N
o Used to model any system that requires additional processing before the resource can be released
o Extends the ability of the TimedQueue
o Consists of matching Queue and channel
o Application examples include modeling multiple execution step software tasks with different sequences associated with each channel
o Can identify errors and lost packets and force retransmissions
The Channel_N block can be used to model a complex sequences of activity that are unique for each type of transaction. The channel block contains a matching set queue and channel. The 'Number_of_Channels' detemrines the number of these pairs per instance. The incoming Data Structure is sent to the specific Queue based on the value in the field called 'Channel_Number'. The queue is priority-based. The head of each queue is sent on the output port when the associated channel becomes available. The Data Structure can be passed through a series of additional blocks until it reaches the Channel_Release. At the Channel_Release, it can be sent to the accept_input or reject_input ports. If sent to the accept_input, the Channel is released and the next transaction be sent through. If the Data Structure is sent to the reject_input, the original data structure is retransmitted from the Channel_N block and the next transaction must wait. This reject models a lost packet or a noisy channel or a BER probability.
The latency through a channel is a combination of the Queue waiting time + the latency on the channel. The latency is computed by the block between the Channel_N and the Channel_Release blocks. These blocks emulate the channel activity. There is no pre-emption and priority has no effect on reject mechanism. The Channel_Complete and the Channel_N blocks are linked using the 'Channel_Name' parameter. A channel is busy between the time a Data Structure enters the Channel, till Channel_Complete.
The Channel_Name must be the same in both the Channel_N and the Channel_Complete blocks. Max_Queue_Length is the maximum number of transaction that can be buffered in each Queue of the Channel_N. When this number is reached, the next packet is rejected and placed on the reject_output port.
The statistics for the Channel_N are generated using the getBlockStatus RegEx function, using the Resource_Statistics_Generator block. The length of the Queue can be retrieved using the array Channel_N_Name + "_" + Length. The array lookup is significantly faster than the getBlockStatus method. The array method is best used when the length is required during the simulation. getBlockStatus is best used at the end of the simulation for output of the statistics. The function and array lookup can be called in either the Virtual_Machine, Processing or Decision blocks.
Result_B = Channel_N_Length(2) where the array index starts at 1 for Channel number 1. Array Index of 0 is not used.
Statistics_A = getBlockStatus(Channel_N_Name,"Any Value","stats",Channel_Number,"Any Value") -> To get the statistics.
Reset_Stats_A = getBlockStatus(Channel_N_Name,"Any Value","stats",-(Channel_Number),"Any Value") -> To reset the statistics.
If reset or statistics is required for all Channels, then make the Channel_Number = Number of Channel + 1.
There is a pre-created "Generator" block and is used in the Resource_Statistics Example in the BDE.
Copy_A = getBlockStatus(Channel_N_Name,"Any Value","copy",Channel_Number, position) -> To get the copy of the current Data Structure at any position of the Channel.
Length_A = getBlockStatus(Channel_N_Name,"Any Value","length",Channel_Number,"Any Value") -> To get the length of the selected Channel.
isAvailable = getBlockStatus(Channel_N_Name,"Any Value","array",Any Integer,Any Integer)- Returns an array of which Channel is free (true) or busy (false)
To learn the usage of the getBlockStatus, view the getBlockStatus example.
Use Model: One might model a multi communication channel, or DMA channel to memory with this block. The Channel blocks can add the effect of delay, contention and limited resources to a processor or networking model through N channels (Number_of_Channels). The 'Channel_Complete' Block can model re-tranmissions through it's two inputs: 'accept_input' for no re-transmission and 'reject_input' to calls back this block to retransmit a packet that is rejected due to noise (communication channel) or ECC bit error (memory).
Data Structure of the Statistics
{BLOCK = "Channel_Stop_n_Wait_Test.Channel_N", |
Discussion of the Statistics
Number_Entered: Number entering channel priority block
Number_Exited: Number exiting channel priority block
Number_Rejected: Number exiting channel priority block
Occupancy_Max: Maximum statistics of the buffer occupancy
Occupancy_Mean: Mean statistics of the buffer occupancy
Occupancy_Min: Min statistics of the buffer occupancy
Occupancy_StDev: Standard Deviation statistics of the buffer occupancy
Queue_Number: Channel Number. Statistics is generated for each Channel
Total_Delay_Max: Maximum wait time through this channel
Total_Delay_Mean: Mean wait time through this channel
Total_Delay_Min: Minimum wait time through this channel
Total_Delay_StDev: Standard Deviation Maximum wait time through this channel
Utilization: Not used
Field Detail |
public Parameter Channel_Name
public Parameter Number_of_Channels
public Parameter Packet_Priority
public Parameter Max_Queue_Length
Created with the Personal Edition of HelpNDoc: Free EPub and documentation generator