Function hazardflow_designs::std::valid_ready::attach_payload
source · pub fn attach_payload<P: Copy, EP: Copy, AP: Copy>(
m: impl FnOnce(Vr<P>) -> Vr<EP>
) -> impl FnOnce(Vr<(P, AP)>) -> Vr<(EP, AP)>
Expand description
Attaches an additional payload to the valid-ready circuit m
.
The returned module attach_payload(m)
looks like the following:
(Ingress) (Egress)
+--> AP -----------------------------> AP --+
| +-----+ |
HOption<(P, AP)> --+--> HOption<P> -->| m |--> HOption<EP> --+--> HOption<(EP, AP)>
bool <--------------------| |<--------------------- bool
+-----+
NOTE: Current implementation considered only when m
returns its egress at the same cycle as takes its ingress.