Priority MUX - select one of the options based on previous value
What you want is round robin servicing with write priority. For round robin you have to remember what happened before. Your code become something like this: (This is pseudo code for three channels) 

if there_is_a_write then
   case previous_write
      when 0 =&gt; 
         if write1 then 
            select = 1 else
         if write2 then 
            select = 2 else
         select = 0;
      when 1 =&gt; 
         if write2 then 
            select = 2 else
         if write0 then 
            select = 0 else
         select = 1;
      when 2 =&gt; 
         if write0 then 
            select = 0 else
         if write1 then 
            select = 1 else
         select = 2;
   end case
else
if there_is_a_read then
   case previous_read
      when 0 =&gt; 
         if read1 then 
            select = 1 else
         if read2 then 
            select = 2 else
         select = 0;
      when 1 =&gt; 
         if read2 then 
            select = 2 else
         if read0 then 
            select = 0 else
         select = 1;
      when 2 =&gt; 
         if read0 then 
            select = 0 else
         if read1 then 
            select = 1 else
         select = 2;
  end case


You have to add code to remember the previous read and write.

You can make changes like having only a 'previous' without distinguishing between read or writes.