Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Electronic Equipment > VHDL > Round-robin pri...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 4 Topic 6130 of 6341
Post > Topic >>

Round-robin priority encoder

by Pasacco <pasacco@[EMAIL PROTECTED] > Jul 3, 2008 at 01:56 AM

Dear

I am having problem to implement "circular round-robin" priority
encoder.

My goal is to implement using "generic" number of ****ts.

I tried to use two "for" loops.

Problem was that the index is not always increasing.

It seems that it is not possible to implement using generic.
If anyone has this experience, please let me know.

Manual implementation is below:
--------------------------------------------------------
-- 4-****t circular round-robin
-- priority encoder
-- current : current pointer
-- req : request
-- next : next pointer
--------------------------------------------------------
process(current,req)
begin
case current is
  when 0=>
    if     req(1)='1' then next<=1;
    elsif req(2)='1' then next<=2;
    elsif req(3)='1' then next<=3;
    else                      next<=0;
    end if;
  when 1=>
    if     req(2)='1' then next<=2;
    elsif req(3)='1' then next<=3;
    elsif req(0)='1' then next<=0;
    else                      next<=1;
    end if;
  when 2=>
    elsif req(3)='1' then next<=3;
    elsif req(0)='1' then next<=0;
    elsif req(1)='1' then next<=1;
    else                      next<=2;
    end if;
  when 3=>
    if     req(0)='1' then next<=0;
    elsif req(1)='1' then next<=1;
    elsif req(2)='1' then next<=2;
    else                      next<=3;
    end if;
end case;
end process;
 




 4 Posts in Topic:
Round-robin priority encoder
Pasacco <pasacco@[EMAI  2008-07-03 01:56:44 
Re: Round-robin priority encoder
Jonathan Bromley <jona  2008-07-03 11:41:10 
Re: Round-robin priority encoder
Pasacco <pasacco@[EMAI  2008-07-06 16:35:56 
Re: Round-robin priority encoder
Mike Treseler <mike_tr  2008-07-06 17:58:08 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Mon Oct 13 14:08:57 CDT 2008.