Exploring XON-XOFF Flow Control with Modeling and Simulation

Below is a browsable image of the model.

Flow_Control_Xon_Xoffmodel<h2>ResourceStatistics</h2><table border="1"><tr><td><b>Parameter</b></td><td><b>Expression</b></td><td><b>Value</b></td></tr><tr><td>Block_Name</td><td>&quot;Multi_Block_Stats&quot;</td><td>&quot;Multi_Block_Stats&quot;</td></tr><tr><td>Scheduler_Name_Array</td><td>{} /* list of all the Schedulers as strings in a array */</td><td>{}\\n</td></tr><tr><td>_explanation</td><td>Results-&gt;Resource_Statistical_Report</td><td>Results-&gt;Resource_Statistical_Report</td></tr><tr><td>Smart_Res_Length</td><td>{Ingress_Size,Ingress_Size,Ingress_Size} /* Number of Queues in each Smart_Resource and match the order in </td><td>{15, 15, 15}\\n</td></tr><tr><td>Number_of_Samples</td><td>20</td><td>20</td></tr><tr><td>Smart_Res_Name_Array</td><td>{&quot;Egress&quot;,&quot;Ingress1&quot;,&quot;Ingress2&quot;}</td><td>{&quot;Egress&quot;, &quot;Ingress1&quot;, &quot;Ingress2&quot;}\\n</td></tr><tr><td>Statistics</td><td>true  /* Reset is false and Statistics is true */ </td><td>true</td></tr><tr><td>SimTime</td><td>SimTime</td><td>1.0E-4</td></tr></table><h2>TextDisplay2</h2><table border="1"><tr><td><b>Parameter</b></td><td><b>Expression</b></td><td><b>Value</b></td></tr><tr><td>Block_Documentation</td><td>Enter User Documentation Here</td><td>Enter User Documentation Here</td></tr><tr><td>rowsDisplayed</td><td>10</td><td>10</td></tr><tr><td>columnsDisplayed</td><td>40</td><td>40</td></tr><tr><td>suppressBlankLines</td><td>false</td><td>false</td></tr><tr><td>title</td><td>&quot;Statistics&quot;</td><td>&quot;Statistics&quot;</td></tr><tr><td>ViewText</td><td>true</td><td>true</td></tr><tr><td>saveText</td><td>false</td><td>false</td></tr><tr><td>fileName</td><td>Enter Filename to save text</td><td>&quot;Enter Filename to save text&quot;</td></tr><tr><td>Append_Time</td><td>true</td><td>true</td></tr></table><h2>ExpressionList7</h2><table border="1"><tr><td><b>Parameter</b></td><td><b>Expression</b></td><td><b>Value</b></td></tr><tr><td>Block_Documentation</td><td>Enter User Documentation Here</td><td>Enter User Documentation Here</td></tr><tr><td>Expression_List</td><td>/* Template to enter multiple RegEx lines*/\\nResult_A = input(0)\\n</td><td>/* Template to enter multiple RegEx lines*/\\nResult_A = input(0)\\n</td></tr><tr><td>Output_Ports</td><td>output</td><td>&quot;output&quot;</td></tr><tr><td>Output_Values</td><td>Result_A.Occupancy_Mean</td><td>&quot;Result_A.Occupancy_Mean&quot;</td></tr><tr><td>Output_Conditions</td><td>true</td><td>&quot;true&quot;</td></tr></table><h2>ExpressionList6</h2><table border="1"><tr><td><b>Parameter</b></td><td><b>Expression</b></td><td><b>Value</b></td></tr><tr><td>Block_Documentation</td><td>Enter User Documentation Here</td><td>Enter User Documentation Here</td></tr><tr><td>Expression_List</td><td>/* Template to enter multiple RegEx lines*/\\nResult_A = InThru\\nResult_B = OutThru\\nResult_D =&quot;Input Throughput: &quot; + InThru.toString() + &quot;\\n&quot; + &quot;Output Throughput: &quot; + OutThru.toString()</td><td>/* Template to enter multiple RegEx lines*/\\nResult_A = InThru\\nResult_B = OutThru\\nResult_D =&quot;Input Throughput: &quot; + InThru.toString() + &quot;\\n&quot; + &quot;Output Throughput: &quot; + OutThru.toString()</td></tr><tr><td>Output_Ports</td><td>output</td><td>&quot;output&quot;</td></tr><tr><td>Output_Values</td><td>Result_D</td><td>&quot;Result_D&quot;</td></tr><tr><td>Output_Conditions</td><td>true</td><td>&quot;true&quot;</td></tr></table><h2>TextDisplay</h2><table border="1"><tr><td><b>Parameter</b></td><td><b>Expression</b></td><td><b>Value</b></td></tr><tr><td>Block_Documentation</td><td>Enter User Documentation Here</td><td>Enter User Documentation Here</td></tr><tr><td>rowsDisplayed</td><td>10</td><td>10</td></tr><tr><td>columnsDisplayed</td><td>40</td><td>40</td></tr><tr><td>suppressBlankLines</td><td>false</td><td>false</td></tr><tr><td>title</td><td>&quot;Output_DS&quot;</td><td>&quot;Output_DS&quot;</td></tr><tr><td>ViewText</td><td>true</td><td>true</td></tr><tr><td>saveText</td><td>false</td><td>false</td></tr><tr><td>fileName</td><td>Enter Filename to save text</td><td>&quot;Enter Filename to save text&quot;</td></tr><tr><td>Append_Time</td><td>true</td><td>true</td></tr></table><h2>ExpressionList5</h2><table border="1"><tr><td><b>Parameter</b></td><td><b>Expression</b></td><td><b>Value</b></td></tr><tr><td>Block_Documentation</td><td>Enter User Documentation Here</td><td>Enter User Documentation Here</td></tr><tr><td>Expression_List</td><td>/* Template to enter multiple RegEx lines*/\\nSelect               = input.Queue\\nIndex                = Select - 1  \\nOutThru(Index)   = OutThru(Index) + input.Size \\n</td><td>/* Template to enter multiple RegEx lines*/\\nSelect               = input.Queue\\nIndex                = Select - 1  \\nOutThru(Index)   = OutThru(Index) + input.Size \\n</td></tr><tr><td>Output_Ports</td><td>output,out</td><td>&quot;output,out&quot;</td></tr><tr><td>Output_Values</td><td>input,(TNow-input.TIME)</td><td>&quot;input,(TNow-input.TIME)&quot;</td></tr><tr><td>Output_Conditions</td><td>true,true</td><td>&quot;true,true&quot;</td></tr></table><h2>ExpressionList2</h2><table border="1"><tr><td><b>Parameter</b></td><td><b>Expression</b></td><td><b>Value</b></td></tr><tr><td>Block_Documentation</td><td>Enter User Documentation Here</td><td>Enter User Documentation Here</td></tr><tr><td>Expression_List</td><td>/* Template to enter multiple RegEx lines*/\\ninput.Size = 64\\ninput.Priority = irand ( 1 ,4)\\ninput.Queue = irand ( 1 , Ingress_Size)\\ninput.Ch_Name = &quot;Ingress2&quot;\\ninput.DELTA = 1.0 * input.Size/Output_Rate</td><td>/* Template to enter multiple RegEx lines*/\\ninput.Size = 64\\ninput.Priority = irand ( 1 ,4)\\ninput.Queue = irand ( 1 , Ingress_Size)\\ninput.Ch_Name = &quot;Ingress2&quot;\\ninput.DELTA = 1.0 * input.Size/Output_Rate</td></tr><tr><td>Output_Ports</td><td>output</td><td>&quot;output&quot;</td></tr><tr><td>Output_Values</td><td>input</td><td>&quot;input&quot;</td></tr><tr><td>Output_Conditions</td><td>true</td><td>&quot;true&quot;</td></tr></table><h2>ExpressionList</h2><table border="1"><tr><td><b>Parameter</b></td><td><b>Expression</b></td><td><b>Value</b></td></tr><tr><td>Block_Documentation</td><td>Enter User Documentation Here</td><td>Enter User Documentation Here</td></tr><tr><td>Expression_List</td><td>/* Template to enter multiple RegEx lines*/\\ninput.Size = 128\\ninput.Priority = irand ( 1 ,4)\\ninput.Queue = irand ( 1 , Ingress_Size)\\ninput.Ch_Name = &quot;Ingress1&quot;\\ninput.DELTA = 1.0 * input.Size/Output_Rate</td><td>/* Template to enter multiple RegEx lines*/\\ninput.Size = 128\\ninput.Priority = irand ( 1 ,4)\\ninput.Queue = irand ( 1 , Ingress_Size)\\ninput.Ch_Name = &quot;Ingress1&quot;\\ninput.DELTA = 1.0 * input.Size/Output_Rate</td></tr><tr><td>Output_Ports</td><td>output</td><td>&quot;output&quot;</td></tr><tr><td>Output_Values</td><td>input</td><td>&quot;input&quot;</td></tr><tr><td>Output_Conditions</td><td>true</td><td>&quot;true&quot;</td></tr></table><h2>xTime_yData_Plotter</h2><table border="1"><tr><td><b>Parameter</b></td><td><b>Expression</b></td><td><b>Value</b></td></tr><tr><td>Block_Documentation</td><td>Enter User Documentation Here</td><td>Enter User Documentation Here</td></tr><tr><td>fillOnWrapup</td><td>true</td><td>true</td></tr><tr><td>legend</td><td>&nbsp;</td><td>&nbsp;</td></tr><tr><td>startingDataset</td><td>0</td><td>0</td></tr><tr><td>fileName</td><td>Enter Filename to save plot</td><td>&quot;Enter Filename to save plot&quot;</td></tr><tr><td>viewPlot</td><td>true</td><td>true</td></tr><tr><td>savePlot</td><td>false</td><td>false</td></tr></table><h2>Mux</h2><table border="1"><tr><td><b>Parameter</b></td><td><b>Expression</b></td><td><b>Value</b></td></tr><tr><td>Block_Documentation</td><td>Enter User Documentation Here</td><td>Enter User Documentation Here</td></tr></table><h2>SingleEvent</h2><table border="1"><tr><td><b>Parameter</b></td><td><b>Expression</b></td><td><b>Value</b></td></tr><tr><td>Block_Documentation</td><td>Enter User Documentation Here</td><td>Enter User Documentation Here</td></tr><tr><td>_explanation</td><td>Source-&gt;Event-&gt;SingleEvent\t</td><td>Source-&gt;Event-&gt;SingleEvent\t</td></tr><tr><td>time</td><td>SimTime</td><td>1.0E-4</td></tr><tr><td>value</td><td>true</td><td>true</td></tr></table><h2>ExpressionList4</h2><table border="1"><tr><td><b>Parameter</b></td><td><b>Expression</b></td><td><b>Value</b></td></tr><tr><td>Block_Documentation</td><td>Enter User Documentation Here</td><td>Enter User Documentation Here</td></tr><tr><td>Expression_List</td><td>/* Template to enter multiple RegEx lines*/\\n</td><td>/* Template to enter multiple RegEx lines*/\\n</td></tr><tr><td>Output_Ports</td><td>output</td><td>&quot;output&quot;</td></tr><tr><td>Output_Values</td><td>input</td><td>&quot;input&quot;</td></tr><tr><td>Output_Conditions</td><td>(getBlockStatus(&quot;Xoff_2&quot;,&quot;length&quot;,1) &lt;  Xoff_Thres)</td><td>&quot;(getBlockStatus(&quot;Xoff_2&quot;,&quot;length&quot;,1) &lt;  Xoff_Thres)&quot;</td></tr></table><h2>Traffic4</h2><table border="1"><tr><td><b>Parameter</b></td><td><b>Expression</b></td><td><b>Value</b></td></tr><tr><td>Block_Documentation</td><td>Enter User Documentation Here</td><td>Enter User Documentation Here</td></tr><tr><td>Data_Structure_Name</td><td>&quot;pulse&quot;</td><td>&quot;pulse&quot;</td></tr><tr><td>Start_Time</td><td>2.1e-7</td><td>2.1E-7</td></tr><tr><td>Mean_Time</td><td>1/Xoff_Rate*0.5</td><td>8.1967213114754E-10</td></tr><tr><td>Spread_Time</td><td>2.0</td><td>2.0</td></tr><tr><td>Random_Seed</td><td>123457L</td><td>123457L</td></tr><tr><td>Time_Distribution</td><td>Fixed (Mean)</td><td>Fixed (Mean)</td></tr></table><h2>ExpressionList3</h2><table border="1"><tr><td><b>Parameter</b></td><td><b>Expression</b></td><td><b>Value</b></td></tr><tr><td>Block_Documentation</td><td>Enter User Documentation Here</td><td>Enter User Documentation Here</td></tr><tr><td>Expression_List</td><td>/* Template to enter multiple RegEx lines*/\\n</td><td>/* Template to enter multiple RegEx lines*/\\n</td></tr><tr><td>Output_Ports</td><td>output</td><td>&quot;output&quot;</td></tr><tr><td>Output_Values</td><td>input</td><td>&quot;input&quot;</td></tr><tr><td>Output_Conditions</td><td>(getBlockStatus(&quot;Xoff_1&quot;,&quot;length&quot;,1) &lt;  Xoff_Thres)</td><td>&quot;(getBlockStatus(&quot;Xoff_1&quot;,&quot;length&quot;,1) &lt;  Xoff_Thres)&quot;</td></tr></table><h2>Traffic3</h2><table border="1"><tr><td><b>Parameter</b></td><td><b>Expression</b></td><td><b>Value</b></td></tr><tr><td>Block_Documentation</td><td>Enter User Documentation Here</td><td>Enter User Documentation Here</td></tr><tr><td>Data_Structure_Name</td><td>&quot;pulse&quot;</td><td>&quot;pulse&quot;</td></tr><tr><td>Start_Time</td><td>2.1e-7</td><td>2.1E-7</td></tr><tr><td>Mean_Time</td><td>1/Xoff_Rate*0.5</td><td>8.1967213114754E-10</td></tr><tr><td>Spread_Time</td><td>2.0</td><td>2.0</td></tr><tr><td>Random_Seed</td><td>123457L</td><td>123457L</td></tr><tr><td>Time_Distribution</td><td>Fixed (Mean)</td><td>Fixed (Mean)</td></tr></table><h2>Queue7</h2><table border="1"><tr><td><b>Parameter</b></td><td><b>Expression</b></td><td><b>Value</b></td></tr><tr><td>Block_Documentation</td><td>Enter User Documentation Here</td><td>Enter User Documentation Here</td></tr><tr><td>Block_Name</td><td>&quot;Xoff_2&quot;</td><td>&quot;Xoff_2&quot;</td></tr><tr><td>Queue_Number_Field</td><td>1</td><td>1</td></tr><tr><td>Priority_Field</td><td>&quot;Priority&quot;</td><td>&quot;Priority&quot;</td></tr><tr><td>Max_Queue_Length</td><td>30</td><td>30</td></tr><tr><td>Number_of_Queues</td><td>Queue_Depth</td><td>100</td></tr><tr><td>Initial_Queue_State</td><td>First_Token_Flow_Through</td><td>First_Token_Flow_Through</td></tr><tr><td>Queue_Reject_Mechanism</td><td>Incoming_Token_Rejected</td><td>Incoming_Token_Rejected</td></tr><tr><td>Queue_Type</td><td>FIFO</td><td>FIFO</td></tr></table><h2>Queue5</h2><table border="1"><tr><td><b>Parameter</b></td><td><b>Expression</b></td><td><b>Value</b></td></tr><tr><td>Block_Documentation</td><td>Enter User Documentation Here</td><td>Enter User Documentation Here</td></tr><tr><td>Block_Name</td><td>&quot;Xon_2&quot;</td><td>&quot;Xon_2&quot;</td></tr><tr><td>Queue_Number_Field</td><td>1</td><td>1</td></tr><tr><td>Priority_Field</td><td>&quot;Priority&quot;</td><td>&quot;Priority&quot;</td></tr><tr><td>Max_Queue_Length</td><td>30</td><td>30</td></tr><tr><td>Number_of_Queues</td><td>Queue_Depth</td><td>100</td></tr><tr><td>Initial_Queue_State</td><td>First_Token_Flow_Through</td><td>First_Token_Flow_Through</td></tr><tr><td>Queue_Reject_Mechanism</td><td>Incoming_Token_Rejected</td><td>Incoming_Token_Rejected</td></tr><tr><td>Queue_Type</td><td>FIFO</td><td>FIFO</td></tr></table><h2>Queue6</h2><table border="1"><tr><td><b>Parameter</b></td><td><b>Expression</b></td><td><b>Value</b></td></tr><tr><td>Block_Documentation</td><td>Enter User Documentation Here</td><td>Enter User Documentation Here</td></tr><tr><td>Block_Name</td><td>&quot;Xoff_1&quot;</td><td>&quot;Xoff_1&quot;</td></tr><tr><td>Queue_Number_Field</td><td>1</td><td>1</td></tr><tr><td>Priority_Field</td><td>&quot;Priority&quot;</td><td>&quot;Priority&quot;</td></tr><tr><td>Max_Queue_Length</td><td>30</td><td>30</td></tr><tr><td>Number_of_Queues</td><td>Queue_Depth</td><td>100</td></tr><tr><td>Initial_Queue_State</td><td>First_Token_Flow_Through</td><td>First_Token_Flow_Through</td></tr><tr><td>Queue_Reject_Mechanism</td><td>Incoming_Token_Rejected</td><td>Incoming_Token_Rejected</td></tr><tr><td>Queue_Type</td><td>FIFO</td><td>FIFO</td></tr></table><h2>Queue4</h2><table border="1"><tr><td><b>Parameter</b></td><td><b>Expression</b></td><td><b>Value</b></td></tr><tr><td>Block_Documentation</td><td>Enter User Documentation Here</td><td>Enter User Documentation Here</td></tr><tr><td>Block_Name</td><td>&quot;Xon_1&quot;</td><td>&quot;Xon_1&quot;</td></tr><tr><td>Queue_Number_Field</td><td>1</td><td>1</td></tr><tr><td>Priority_Field</td><td>&quot;Priority&quot;</td><td>&quot;Priority&quot;</td></tr><tr><td>Max_Queue_Length</td><td>30</td><td>30</td></tr><tr><td>Number_of_Queues</td><td>Queue_Depth</td><td>100</td></tr><tr><td>Initial_Queue_State</td><td>First_Token_Flow_Through</td><td>First_Token_Flow_Through</td></tr><tr><td>Queue_Reject_Mechanism</td><td>Incoming_Token_Rejected</td><td>Incoming_Token_Rejected</td></tr><tr><td>Queue_Type</td><td>FIFO</td><td>FIFO</td></tr></table><h2>Queue8</h2><table border="1"><tr><td><b>Parameter</b></td><td><b>Expression</b></td><td><b>Value</b></td></tr><tr><td>Block_Documentation</td><td>Enter User Documentation Here</td><td>Enter User Documentation Here</td></tr><tr><td>Block_Name</td><td>&quot;Egress&quot;</td><td>&quot;Egress&quot;</td></tr><tr><td>Queue_Number_Field</td><td>&quot;Queue&quot;</td><td>&quot;Queue&quot;</td></tr><tr><td>Priority_Field</td><td>&quot;Priority&quot;</td><td>&quot;Priority&quot;</td></tr><tr><td>Time_Field</td><td>&quot;DELTA&quot;</td><td>&quot;DELTA&quot;</td></tr><tr><td>Max_Queue_Length</td><td>Queue_Depth</td><td>100</td></tr><tr><td>Number_of_Queues</td><td>Ingress_Size</td><td>15</td></tr><tr><td>Queue_Type</td><td>FIFO</td><td>FIFO</td></tr></table><h2>Smart_Controller4</h2><table border="1"><tr><td><b>Parameter</b></td><td><b>Expression</b></td><td><b>Value</b></td></tr><tr><td>Block_Documentation</td><td>Enter User Documentation Here</td><td>Enter User Documentation Here</td></tr><tr><td>Block_Name</td><td>&quot;RR2&quot;</td><td>&quot;RR2&quot;</td></tr><tr><td>Optional_Parameters</td><td>/* First row contains Column Names.              */\\nParameter_Name                 Parameter_Value     \\nPath                           none                \\nRead_File                      none                \\nSave_Files                     false               \\nProfile_File                   none                \\nListen_to_File                 none                \\nDuplicate_Input                true                \\nProfile                        0                   \\nMaximum_Loops                  1000000             \\nBlock_Reference                Block_Name          \\nPort_Order_Array               {&quot;input&quot;}         \\nAdd_Scheduler_Times_to_DS      false               \\n</td><td>/* First row contains Column Names.              */\\nParameter_Name                 Parameter_Value     \\nPath                           none                \\nRead_File                      none                \\nSave_Files                     false               \\nProfile_File                   none                \\nListen_to_File                 none                \\nDuplicate_Input                true                \\nProfile                        0                   \\nMaximum_Loops                  1000000             \\nBlock_Reference                Block_Name          \\nPort_Order_Array               {&quot;input&quot;}         \\nAdd_Scheduler_Times_to_DS      false               \\n</td></tr><tr><td>Single_Cycle</td><td>false</td><td>false</td></tr><tr><td>Breakpoint</td><td>&quot;none&quot;</td><td>&quot;none&quot;</td></tr><tr><td>Self_Start</td><td>true</td><td>true</td></tr><tr><td>Smart_Resource_Name</td><td>&quot;Ingress2&quot;</td><td>&quot;Ingress2&quot;</td></tr></table><h2>Smart_Controller</h2><table border="1"><tr><td><b>Parameter</b></td><td><b>Expression</b></td><td><b>Value</b></td></tr><tr><td>Block_Documentation</td><td>Enter User Documentation Here</td><td>Enter User Documentation Here</td></tr><tr><td>Block_Name</td><td>&quot;RR1&quot;</td><td>&quot;RR1&quot;</td></tr><tr><td>Optional_Parameters</td><td>/* First row contains Column Names.              */\\nParameter_Name                 Parameter_Value     \\nPath                           none                \\nRead_File                      none                \\nSave_Files                     false               \\nProfile_File                   none                \\nListen_to_File                 none                \\nDuplicate_Input                true                \\nProfile                        0                   \\nMaximum_Loops                  1000000             \\nBlock_Reference                Block_Name          \\nPort_Order_Array               {&quot;input&quot;}         \\nAdd_Scheduler_Times_to_DS      false               \\n</td><td>/* First row contains Column Names.              */\\nParameter_Name                 Parameter_Value     \\nPath                           none                \\nRead_File                      none                \\nSave_Files                     false               \\nProfile_File                   none                \\nListen_to_File                 none                \\nDuplicate_Input                true                \\nProfile                        0                   \\nMaximum_Loops                  1000000             \\nBlock_Reference                Block_Name          \\nPort_Order_Array               {&quot;input&quot;}         \\nAdd_Scheduler_Times_to_DS      false               \\n</td></tr><tr><td>Single_Cycle</td><td>false</td><td>false</td></tr><tr><td>Breakpoint</td><td>&quot;none&quot;</td><td>&quot;none&quot;</td></tr><tr><td>Self_Start</td><td>true</td><td>true</td></tr><tr><td>Smart_Resource_Name</td><td>&quot;Ingress1&quot;</td><td>&quot;Ingress1&quot;</td></tr></table><h2>Queue2</h2><table border="1"><tr><td><b>Parameter</b></td><td><b>Expression</b></td><td><b>Value</b></td></tr><tr><td>Block_Documentation</td><td>Enter User Documentation Here</td><td>Enter User Documentation Here</td></tr><tr><td>Block_Name</td><td>&quot;Ingress2&quot;</td><td>&quot;Ingress2&quot;</td></tr><tr><td>Queue_Number_Field</td><td>&quot;Queue&quot;</td><td>&quot;Queue&quot;</td></tr><tr><td>Priority_Field</td><td>&quot;Priority&quot;</td><td>&quot;Priority&quot;</td></tr><tr><td>Max_Queue_Length</td><td>Queue_Depth</td><td>100</td></tr><tr><td>Number_of_Queues</td><td>Ingress_Size</td><td>15</td></tr><tr><td>Initial_Queue_State</td><td>First_Token_Flow_Through</td><td>First_Token_Flow_Through</td></tr><tr><td>Queue_Reject_Mechanism</td><td>Incoming_Token_Rejected</td><td>Incoming_Token_Rejected</td></tr><tr><td>Queue_Type</td><td>FIFO</td><td>FIFO</td></tr></table><h2>Queue1</h2><table border="1"><tr><td><b>Parameter</b></td><td><b>Expression</b></td><td><b>Value</b></td></tr><tr><td>Block_Documentation</td><td>Enter User Documentation Here</td><td>Enter User Documentation Here</td></tr><tr><td>Block_Name</td><td>&quot;Ingress1&quot;</td><td>&quot;Ingress1&quot;</td></tr><tr><td>Queue_Number_Field</td><td>&quot;Queue&quot;</td><td>&quot;Queue&quot;</td></tr><tr><td>Priority_Field</td><td>&quot;Priority&quot;</td><td>&quot;Priority&quot;</td></tr><tr><td>Max_Queue_Length</td><td>Queue_Depth</td><td>100</td></tr><tr><td>Number_of_Queues</td><td>Ingress_Size</td><td>15</td></tr><tr><td>Initial_Queue_State</td><td>First_Token_Flow_Through</td><td>First_Token_Flow_Through</td></tr><tr><td>Queue_Reject_Mechanism</td><td>Incoming_Token_Rejected</td><td>Incoming_Token_Rejected</td></tr><tr><td>Queue_Type</td><td>FIFO</td><td>FIFO</td></tr></table><h2>Traffic5</h2><table border="1"><tr><td><b>Parameter</b></td><td><b>Expression</b></td><td><b>Value</b></td></tr><tr><td>Block_Documentation</td><td>Enter User Documentation Here</td><td>Enter User Documentation Here</td></tr><tr><td>Data_Structure_Name</td><td>&quot;pulse&quot;</td><td>&quot;pulse&quot;</td></tr><tr><td>Start_Time</td><td>2.01e-7</td><td>2.01E-7</td></tr><tr><td>Mean_Time</td><td>1/Xoff_Rate*0.5</td><td>8.1967213114754E-10</td></tr><tr><td>Spread_Time</td><td>2.0</td><td>2.0</td></tr><tr><td>Random_Seed</td><td>123457L</td><td>123457L</td></tr><tr><td>Time_Distribution</td><td>Fixed (Mean)</td><td>Fixed (Mean)</td></tr></table><h2>Traffic</h2><table border="1"><tr><td><b>Parameter</b></td><td><b>Expression</b></td><td><b>Value</b></td></tr><tr><td>Block_Documentation</td><td>Enter User Documentation Here</td><td>Enter User Documentation Here</td></tr><tr><td>Data_Structure_Name</td><td>&quot;Header&quot;</td><td>&quot;Header&quot;</td></tr><tr><td>Start_Time</td><td>0.0</td><td>0.0</td></tr><tr><td>Mean_Time</td><td>1.0/In_Rate</td><td>5.0E-8</td></tr><tr><td>Spread_Time</td><td>2.0</td><td>2.0</td></tr><tr><td>Random_Seed</td><td>123457L</td><td>123457L</td></tr><tr><td>Time_Distribution</td><td>Fixed (Mean)</td><td>Fixed (Mean)</td></tr></table><h2>Traffic2</h2><table border="1"><tr><td><b>Parameter</b></td><td><b>Expression</b></td><td><b>Value</b></td></tr><tr><td>Block_Documentation</td><td>Enter User Documentation Here</td><td>Enter User Documentation Here</td></tr><tr><td>Data_Structure_Name</td><td>&quot;Header&quot;</td><td>&quot;Header&quot;</td></tr><tr><td>Start_Time</td><td>0.0</td><td>0.0</td></tr><tr><td>Mean_Time</td><td>1.0/In_Rate</td><td>5.0E-8</td></tr><tr><td>Spread_Time</td><td>2.0</td><td>2.0</td></tr><tr><td>Random_Seed</td><td>123457L</td><td>123457L</td></tr><tr><td>Time_Distribution</td><td>Fixed (Mean)</td><td>Fixed (Mean)</td></tr></table><h2>Latency</h2><table border="1"><tr><td><b>Parameter</b></td><td><b>Expression</b></td><td><b>Value</b></td></tr><tr><td>Block_Documentation</td><td>Enter User Documentation Here</td><td>Enter User Documentation Here</td></tr><tr><td>fillOnWrapup</td><td>true</td><td>true</td></tr><tr><td>legend</td><td>&nbsp;</td><td>&nbsp;</td></tr><tr><td>startingDataset</td><td>0</td><td>0</td></tr><tr><td>fileName</td><td>Enter Filename to save plot</td><td>&quot;Enter Filename to save plot&quot;</td></tr><tr><td>viewPlot</td><td>true</td><td>true</td></tr><tr><td>savePlot</td><td>false</td><td>false</td></tr></table><h2>Latency_Histogram</h2><table border="1"><tr><td><b>Parameter</b></td><td><b>Expression</b></td><td><b>Value</b></td></tr><tr><td>Block_Documentation</td><td>Enter User Documentation Here</td><td>Enter User Documentation Here</td></tr><tr><td>fillOnWrapup</td><td>true</td><td>true</td></tr><tr><td>legend</td><td>&nbsp;</td><td>&nbsp;</td></tr><tr><td>startingDataset</td><td>0</td><td>0</td></tr><tr><td>fileName</td><td>Enter Filename to save plot</td><td>&quot;Enter Filename to save plot&quot;</td></tr><tr><td>viewPlot</td><td>true</td><td>true</td></tr><tr><td>savePlot</td><td>false</td><td>false</td></tr><tr><td>binWidth</td><td>3.0E-08</td><td>3.0E-8</td></tr><tr><td>binOffset</td><td>2.0E-08</td><td>2.0E-8</td></tr></table><h2>Traffic7</h2><table border="1"><tr><td><b>Parameter</b></td><td><b>Expression</b></td><td><b>Value</b></td></tr><tr><td>Block_Documentation</td><td>Enter User Documentation Here</td><td>Enter User Documentation Here</td></tr><tr><td>Data_Structure_Name</td><td>&quot;pulse&quot;</td><td>&quot;pulse&quot;</td></tr><tr><td>Start_Time</td><td>2.01e-7</td><td>2.01E-7</td></tr><tr><td>Mean_Time</td><td>1/Xoff_Rate*0.5</td><td>8.1967213114754E-10</td></tr><tr><td>Spread_Time</td><td>2.0</td><td>2.0</td></tr><tr><td>Random_Seed</td><td>123457L</td><td>123457L</td></tr><tr><td>Time_Distribution</td><td>Fixed (Mean)</td><td>Fixed (Mean)</td></tr></table><h2>VariableList</h2><table border="1"><tr><td><b>Parameter</b></td><td><b>Expression</b></td><td><b>Value</b></td></tr><tr><td>Block_Documentation</td><td>Enter User Documentation Here</td><td>Enter User Documentation Here</td></tr><tr><td>Memory_Init_Text</td><td>/* Memory Initialize Templates          \\nName          Type          Value       */\\nQueue_Ptr1    global\t\t0\t;\\nQueue_Ptr2    global\t\t0\t;\\nXoff\t      global\t\t0\t;\\nDelay\t      global\t\t{Ingress_Size:0.0}\t;\\nInThru\t      local\t\t{Ingress_Size:0}\t;\\nOutThru\t      local\t\t{Ingress_Size:0}\t;</td><td>/* Memory Initialize Templates          \\nName          Type          Value       */\\nQueue_Ptr1    global\t\t0\t;\\nQueue_Ptr2    global\t\t0\t;\\nXoff\t      global\t\t0\t;\\nDelay\t      global\t\t{Ingress_Size:0.0}\t;\\nInThru\t      local\t\t{Ingress_Size:0}\t;\\nOutThru\t      local\t\t{Ingress_Size:0}\t;</td></tr></table>

Introduction

Purpose of this demonstration system is to explore XON-XOFF Flow Control using Modeling and Simulation. XON-XOFF Flow Control is used to control the data transfers between computers and other devices in an asynchronous serial connection. In this simulation model we have two Ingress queues representing two master devices and a single Egress Queue representing a Slave device.  Block diagram of the system is shown below



A set of transactions from different channels (Ch1, Ch2,...Chn) arrives at Input Ingress Buffer  and the Ingress Buffer arbiter will send packets to individual output Q or Egress Buffer. In the current model, we assume the mapping of input to the final Output Q is pre-provision. (From the above Input Ch1 map to OutputCh1. ) The Flow Control between Output Ch1 and Input Ch1 can be Xon/Xoff based or Credit Based. Multiple Input Q will flow through a inter-mediate Channel. The flow control of these channel will be Xon/ Xoff Based.
(Note : The max. traffic rate, and the drain rate of any channel should be parameterised, and the actual drain rate will be Flow control back-pressured based.)

Flow Control Logic is defined using VisualSim Scripting language, transactions will be sent out of Ingress Buffer only if Egress Buffer has sufficient space. 


The model is broken down into the following sections

1. Traffic source: The source has a input rate with a uniform distribution.
2. Setting up the forward and output queues
3. Writing to the forward queue
4. Removing from the output queues
5. Round-robin algorithm
6. Applying Backward Pressure
7. Reading from the forward queue and placing them in the output queue along with the estimated processing time in the output queue: The process of transferring the data from the forward queue to the output queue is done once the backward pressure has been evaluated and the forward queue is free to send the data. This is done by first removing the data from the Forward Queue, computing processing delay at the output queue and then placing the frames in the associated output port queue along with the processing time.
8. Statistics has been gathered on the forward and output queues, and the latency of each frame at the exit of the output queue. The latency is computed by calculating the time from the packet generation to the exit of the output queue (“DELTA = TNow – TIME”).

Analysis

Two results are captured in this model. The first is the statistics of the forward and output queue occupancy while the second is the end-to-end latency of the each frame. There are considerable spikes in the latency curve indicating the unpredictable nature of this algorithm.

This indicates that the design did not scale well. The forward queues are somewhat overdesigned. Also, the back pressure is never triggered as the data is not arriving fast enough. The round-robin algorithm can be improved using a weighted average by adding more knowledge about the content of the queues.