Queue

Use of the Queue block to model the buffer management, ingress/egress queues, FIFO and SRAM in FPGAs

Smart_Resource_model01

Browsable image of the model.

  • For an executable version,
  • Mouse over the icons to view parameters. Click on hierarchy and plotters to reveal content (if provided).
  • To simulate, click on Launch button, open downloaded file and click Run on the Java Security Page.
Smart_Resource_model01model <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>Resource_List</td><td>{&quot;First_Q&quot;} /* Names of Resources */</td><td>{&quot;First_Q&quot;}</td></tr><tr><td>ResourceLength_List</td><td>{Num_Queues+1} /* Length of all Resources in the Resource_List */</td><td>{6}</td></tr><tr><td>Number_of_Samples</td><td>1 /* Number of output or reset in a simulation run */</td><td>1</td></tr><tr><td>Statistics</td><td>true /* True to generate; False to reset */</td><td>true</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>&nbsp;</td><td>&nbsp;</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>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>&nbsp;</td><td>&nbsp;</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>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 = &quot;Processor&quot;\\ninput.A_Bytes = 120 /* In Bytes */\\ninput.A_Priority = irand ( 1, 5)\\ninput.Queue_Num = irand(1,Num_Queues)</td><td>input.Source = &quot;Processor&quot;\\ninput.A_Bytes = 120 /* In Bytes */\\ninput.A_Priority = irand ( 1, 5)\\ninput.Queue_Num = irand(1,Num_Queues)</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>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;Processor_DS&quot; /* Select existing DS template or create new. Look at Lab 1 for new one */</td><td>&quot;Processor_DS&quot;</td></tr><tr><td>Start_Time</td><td>0.0 /* Delay the first Data Structure */</td><td>0.0</td></tr><tr><td>Value_1</td><td>0.1 /* Mean for Period or Fixed; Exponential and Normal, Minimum for Uniform */</td><td>0.1</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>Fixed (Value_1)</td><td>Fixed (Value_1)</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;Pop_Queue&quot;</td><td>&quot;Pop_Queue&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;First_Q&quot;</td><td>&quot;First_Q&quot;</td></tr></table> <h2>Queue</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;First_Q&quot; /* Unique Name for the entire model */</td><td>&quot;First_Q&quot;</td></tr><tr><td>Queue_Number_Field</td><td>&quot;Queue_Num&quot; /* Using Fixed Value */</td><td>&quot;Queue_Num&quot;</td></tr><tr><td>Priority_Field</td><td>&quot;A_Priority&quot;  /* Field Name as reference */</td><td>&quot;A_Priority&quot;</td></tr><tr><td>Max_Queue_Length</td><td>30 /* Number of Transaction slots in each Queue or FIFO */</td><td>30</td></tr><tr><td>Number_of_Queues</td><td>Num_Queues /* Number of Queues represented by this block */</td><td>5</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>

(a) Defines a Queue, buffer or a FIFO. (b) Removes the head transaction when value is received at Pop. (c) Used when the processing delay is not known in advance. Input/Output: (a) Input: Transactions (b) Pop_Input: Integer (Queue Number) or array {Queue, position} (c) Output: Transactions, (d) reject_output: Transactions.