One such arbiter circuit, taken from McMillan's well-known Ph.D. thesis, is given below:
Figure 1 gives interconnection between cells.In the rest of this note we consider a 5-cell arbiter.
Figure 2 gives the circuit elements of one cell.
SMV code (syncarb5.smv) for this circuit as taken from current SMV distribution.
Modified SMV Code (syn5.smv) for the same circuit which may be easier to to understand (but inefficient to modelcheck)
Verilog code (msyn5.v) for the same circuit translated from the above SMV code.
We consider more complex properties of the arbiter posed as questions below. These can be formalised in CTL[DC].
Following CTLDC formula states that if req(i)
is high for m cycles there must be ack(i) during this interval.
AG
# [] ( [[ req(i) ]] && (slen >=m-1) =>
<> < ack(i) > ) #
(Recall that slen is step length i.e. number of cycles - 1.)
Find the smallest m satisfying the above property:
i.e. find the length of longest subsequence during which req(i) is high
throughout, and ack(i) holds at the end-point but nowhere before that (within
the subsequence).
MAXDCLEN(
[[req(i)]] && ([!ack(i)]^<ack(i)>) )
Question 1(a)
For how many consecutive cycles must the req(i) be held high to ensure that number of cycles with ack(i) is at least 3.
Following CTLDC formula states that if req(i)
is high for m cycles there must be at least 3 ack(i) during this interval.
AG
# [] ( [[ req(i) ]] && (slen >=m-1) =>
(scount ack(i)>=3) ) #
Find the smallest m satisfying the above property:
i.e. find the length of longest subsequence during which req(i) is high
throughout, and ack(i) holds at the end-point and count of ack(i) is three.
MAXDCLEN(
[[req(i)]] && ( (scount ack(i)=3)^<ack(i)>) )
Can there be lost cycles?
How many consecutive cycles can be lost for the
5-cell arbiter in the worst case?
The following CTLDC formula states that number
of consecutive lost cycles is at most m.
AG
# [] ( [[lostcycle]] => slen <= m-1) #
Find the smallest m satisfying the above property:
MAXDCLEN(
[[lostcycle]])
For which pairs of cells does fifo(i,j) hold?
In CTLDC fifo(i,j) can be formulated as
AG
#[] ( (<!req(j)> ^ [[ req(i) && ! ack(i) ]]) => ! <>
<ack(j)> ) #
Components CTLDC of the tool DCVALID
(Version 1.4) allows us to answer these questions for the arbiter design
written in SMV, Verilog (VIS) and ESTEREL notations. See overview
for quick introduction.
The actual specification file used with CTLDC to find the solution
is given here.
Note: The CTLDC quantitative analysis features MINDCLEN(D) and MAXDCLEN(D) are available only for SMV model checking. They are implemented using the quantitative analysis facilities available in SMV and NuSMV.
Specification terms MINDCLEN(D) and MAXDCLEN(D) when model checked against a system model M result in calculation of the lengths of longest/shortest subsequences within executions of M which satisfy D.
For the above synchronous bus arbiter, specification MAXDCLEN( [[lostcycle]] ) gives the maximum number of consecutive lost cycles. Tool CTL[DC] together with NuSMV computes the answer as 5.
Specification MAXDCLEN( (scount ack < 3) && [[req]] ) gives the maximum number of cycles for which request can be continuously high without getting 3 cycles worth of acknowledgements. Tool CTL[DC] together with NuSMV computes the answer as 19.