Line coding¶
Line-coding helpers and definitions.
- bakeneko.physical.coding.K(x: int, y: int) int ¶
Returns the 8b/10b encoded value for the given K symbol.
- Return type:
- bakeneko.physical.coding.D(x: int, y: int) int ¶
Returns the 8b/10b encoded value for the given D symbol
- Return type:
- class bakeneko.physical.coding.Symbol(value: int, *, sym_type: Type | None = None, name: str = '', description: str = '') None ¶
A simple encapsulation for PCIe 8b/10b named symbols
- Parameters:
name (str) – The symbol name. (default:
''
)value (int) – The numerical value of the symbol. Normally the result of a call to D or K.
sym_type (Symbol.Type) – The type of symbol this is, either Control or Data. (default:
None
)description (str) – A brief description of this symbol. (default:
''
)
- class Type(value)¶
Named symbol type
- static control(name: str, value: int, description: str = '') Symbol ¶
Construct a named control symbol
- Return type:
- static data(name: str, value: int, description: str = '') Symbol ¶
Construct a named data symbol
- Return type:
- static from_bits(bits: int, *, name: str = '', description: str = '') Symbol | None ¶
Convert a 10-bit code into a Symbol object if possible
- class bakeneko.physical.coding.Symbols(value)¶
List of known PCIe named symbols