Exploring XON-XOFF Flow Control with Modeling and
Simulation
Below is a browsable image of the model.
For an executable version,
To view or save the MoML file for this model, click here.
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.