Function hazardflow_designs::std::valid_ready::attach_ready
source · pub fn attach_ready<P1: Copy, R1: Copy, P2: Copy, R2: Copy>(
m: impl FnOnce(I<VrH<P1, R1>, { Dep::Helpful }>) -> I<ValidH<P2, R2>, { Dep::Helpful }>
) -> impl FnOnce(I<VrH<P1, R1>, { Dep::Helpful }>) -> I<VrH<P2, R2>, { Dep::Helpful }>
Expand description
Attaches a ready signal to the module m
’s egress interface.
The returned module’s ingress ready signal is calculated as “m
’s ingress ready signal” AND “attached ready
signal”.
The returned module attach_ready(m)
looks like the following:
(Ingress) (Egress)
+-----+
HOption<P1> --------------------->| |--> HOption<P2>
R1 <---------------------| m |<-- R2
+-----+ | |
| |<-- bool <--| |
bool <--| AND | +-----+
| |<--------------------- bool
+-----+