Skip to main content

LtpReq

Enum LtpReq 

Source
#[non_exhaustive]
pub enum LtpReq { None, AllOnes, AllZeros, NyquistClock, DdeCompliance, Lfsr0, Lfsr1, Lfsr2, Lfsr3, FfeChange, RateChange, Reserved(u8), }
Expand description

Link training pattern requested by the sink for one lane: a 4-bit field in Status_Flags_1 (lanes 0–1) or Status_Flags_2 (lanes 2–3).

Values 0x1–0x8 are patterns the PHY drives on that lane; 0x0, 0xE and 0xF are signals to the state machine and never reach the PHY. The values the specification leaves undefined (0x9–0xD) are Reserved, so a request can always be represented and the training layer decides what to do with it: plumbob leaves the lane as it was.

Variants (Non-exhaustive)§

This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
§

None

No pattern requested (0x0): the lane is trained.

§

AllOnes

All ones (0x1).

§

AllZeros

All zeros (0x2).

§

NyquistClock

Nyquist clock pattern (0x3).

§

DdeCompliance

DDE (Data Dependent Equalization) compliance pattern (0x4).

§

Lfsr0

LFSR pattern 0 (0x5).

§

Lfsr1

LFSR pattern 1 (0x6).

§

Lfsr2

LFSR pattern 2 (0x7).

§

Lfsr3

LFSR pattern 3 (0x8).

§

FfeChange

Raise this lane’s TxFFE level (0xE).

§

RateChange

Drop the FRL rate (0xF).

§

Reserved(u8)

A value the specification leaves undefined, 0x9–0xD.

Build requests from a raw value with from_value, which only produces Reserved for 0x9–0xD. A Reserved built by hand with any other value is not a request a sink can send: Reserved(0x5) has the value of Lfsr0 but does not compare equal to it.

Implementations§

Source§

impl LtpReq

Source

pub const fn from_value(value: u8) -> Option<LtpReq>

The request with the 4-bit value, or None above 0xF. Every value has exactly one request: 0x9–0xD are Reserved.

Source

pub const fn value(self) -> u8

The request’s 4-bit value (for a Reserved built by hand, the value it holds).

Source

pub const fn pattern(self) -> Option<LtpPattern>

The pattern this request asks the PHY to drive, or None for the requests that are signals to the state machine (0x0, 0xE and 0xF) and for reserved values.

Trait Implementations§

Source§

impl Clone for LtpReq

Source§

fn clone(&self) -> LtpReq

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for LtpReq

Source§

impl Debug for LtpReq

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl Eq for LtpReq

Source§

impl PartialEq for LtpReq

Source§

fn eq(&self, other: &LtpReq) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for LtpReq

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.