help:mutex:protocol
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| help:mutex:protocol [2024/11/15 13:05] – removed - external edit (Unknown date) 127.0.0.1 | help:mutex:protocol [2026/05/26 16:14] (current) – [Arbitration protocols] victor | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| + | ====== Arbitration protocols ====== | ||
| + | |||
| + | This tutorial focuses mostly on the difference between //early// and //late// arbitration protocols and explains why the former is more robust and should be preferred. | ||
| + | |||
| + | Related information: | ||
| + | * [[wp> | ||
| + | * [[a2a/ | ||
| + | |||
| + | ===== Early vs late arbitration protocols ===== | ||
| + | |||
| + | The arbitration protocol can be viewed as a contract between the arbiter and the rest of the circuit. The //early// and //late// arbitration protocols can be formalised as the following STGs: | ||
| + | |||
| + | <WRAP group> | ||
| + | <WRAP half column> | ||
| + | |{{ mutex-early.stg.svg? | ||
| + | | Early arbitration protocol | ||
| + | </ | ||
| + | <WRAP half column> | ||
| + | |{{ mutex-late.stg.svg? | ||
| + | | Late arbitration protocol | ||
| + | </ | ||
| + | </ | ||
| + | |||
| + | The difference is in which transitions return the token back to place '' | ||
| + | |||
| + | One can observe that the early protocol can execute every trace that the late protocol can execute, but not vice versa: E.g. the trace ''< | ||
| + | |||
| + | From the point of view of circuit design, the arbiter is usually implemented using a (pre-designed) MUTEX cell, and one has to design a circuit around it, or more precisely, an STG which is then synthesised in a circuit. In other words, an asynchronous designer does not design a MUTEX cell (it is provided as a basic cell), but designs an STG that has to interface to a MUTEX cell. Hence, the designer can, // | ||
| + | |||
| + | The early protocol is more permissive, i.e. it places strictly fewer requirements on the MUTEX implementation, | ||
| + | |||
| + | Hence, there are two possible ways to design a robust circuit (assuming MUTEX follows at least early protocol in either case): | ||
| + | * make sure that MUTEX follows not just early but also late protocol, and design the circuit using either early or late protocol; | ||
| + | * design the circuit using early protocol. | ||
| + | In the following section, we show that the former option may be problematic in practice, and so the latter option is recommended. | ||
| + | |||
| + | |||
| + | ===== Can MUTEX reliably follow the late protocol? ===== | ||
| + | |||
| + | One can derive the set and reset functions for the early and late protocol, and the set functions are different: | ||
| + | |||
| + | <WRAP group> | ||
| + | <WRAP half column> | ||
| + | |{{ mutex-early.circuit.svg? | ||
| + | | Early MUTEX | | ||
| + | </ | ||
| + | <WRAP half column> | ||
| + | |{{ mutex-late.circuit.svg? | ||
| + | | Late MUTEX | | ||
| + | </ | ||
| + | </ | ||
| + | |||
| + | Of course, one cannot just implement these functions -- one has to contain the metastability due to the choice between the two grants, and so the real MUTEX implementation is usually as follows (sometimes outputs are buffered): | ||
| + | |||
| + | {{ mutex_implementation.svg? | ||
| + | |||
| + | Consider the state of this circuit after the trace ''< | ||
| + | |||
| + | One can rely on the timing assumption that ''< | ||
| + | |||
| + | Hence, to enforce the late protocol, one has to not only design the MUTEX cell carefully, but also impose design rules on its use, e.g. limit the load on its outputs. This means that the permissible loads need to be characterised for all corners and technologies, | ||
| + | |||
| + | Furthermore, | ||
| + | |||
| + | Given all the above consideration, | ||
| + | |||
| + | ===== MUTEX support in Workcraft ===== | ||
| + | |||
| + | The traditional method of factoring out MUTEX into the environment (so the MUTEX grants are inputs to the STG) is considered obsolete in Workcraft flow, for the reasons it does not allow the features described below. Instead, MUTEXes are now treated as part of the circuit and specified in the STG so that their grants are outputs or internal signals. The place representing the choice between the grants should be tagged as a MUTEX place in the Property Editor (verification of output-persistence will fail if you forget to do that, as the grants disable each other; also, if the grants are declared as input signals, an error will be reported during the verification of the MUTEX protocol). The protocol is a property of the MUTEX place, and by default it is early, but can be changed to late by the user (who is then responsible for the outfall; the key is that the default is the safer protocol, and turning on the less safe late protocol is not tacit, the user has to actively do it). The visual representations of early and late MUTEX places is shown in the above STGs -- note that they look differently from each other and from non-MUTEX places. | ||
| + | |||
| + | The verification and synthesis would recognise MUTEX places and treat them specially: | ||
| + | * the choice between grants (which are now internal or output signals) does not cause violation of output-persistence; | ||
| + | * arbitration protocol (of the type corresponding to the type of the MUTEX place) is verified for each MUTEX place; | ||
| + | * synthesis automatically adds MUTEX cells to the netlist (with the equations corresponding to the protocol). | ||
Copyright © 2014-2024 workcraft.org