Designing Port Switch

Below is a browsable image of the model.

Port_Switchmodel<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>{&quot;Switch_Fabric&quot;} /* list of all the Schedulers as strings in a array */</td><td>{&quot;Switch_Fabric&quot;}\\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>{200,200} /* Number of Queues in each Smart_Resource and match the order in </td><td>{200, 200}\\n</td></tr><tr><td>Number_of_Samples</td><td>1</td><td>1</td></tr><tr><td>Smart_Res_Name_Array</td><td>{&quot;Input_Buffer&quot;,&quot;Output_Buffer&quot;}</td><td>{&quot;Input_Buffer&quot;, &quot;Output_Buffer&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>Sim_Time</td><td>30.0</td></tr></table><h2>SystemResource2</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>This_Scheduler_Name</td><td>&quot;Switch_Fabric&quot;</td><td>&quot;Switch_Fabric&quot;</td></tr><tr><td>Parent_Scheduler_Name</td><td>&quot;None&quot;</td><td>&quot;None&quot;</td></tr><tr><td>Task_Context_Switch_Time</td><td>0.0</td><td>0.0</td></tr><tr><td>Round_Robin_Time_Slice</td><td>1.0</td><td>1.0</td></tr><tr><td>Clock_Rate_Mhz</td><td>Switch_Speed</td><td>1.6E7</td></tr><tr><td>Max_Scheduler_Length</td><td>30</td><td>30</td></tr><tr><td>Time_Type</td><td>Number Clocks</td><td>Number Clocks</td></tr><tr><td>Scheduler_Type</td><td>FCFS + Preempt</td><td>FCFS + Preempt</td></tr><tr><td>Add_Scheduler_Times_to_DS</td><td>false</td><td>false</td></tr></table><h2>Mapper</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>Parent_Scheduler_Name</td><td>&quot;Switch_Fabric&quot;</td><td>&quot;Switch_Fabric&quot;</td></tr><tr><td>Task_Number</td><td>&quot;INDEX&quot;</td><td>&quot;INDEX&quot;</td></tr><tr><td>Task_Priority</td><td>0</td><td>0</td></tr><tr><td>Task_Time</td><td>&quot;DELTA&quot;</td><td>&quot;DELTA&quot;</td></tr><tr><td>Task_Plot_ID</td><td>1</td><td>1</td></tr></table><h2>Queues</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;Input_Buffer&quot;</td><td>&quot;Input_Buffer&quot;</td></tr><tr><td>Queue_Number_Field</td><td>&quot;Source_Port&quot;</td><td>&quot;Source_Port&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>Input_Buffer_Size</td><td>200</td></tr><tr><td>Number_of_Queues</td><td>Num_of_Ports</td><td>16</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>Server</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;Output_Buffer&quot;</td><td>&quot;Output_Buffer&quot;</td></tr><tr><td>Queue_Number_Field</td><td>1</td><td>1</td></tr><tr><td>Priority_Field</td><td>&quot;Priority_Field_or_Int&quot;</td><td>&quot;Priority_Field_or_Int&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>Output_Buffer_Size</td><td>200</td></tr><tr><td>Number_of_Queues</td><td>1</td><td>1</td></tr><tr><td>Queue_Type</td><td>FIFO</td><td>FIFO</td></tr></table><h2>ExpressionList8</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 for List of Expressions. */ \\n</td><td>/* Template for List of Expressions. */ \\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>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>input.DELTA = 1.0 / Variable_packets_per_sec</td><td>input.DELTA = 1.0 / Variable_packets_per_sec</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,input.Destination_Port</td><td>&quot;input,input.Destination_Port&quot;</td></tr><tr><td>Output_Conditions</td><td>true,true</td><td>&quot;true,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>/* No Expressions. */</td><td>/* No Expressions. */</td></tr><tr><td>Output_Ports</td><td>output,false</td><td>&quot;output,false&quot;</td></tr><tr><td>Output_Values</td><td>input,input</td><td>&quot;input,input&quot;</td></tr><tr><td>Output_Conditions</td><td>(input.Source_Port != input.Destination_Port &amp;&amp; input.Time_Live &gt; TNow),!(input.Source_Port != input.Destination_Port &amp;&amp; input.Time_Live &gt; TNow)</td><td>&quot;(input.Source_Port != input.Destination_Port &amp;&amp; input.Time_Live &gt; TNow),!(input.Source_Port != input.Destination_Port &amp;&amp; input.Time_Live &gt; TNow)&quot;</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>\\ninput.INDEX = (input.Destination_Port == Broadcast_Port_Num)?Num_of_Ports:0</td><td>\\ninput.INDEX = (input.Destination_Port == Broadcast_Port_Num)?Num_of_Ports:0</td></tr><tr><td>Output_Ports</td><td>output,false</td><td>&quot;output,false&quot;</td></tr><tr><td>Output_Values</td><td>input,input</td><td>&quot;input,input&quot;</td></tr><tr><td>Output_Conditions</td><td>(input.Destination_Port == Broadcast_Port_Num),!(input.Destination_Port == Broadcast_Port_Num)</td><td>&quot;(input.Destination_Port == Broadcast_Port_Num),!(input.Destination_Port == Broadcast_Port_Num)&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;Port Statistics&quot;</td><td>&quot;Port 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>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>\\ninput.Time_Live = TNow + Time_to_Live\\ninput.DELTA = input.Packet_Bytes % Packet_Size\\ninput.DELTA = input.DELTA + 1.0\\ninput.INDEX = input.Source_Port + 1</td><td>\\ninput.Time_Live = TNow + Time_to_Live\\ninput.DELTA = input.Packet_Bytes % Packet_Size\\ninput.DELTA = input.DELTA + 1.0\\ninput.INDEX = input.Source_Port + 1</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,input.Source_Port</td><td>&quot;input,input.Source_Port&quot;</td></tr><tr><td>Output_Conditions</td><td>true,true</td><td>&quot;true,true&quot;</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>input.Source_Port    = 0  \\ninput.Destination_Port = 1  \\ninput.Priority       = 0  \\ninput.Packet_Bytes   = 53 \\ninput.Time_Live      =  0.0 \\n\\ninput.Source_Port = irand (2, 15)\\ninput.Destination_Port = input.Source_Port  - 1\\ninput.Packet_Bytes = Packet_Size</td><td>input.Source_Port    = 0  \\ninput.Destination_Port = 1  \\ninput.Priority       = 0  \\ninput.Packet_Bytes   = 53 \\ninput.Time_Live      =  0.0 \\n\\ninput.Source_Port = irand (2, 15)\\ninput.Destination_Port = input.Source_Port  - 1\\ninput.Packet_Bytes = Packet_Size</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>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>input.Source_Port    = 0  \\ninput.Destination_Port = 1  \\ninput.Priority       = 0  \\ninput.Packet_Bytes   = 53 \\ninput.Time_Live      =  0.0 \\n\\ninput.Source_Port = 1\\ninput.Destination_Port = irand (1, 15)\\ninput.Packet_Bytes = Packet_Size</td><td>input.Source_Port    = 0  \\ninput.Destination_Port = 1  \\ninput.Priority       = 0  \\ninput.Packet_Bytes   = 53 \\ninput.Time_Live      =  0.0 \\n\\ninput.Source_Port = 1\\ninput.Destination_Port = irand (1, 15)\\ninput.Packet_Bytes = Packet_Size</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>input.Source_Port    = 0  \\ninput.Destination_Port = 1  \\ninput.Priority       = 0  \\ninput.Packet_Bytes   = 53 \\ninput.Time_Live      =  0.0 \\n\\ninput.Source_Port = 1\\ninput.Destination_Port = Broadcast_Port_Num\\ninput.Packet_Bytes = Packet_Size</td><td>input.Source_Port    = 0  \\ninput.Destination_Port = 1  \\ninput.Priority       = 0  \\ninput.Packet_Bytes   = 53 \\ninput.Time_Live      =  0.0 \\n\\ninput.Source_Port = 1\\ninput.Destination_Port = Broadcast_Port_Num\\ninput.Packet_Bytes = Packet_Size</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>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;Header&quot;</td><td>&quot;Header&quot;</td></tr><tr><td>Start_Time</td><td>0.002</td><td>0.002</td></tr><tr><td>Value_1</td><td>1.0 / Fixed_packets_per_sec</td><td>0.01</td></tr><tr><td>Value_2</td><td>(1.0 / Variable_packets_per_sec * (Num_of_Ports - 2) ) * 2.0</td><td>0.224</td></tr><tr><td>Random_Seed</td><td>123457L</td><td>123457L</td></tr><tr><td>Time_Distribution</td><td>Uniform (Value_1, Value_2)</td><td>Uniform (Value_1, Value_2)</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.001</td><td>1.0E-3</td></tr><tr><td>Value_1</td><td>1.0 / Fixed_packets_per_sec</td><td>0.01</td></tr><tr><td>Value_2</td><td>(1.0 / Variable_packets_per_sec) * 2.0</td><td>0.016</td></tr><tr><td>Random_Seed</td><td>123457L</td><td>123457L</td></tr><tr><td>Time_Distribution</td><td>Uniform (Value_1, Value_2)</td><td>Uniform (Value_1, Value_2)</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>Value_1</td><td>1.0 / Fixed_packets_per_sec</td><td>0.01</td></tr><tr><td>Value_2</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>Single Event</td><td>Single Event</td></tr></table><h2>TimedPlotter2</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>Delay</td><td>Delay</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>IN_Fld</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>Destination_Name</td><td>&quot;Pop&quot;</td><td>&quot;Pop&quot;</td></tr><tr><td>Select_Field</td><td>&quot;Source_Port&quot;</td><td>&quot;Source_Port&quot;</td></tr><tr><td>Destination_Type</td><td>Local</td><td>Local</td></tr><tr><td>Conversion_Type</td><td>None</td><td>None</td></tr></table><h2>OUT</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>Destination_Name</td><td>&quot;Pop&quot;</td><td>&quot;&quot;Pop&quot;&quot;</td></tr><tr><td>Destination_Type</td><td>Local</td><td>Local</td></tr></table><h2>TimedPlotter</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>Pkts</td><td>Pkts</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>DS_While_K</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>While_Statement</td><td>&quot;INDEX &gt; 0&quot;</td><td>&quot;INDEX &gt; 0&quot;</td></tr><tr><td>True_Execute</td><td>&quot;1, 2&quot;</td><td>&quot;1, 2&quot;</td></tr><tr><td>False_Execute</td><td>&quot;3, 4&quot;</td><td>&quot;3, 4&quot;</td></tr><tr><td>Field_Statement_1</td><td>&quot;Destination_Port = INDEX - 1&quot;</td><td>&quot;&quot;Destination_Port = INDEX - 1&quot;&quot;</td></tr><tr><td>Field_Statement_2</td><td>&quot;INDEX -= 1&quot;</td><td>&quot;&quot;INDEX -= 1&quot;&quot;</td></tr><tr><td>Field_Statement_3</td><td>&quot;Name_X Assign Name_Y OP Name_Z&quot;</td><td>&quot;&quot;Name_X Assign Name_Y OP Name_Z&quot;&quot;</td></tr><tr><td>Field_Statement_4</td><td>&quot;Name_X Assign Name_Y OP Name_Z&quot;</td><td>&quot;&quot;Name_X Assign Name_Y OP Name_Z&quot;&quot;</td></tr><tr><td>Loop_Delay_Value</td><td>0.00005</td><td>5.0E-5</td></tr><tr><td>Max_Loop_Count</td><td>100</td><td>100</td></tr><tr><td>Random_Seed</td><td>123457L</td><td>123457L</td></tr></table>