Macro calyx_ir::build_assignments
source · macro_rules! build_assignments { (@base $builder:expr; $dst_node:ident[$dst_port:expr] = ? $src_node:ident[$src_port:expr]) => { ... }; (@base $builder:expr; $dst_node:ident[$dst_port:expr] = $guard:ident ? $src_node:ident[$src_port:expr]) => { ... }; ($builder:expr; $($dst_node:ident[$dst_port:expr] = $($guard:ident)? ? $src_node:ident[$src_port:expr];)*) => { ... }; }
Expand description
Build guarded assignment statements and return a vector containing them.
The macro accepts two forms:
build_assignments!(builder;
group["go"] = ? signal_on["out"]; // no guard
fsm["in"] = guard ? add["out"];
)Note: Guards used in the assignments are cloned.