enormous arbiter

Guest
Hi

I need to code an enormous arbiter, with 16 identical choices. I have
coded it the long way.

case present_state is
when a0 =>
if fred(1)='1' and (condition) then present_state <= a1;
elsif fred(2)='1' and (condition) then present_state <= a2;
...
elsif fred(15)..
...
...
when a15 =>
...
...

all the signals (fred and everything in the (condition))are arrays
so it's crying out for nested loops. The problem is that present_state
then becomes a vector which limits the choices of the synthesis tool.
Any ideas appreciated.

Colin
 
I want to reduce the code size. I need to make a small change to it
which at the moment requires 256 (16*16) if statements to be modified.

Colin
 
On 12 Oct 2005 01:32:41 -0700, colin_toogood@yahoo.com wrote:

I want to reduce the code size. I need to make a small change to it
which at the moment requires 256 (16*16) if statements to be modified.
Make a rotator (barrel shifter) that rotates the request vector
through a number of positions determined by the arbiter state.
Typically this will work better if the arbiter state is simply
the numeric value of the most recently serviced request. For
highly symmetrical state machines like this, your choice of
state vector is likely to be at least as good as the synthesis
tool's - don't be frightened of telling it what you want.

Your arbiter then picks a bit from the rotated vector using
a fixed algorithm (independent of the arbiter state).

Having picked the bit, you need to re-align it to the correct
position by subtracting the rotate count from its position
number, because the request bits have been shifted by the rotator.

If you adopt this approach, it's easy to write the code so that
it can be generalised for any width of arbiter, using generics.

Question: The condition that qualifies each request bit... is it
the same condition in all cases (in which case it could go
outside the big cascaded if/elsif clause)? Or is it different
for each bit (in which case it's just something that you need
to AND with the request vector)?
--
Jonathan Bromley, Consultant

DOULOS - Developing Design Know-how
VHDL, Verilog, SystemC, Perl, Tcl/Tk, Verification, Project Services

Doulos Ltd. Church Hatch, 22 Market Place, Ringwood, BH24 1AW, UK
Tel: +44 (0)1425 471223 mail:jonathan.bromley@doulos.com
Fax: +44 (0)1425 471573 Web: http://www.doulos.com

The contents of this message may contain personal views which
are not the views of Doulos Ltd., unless specifically stated.
 

Welcome to EDABoard.com

Sponsor

Back
Top