| 1 |
# In-Element Bit Ordering |
| 2 |
|
| 3 |
The `bitvec` memory model is designed to separate the semantic ordering of bits |
| 4 |
in an abstract memory space from the electrical ordering of latches in real |
| 5 |
memory. This module provides the bridge between the two domains with the |
| 6 |
[`BitOrder`] trait and implementations of it. |
| 7 |
|
| 8 |
The `BitOrder` trait bridges semantic indices (marked by the [`BitIdx`] type) to |
| 9 |
electrical position counters (morked by the [`BitPos`] type) or selection masks |
| 10 |
(marked by the [`BitSel`] and [`BitMask`] types). |
| 11 |
|
| 12 |
Because `BitOrder` is open for client crates to implement, this module also |
| 13 |
provides verification functions for the test suite that ensure a given |
| 14 |
`BitOrder` implementation is correct for all the register types that it will |
| 15 |
govern. See the [`verify_for_type`] or [`verify`] functions for more |
| 16 |
information. |
| 17 |
|
| 18 |
[`BitIdx`]: crate::index::BitIdx |
| 19 |
[`BitMask`]: crate::index::BitMask |
| 20 |
[`BitOrder`]: self::BitOrder |
| 21 |
[`BitPos`]: crate::index::BitPos |
| 22 |
[`BitSel`]: crate::index::BitSel |
| 23 |
[`verify`]: self::verify |
| 24 |
[`verify_for_type`]: self::verify_for_type |