// This is a SyReC-file describing a simple arbiter with 8 clients.
// This file has been taken from RevLib (www.revlib.org).  

module arb8( in r0(1), in r1(1), in r2(1), in r3(1), in r4(1), in r5(1), in r6(1), in r7(1), 
             out a0(1), out a1(1), out a2(1), out a3(1), out a4(1), out a5(1), out a6(1), out a7(1) )
  if r0 then
      a0 ^ = 1
  else
      if r1 then
          a1 ^ = 1
      else
          if r2 then
              a2 ^ = 1
          else
              if r3 then
                  a3 ^ = 1
              else
                  if r4 then
                      a4 ^ = 1
                  else
                      if r5 then
                          a5 ^ = 1
                      else
                          if r6 then
                              a6 ^ = 1
                          else
                              if r7 then
                                  a7 ^ = 1
                              else
                                  skip
                              fi r7
                          fi r6
                      fi r5
                  fi r4
              fi r3
          fi r2
      fi r1
  fi r0
