Round Robin algorithm details :
Round Robin algorithm Verilog code :
What is Round Robin algorithm ?
Round-robin (RR) is one of the algorithms employed by process and network schedulers in computing.As the term is generally used, time slices (also known as time quanta) are assigned to each process in equal portions and in circular order, handling all processes without priority (also known as cyclic executive). Round-robin scheduling is simple, easy to implement, and starvation-free. Round-robin scheduling can also be applied to other scheduling problems, such as data packet scheduling in computer networks. It is an operating system concept.
In the real situation, we can have a modified version of round robin.
Below feature can be include while designing a arbiter using round robin.
- If there are no requests, which ever device/master send request, access will be given in next clock cycle.
- For some master, priority can be set.
- Programmable delay to get the access if request is present.
Below is the block diagram for round robin algorithm with 4 request and 4 grant.
Counter will be controlled by a state machine.
Verilog Code for Round Robin Algorithm :
Below are the simulation results :
In the same way, request/grant can be increased to n number.
Ref - https://en.wikipedia.org/wiki/Round-robin_scheduling
can u mail me the code?
ReplyDeletemail id-shaikreshma06061998@gmail.com
Dear Sir,
ReplyDeleteFrom lines 56 to 63 in the code, we are driving grnt_o based on the current req_i value.
Again from lines 70 to 96, we are driving grnt_o based on both ring_cnt & req_i which is desirable.
Please explain why do we need the first block of code despite the second block with ring_cnt serving the purpose.
There is timer logic ..
DeleteI simply couldn't leave your web site prior to suggesting
ReplyDeletethat I actually loved the standard information an individual supply in your visitors?
Is gonna be again steadily to invfestigate cross-check new posts
How to change this code into CPP ? Can someone help pls ?
ReplyDelete