Trait hazardflow_designs::std::hazard::Hazard
source · pub trait Hazard {
type P: Copy;
type R: Copy;
// Required method
fn ready(p: Self::P, r: Self::R) -> bool;
}
Expand description
A hazard protocol with given payload, resolver, and ready function.
A struct represents a hazard protocol when it implements this trait.
Required Associated Types§
Required Methods§
sourcefn ready(p: Self::P, r: Self::R) -> bool
fn ready(p: Self::P, r: Self::R) -> bool
Indicates whether the receiver of the payload is ready to receive the payload.
This ready condition is not automatically enforced by just using a hazard interface. If you want to enforce the
condition, you may use Hazard::ready
directly in the combinational logic. Note that all the std
combinators
already check the condition.
Object Safety§
This trait is not object safe.