pub trait MergeExt<const N: usize, const ED: Dep>: Interface{
    type EH: Hazard;

    // Required method
    fn cmerge(self) -> I<SelH<Self::EH, N>, ED>;

    // Provided method
    fn merge(self) -> I<Self::EH, ED> { ... }
}
Expand description

Extension trait for merge and cmerge.

Required Associated Types§

source

type EH: Hazard

Hazard specification of egress interface.

Required Methods§

source

fn cmerge(self) -> I<SelH<Self::EH, N>, ED>

Control merge.

Provided Methods§

source

fn merge(self) -> I<Self::EH, ED>

A variation of cmerge that does not output a control signal that indicates which interface is selected. See cmerge for more information.

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl<const N: usize, H: Hazard, const D: Dep> MergeExt<N, { Dep::Demanding }> for [I<AndH<H>, D>; N]

source§

fn cmerge(self) -> I<SelH<AndH<H>, N>, { Dep::Demanding }>

Merges N AndH<H> hazard interfaces with a control signal that outputs which interface is selected.

  • Payloads: Selects the first ingress interface on which a transfer can happen (ip[sel].is_some_and(|p| AndH::<H>::ready(p, er))), and outputs the selected interface’s payload.
  • Resolver: If the index of the selected interface is sel, the ingress ready signals for the interfaces 0..=sel is true, and (sel + 1)..N is false. This is to ensure that a transfer happens only on the interface sel. The inner value H::R of the resolver is duplicated to multiple interfaces.
InterfaceIngressEgress
FwdArray<HOption<H::P>, N>(HOption<H::P>, BoundedU<N>)
BwdArray<Ready<H::R>, N>Ready<H::R>
§

type EH = AndH<H>

source§

impl<const N: usize, P: Copy, R: Copy, const D: Dep> MergeExt<N, D> for [I<ValidH<P, R>, D>; N]

source§

fn cmerge(self) -> I<SelH<ValidH<P, R>, N>, D>

Merges N ValidH hazard interfaces with a control signal that outputs which interface is selected.

  • Payloads: Selects the first ingress interface with a valid payload and outputs that payload.
  • Resolver: Duplicated to multiple interfaces.
InterfaceIngressEgress
FwdArray<HOption<P>, N>(HOption<P>, BoundedU<N>)
BwdArray<R, N>R
§

type EH = ValidH<P, R>

Implementors§