Channel

Parent Previous Next

Full Library / Resource / Channel and Pipeline / Channel
Block Name: Channel

Code File Location: VisualSim/actor/lib/Channel_Basic

Block Overview

  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 a single Queue and multiple channels 

  o  Application examples include virtual channels, DMA, wireless, buses, and multiple execution step software tasks

 o  Can identify errors and lost packets and force retransmissions

Description

Statistics

The statistics for the Channel are generated using the getBlockStatus RegEx function or using the Resource_Statistics_Generator block.  The Channel length is received by using the getBlockStatus while the status (Active or Free) by simply looking at the array Channel_Name + "_" + Length.  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_Length(2) where the array index starts at 1 for Channel number 1.  This returns whether the Channel is busy or not.

Statistics_A = getBlockStatus(Channel_Name,"stats",Channel_Number)  -> To get the statistics.  This returns a single Data Structure for the Queue.  The Channel_Number field is ignored.

Reset_Stats_A = getBlockStatus(Channel_Name,"stats",-(Channel_Number))   -> To reset the statistics.  This resets the single Data Structure for the Channel.  The Channel_Number field is ignored.

There is a pre-created "Generator" block and is used in the Resource_Statistics Example in the BDE.

Copy_A = getBlockStatus(Channel_Name,"copy",Channel_Number, position)  -> To get the copy of the current Data Structure at any position of the Queue.  This does not include the items that are currently in the Channels.  In this case, it can take any item out of the Queue.

Length_A = getBlockStatus(Channel_Name,"length",Channel_Number)  -> To get the length of the Queue.  The Channel_Number is ignored.

Remove_A = getBlockStatus(Channel_Name,"take",Channel_Number, position)  -> To remove a transaction in any position of the Queue.  This does not include the items that are currently in the Channels.  In this case, it can take any item out of the Queue.

isAvailable =  getBlockStatus(Channel_Name,"array",Any Integer)- Returns an array of which Channels are free (true) or busy (false)

{BLOCK                 = "Channel_Stop_n_Wait_Test.Channel_Priority",
DELTA                  = 0.0,
DS_NAME                = "Queue_Common_Stats",
ID                     = 2,
INDEX                  = 0,
Number_Entered         = 94,
Number_Exited          = 94,
Number_Rejected        = 0,
Occupancy_Max          = 1.0,
Occupancy_Mean         = 0.5,
Occupancy_Min          = 0.0,
Occupancy_StDev        = 0.5,
Queue_Number           = 1,
TIME                   = 199.0000000081,
Total_Delay_Max        = 199.0000000081,
Total_Delay_Mean       = 99.3936170309085,
Total_Delay_Min        = 2.0000000081,
Total_Delay_StDev      = 58.5856743223995
Utilization            = 0.0 }

Field Detail

stats_input

public TypedIOPort stats_input


stats_output

public TypedIOPort stats_output


Channel_Name

public Parameter Channel_Name


Channel_Rate_Mhz

public Parameter Channel_Rate_Mhz


Number_of_Channels

public Parameter Number_of_Channels


Channel_Width_Bytes

public Parameter Number_of_Channels

Parameter.  This is the width of all channels in bytes. The type is integer.


Packet_Size_Bytes

public Parameter Packet_Size_Bytes


Max_Channel_Packets

public Parameter Max_Channel_Packets



Created with the Personal Edition of HelpNDoc: Easily create iPhone documentation